Skip to content

Writer: close a key in every namespace held, one change-set per namespace (issue 8) - #162

Open
Hafeok wants to merge 2 commits into
claude/great-feynman-zcdsdd-step-07-signersfrom
claude/great-feynman-zcdsdd-step-08-close-everywhere
Open

Hafeok wants to merge 2 commits into
claude/great-feynman-zcdsdd-step-07-signersfrom
claude/great-feynman-zcdsdd-step-08-close-everywhere

Conversation

@Hafeok

@Hafeok Hafeok commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Closes #151 — PRD ledger/prd/namespace-independence-prd.md §6 issue 8 (§3.2, §3.3; rulings 47 and 69; AC-47 third bullet).

Stacked on #161 (issue 7). Review the last commit alone, ccf8a0c3.

What lands

ledger identity revoke|rotate <binding> --everywhere closes the key in every namespace its principal holds it open in: one change-set per namespace, each the same act closing that namespace's binding with the same at, signed in its own namespace, filed namespace by namespace and gated as it lands, naming every file written, to land in one commit (LP-6.34, new). Without the flag a close ends the key in the namespace of the binding it names, as before, and the split is a notice (ruling 69). A key already closed everywhere is refused with nothing to close.

The other half of this issue already landed. The writer opening every namespace on its own genesis, roles, first policy and self-bound binding — join_genesis gone, --external-ref required every time — came with #159 (issue 5) and #160 (issue 6), for the reason those pull requests give: with authority and keys per namespace, the old writer could not open a second namespace at all. The genesis_key.rs rewrites §3.11 lists landed with #160. --without-key stays until issue 13.

Tests (AC-47, third bullet)

ledger-cli/tests/key_across_namespaces.rs (each failing before): a revoke everywhere files one change-set in A and one in B, both closes with one at, each naming its namespace's binding, named in the verb's output, landing in one commit; verify is conformant with no split notice and both allowed_signers lines end; closed everywhere, a second --everywhere is refused; a rotate everywhere closes the key and binds the new one in each namespace, the new key signs in B and the old one does not; the carried test now drives --everywhere too — no agent identity and no non-interactive session produces a key close. The notice for a close in one namespace alone is asserted by the tests #160 added.

Also: signers_per_namespace.rs (issue 7) pauses a second after opening its two namespaces, as its sibling key tests do — a close in the same second as the policies it closes under sat at their second for ssh-keygen, and the test was flaky (seen once in the full run).

Protocol

LP-6.34 (new); LP-6.32 loses its note; Appendix B row; no Appendix C note (the issue row says none). CLAUDE.md updated. No class added; no digest moves.

Checks

cargo build, cargo t, cargo clippy --workspace -- -D warnings -D clippy::unwrap_used, the quality scripts, and ledger verify --export on this repository (same output as on main).

🤖 Generated with Claude Code

https://claude.ai/code/session_01GgRcHXmnAu43hChNxhnqxU


Generated by Claude Code

Hafeok commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

CI, standing down on one step. The check job will fail at the contract-surface gate (ddd diff-contracts <base>..HEAD) for this PR's exposed-surface changes — identity_revoke and identity_rotate re-signed with everywhere, KeyArgs deriving Clone — as it does for #157–#161. Every other step of check passes locally.

The remedy the gate names is ddd bind claude/great-feynman-zcdsdd-step-07-signers..HEAD (with --verdict), which files seam declarations under .ddd/seams/. The session's instructions forbid me to edit .ddd/, and a declaration's verdict is the author's judgment, so I am not filing them. Please run ddd bind on this branch and push, or tell me to. Recorded in the close-out.


Generated by Claude Code

