Skip to content

Mutation-scope abandonment lifecycle - #258

Open
davidabram wants to merge 6 commits into
ref-recfrom
mutation-scope-runtime-integration
Open

Mutation-scope abandonment lifecycle#258
davidabram wants to merge 6 commits into
ref-recfrom
mutation-scope-runtime-integration

Conversation

@davidabram

Copy link
Copy Markdown
Member

No description provided.

@davidabram
davidabram force-pushed the mutation-scope-runtime-integration branch 7 times, most recently from 6bb2f5c to 30dc1ef Compare September 3, 2026 09:55
Define the protected-worktree extraction, abandonment entrypoint, store seam,
regression coverage, and adapter contract for safely retiring stale mutation
scopes while preserving coordinate behavior.

Plan: mutation-scope-runtime-integration (T01–T05)
The mutation-trace runtime now centralizes git-dir resolution, worktree locking, external-taint fencing, checkout identity derivation, and successful marker completion in `ProtectedWorktree`. Refactor `coordinate()` to use the guard while preserving existing error and lock-ordering semantics, and document the shared prefix and its test boundary.

Plan: `mutation-scope-runtime-integration` — T01
@davidabram
davidabram force-pushed the mutation-scope-runtime-integration branch from 30dc1ef to 8f2bd72 Compare September 3, 2026 10:07
davidabram and others added 2 commits September 3, 2026 12:15
Promote MutationTraceStore::load_scope to a public, cold-path single-row read that returns durable scope state without widening into a worktree projection or adjudicating worktree identity. Add coverage for known, missing, and cross-worktree scopes while preserving load_worktree's existing mismatch behavior.

Document the store contract and mark the runtime-integration task complete in the shared context.
Plan: mutation-scope-runtime-integration (T02)
Add `abandon_scope` as the mutation-cursor runtime's second protected entrypoint for retiring scopes whose final worktree boundary was not observed, without assigning them snapshot semantics.

Reuse the shared protected-worktree fence and CAS retry limit, classify durable scope state before applying `protocol::abandon`, retry conflicts from fresh state, and clear the fence only after settled outcomes while preserving it for recovery-required results and errors. Add focused TempDir-backed coverage and document the runtime, fence, testing, and plan updates.

Plan: mutation-scope-runtime-integration (T03)

Co-authored-by: SCE <[email protected]>
@davidabram
davidabram force-pushed the mutation-scope-runtime-integration branch from fbdd0f2 to efa46a0 Compare September 3, 2026 11:14
Exercise scope abandonment and successor recovery against real Git worktrees and a repository-scoped Agent Trace DB. Cover ambiguous-gap rebaselining, unrelated live-scope preservation, cross-checkout rejection, and a real CAS race; widen the inner seam only to support the sibling-module race test.

Record the completed integration task and its behavioral guarantees in the mutation-trace runtime and scope-abandonment context.

Plan: mutation-scope-runtime-integration.md T04

Co-authored-by: SCE <[email protected]>
@davidabram
davidabram force-pushed the mutation-scope-runtime-integration branch from 2808d7d to 2a92d51 Compare September 3, 2026 11:58
Expose the coordinator and scope-abandonment entrypoints with their crate-visible
outcome and error types while keeping the runtime safety modules private. Record
the lifecycle, staleness, recovery, and attribution rules future harness adapters
must follow, and update the runtime indexes and plan status.

Plan: mutation-scope-runtime-integration (T05)

Co-authored-by: SCE <[email protected]>
@davidabram
davidabram force-pushed the mutation-scope-runtime-integration branch from 2a92d51 to 5a4cbd1 Compare September 3, 2026 12:30
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