没有不值得去解决的问题,也没有不值得去学习的技术!

Reviewing the First Launch of es-ES: How I Streamlined the Production Workflow for Adding New Languages to A Tour of Go

Reviewing the First Launch of es-ES: How I Streamlined the Production Workflow for Adding New Languages to A Tour of Go

作者:

在

Today I completed the first Production launch of the Spanish es-ES for A Tour of Go.

Looking only at the final result, this launch was not complicated: translation, Quality Check, Final Review, Locale Surface Review, Preview, Production, browser acceptance, and finally officially entering live.

But the truly valuable part actually happened after the launch.

This first Production launch of es-ES exposed several pre-existing issues that had not yet been fully standardized. Since the next language will continue to reuse the same workflow, I did not just settle for “it can go live this time.” Instead, while the real-world context and failure evidence were still available, I consolidated these issues one by one into the official workflow.

In the end, I handled 6 categories of issues:

  1. Fault tolerance for Cloudflare API transient network failures;
  2. The duplication between first-production public machine acceptance and the public Production verifier;
  3. The first Production final closeout still relying on manual file modifications;
  4. The current live locale list being scattered across multiple documents and tests;
  5. Google / Bing sitemap submission not being officially integrated into the new language workflow;
  6. The Locale Surface Review A gate becoming excessively stale due to unrelated Production identity changes.

This article documents the process of deducing workflow standardization from real launch issues.


1. After the es-ES launch, there are now 6 official Production locales

After Spanish went live and completed the final closeout, I first re-checked the official Production identity:

Bash
python3 scripts/production-identity.py list --state live

There are currently:

  • zh-CN
  • ja-JP
  • de-DE
  • fr-FR
  • ko-KR
  • es-ES

6 locales are in the live state.

[Figure 1: The current 6 Production locales are all live]
[Figure 1: The current 6 Production locales are all live]

In the subsequent optimizations, a very important direction was to further clarify:

production/identity.json is the sole machine authority for Production status.

Previously, the README, language descriptions, runbooks, and even some tests still manually enumerated “which Production locales currently exist.”

This didn’t seem like a problem when there were few languages, but adding each language required synchronizing modifications across a bunch of places. Over time, this inevitably leads to drift.

I took this opportunity to resolve it all at once.


2. First real failure: A Cloudflare API timeout should not directly cause a first launch failure

The most directly exposed issue during this first Production was a transient Cloudflare API failure.

During execution, I encountered this error:

Plaintext
[首次生产] FAILED
stage: preflight
expected: command exit 0
actual: curl: (28) Operation timed out after 5000 milliseconds with 0 out of 0 bytes received
[first-production:aliyun] ERROR: Cloudflare zone lookup failed
[Figure 2: Cloudflare zone lookup failed due to a 5-second timeout, causing preflight failure]
[Figure 2: Cloudflare zone lookup failed due to a 5-second timeout, causing preflight failure]

The initial problem here was not a configuration error, nor a non-existent zone, but simply a network request timeout.

If such a transient issue directly causes the entire first Production to fail, then as the number of locales increases, Production automation will actually become increasingly fragile.

So this time I added official bounded retries for the Cloudflare API.

But we cannot simply and crudely do:

Plaintext
失败 → 再 POST 一次

Especially for DNS mutations.

Because if a POST actually reaches Cloudflare, but the client simply doesn’t receive the response, then POSTing again risks duplicate creation.

The final processing logic became a stricter state machine:

Plaintext
查询当前状态
    ↓
已经 exact → 成功,不 POST
不存在 → 允许 POST
冲突 → 直接失败

POST 结果未知
    ↓
重新查询真实状态
    ↓
exact → 视为成功
absent → 才允许下一次 mutation attempt
conflict → fail closed

While also constraining:

  • Maximum of 3 attempts;
  • Retry only on explicit transient curl failures;
  • Use 1-second, 2-second backoffs;
  • Do not retry on non-transient errors;
  • If it ultimately still fails, fail closed.

This is more important than simply adding a curl --retry, because it solves:

How to ensure that a mutation still maintains a deducible state during a network failure.


3. Second issue: first-production was duplicating the Production acceptance process

After handling network stability, I discovered a workflow-level duplication.

The first-production process itself checked many things, for example:

  • public routes;
  • canonical;
  • sitemap;
  • /socket;
  • CDN cache;
  • HTML identity.

But the repository already had an official:

