Bring the docs landing page back in line with CLI.html - #19
Conversation
docs/index.html is hand-kept: gendocs.carp sets "docs-generate-index" to false, so save-docs never writes it. It has been a byte-identical copy of docs/CLI.html since it was added in d16f09e, and it fell three commits behind, last touched at 3736d35 (0.3.0) while CLI.html moved twice after. Three prose paragraphs, all sourced from cli.carp doc strings, had regressed: - completion still claimed only bash and zsh were supported; fish landed in 8e241dd - the option-parsing paragraph was missing the rule that a lone - is an operand - the whole --name=value / -n=value / --define=x=1 paragraph was absent The latter two came from 5e3d11e. Ran carp -x gendocs.carp first to confirm docs/CLI.html was itself current: all eight generated module pages were rewritten byte-identical and index.html was left untouched, which verifies both that the copy source is up to date and that index.html really is outside gendocs' reach.
There was a problem hiding this comment.
Build & Tests
No source changed, so there is no suite to move: docs/index.html only. carp -x gendocs.carp exits 0 and leaves git status --porcelain empty. CI is green at 11e452b3 on both runners. Merge-base equals origin/master, single commit.
Findings
None in the shipped change. I re-derived the premise rather than taking it:
Both halves check out, from mtimes rather than inference. After carp -x gendocs.carp, docs/CLI.html's mtime moves and docs/index.html's does not — so CLI.html really was rewritten (byte-identical, hence the empty git status) and index.html really does sit outside save-docs' reach. diff docs/index.html docs/CLI.html is now empty, restoring the invariant.
The copied prose is true, not merely consistent with the doc strings. Matching HTML against cli.carp:1287, :600 and :603 only proves the copy is faithful; the risk in a docs-sync PR is faithfully propagating a false claim. So I built a parser and ran the three documented behaviours:
define=x=1 -> define is x=1 ; split at the first =
-d=y=2 -> define is y=2 ; short form too
lone - -> file is - ; positional, not an unknown option
fish -> 217 bytes, starts: "# fish completion for probe"
All three hold, and CLI.Completion.fish exists and emits a real script. The landing page was indeed telling readers that two shipped behaviours do not exist.
One inaccuracy, in the PR body rather than the file: it says the page "drifted three commits behind", then says in the same sentence that CLI.html "has moved twice since" — two is right. git log -- docs/index.html ends at 3736d35, and CLI.html has taken exactly 8e241dd and 5e3d11e since. The table beneath it is correct, and nothing about the change depends on the count.
Verdict: merge
Small, verified, and it restores an invariant that has held at every commit which has ever touched the landing page.
docs/index.htmlis the hand-kept landing page for carpentry.dev/cli.gendocs.carpsets(Project.config "docs-generate-index" false), sosave-docsnever writes it, and it has drifted three commits behind:git log --oneline -- docs/index.htmlends at 3736d35 (0.3.0) whiledocs/CLI.htmlhas moved twice since.Three prose paragraphs had regressed as a result, all of them text that lives in
cli.carpdoc strings and is correct there:bashandzshare supported"bash,zshandfish" — fish landed in 8e241dd--(conventionally stdin) is a positional, not an unknown option--name=value/-n=value, split at the first=, so--define=x=1setsdefinetox=1The last two came from 5e3d11e. Both behaviours shipped in 0.4.0, so the front door of the published docs was telling readers that fish completion and
--define=x=1do not exist.What this changes
docs/index.htmlonly — 6 insertions, 3 deletions, exactly the three paragraphs above. No source, no restructuring, no changelog (the repo doesn't keep one).Verification
Ran
carp -x gendocs.carpbefore copying, so the copy source was known-current rather than assumed:CLI.htmland friends) were rewritten byte-identical to what was committed —git status --porcelaincame back empty, with mtimes confirming they really were rewritten. Sodocs/CLI.htmlwas already up to date with the source doc strings; regenerating moved nothing.docs/index.htmlwas left untouched by that run (mtime unchanged), which confirms the premise that it sits outsidesave-docs' reach.On the "preserve whatever genuinely differs about a landing page" point: there is nothing to preserve.
index.htmlhas been a byte-for-byte copy ofCLI.htmlat every commit that touched it —diffis empty at d16f09e, 2f36046 and 3736d35 — and the pre-fix diff was 13 lines covering only the three prose hunks, with no self-link or structural difference. Both files sit in the same directory, so the relative nav links resolve identically.diff docs/index.html docs/CLI.htmlis now empty again, restoring that invariant.CI is unaffected: it lints and tests
.carpfiles withdocs/excluded, and this touches one generated.htmlfile.Same class of drift as http #37, which merged.
Opened by the carpentry-org heartbeat agent (Claude). Veit has not reviewed this yet.