Repository navigation
Fix gaps from an end-to-end map run; add map mode, source and carried entries - #45
Merged
Merged
Conversation
- One exclusion rule decides what every capture leaves out, and the other-language count, source paths and `map size` use it. Changed files in `.genesis/` or in folders passed to `--exclude` are counted by folder; changed files in other left-out folders stay listed. - `map size` takes `--exclude` and the other options `prepare` uses to choose files, and picks the engine `prepare` picks. - A step that carries an entry anchor takes no range anchors from the lines that lead into the entry, so the code that dispatches to an entry is not pulled into its flow. - A single unconditional assignment in unittest `setUp` or `asyncSetUp` counts like one in `__init__`, so a test reaches the code its set-up object runs. - `summary.md` and `graph.html` print an explanation shared by changes at one place once. - `business-map.json` says whether it is a project map or a review map (`mode`) and records the code it was read from (`source`: revision, worktree_dirty, integrity_status and a digest per file). - A risk may name changed files Genesis did not analyze (`paths`), and accepted risks can be withdrawn by id (`withdrawn_risks`). - A Python change review starts from the entries and flows of the latest map that proposed entries, or of the map passed to `map prepare --entries-from`, so changes land on the flows the map showed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `worktree_dirty` no longer flags a clean checkout whose line endings Git converted, including through the user's own `core.autocrlf`, or a file a filter driver converts while the index vouches for it. Filter drivers never run. - `source.files` holds digests of the files as their commit stores them, read in one `cat-file --batch` call. - The agent engine reports a committed file it did not read as removed. - A business map without `mode` is of unknown kind; the field has no default. - Entries a map gave one flow stay in one flow in the skeleton and the default plan, and a change that removes a carried entry shows its flow as removed. - Changed and new files in dependency, build or cache folders say why they were not analyzed. - A risk on a file a later `prepare` leaves out is named by the `risks_not_shown` limitation and listed by `diff`, not dropped. - The exported JSON Schema requires a risk to name changes or files, and the view pages carry no `source`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Line endings count as converted only where the file's attributes and `core.autocrlf` make Git convert them. - Files Git is told not to check (assume-unchanged, `core.ignoreStat`) are compared by their bytes; the index never vouches for them. - A file restored while it is read is read again. - Untracked files in a dependency, build or cache folder that holds no tracked file no longer crowd the changes out of the list, and changed tracked files come before new files when the list is cut. - A flow that loses carried entries is shown removed once, with the id the map gave it. - The latest map that grouped entries into one flow is carried even when it proposed no entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Replace the in-process copy of Git's line-ending rules with one `git hash-object --stdin-paths` call, filter drivers off. A file counts as unchanged only if a second read finds the same bytes, inode and times. - Untracked files in a dependency, build or cache folder that holds no tracked file are counted by folder (`untracked_by_folder` and the `untracked_files_by_folder` limitation) instead of being dropped. - A removed flow shows an agent-proposed entry as the map had it. - The skill and the usage docs say how moved carried entries and new files in such folders are reported. 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.
Summary
An end-to-end run (map a project, keep the map with a spec, then review a change) turned up gaps in
genesis map. This PR fixes them. It also adds what another tool needs to rely on a map: what kind of map it is, which code it was read from, and a way to start a review from a committed map.Fixes
map sizeall use the same rule. Changed files in.genesis/or in--excludefolders are counted by folder. Changed files in dependency, build or cache folders stay listed, with the reason they were not analyzed.map sizetakes--excludeand the other optionsprepareuses to choose files, and it picks the same engine.setUp/asyncSetUp. A single unconditional assignment there counts like one in__init__, so a test reaches the code its set-up object runs.summary.mdandgraph.htmlprint an explanation shared by several changes at one place only once.Map and review contract
mode(map|change) inbusiness-map.jsonsays whether the file is a project map or a review map. Older files have nomode; read a missing one as unknown.sourcerecords the code the map was read from:revision,worktree_dirty,integrity_status(complete|partial), andfiles, a SHA-256 per file of the bytes asrevisionstores them (git show <revision>:<path>). Every file the map cites must be listed. It is attached atrender.view.htmlandview.share.htmlleave it out.change_ids,paths(changed files listed underunanalyzed_changes), or both. Accepted risks can be withdrawn by id withwithdrawn_risks. A risk whose files a laterprepareleaves out is named by therisks_not_shownlimitation, not dropped.map prepare --entries-from <business-map.json>it starts from a named map instead, such as one committed with a spec, so every clone gets the same flows. A change that removes a carried entry shows the map's flow as removed. The agent engine refuses--entries-from.Worktree comparison
worktree_dirtyand the list of changed files no longer flag a clean checkout whose line endings,identor encoding Git converts. Files whose raw bytes differ from the commit go to onegit hash-object --stdin-pathscall with every filter driver switched off, and the user's owncore.autocrlfis honored. A file counts as unchanged only if a second read finds the same bytes, inode and times.core.ignoreStat) are compared by their bytes.untracked_by_folder, and theuntracked_files_by_folderlimitation), so a virtual environment no longer crowds the change's own files out of the list.Known limits, unchanged
diff-indexdoes not list a changed assume-unchanged file outside the capture, as withgit status.git add.Checks
pytest: 613 passed.ruff check,ruff format --check,check_public_boundary.pyandcheck_packages.pypass, and both wheels build.build_map_fixtures.pyleaves no diff.node --test(65),eslint,tsc -bandvite buildpass, and the built page is byte-identical to the committedassets/viewer/index.html.prepare --entries-from, submit, withdraw a risk, render.🤖 Generated with Claude Code