Bash
scripts/verify-production.sh <release-dir>

Which also checks these things.

In other words, during a single first launch, many public network requests were actually executed twice.

This not only wasted time, but also increased:

  • CDN requests;
  • Opportunities for DNS / network transient failures;
  • The risk of the two sets of validator behaviors gradually drifting.

So this time I re-divided the responsibilities.

first-production now only retains:

Plaintext
DNS 完成
→ 最小公网 readiness
→ 正式 hostname 首页 200
→ html lang 正确

After confirming that the public network is ready for acceptance, it only calls once:

Bash
VERIFY_PRODUCTION_NETWORK_SSH=zgocloud \
scripts/verify-production.sh <release-dir>

Then the public verifier is responsible for:

Plaintext
routes
canonical
lang
sitemap 105/105
/socket
CDN cache
remote identity

This way, first Production no longer maintains a second similar machine acceptance implementation.


4. Third issue: All acceptance passed, but the lifecycle still had to be modified manually at the end

The part I felt was most worth optimizing this time was the final step of first Production.

The previous workflow was roughly:

Plaintext
machine PASS
→ browser PASS
→ HUMAN visual PASS
→ 手工修改 Surface Review evidence
→ 手工把 production_state 从 first-production 改成 live
→ 再验证

The last two steps were actually completely mechanical operations.

The only thing that truly cannot be replaced by a machine is:

HUMAN visual gate.

So this time I added an official command:

Bash
go run -mod=readonly ./cmd/tour-i18n first-production finalize \
  --release-dir /tmp/go-tour-release-YYYYMMDD-<locale>-<shortsha> \
  --review-id YYYYMMDD-first-production

The new finalizer will first automatically check:

Plaintext
release.json
→ first-production receipt
→ locale / hostname / release identity
→ public-machine PASS
→ browser PASS
→ Locale Surface Review A gate current

Only after all pass, is the real HUMAN gate displayed.

The maintainer must explicitly type in a real TTY:

Plaintext
VISUAL-PASS

Only then will the program continue.

[Figure 3: Official first-production finalizer and VISUAL-PASS rules]
[Figure 3: Official first-production finalizer and VISUAL-PASS rules]

Here I deliberately retained several strict restrictions:

  • Must be a real TTY;
  • --yes does not exist;
  • No environment variable bypass allowed;
  • No default value;
  • EOF fails directly;
  • Incorrect input fails directly.

In other words, the program can record:

maintainer 已确认 visual gate passed

But it cannot claim on its own:

我已经看过页面,视觉效果正常。

After confirmation, the finalizer mechanically completes:

Plaintext
Surface Review finalization evidence
+
production_state:
first-production → live

And it rolls back on exceptions, preventing the evidence and identity from being only half-successfully modified.

After this step, the final Production closeout for a new language no longer requires Codex to manually modify the lifecycle.


5. Fourth issue: Why do we have to update the “current language list” everywhere for every new live locale?

After the es-ES launch, I also noticed a long-term maintenance issue.

Previously, many places in the repository had things written like:

Plaintext
zh-CN、ja-JP、de-DE、fr-FR、ko-KR、es-ES

Including:

  • README;
  • LANGUAGES.md;
  • Production Runbook;
  • production identity tests;
  • preview browser tests.

Today there are 6 languages.

After the next language goes live, there will be 7.

If we rely on maintainers remembering to update all places every time, these static lists will sooner or later become inconsistent.

So this time I further consolidated the responsibilities:

Plaintext
production/identity.json
        ↓
Production machine authority

Added a read-only query:

Bash
python3 scripts/production-identity.py list

And:

Bash
python3 scripts/production-identity.py list --state live

If tests need “all official Production locales,” they dynamically read the authority instead of hardcoding:

Python
("zh-CN", "ja-JP", "de-DE", "fr-FR", "ko-KR", "es-ES")

The README and runbooks no longer maintain the constantly changing “current complete locale set.”

Meanwhile, LANGUAGES.md still retains the language display registry, because it has other responsibilities:

  • English official entry;
  • autonym;
  • display order;
  • community language entry;
  • CDN architecture description.

In other words:

What was removed was the duplicated lifecycle authority, not crudely shoving all locale information into a single file.

After making the changes, I got a very satisfying result:

When the next locale switches from first-production to live, the number of additional files that need to be modified due to “current-live list synchronization”: 0.


6. Fifth issue: Google Search Console and Bing shouldn’t be an afterthought after launch

After es-ES officially went live, I also manually completed:

  • Google Search Console sitemap submission;
  • Bing Webmaster Tools sitemap submission.

This action itself is not complicated.

The real problem is:

It previously did not officially appear in the standard lifecycle for adding a new locale.

This way, the next time a new language is added, it’s easy to run into:

Plaintext
Production 都完成了
→ 过一会儿才想起来
→ 好像还没提交 sitemap

So the official sequence for adding a new locale now includes one more step:

Plaintext
production acceptance
→ visual HUMAN gate
→ first-production finalize
→ production_state=live
→ search-engine submission closeout

All new Production locales:

  • Google Search Console;
  • Bing Webmaster Tools;

Are all part of the standard closeout.

However, here it is explicitly stated that search engine status is not upgraded to a Production gate.

That is to say:

Plaintext
没有被 Google 收录
≠ Production 未完成

Nor will we wait for Search Console indexing / coverage to turn green before marking the site as live.

Additionally, like what the Korean site uses:

Plaintext
Naver Search Advisor

Is still just a locale / market-specific search engine.

Just because ko-KR requires Naver, we won’t require Spanish, French, and German to also all submit to Naver.


7. Sixth issue: Why does one locale going live make the language review gate stale for other locales?

This was the last, rather subtle issue handled this time.

The Locale Surface Review A gate performs a SHA-256 on inputs that affect language quality and page identity.

The original design also included:

Plaintext
整个 production/identity.json

The problem is:

Assume es-ES changes from:

Plaintext
first-production

To:

Plaintext
live

The SHA of the entire production/identity.json changes.

As a result, the Surface Review A gate that was just completed immediately becomes stale.

Even completely unrelated:

  • Another language changing its port;
  • systemd service adjustments;
  • CDN configuration changes;
  • data root modifications;

Could also cause the target locale’s language quality review to become invalid.

This clearly exceeds the scope of what a language review should actually be responsible for.

So now the A gate is upgraded to schema v2.

v2 only binds the target locale’s public identity:

Plaintext
locale
production_hostname
production_public_url

And no longer binds:

Plaintext
production_state
port
service
data root
release/current/lock
TLS/vhost
CDN/cache
其他 locale profile

This way:

Plaintext
first-production → live

No longer needlessly makes the language quality gate stale.

But if content that truly affects the public page identity changes, for example:

Plaintext
hostname
public URL
languages.go
UI
glossary
SEO metadata
course metadata

The A gate will still go stale.

At the same time, the historical schema v1 will not be secretly reinterpreted.

Old v1 receipts are still verified according to the original rule of SHA-ing the entire production/identity.json.

This eliminates the excessive invalidation in the new workflow without tampering with the semantics of the historical review evidence.


8. This was not just a fix, but the consolidation of an entire workflow

Looking back at the Git log after completion, the changes this time were actually very concentrated:

[Figure 4: Continuous workflow optimization commits completed after the es-ES first Production closeout]
[Figure 4: Continuous workflow optimization commits completed after the es-ES first Production closeout]

As seen in the screenshot:

Plaintext
790d379 refactor: 收敛 Surface Review A 身份范围
f2404d9 docs: 补充新增语言搜索引擎收口
b5f39fc refactor: 收敛 production locale 状态来源
2cf39e9 feat: 自动化首次生产最终收口
5965f3e refactor: 去重首次生产公网验收
f7685e8 fix: 完善首次生产 Cloudflare API 容错
c9a8880 chore: 完成 es-ES 首次生产收口
d364c96 fix: 提升首次生产公网验收稳定性

This is also a project maintenance style I increasingly prefer now:

Not redesigning the workflow every time a new language is added, but rather:

Plaintext
复用正式流程
→ 遇到真实 failure
→ 保留 evidence
→ 修正通用流程
→ 后面的 locale 直接继承

This way, as more languages go live, the next language should theoretically become increasingly lightweight, not increasingly complex.


9. The final Production acceptance can now run through completely

Before optimization, this es-ES actual Production had already completed the full machine and browser acceptance at the end:

Plaintext
release identity: PASS
remote identity: PASS
source routes: 7/7 PASS
public routes: 7/7 PASS
html identity: PASS
sitemap: 105/105 PASS
socket boundary: PASS
CDN: PASS

PRODUCTION MACHINE ACCEPTANCE: PASS

Subsequently:

Plaintext
desktop routes: PASS
mobile: PASS
Run / Format / Reset / SPA / ads: PASS

PRODUCTION BROWSER ACCEPTANCE: PASS

Finally entering:

Plaintext
READY FOR HUMAN VISUAL GATE
[Figure 5: es-ES official Production machine/browser acceptance all PASS]
[Figure 5: es-ES official Production machine/browser acceptance all PASS]

The screenshot also shows an SSH warning about post-quantum key exchange.

It was not a failure item for this Production acceptance, so I did not mix it into the locale launch workflow this time.

This is also a point I rather insist on now:

Real issues belong to real issues; just because they happen to appear simultaneously in the logs doesn’t mean we should shove everything into the same fix.


10. After all modifications are complete, run a combined regression again

After the 6 issues were resolved, I finally re-ran the entire set of relevant tests:

Bash
go test -mod=readonly -count=1 ./...

python3 scripts/production-identity.py validate
python3 scripts/production-identity-test.py
python3 scripts/first-production-test.py
python3 scripts/verify-preview-browser-test.py

bash -n \
  scripts/verify-production.sh \
  scripts/verify-production-test.sh

bash scripts/verify-production-test.sh

git diff --check
git status --short

Ultimately:

Plaintext
Go tests: PASS
production identity: PASS
first-production tests: 26/26 OK
preview browser tests: 23/23 OK
verify-production-test: PASS
git diff --check: clean
working tree: clean

During this time, the test output will show things like:

Plaintext
production identity error: unknown production locale: it-IT

Or:

Plaintext
public URL must be an HTTPS origin ending in /

These are negative cases deliberately constructed by the tests.

The final test suite was OK, indicating that the fail-closed branch also works normally and is not a regression failure.


11. Next step: A direction I want to verify is expanding the Translation batch to 60 Pages

The issues identified in the workflow this time have all been closed out.

However, there is one efficiency experiment I have not yet written into the official spec.

Official translations now use:

Plaintext
Codex GPT-5.6 Sol High

During translation, Codex reads at once:

Plaintext
manifest.json
+ 全部 inputs/*
+ locale glossary

Then writes the raw responses for the entire batch.

Looking at the actual consumption of the last few languages, the model itself incurs a fixed context reading and inference cost every time it starts a batch.

So I plan to try the following for the next language:

Plaintext
60 Pages
+
剩余 Pages
+
Examples 独立 batch

Instead of keeping smaller Page batches.

But for now, I have not written “60 Pages” into the official runbook.

The reason is simple:

This is an optimization hypothesis, not yet a verified production baseline.

The next language will actually observe:

  • Codex execution time;
  • Weekly quota consumption;
  • automatic validation failure;
  • Quality Check A/B/C/D;
  • Number of revisions.

If processing 60 complete TranslationUnits at once can indeed significantly save quota without a drop in quality, then I will consider upgrading it to the recommended production configuration.

Until then, it is just the next round of controlled experiments.


Summary

Ultimately, what I gained from this Spanish launch was not just:

Another es-ES site.

More importantly, the real Production again helped me find a few issues that are easy to discover only when actually running through the entire workflow.

After this handling, the latter half of the new locale workflow has become:

Plaintext
Production deploy
→ 最小公网 readiness
→ 公共 production verifier
→ browser acceptance
→ HUMAN visual gate
→ first-production finalizer
→ production_state=live
→ Google / Bing submission closeout

And:

  • Cloudflare transient failure has official fault tolerance;
  • DNS mutation will not blindly duplicate POSTs;
  • Public network acceptance no longer runs two sets;
  • HUMAN gate still must be confirmed by a human;
  • Mechanical modifications to the lifecycle have been automated;
  • production/identity.json becomes the sole Production machine authority;
  • Adding a new live locale no longer requires synchronizing multiple static lists;
  • Surface Review A no longer fails due to unrelated infrastructure mutations;
  • Search Console / Bing also officially enters the standard post-launch closeout.

This is also an increasingly obvious change in this project recently:

At the beginning, it was about “translating a language.”

Now it’s more like building a production line that can be repeatedly run long-term for:

Multilingual translation, review, launch, acceptance, and maintenance.

And as the number of official locales grows, what I truly hope to see is not the workflow becoming increasingly complex.

Quite the opposite:

Each new language exposes an issue once, which gets fixed in the general workflow; the next language then avoids that pitfall.

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系