Repository navigation
Conversation
…report frog records paths in SQLite: a repo's location, each target's working directory, each lock's files. Those are derived state, and this workspace has already moved from /home/xyzzy/src/ragbaz to /srv/ragbaz/src/vendors/ragbaz/head. An absolute path recorded yesterday is a fact about yesterday. paths.py resolves three shapes in order: already-relative paths join to the current root; absolute paths that still exist are used as-is; an absolute path under a previous root is recovered by taking the longest trailing run of components that still exists now. That third case is what lets an existing database heal without a migration. Resolution is conservative -- a recovered path is reported as relocated rather than silently substituted, and nothing outside the repo root is ever returned, so '..' in a stored path cannot escape. version.py answers 'what am I running' honestly. The installed frog is a launcher that puts a live working tree on sys.path, so the executing code may correspond to no commit at all; matches_a_commit is False whenever the tree is dirty, because quoting a bare hex would be a lie of omission. store.py additionally applies discovery exclusions below the explicit root consistently across VFSes, and roots the local backup adapter at / so an absolute CLI destination is treated as a host path rather than a workspace shadow path. 389 passed, 11570 subtests. Ruff clean on the new files (the remaining PLW1510 in version.py matches store.py's existing subprocess.run pattern).
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
frog records paths in SQLite -- a repo's location, each target's working directory, each lock's files. Those are derived state, and this workspace has already moved: from
/home/xyzzy/src/ragbazto/srv/ragbaz/src/vendors/ragbaz/head. An absolute path recorded yesterday is a fact about yesterday.Why this is not a one-time repair
Repairing the rows once is not resistance; the next move repeats the damage. The rule this implements is:
paths.pyresolves three shapes in order:Case 3 is what lets an existing database heal without a migration. A stored
/old/root/BAZ.AI-Governance/src/governance-nodeis, relative to its repo,src/governance-node-- and that suffix re-joins to wherever the repo lives now.Resolution is deliberately conservative: a recovered path is reported as relocated rather than silently substituted, and nothing outside the repo root is ever returned, so
..in a stored path cannot escape.Also in this branch
version.py--frog --versionanswers "what am I running" honestly. The installedfrogis a launcher that puts a live working tree onsys.path, so the executing code may correspond to no commit at all.matches_a_commitis False whenever the tree is dirty, because quoting a bare hex would be a lie of omission.buildstays discoverable, but paths outside the requested root no longer enter a cached result./so an absolute CLI destination is treated as a host path rather than a workspace shadow path.Verification
389 passed, 3 subtests(21 of those are new relocation tests,test_relocation.py)PLW1510inversion.pymatchesstore.py's existingsubprocess.runpattern, so it is left consistent rather than diverging.Note on branches
This is independent of
tui-ragbaz-renderer-adaptation(also pushed, 454 passed), which adapts frog's TUI onto the design tokens. The two touch different files and can merge in either order.