Repository navigation
Studio map: the system-map tests check a plain folder, not a git repo per case (#818) - #819
Merged
Merged
Conversation
… per case (#818) Most cases write a plain folder and hand its tracked files to check_files; a folder becomes a real repository, index only, where git or the binary reads it, and commits only where a case reads one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
touched.rs's check runs on the folder's tracked list, report has no git fallback nothing used, laws' helper is write_tracked, edges calls run directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #818 (part of #803, fix direction 1, for
studio-system-maponly).Summary
Most
studio-system-mapcases now write a plain temporary folder with nogit.common.rskeeps each folder's tracked files and hands them tosystem_map::check_files. A file that is written but left out of that list is untracked, as before. A folder becomes a real repo only wheregitor the binary reads it.These still use a real repo:
binary.rsandimports.rsdrive the binary on a real repo.scan.rsrunsinitandadd.--commitcase commits once.check()itself:ownership::an_untracked_file_is_never_countedrunssystem_map::checkon a real repo and shows that an untracked file is left out.touched.rskeeps no repo. The ticket expected it to read history, buttouched()places paths by pattern and makes nogitcall (system-map/src/touched.rs:23-25).These assertions changed form; what they claim is unchanged:
assert_unsure_file_listed_and_link_unproven: it used to look for the binary's pass line,1 import (0 proven, 1 unproven). It now checksreport.problemsis empty and thatcounts.linksis(import, proven, unproven) == (1, 0, 1).assert_only_candidate_links_relaxed: it now compares against the report's problems and notes. A test-onlyprinted()rebuilds the binary's note lines fromprint_check(system-map/src/cli.rs:89-97), so a change to that wording would not fail this helper.sites()with no arguments: it serializes theReport, which is whatcheck --jsonprints. With--commitit still runs the binary.imports_json: it stays on the binary, sincesystem_map::importshas no variant that takes a file list.No test was removed or merged.
Evidence
Measured back to back on the same machine, at
origin/main(68cb0c709, 511 tests including #814'sc.rs) against this branch:cargo nextest list -p studio-system-map --test itgitcalls (ticket's shim)/usr/bin/time -prealOn the ticket's base
92c2640a8(496 tests), the counts were 8,242gitcalls before and 667 after.npm run checkpasses.Merge Danger
Door: two-way. The change is test setup only, with no source, stored type or map change.
Blast Radius: tests
If
check()andcheck_files()ever start to differ beyond where the file list comes from, most tests would no longer see it.ownership::an_untracked_file_is_never_counted, the binary tests and the--committests still covercheck()on a real repo.Correctness pass
There were three review passes, and the fixes from the first two are in the second commit:
/code-review):touched.rs:182ransystem_map::checkon a plain folder, and passed only because its subset assertion is loose. It now usescommon::report.reportkept a fallback tocheck()that no test reached. It is gone.laws.rs, the helper namedcommitno longer committed. It is nowwrite_tracked.edges.rs,run_checkonly passed its arguments on. It is inlined.keyhelper had no doc comment.printed().HEAD~1, and paths that canonicalize to/private/var. It also ran the suite. It found no problems.origin/main: Studio map: the C/C++ extractor, c-includes (#806) #814's newc::commit_mode_gives_the_pairs_of_the_working_treefailed, because it reads a commit. It now callscommit(&root).Outside review
skipped: no risk match
🤖 Generated with Claude Code