Documentation
¶
Overview ¶
upstreamdoc-gen renders how choudoufu differs from upstream OpenTofu (#2256) into two files:
- the "base" span of the site page site/src/content/docs/how-it-works/upstream.md: the upstream OpenTofu commit choudoufu is built on, from the committed live/fork-surface.json, which scripts/upstream-sync.sh --finish regenerates on every sync;
- live/NEW-RUNTIME.md, whole: the same base and the new runtime's gap tables, from internal/live/newruntime/gaps.json through that package's own parser, so the file shows exactly the rows the refusal checks read, and the fork ports registered in internal/engine/forkport with their switches and expiry issues. The tables live in the repository, not on the site, because the site is held to a word limit (live/site_size_test.go).
Like tools/toggles-gen it reads only committed sources: no git, no network. The page's span uses internal/live/mdspan's markers, so the hand-written prose around it passes through byte for byte. render_test.go fails when either committed file differs from what this tool would write.
Usage, from anywhere in the checkout:
go run ./tools/upstreamdoc-gen