Skip to content

fix: reject unreadable manifest path shapes#178

Open
johnson-ricon wants to merge 2 commits into
junior/changed-note-ref-difffrom
johnson/fix-ref-diff-prefix-collisions
Open

fix: reject unreadable manifest path shapes#178
johnson-ricon wants to merge 2 commits into
junior/changed-note-ref-difffrom
johnson/fix-ref-diff-prefix-collisions

Conversation

@johnson-ricon

Copy link
Copy Markdown
Contributor

Finding

The changed-note reducer treats only exact readable-path equality as a manifest collision. A manifest can also map one blob to shared and another to shared/child.md. A full readable-tree materialization cannot represent that ref and fails regardless of row order, but the reduced path can select only the changed child ID, omit the colliding parent ID, and emit a plausible patch.

This fix validates the complete existing-blob mapping for each ref and rejects any readable path that is also another mapped path's directory. Exact duplicate paths remain supported for the alias semantics repaired by #177.

Validation

  • mise run test — 405 BATS tests and 9 Python tests passed
  • mise run test diff — 15/15 passed
  • all eight Codebase lints passed
  • mise run doctor passed; optional local pre-commit hook remains uninstalled
  • bash -n lib/diff.sh .mise/tasks/diff
  • readme build --check
  • git diff --check

Fixes one adversarial review finding on #176.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant