Repository navigation
D316 — a module's formatter runs at the commit, from the verb it declares - #594
Merged
Merged
Conversation
…ares (#593) Downstream, a red `cargo fmt --check`, inside a module's check, was seen only at attest, after the push and the verifier's round. A module now declares its formatter's check as the optional verb `format`; the skeleton's pre-commit hook nstack-format runs it on the modules whose files are staged, and Module checks runs it after bootstrap, before check, so the one line is judged at the commit and in CI alike. Where nstack, an engine without the verb, or the module's own tool (exit 127) is missing, the hook says so and lets the commit go: CI judges. Chosen after an independent audit of moonrepo, lefthook, lint-staged, trunk, Bazel and Pants. Agent-Session: napkinstack-os-1e Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…engine (#593) The verifier found the oracle's Module checks sequence missing format; a staged path git quotes (café.txt) skipped; the header's claim on untracked files untrue; and three guards untested. The oracle expects format; paths are read unquoted; the header says what pre-commit sets aside; tests cover a folder another's begins with, a formatter reading stdin, a quoted path and an engine older than the verb. The manifest template, INSTALL's commands, 09-platform's check row, the CLI's help and platform/README name format. Agent-Session: napkinstack-os-1e Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The repository's .pre-commit-config.yaml is the skeleton's, as the oracle requires; .nstack/format-before-commit.sh beside fitness-before-push.sh. Agent-Session: napkinstack-os-1e Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…593) Agent-Session: napkinstack-os-1e Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: napkinstack-os-1e Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
napkinstack-admin
approved these changes
Nov 30, 2026
Merged
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Workstream
D316 — a module's formatter ran only in CI or at attest (#593). Reported by the consumer project's coordinator (PR #1390: a red
cargo fmt --checkseen after the push and the verifier's round). Decided after an independent audit (no over-engineering, language-agnostic), for v0.35.5.What it changes
Legend:
formatis the formatter's check alone. It writes nothing and builds nothing, in seconds, and it is optional likebootstrapore2e. The rewriting command belongs in the module'sAGENTS.md.modules.OPTIONALand the CLI gainformat..pre-commit-config.yamlgains thenstack-formathook, and.nstack/format-before-commit.shis new;check-modules.shrunsformatafterbootstrap;09-platform.md§2 gets a verb row and a paragraph;INSTALL.md, the manifest template and the workflow's comment name the verb.What a project receives
.pre-commit-config.yaml,check-modules.sh) and 1 new (format-before-commit.sh), with the handbook pages.format.checkintoformat.Verification
Red first:
test_format_hook.pyfails 8 of 8 on main.Fresh read-only verifier on d6968bb. Blocking, fixed in 711eea3: the oracle's Module checks sequence lacked
format. Also fixed:café.txt) was skipped: it is now read unquoted;formatinsidecheck.The verifier checked under dash (shellcheck clean) and with real pre-commit: a partly staged file, the first commit, contracts/ and platform/, a rename, a deletion.
Then the oracle asked the repository's own config to match the skeleton's (P3), in c3498d6. The hook repositories in
run.shnow hold the scripts the hooks run, in 93ea9e4.Mutants killed:
format;uv run bash platform/tests/run.shat 93ea9e4: Platform tests: OK.Not changed:
checkand addingformatruns it twice in CI, a few seconds;cargoinstalled without rustfmt exits otherwise than 127, so the hook says "not formatted";DoD
🤖 Generated with Claude Code