Repository navigation
Refuse an entity outside its directory's namespace, including revocation targets (issue 3) - #157
Conversation
|
CI, standing down on one step. The The remedy the gate names is Generated by Claude Code |
92b8e57 to
efc4bc5
Compare
61bd97e to
74fb858
Compare
Issue #147 (PRD issue 4, §3.7; rulings 43 and 75; AC-43). Only `based_on` crosses a namespace. The new `verify::crossing` stage makes a decision's latest version whose `supersedes` names a decision of another namespace a `SCHEMA` fault naming the decision, the edge and the other namespace. Earlier versions are history and are not judged, so a next version that drops the edge repairs the store — the same withdrawal LP-8.21 records for a losing claimant. The writer refuses the verb by the gate it runs over the store as it would be; `G001` keeps the dangling target, whichever namespace it names. No class is added. Tests (each failing before the change): `crossing_tests` over in-memory stores (a latest version superseding another namespace is named with both ids; a next version dropping the edge repairs it while history keeps the claim; a supersession within the namespace is not a crossing), and `ledger-cli/tests/crossing.rs` over a two-namespace store: `supersede` across namespaces is refused in both directions and writes nothing; a crossing filed by hand past the verb fails the gate, and a hand-filed next version without the edge makes the store conformant again; a supersession at home still stands. Protocol: LP-3.31 loses its not-implemented mark and its note; LP-8.8 gains the clause; Appendix B row. No Appendix C note (the issue row says none). No digest moves; no such edge in this repository or the fixtures. Stacked on #157 (issue 3). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GgRcHXmnAu43hChNxhnqxU
…s included Issue #146 (PRD issue 3, §3.7; ruling 45; AC-45). A file's namespace is its directory (LP-3.34), so every entity under `ns/<ns>/` belongs to `<ns>`. `verify::belonging` makes each one that does not a `SCHEMA` fault naming the entity: a decision id of another namespace, a version or an acceptance of such a decision, a binding or a policy whose `namespace` is another, a revocation of an acceptance or a grant filed under another directory, a grant acceptance or an interval naming a grant filed elsewhere, an availability ending an interval filed elsewhere, and a sidecar under a namespace other than its entity's. A record whose target is not filed is already a fault and is left to that finding; a candidate the writer could home nowhere is judged by the finding that says why, not here. No class is added. Tests (each failing before the change): `belonging_tests` over in-memory stores (a decision, its version and its acceptance of another namespace each named; a binding, a policy and a revocation target of another namespace named; an unhomed candidate left alone), and `ledger-cli/tests/belonging.rs` over stores the verbs built and a hand misfiled: a decision of B under A, an acceptance of B under A, a revocation under A of B's acceptance (and the same revocation under B in its place), and B's opening change-set under A, its policy and binding named. One unit-test store had homed a `fixture.ledger` policy under a `hafeok.ledger` file; its policy now names the file's namespace. Protocol: LP-3.33 loses its not-implemented mark and its note; LP-8.8 gains the clause; Appendix B row; Appendix C note "An entity outside its namespace's directory is refused". No digest moves; no committed file in this repository is mixed (0 of 187). Stacked on #156 (issue 10). 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 this step's two exposed Rust surface changes: a new declaration for verify/belonging.rs with its verdict_knowledge written, and the verify/mod.rs declaration amended with the binding for the new module. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GgRcHXmnAu43hChNxhnqxU
efc4bc5 to
ef2ce1a
Compare
74fb858 to
eb6bf21
Compare
Issue #147 (PRD issue 4, §3.7; rulings 43 and 75; AC-43). Only `based_on` crosses a namespace. The new `verify::crossing` stage makes a decision's latest version whose `supersedes` names a decision of another namespace a `SCHEMA` fault naming the decision, the edge and the other namespace. Earlier versions are history and are not judged, so a next version that drops the edge repairs the store — the same withdrawal LP-8.21 records for a losing claimant. The writer refuses the verb by the gate it runs over the store as it would be; `G001` keeps the dangling target, whichever namespace it names. No class is added. Tests (each failing before the change): `crossing_tests` over in-memory stores (a latest version superseding another namespace is named with both ids; a next version dropping the edge repairs it while history keeps the claim; a supersession within the namespace is not a crossing), and `ledger-cli/tests/crossing.rs` over a two-namespace store: `supersede` across namespaces is refused in both directions and writes nothing; a crossing filed by hand past the verb fails the gate, and a hand-filed next version without the edge makes the store conformant again; a supersession at home still stands. Protocol: LP-3.31 loses its not-implemented mark and its note; LP-8.8 gains the clause; Appendix B row. No Appendix C note (the issue row says none). No digest moves; no such edge in this repository or the fixtures. Stacked on #157 (issue 3). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GgRcHXmnAu43hChNxhnqxU
Closes #146 — PRD
ledger/prd/namespace-independence-prd.md§6 issue 3 (§3.7; ruling 45; AC-45).Stacked on #156 (issue 10): the diff against
mainincludes #154, #155 and #156. Review the last commit alone,61bd97ed.What lands
A file's namespace is its directory (LP-3.34), so every entity under
ns/<ns>/belongs to<ns>. The newverify::belongingstage makes each one that does not aSCHEMAfault naming the entity:namespaceis another;A record whose target is not filed is already a fault (
authority::references) and is left to that finding. A change-set the writer can home nowhere carries an empty namespace and is judged by the finding that says why, not here. No class is added. The writer side of LP-3.33 (homing a change-set by its one namespace, refusing a mixed one) already landed in #154 and is cited, not rebuilt.verify::verifyhad its landing-free file checks moved intofile_findingsso the function stays under the 40-line gate.Tests (AC-45)
Each failed before the change.
ledger-core/src/verify/belonging_tests.rs: a decision, its version and its acceptance of another namespace each named; a binding, a policy and a revocation target of another namespace named; an unhomed candidate not judged here.ledger-cli/tests/belonging.rs: a decision of B under A; an acceptance of B under A; a revocation under A of B's acceptance (and the same revocation under B in its place, conformant); B's opening change-set under A, its policy and binding each named.genesis_role_tests) had homed afixture.ledgerpolicy under ahafeok.ledgerfile; its policy now names the file's namespace.Protocol
LP-3.33 loses its not-implemented mark and its note on the implemented format; LP-8.8 gains the clause; Appendix B row; Appendix C note "An entity outside its namespace's directory is refused". No digest moves;
CANONICAL_FORMstaysv1; no committed file in this repository is mixed (0 of 187).Checks
cargo build,cargo t,cargo clippy --workspace -- -D warnings -D clippy::unwrap_used, the quality scripts, andledger verify --exporton this repository (same output as onmain: 284 entries, 93 decisions, 3 awaiting, 2 notices, exports matching).🤖 Generated with Claude Code
https://claude.ai/code/session_01GgRcHXmnAu43hChNxhnqxU
Generated by Claude Code