Repository navigation
Conversation
Move every file under formal/ by kind so the top level is one README and six directories: guides/, models/ (with kernel/ and fixtures/ beneath it), replay/, tools/, catalogs/ and generated/. The Quint tree moves down one level as a unit, so no import changes; 15 kernel comments that name the kernel directory are the only Quint edits. The two one-line shell wrappers are deleted. The move is performed by formal/tools/migrate-layout.mjs, committed here and removed at the end of the series: it rewrites every relative Markdown link and every literal formal/<name> path by kind, so synthetic test paths follow the layout and the rewrite is idempotent. Assembled paths, escaped regex literals and interpolations follow in later commits (the hand-edit list in #221). Part of #221.
The paths a substring rewrite cannot see: the scheduler's source predicate, scan directories and path-shape checks now name formal/models/, formal/tools/ and formal/generated/; the fixture generator's artifact check and the guide scan (formal/guides/*.md plus the two READMEs that keep their paths) follow; twenty tools compute the repository root two levels up; thirteen imports of replay/ gain a level; the witness-evidence producer scans formal/models/ and formal/models/kernel/ and interpolates the model path there; the fixture-scope script reads the lock from generated/ and matches catalogs under catalogs/; .gitattributes marks generated/ as generated. The differential reads its reference revision through the layout that revision's own listing shows (execution.mjs layouts), so a comparison against pre-move main still exports every Quint source. That reader is transitional and goes once the merge base with main carries the current layout. Part of #221.
formal/README.md gains a directory table directly after the task table, and each directory an index of one line per file with what to read first and the command that regenerates or refreshes it: guides by the ledger's review kinds, models by kind, tools by verb with their make targets, catalogs by purpose, check and refresh command, generated with its generator and freshness check, replay by role. AGENTS.md shows the same tree. scripts/check-docs.mjs gains a relative-link pass over formal/**/*.md and the repository READMEs that point into formal/, run with the docs sources check under make check; the site check walks only built pages and skipped these. It found four parent-relative links in typescript/README.md, fixed here. VALIDATION.md says how to replay an exploration saved before the move; PROTOCOL.md names make fixtures-check in place of the deleted wrapper. Part of #221.
…ayout node formal/tools/generate-artifacts.mjs --write: the seventeen smoke traces and nineteen witness fixtures are byte-identical to the path-rewritten files, the four vector files change only in the generator's own source digest, and the lock records the new input and artifact hashes. The source audit is re-keyed for the moved guides and the new guides index; feature-coverage and go-parity pins follow the files the move touched. Part of #221.
Two rules were wrong in the first pass. The path boundary excluded a following dot, so a path at the end of a sentence (formal/SPEC.md.) was skipped; it now excludes only a dot followed by a word character, so profiles.jsonl still does not match. The bare directory rules matched the ports' own test modules under directories named formal/ (rust/tests/formal/fixtures.rs became formal/models/fixtures.rs); they now exclude a following dot. The three sentence-final paths the first pass missed are fixed in this series, and the Rust false positives were reverted by hand. Lines marked layout-legacy are never rewritten: the differential's reader of pre-move revisions names the old paths on purpose. A dry run on the migrated tree now reports no moves and no edits. Part of #221.
…nesses Paths the ports assemble from pieces: smoke traces under formal/generated/ (Go feature and settlement replays, Rust inventory and settlement control), model paths under formal/models/ (Go behavior registry and witness evidence, Rust inventory and witness, Python witness), the library folders the three witness scanners mirror from the producer (formal/models and formal/models/kernel), the fixed corpora under formal/catalogs/ beside the generated vectors under formal/generated/ (Python vector and integration tests), and the fake checkout the Python acceptance test builds, which now places the runner under formal/tools/. Two Python runner tools computed the repository root one level up and now compute it two. rustfmt re-wraps the lines the longer paths pushed past the limit. go vet and go test pass; cargo fmt --check and cargo test pass (1738 conformance cases); pytest passes 2229 with 342 skips for the absent Redis. Part of #221.
…e docs check Interpolated paths (smoke traces under formal/generated/, catalogs under formal/catalogs/, synthetic manifest models under formal/models/), sixteen escaped regex expectations in the execution tests and the others that name a catalog, tool or guide, and the fake repository trees that create only the old parent directory. The source-audit test adds the top-level README the guide scan now includes. The witness registry reader's default location follows the catalogs, the one relative default the move left behind. scripts/check-docs.test.mjs gains a test for the relative-link pass: a good tree passes, a missing guide target and a root README link into the old location fail by name, and code spans and absolute URLs are ignored. Part of #221.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #223 +/- ##
=======================================
Coverage 93.73% 93.73%
=======================================
Files 78 78
Lines 11357 11357
Branches 656 656
=======================================
+ Hits 10645 10646 +1
+ Misses 642 641 -1
Partials 70 70
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Reviewed at Before merge
Two accuracy notes for the description: the dry run on the merged tree is not zero edits. It reports 11 literal edits, all in Verified
Ran locally on a checkout of the branch: the migration script dry run, the formal link pass, the two node test files and the manifest validator. Did not run |
Review fixes for #223. The TypeScript README's four repository links become absolute GitHub URLs: npm renders relative README links against the repository URL and typescript/package.json declares no directory, so the parent-relative form resolved above the repository root there while the old form was broken on GitHub; the same table already uses absolute links for the docs site. The tools index said the audit lane runs the first five checks (it runs execution.mjs and the first four) and that generators write only under generated/ (the witness fixtures live under typescript/test/fixtures/). TEST-AUDIT.md describes the guide scan as it is now: formal/guides/*.md plus the two READMEs that kept their paths. The ledgers are re-keyed for the two reviewed files.
|
Thanks, all four points taken in 6bea358, and the gate is running.
Both accuracy notes are in the description now: the dry run on the merged tree reports 11 literal edits, all of them pre-move paths that The commit message of 1caf7f2 still says the dry run reported no edits; that was true at 4c4b97d, before the docs test gained its fixtures, and the PR description carries the correction. — Claude |
Closes #221. Phase 1 of #220.
What this does
Groups
formal/by role so the top level is one README and six directories, each with an index. Nothing about the models, the driver contract, the catalogs' content or the checks changes; the Quint tree moves down one level as a unit, so no import changes.How to review it
The move is one script,
formal/tools/migrate-layout.mjs, committed in the first commit (96eb885) and removed in the last. Review the mapping in that file rather than the 3,500 rewritten paths: it maps everyformal/<name>string by kind (directory, smoke-trace and vector name shapes, then extension), so synthetic test paths follow the layout and the rewrite is idempotent. A dry run on the merged tree reports zero moves and 11 literal edits, all inscripts/check-docs.test.mjs, whose fixtures use pre-move paths on purpose (one of them is the deliberately brokenformal/SPEC.mdlink that asserts a failure); the script is gone, so nothing acts on them.Everything the script could not see is in the hand-edit commits, following the list in #221:
replay/imports; the witness-evidence producer; fixture-scope's lock path and catalog pattern;.gitattributesscripts/check-docs.mjs, four pre-existing broken links intypescript/README.md, the snapshot-replay sentence in VALIDATION.md, AGENTS.mdformal/test modules) and thelayout-legacymarkerCompatibility. The differential reads its reference revision through the layout that revision's own listing shows (
layoutsinexecution.mjs): manifests, source discovery and kernel recognition together. That reader is transitional and goes once the merge base withmaincarries the new layout. Saved exploration runs from before the move are replayed from a checkout of their recorded base revision; VALIDATION.md says so.Artifact and ledger changes
#221 step 1 had the refresh-commands PR from #220 landing first; it did not, so the ledgers were re-keyed with a session script built on the exported snapshot functions, and that PR (E1) becomes the first item of #220 Phase 2.
node formal/tools/generate-artifacts.mjs --writeregenerated everything: the 17 smoke traces and 19 witness fixtures came back byte-identical to the path-rewritten files, so their histories and states are unchanged by construction; the four vector files change only in the generator's own source digest (one line each); the lock records the new input and artifact hashes. The source audit is re-keyed for the moved guides and gains the guides index; feature-coverage and go-parity pins follow the files the move touched.Verification
make auditlane: manifest, source audit, semantic coverage, feature coverage, go-parity: green. Fixture verify: 36 artifacts, 197 histories.--check: matches 17 profiles. Kernel fixtures: 16 fixtures, 194 runs pass.go vetandgo test ./...pass. Rust:cargo fmt --check,cargo clippy -D warningsandcargo test --all-featurespass (1,738 conformance cases). Python: 2,229 passed, 342 skipped for the absent Redis.main(d470b2f) through the layout-aware reader: all 16 composed profiles agree on every history in both directions, 5,985 reference histories forward and 5,985 candidate histories reverse (5,380 sampled plus 605 exported regressions each way), bytes per state x1.000 for every profile, generation wall within x0.97 to x1.02.make check-tsrun on a saturated machine (load 26 to 34 alongside the differential) 20 tests hit their 5 s timeouts, all of them tests that spawn fake tool processes for the prerequisite probes or the receipt replays, and every one of those files passes when run on its own. The slowest of them, the Rust prerequisite probe, takes 6.0 s on pre-movemainand 5.3 s on this branch on the same machine back to back, so the sensitivity is inherited, not introduced. Smoke:make smokegreen in all four ports (1,821 TypeScript replay assertions, then Go, Rust and Python).explorationenabled before merge, as Formal: group formal/ by role so the top level is one README (phase 1 of #220) #221 asks.Not in this PR
Splitting
models/by kind ortools/by verb (the indexes carry the grouping), permanent old-layout compatibility, and everything in #220 Phase 2 and 3. #219 is open and touches 54 files underformal/; the script can be re-run on that branch from the first commit (git show 96eb885:formal/tools/migrate-layout.mjs) with rows added for its new files.🤖 Generated with Claude Code