Repository navigation
Detect the flat layout in history; refuse it without the legacy capability (issue 2) - #155
Conversation
|
CI, standing down, as the description says. The Once the store moves, the contract-surface gate ( Generated by Claude Code |
a07559d to
11063a9
Compare
…ility Issue #145 (PRD issue 2; rulings 82 and 97; AC-82). Before reading history a verifier looks for the flat paths of revision v1.8 (`.decisions/log`, `.decisions/roles`, `.decisions/sig`) on the first-parent line of the verified commit and, when given, the base (`layout::flat_history`). Run without the legacy capability (`ledger verify --no-legacy-layout`) it refuses such a repository with exit 2, naming the first flat commit, and never reports it conformant. With the capability, which the reference implementation has, the three readers ruling 97 leaves to git follow a tracked file along its lineage, its namespaced path and the flat path of the same kind and name, told apart by path and never a commit by its layout: - `L007`: a flat file the re-layout deleted is judged through the file it became, by entity, with ruling 58's `format:` comparison along the same lineage (`verify::history`); a flat file that went nowhere is a removal as before. Rename detection is off in every landing query, so a move reads as a delete and an add and each path classifies by itself. - `L009`: the pickaxe names both paths, so the introducing commit is the original and never the move (`blame::introducing_author`). - The base overlay: a flat base is read for the re-layout's own pull request; a flat change-set is homed by the namespace its entities name and a flat sidecar by the entity it signs (`revision`). Landing positions read the namespaced paths only, as the session's instruction says; that is sound because no committed store with flat history holds an authority record, confirmed by scanning every first-parent revision of this repository (none, and no deletion in the flat log). Tests (`ledger-cli/tests/legacy_layout.rs`, each failing before the change): a flat store re-laid out in one commit by a non-acceptor verifies conformant with blame on; an entity dropped by the move is `L007` by entity; a flat file removed rather than moved stays `L007`; a `format:` raised past the need across the move is `L007`; without the capability a flat history is refused with exit 2 naming the first flat commit, on the base too; a v1.9 history needs no capability; the overlay reads a flat base. `layout` gains unit tests for the flat classifier, the counterpart and the detection. Protocol: LP-3.35 loses its not-implemented mark; LP-8.30 gains the re-layout exception; LP-8.32 the lineage; Appendix B row; the v1.9 Appendix C note gains its history paragraph. No class added, no digest moves. Stacked on #154 (issue 1). This repository's own store is still flat, so `ledger verify --export` is still refused here; #10's re-layout commit, stacked on this, makes it green. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GgRcHXmnAu43hChNxhnqxU
Files the signed bindings the contract-surface gate demands for the 17 exposed Rust surface changes of this step over 7 files — two new declarations (blame.rs, verify/integrity.rs) with their verdict_knowledge written; the other five amended with bindings only. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GgRcHXmnAu43hChNxhnqxU
11063a9 to
25ab27a
Compare
Closes #145 (PRD §6 issue 2; rulings 82 and 97; AC-82). Step 2 of the namespace layout and authority session, stacked on #154 (issue 1), as the dependency column says.
What lands. Before reading history, a verifier looks for the flat paths of revision v1.8 on the first-parent line of the verified commit and, when given, the base (
layout::flat_history). Run without the legacy capability (ledger verify --no-legacy-layout) it refuses such a repository with exit 2, naming the first flat commit, and never reports it conformant. With the capability, which the reference implementation has, the three readers ruling 97 leaves to git follow each tracked file along its lineage (its namespaced path and the flat path of the same kind and name), told apart by path and never a commit by its layout:L007judges a flat file the re-layout deleted through the file it became, by entity, with ruling 58'sformat:comparison along the same lineage; a flat file that went nowhere stays a removal. Rename detection is off in every landing query so a move reads as a delete and an add.L009's pickaxe names both paths, so the introducing commit is the original, never the move.Landing positions read the namespaced paths only, as the session instruction says. That is sound because no committed store with flat history holds an authority record: every first-parent revision of this repository was scanned (no
grants,key_bindings,policies,grant_acceptances,unavailabilitiesoravailabilitieslist in any flat log file, and no deletion in the flat log).Tests (
ledger-cli/tests/legacy_layout.rs, each failing before the change): a flat store re-laid out in one commit by a non-acceptor verifies conformant with blame on; an entity dropped by the move isL007by entity; a flat file removed rather than moved staysL007; aformat:raised past the need across the move isL007; without the capability a flat history is refused with exit 2 naming the first flat commit, on the base too; a v1.9 history needs no capability; the overlay reads a flat base.layoutgains unit tests for the flat classifier, the counterpart and the detection. AC-82's first bullet over this repository's own history is #10's, which re-lays the store out.Protocol. LP-3.35 loses its not-implemented mark; LP-8.30 gains the re-layout exception; LP-8.32 the lineage; Appendix B row; the v1.9 Appendix C note gains its history paragraph. No class added, no digest moves.
This repository's own store is still flat, so
ledger verify --exportis still refused on this branch (one red step, as on #154); the issue 10 PR, stacked on this one, re-lays the store out and is green.🤖 Generated with Claude Code
https://claude.ai/code/session_01GgRcHXmnAu43hChNxhnqxU
Generated by Claude Code