Inspiration

Shopify merchants and ecommerce agencies can obtain inexpensive machine translation, but sending raw storefront HTML through a translation engine can damage links, Liquid placeholders, brand terms, and structure. Managed localization platforms can make ongoing maintenance safer, but their pricing often scales with words, languages, features, or AI credits.

Shopify's native Translate & Adapt workflow can automatically translate a maximum of two languages. Beyond that cap, merchants can translate manually or turn to third-party workflows. In researching HTML-capable localization services, I found that many of the safer, managed options meter ongoing work by words, languages, feature tiers, or AI credits. I wanted a durable alternative: a localization safety and release layer that can be maintained without recurring runtime LLM-token spend.

During OpenAI Build Week, we used Codex and GPT-5.6 to turn those production localization lessons into LocaleGuard: a coherent, runnable localization safety product.

Production grounding — Reboot Hub

Live public reference: English storefront · French storefront

Reboot Hub is my independent Shopify storefront and the real operating context behind this project. I designed, built, and iterated on the entire site myself with Codex, from GPT-5.4 through GPT-5.6 — a one-person, AI-augmented operation.

The underlying multilingual-localization workflow has been used and refined while operating Reboot Hub. LocaleGuard is the new credential-free Build Week product layer created with Codex + GPT-5.6 from those production lessons. Its out-of-the-box judge demo needs no paid API key and records zero runtime LLM calls and zero runtime LLM tokens.

These public pages show the real production context, not a live LocaleGuard integration: the demo does not access, modify, or connect to Reboot Hub.

What it does

LocaleGuard accepts sanitized Shopify-shaped content and lets a pluggable non-LLM engine create translation candidates. It translates safe text nodes while preserving HTML structure and protected attributes, applies brand and field policies, skips unchanged content using source digests, and blocks unsafe candidates before release.

After a candidate passes the release gate, LocaleGuard publishes it to a local judge sandbox and performs independent readback verification. Each run produces an audit receipt with policy version, changed fields, safety checks, and measured runtime telemetry — including zero LLM calls and zero LLM tokens.

How we built it

LocaleGuard is a Python local web application with a reusable core package, translator adapters, deterministic Shopify-shaped fixtures, a versioned fail-closed policy, semantic DOM snapshots, protected-token restoration, an explicit release state machine, atomic field checkpoints, fault injection, sandbox persistence, independent readback, SHA-256-hashed receipts, a FastAPI contract, and a responsive browser interface.

The default judge path requires no account, network service, production credential, or live Shopify write. An optional non-LLM network adapter is strictly opt-in and never owns release authorization.

How we used Codex and GPT-5.6

The majority of core functionality was built in one primary Codex + GPT-5.6 Session using test-driven, reviewable commits. Codex accelerated architecture extraction, modular implementation, adversarial test design, UI construction, browser automation, documentation, and cross-flow review.

That review found a subtle issue: after a safe verified run, checkpoints also skipped deliberate judge faults. Regression tests first reproduced the problem; the final design preserves checkpoints for normal incremental work while forcing fault scenarios to execute. This is how Codex was used as an engineering collaborator, not merely a code-completion tool.

The project owner made the key product decisions: build a credential-free local product rather than a Shopify App for this challenge; avoid a runtime LLM dependency; separate translation candidates from release authorization; use a deterministic local sandbox with Reboot Hub as public production grounding; and state cost boundaries precisely.

Accomplishments

  • A complete source-to-verified-release browser workflow.
  • 49 passing product tests across unit, integration, API, page, CLI, runtime scan, and evaluation paths.
  • 4 of 4 supplied critical candidate mutations blocked.
  • 1 of 1 supplied safe run ready for release.
  • 0 supplied readback mismatches accepted.
  • 0 unchanged title fields retransmitted in the incremental benchmark.
  • A credential-free judge demo with 0 runtime LLM calls and 0 runtime LLM tokens.

These are deterministic supplied-fixture benchmark results, not universal accuracy or savings claims.

Challenges

The hard part was not generating a translated string, but proving that it was safe to release. A regression test exposed a subtle failure mode: after a verified safe run, incremental checkpoints could also skip a deliberate judge fault. We redesigned the workflow so normal unchanged work remains efficient while fault scenarios always execute and can be blocked.

What we learned

Localization needs a verification and release layer, not only a translation engine. Translation candidates and publication authority should remain separate. We also learned to state the zero-token boundary precisely: LocaleGuard’s default judge path uses zero runtime LLM calls and tokens, while external translation sources remain optional and never authorize release.

How judges can test it

  1. Use Python 3.11 or newer.
  2. Create a virtual environment and install the repository with python -m pip install -e ..
  3. Run localeguard demo and open http://127.0.0.1:8000.
  4. Complete the safe rich-product path and inspect the verified receipt.
  5. Inject a protected-URL fault and confirm release is blocked.
  6. Run incremental v1 then v2 and inspect SKIPPED_UNCHANGED.
  7. Run localeguard evaluate --output evaluation.json to reproduce every submitted metric.

No rebuild, test account, Shopify credential, or paid API key is required.

Reboot Hub is public production grounding only. LocaleGuard does not access, modify, or connect to its live Shopify store.

Built With

Share this project:

Updates