You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ADR 0003 B2: Operation views and undo, plain and final discard, including checkpoint and compaction #30
Needs: B4, F1 (every listed PR must have merged before this step starts)
Scope: Operation views and undo, plain and final discard, including checkpoint and compaction (no sweep before K1)
Acceptance (exact pass conditions): After a random operation sequence, undo to any earlier operation in the window restores that exact view digest, also after a checkpoint and compaction; undo is undoable; per-actor undo leaves other actors' operations intact; undo of a revocation or of a final discard is refused; undo by an actor without a dominating chain is refused (refusal of undo for receipts and promotions is tested in E1 and E2, which create them)
Rules: one PR owning one subsystem; tests fail before the change and pass after it; any performance figure is stated in SI units (s, J, W) next to its section 6 bound as a fraction of that bound, with raw samples; a performance report alone is never an acceptance.
Claim this step by commenting "claimed by " before starting; never start a step that is already claimed.
claimed by claude-opus-5.5 session syn-adr0003 (branch synapse/30-operation-views, base main 2f06c45).
Plan:
Operation log = the revision records already in the WAL (kinds 7, 8, 9, 11) plus a new kind 12 view operation: undo (whole or filtered to one actor chain), plain discard, final discard, capability revocation. Each operation records its actor chain.
View = the per-change visible heads plus the discarded set, with a two-level Merkle digest; computed by folding the operations still in effect. An undo to operation T disables every later operation (or every later operation of one actor); an undo of an undo re-enables what it disabled, so undo is undoable and an undo to T restores the exact view digest at T.
Refusals: undo without the Undo capability; undo of operations whose actor chain the undoer does not dominate; undo across a revocation or a final discard; undo to a point outside the window (typed).
Checkpoints and compaction keep every operation (no sweep before K1), so undo works after them.
Revocations become durable WAL operations and are re-applied to the auth state at open.
Not in B2: GC, quota release on final discard, per-owner retention window (K1); receipts and promotions (E1, E2); workspace pointers in the view (C2).
B2 is ready on branch synapse/30-operation-views (head 8c68955), based on main 2f06c45. No PR was opened; the orchestrator opens it.
WAL kind 12 ViewOperationRecorded: undo (whole or per actor), plain and final discard, revocation.
A view is the fold of the log, with a two-level Merkle digest.
API: undo (needs Undo), discard (needs Propose), and an operator revoke_link that writes the fact and revokes the link in the policy enforcer at the same sequence.
Tests:
cargo test --workspace --locked --no-fail-fast: 410 passed, 0 failed. Clippy -D warnings and fmt are clean.
The acceptance property (undo to T restores the digest of T, also after reopen and checkpoint_and_compact), undo of an undo, per-actor isolation and conflict data, refusal of undoing a fact, and the dominance rules are covered in crates/synapse-store/src/operation_tests.rs and crates/synapse-api/tests/b2_operation_views.rs.
Red before green: 14 mutations, all red. See evidence/b2-operation-views/.
Limits, also in docs/B2_OPERATION_VIEWS.md:
No undo window and no GC yet (K1).
The policy enforcer's grants and revocations are not rebuilt at open.
Activity
drakestapleton commentedon Oct 18, 2026
claimed by claude-opus-5.5 session syn-adr0003 (branch
synapse/30-operation-views, base main 2f06c45).Plan:
Undocapability; undo of operations whose actor chain the undoer does not dominate; undo across a revocation or a final discard; undo to a point outside the window (typed).Not in B2: GC, quota release on final discard, per-owner retention window (K1); receipts and promotions (E1, E2); workspace pointers in the view (C2).
drakestapleton commentedon Oct 18, 2026
B2 is ready on branch
synapse/30-operation-views(head 8c68955), based on main 2f06c45. No PR was opened; the orchestrator opens it.ViewOperationRecorded: undo (whole or per actor), plain and final discard, revocation.undo(needsUndo),discard(needsPropose), and an operatorrevoke_linkthat writes the fact and revokes the link in the policy enforcer at the same sequence.Tests:
cargo test --workspace --locked --no-fail-fast: 410 passed, 0 failed. Clippy-D warningsand fmt are clean.checkpoint_and_compact), undo of an undo, per-actor isolation and conflict data, refusal of undoing a fact, and the dominance rules are covered incrates/synapse-store/src/operation_tests.rsandcrates/synapse-api/tests/b2_operation_views.rs.evidence/b2-operation-views/.Limits, also in
docs/B2_OPERATION_VIEWS.md: