MessageWeave/scripts/docs_check
anonsaber 42128433ed docs: add the worker bilingual README and name both deployment forms
Root README gains §2 "Two ways to run it": a side-by-side table of
Form A (backend origin only) against Form B (behind the Cloudflare Worker
gateway) — what answers, failover, the callback URL to register, the
reachable route surface, which health endpoint to watch, and the docs to
read. Late in the switch: registration is idempotent and re-adding retires
the previous subscription, so the switch is one SPA field, not a migration;
nothing secret moves to the gateway; /api/bootstrap and /debug/* stay
origin-only either way. Later sections renumbered, and the monitoring
paragraph now points at the gateway aggregate GET /healthz-worker instead
of the origin-passthrough /healthz.

cloudflare-worker/README.md rewritten as the canonical English version and
cloudflare-worker/README.zh-CN.md added as its translation, covering the
route safelist (19 paths with per-path methods), the timeout/retry budget
with per-route overrides, bounded failover, the two health endpoints,
callback registration, config, local verification, deploy, and the design
invariants.

Both fixes along the way:

- README.zh-CN said the startup env block has 2 required + 2 optional
  variables; the table has 3 rows, 2 required + 1 optional.
- docs/charter.md §8 / registry list now names the zh-CN twin next to the
  gateway README.

scripts/docs_check gains the new file in validate_docs, check_tables,
audit_anchors and audit_anchor_semantics so it is checked like every other
document. check_sec_refs resolves §-refs against the document being scanned
when a basename is shared: README.md exists both at the repo root and under
cloudflare-worker/, and the basename-keyed heading map silently dropped one
of them. The gate was passing for the wrong reason before.

GATE-DOCS 6/6 clean: 72 anchors, 454 section refs, 727 path refs.
audit_anchor_semantics still reports the same 7 pre-existing candidates,
none in the new or edited files.
2026-10-01 13:40:39 +08:00
..
audit_anchor_semantics.py docs: add the worker bilingual README and name both deployment forms 2026-10-01 13:40:39 +08:00
audit_anchors.py docs: add the worker bilingual README and name both deployment forms 2026-10-01 13:40:39 +08:00
audit_paths.py docs: 回答 hoststack.yaml 的来历与官方做法,补上命令字段不回写的证据 2026-09-29 12:25:08 +08:00
check_file_size.py fix(mode): restore executable bit on the doc validators 2026-09-29 01:16:43 +08:00
check_sec_refs.py docs: add the worker bilingual README and name both deployment forms 2026-10-01 13:40:39 +08:00
check_tables.py docs: add the worker bilingual README and name both deployment forms 2026-10-01 13:40:39 +08:00
reanchor.py docs: close the TTL gap, re-anchor drifted code refs, add anchor tooling 2026-09-30 13:20:13 +08:00
run_all.sh docs+tooling: no document may name a path that does not exist 2026-09-29 09:28:29 +08:00
show_anchors.py docs: close the TTL gap, re-anchor drifted code refs, add anchor tooling 2026-09-30 13:20:13 +08:00
validate_docs.py docs: add the worker bilingual README and name both deployment forms 2026-10-01 13:40:39 +08:00