@Hafeok
Hafeok force-pushed the claude/great-feynman-zcdsdd-step-07-signers branch from 9df8605 to 111f4f6 Compare October 11, 2026 06:19
@Hafeok
Hafeok force-pushed the claude/great-feynman-zcdsdd-step-08-close-everywhere branch from ccf8a0c to 0fafebc Compare October 11, 2026 06:20
Hafeok added a commit that referenced this pull request Oct 11, 2026
Issue #152 (PRD issue 9, §3.11; rulings 63 and 68). The fifteen
committed fixture stores under `ledger-cli/tests/fixtures/` move their
`sets/` and `log/` under `.decisions/ns/<namespace>/` with `git mv` —
`fixture.ledger` for the twelve class fixtures and `pass`,
`fixture.coverage`, `fixture.forked`, `fixture.two-clocks` for the rest
— no file's content changed, and `UPDATE_FIXTURES=1 cargo test -p
ledger-cli --test gate` finds nothing to refresh (checked: no fixture
file modified).

The staging shim issue 1 left in the test helpers goes: `stage_fixture`,
`stage_fixture_into`, `stage_workspace` and the flat branch of
`stage_store_into` become plain copies (`fixture_copy`,
`copy_fixture_into`, `workspace_copy`, `copy_store_into`), and the flat
fallbacks in `gate.rs`'s and `digests.rs`'s fixture walkers go.
`legacy_layout.rs` lays the `pass` fixture flat itself, byte for byte,
to build its v1.8 history; `scalars.rs` reads the fixture's set from its
namespace directory.

The tests of §3.11: item 1 (flat paths) was done by issue 1, with the
shim removed here; item 2 (meaning changed under rulings 47 and 68) by
issues 5, 6 and 8; item 3 (the flat era in history) by issue 2; item 4
(D6 by landing) is issue 12's. A grep over the test sources finds no
flat path left.

Protocol: the Appendix C note "Namespaces become independent; a store
with shared authority is re-founded" lands as the PRD drafted it, headed
with no format number (no format bump here; the draft said "and format
8"); the v1.9 note's two sentences that pointed at this issue now point
at the note and at the fixtures; Appendix B row. No class added; no
digest moves.

Stacked on #162 (issue 8).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GgRcHXmnAu43hChNxhnqxU
@Hafeok
Hafeok force-pushed the claude/great-feynman-zcdsdd-step-07-signers branch from 111f4f6 to 3cdc118 Compare October 11, 2026 06:22
@Hafeok
Hafeok force-pushed the claude/great-feynman-zcdsdd-step-08-close-everywhere branch from 0fafebc to f85d4d5 Compare October 11, 2026 06:22
Hafeok added a commit that referenced this pull request Oct 11, 2026
Issue #152 (PRD issue 9, §3.11; rulings 63 and 68). The fifteen
committed fixture stores under `ledger-cli/tests/fixtures/` move their
`sets/` and `log/` under `.decisions/ns/<namespace>/` with `git mv` —
`fixture.ledger` for the twelve class fixtures and `pass`,
`fixture.coverage`, `fixture.forked`, `fixture.two-clocks` for the rest
— no file's content changed, and `UPDATE_FIXTURES=1 cargo test -p
ledger-cli --test gate` finds nothing to refresh (checked: no fixture
file modified).

The staging shim issue 1 left in the test helpers goes: `stage_fixture`,
`stage_fixture_into`, `stage_workspace` and the flat branch of
`stage_store_into` become plain copies (`fixture_copy`,
`copy_fixture_into`, `workspace_copy`, `copy_store_into`), and the flat
fallbacks in `gate.rs`'s and `digests.rs`'s fixture walkers go.
`legacy_layout.rs` lays the `pass` fixture flat itself, byte for byte,
to build its v1.8 history; `scalars.rs` reads the fixture's set from its
namespace directory.

The tests of §3.11: item 1 (flat paths) was done by issue 1, with the
shim removed here; item 2 (meaning changed under rulings 47 and 68) by
issues 5, 6 and 8; item 3 (the flat era in history) by issue 2; item 4
(D6 by landing) is issue 12's. A grep over the test sources finds no
flat path left.

Protocol: the Appendix C note "Namespaces become independent; a store
with shared authority is re-founded" lands as the PRD drafted it, headed
with no format number (no format bump here; the draft said "and format
8"); the v1.9 note's two sentences that pointed at this issue now point
at the note and at the fixtures; Appendix B row. No class added; no
digest moves.

Stacked on #162 (issue 8).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GgRcHXmnAu43hChNxhnqxU
Hafeok and others added 2 commits October 11, 2026 06:29
…e invocation

Issue #151 (PRD issue 8, §3.2, §3.3; rulings 47 and 69; AC-47 third
bullet). `ledger identity revoke|rotate <binding> --everywhere` closes
the key in every namespace its principal holds it open in: one
change-set per namespace, each the same act closing that namespace's
binding with the same `at`, signed in its own namespace, filed namespace
by namespace and gated as it lands, naming every file written, to land
in one commit (LP-6.34). Without the flag a close ends the key in the
namespace of the binding it names, as before, and the split is a notice.
A key already closed everywhere is refused with nothing to close.

The other half of this issue — the writer opening every namespace on its
own genesis, roles, first policy and self-bound binding, `join_genesis`
gone, `--external-ref` required every time — landed with issues 5 and 6,
for the reason their commits give; the `genesis_key.rs` rewrites §3.11
lists landed with issue 6. `--without-key` stays until issue 13.

Tests (each failing before the change): `key_across_namespaces.rs` —
a revoke everywhere files one change-set in A and one in B, both closes
with one `at`, each naming its namespace's binding, named in the verb's
output, landing in one commit; `verify` is conformant with no split
notice and both `allowed_signers` lines end; closed everywhere, a second
`--everywhere` is refused; a rotate everywhere closes the key and binds
the new one in each namespace, the new key signs in B and the old one
does not; and the carried test now drives `--everywhere` too: no agent
identity and no non-interactive session produces a key close.

Also: `signers_per_namespace.rs` (issue 7) pauses a second after opening
its two namespaces, as its sibling key tests do — a close in the same
second as the policies it closes under sat at their second for
`ssh-keygen`, and the test was flaky.

Protocol: LP-6.34 (new), LP-6.32 loses its note; Appendix B row; no
Appendix C note (the issue row says none). CLAUDE.md updated. No class
added; no digest moves.

Stacked on #161 (issue 7).

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 three exposed Rust surface changes, all in author/identity_ops.rs:
the declaration is amended with the bindings and its verdict extended
with what rotate and revoke do under `everywhere`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GgRcHXmnAu43hChNxhnqxU
@Hafeok
Hafeok force-pushed the claude/great-feynman-zcdsdd-step-08-close-everywhere branch from f85d4d5 to 5f23b62 Compare October 11, 2026 06:29
Hafeok added a commit that referenced this pull request Oct 11, 2026
Issue #152 (PRD issue 9, §3.11; rulings 63 and 68). The fifteen
committed fixture stores under `ledger-cli/tests/fixtures/` move their
`sets/` and `log/` under `.decisions/ns/<namespace>/` with `git mv` —
`fixture.ledger` for the twelve class fixtures and `pass`,
`fixture.coverage`, `fixture.forked`, `fixture.two-clocks` for the rest
— no file's content changed, and `UPDATE_FIXTURES=1 cargo test -p
ledger-cli --test gate` finds nothing to refresh (checked: no fixture
file modified).

The staging shim issue 1 left in the test helpers goes: `stage_fixture`,
`stage_fixture_into`, `stage_workspace` and the flat branch of
`stage_store_into` become plain copies (`fixture_copy`,
`copy_fixture_into`, `workspace_copy`, `copy_store_into`), and the flat
fallbacks in `gate.rs`'s and `digests.rs`'s fixture walkers go.
`legacy_layout.rs` lays the `pass` fixture flat itself, byte for byte,
to build its v1.8 history; `scalars.rs` reads the fixture's set from its
namespace directory.

The tests of §3.11: item 1 (flat paths) was done by issue 1, with the
shim removed here; item 2 (meaning changed under rulings 47 and 68) by
issues 5, 6 and 8; item 3 (the flat era in history) by issue 2; item 4
(D6 by landing) is issue 12's. A grep over the test sources finds no
flat path left.

Protocol: the Appendix C note "Namespaces become independent; a store
with shared authority is re-founded" lands as the PRD drafted it, headed
with no format number (no format bump here; the draft said "and format
8"); the v1.9 note's two sentences that pointed at this issue now point
at the note and at the fixtures; Appendix B row. No class added; no
digest moves.

Stacked on #162 (issue 8).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GgRcHXmnAu43hChNxhnqxU
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