Merge note (pull_request_target spec-trace workflow has a startup_failure on every branch since 2026-12-02 22:45Z, so its checks run locally): - Test run 47143803892 succeeded (go test (linux), process-level tests (real binaries)) on head d7e51484 against main fefd83d0, the current main head. - spec-trace-check.sh and public-text-check.sh, run with the main branch's scripts against this head and body: both exit 0. - Code review ACCEPT on 1682bcba: 271 bound classifications, citations and notes and 289 trace bindings compared unchanged; source lines are diagnostic only, while a renamed or moved function still changes its key and needs a classification; the union merge keeps concurrent additions and the checker keeps rows sorted and unique.
3.1 KiB
Model citations for mapped files
The spec-trace workflow reads model-code-trace.tsv and the validator from
the target branch. A PR cannot replace its own mapping or checker.
Each non-comment line has two tab-separated columns: an exact repository
path and Module.Action. Repeat a path to list alternative actions that
cover it. Paths are case-sensitive; directories and glob patterns are not
expanded. Missing, empty or malformed mappings refuse the check.
Source line numbers are not part of this file-wide mapping. Moving a function or test within its file does not change its model obligations or rewrite the table. The time-bound registry separately keys individual bounds by file, function, bound kind and occurrence; CI scans current source locations for diagnostics rather than committing those locations.
Git uses its built-in union merge for this table so concurrent row additions are retained. After a merge, sort and deduplicate the non-comment rows; the checker refuses unsorted or duplicate rows. Review removals explicitly: a union merge does not decide whether an old mapping should be removed.
The reviewed map uses the neutral public module names: SnapshotRemoval,
RestoreTarget, HolderInterface, EngineAdapter, StopAndRestart,
MoveAdmission, Promotion, ProbeRound, FencingRound, VolumeCreate,
ReplicationPeer and RestoreCommand.
Actions name top-level definitions used by the corresponding model's Next.
The mapping is the source of accepted citations; private model names and
storage locations do not belong in the public map or PR description.
For every changed mapped path, including deletions, the PR's Model: line
must contain a listed action or NONE (pure function of Module) for that
module. Separate multiple citations with semicolons, for example:
Model: EngineAdapter.Begin; MoveAdmission.Revoke; NONE (pure function of RestoreTarget)
Unmapped paths keep the existing spec-trace policy. The pure-function declaration is a review claim; CI checks its module, not its truth.
Adding a model or file
- Have the model owner confirm its neutral public module name and the
top-level action definitions used by
Next. Use those names in public code, mapping rows and PR descriptions. - Add an exact-path TSV row for each implementation and enforcement file that the action covers. Split actions get separate rows. Include receiving guards as well as senders; a reviewer checks that each file really enforces the cited action. Environment actions without a Go site and mutant test obligations are not implementation mappings.
- Add controls for accepted and refused citations when extending the
checker. For mapping additions, check the real map against representative
affected paths. Run
python3 -B .github/scripts/model-trace-check-test.pyandbash .github/scripts/spec-trace-check-test.shon Linux. - Submit the map and its evidence for review with the model change or before its callers land. The PR description cites the applicable public actions. The new rows govern later PRs once they are on the target branch; changing a PR's own map never changes the check that evaluates that PR.