Skip to content

The surface records help <command>, which the parser answers before any action - #1047

Merged
Sunrisepeak merged 2 commits into
mainfrom
fix/surface-records-the-help-command
Dec 6, 2026
Merged

Sunrisepeak merged 2 commits into
mainfrom
fix/surface-records-the-help-command

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Dec 6, 2026 •

Copy link
Copy Markdown
Member

main's full gate after 2026.12.6.2 (run 47637770582, "the run's tests, reported") failed on one ledger item, every case having passed:

the full gate fails: ledger surface: command help has no passing case and no waiver

Cause. mcpp help <command> (2026.12.6.1) is answered by mcpplibs.cmdline's parser (HelpOptions::help_command): it returns a ParseError of kind help before any action, so record_invocation, which reads the parsed record, never ran for it. The surface lists command help because the completion tree holds it; e2e cli/usage runs mcpp help and mcpp help build, unrecorded. The pull-request gate runs the cases a change affects and does not check this ledger, so #1044 and #1046 passed it.

Change. record_answered: when the parser answers a help whose first word is help (the rule by which the parser reads it as a command), command help is recorded, with MCPP_SURFACE_RECORD set only. --help stays unrecorded as before (a parser-added flag), and emit surface is unchanged.

Verified. With MCPP_SURFACE_RECORD, mcpp help and mcpp help build record command help; mcpp build --help and --version record nothing. e2e cli/usage passes; GCC and LLVM 23.1.3 builds pass. The full gate itself runs on main only.

A second commit: e2e generated/314 reads the graph its build wrote. The pull-request run failed this case once (no compile edge for the dependency was found at all, tests/e2e/actions/generated.cpp:212); it passed on main's full run and three times locally. The case read build.ninja after mcpp run. A run that does not replay the graph plans again, and the path dependency's units, which the build had just put in the home's cache (mcpp-cache-fills), are then staged (stage_file): that graph has no compile edge of the package to order. Reproduced locally by a dependency source newer than the graph before mcpp run: 2 compile edges before, 0 after, two stage_file edges. The shared home of a run is written by its other programs, which is the run's reason to plan again on CI. The engine is right (a staged unit does not wait for the action that generates a header it was compiled with); the case now reads the graph right after mcpp build. With a forced re-plan before mcpp run the case passes; without one it passes as before.

…ny action: the full gate found command help unexercised
…gain stages the dependency's units from the home's cache
@Sunrisepeak
Sunrisepeak merged commit a2f99fb into main Dec 6, 2026
57 checks passed
@Sunrisepeak
Sunrisepeak deleted the fix/surface-records-the-help-command branch December 6, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant