Skip to content

Mutation cursor external taint - #245

Open
davidabram wants to merge 8 commits into
git-snapshot-lock-coordinatorfrom
mutation-cursor-external-taint
Open

Mutation cursor external taint#245
davidabram wants to merge 8 commits into
git-snapshot-lock-coordinatorfrom
mutation-cursor-external-taint

Conversation

@davidabram

Copy link
Copy Markdown
Member

No description provided.

@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sce-config-json Ready Ready Preview Aug 30, 2026 6:23pm

Request Review

@davidabram davidabram closed this Aug 30, 2026
@davidabram davidabram reopened this Aug 30, 2026
@davidabram
davidabram force-pushed the mutation-cursor-external-taint branch from d71bbf6 to b46ab29 Compare August 30, 2026 13:41
@davidabram
davidabram force-pushed the mutation-cursor-external-taint branch from b46ab29 to a3a2c3f Compare August 30, 2026 14:24
@davidabram
davidabram force-pushed the mutation-cursor-external-taint branch from 05c3174 to 5e404c5 Compare August 30, 2026 15:02
@davidabram
davidabram force-pushed the mutation-cursor-external-taint branch from 140d0ed to f612c94 Compare August 30, 2026 15:52
@davidabram
davidabram force-pushed the mutation-cursor-external-taint branch from a7605c5 to 2b03320 Compare August 31, 2026 23:53
@davidabram
davidabram force-pushed the mutation-cursor-external-taint branch 2 times, most recently from 2a0fa06 to f7f96d2 Compare September 2, 2026 11:51
@davidabram
davidabram force-pushed the mutation-cursor-external-taint branch 2 times, most recently from 70beb08 to 26e03c7 Compare September 2, 2026 17:24
@davidabram
davidabram force-pushed the mutation-cursor-external-taint branch from 26e03c7 to c158e43 Compare September 2, 2026 21:22
davidabram and others added 8 commits September 3, 2026 12:07
Define the crash-safety boundary for mutation-cursor coordination before runtime implementation. The plan covers a worktree-scoped write-ahead marker, inherited-taint recovery, failure handling, and restart/integration validation while preserving existing DB protocol semantics.

Plan: mutation-cursor-external-taint; Tasks: T01-T04

Co-authored-by: SCE <[email protected]>
Establish the worktree-local filesystem boundary needed to detect interrupted mutation-cursor runtime sections before the coordinator wires it into the full boundary. `ExternalTaintMarker` uses an empty `<git-dir>/sce/mutation-cursor-tainted` file whose existence is the state, with synced creation, idempotent clearing, and worktree-scoped paths. Add the runtime context and record plan `mutation-cursor-external-taint` task T01 as complete; coordinator integration remains follow-up work.

Co-authored-by: SCE <[email protected]>
Prevent failures during Agent Trace DB acquisition and the protected mutation-trace boundary from losing the worktree-local durability signal. Reshape `coordinate()` to accept a DB provider, arm the marker after acquiring the worktree lock and before checkout identity or DB access, clear it only after success, and report marker and DB-provider failures explicitly.

Add end-to-end coverage for success, failure, and fail-closed marker arming, and document the fence ordering and concrete marker refinement.

Plan: mutation-cursor-external-taint (T02)

Co-authored-by: SCE <[email protected]>
Update the sync test fixture to return terminal stream counts and assert that only messages trigger one ingestion batch request. This verifies terminal statuses do not resend batches.

Co-authored-by: SCE <[email protected]>
Map an inherited external-taint marker onto `database_failure` for each freshly loaded projection so recovery rebaselines against the already captured tree, retries losing recovery CAS operations without recapturing, and clears the pending overlay once recovery lands. Add focused pipeline coverage for first-use recovery and boundary retries, and document the recovery lifecycle and completed task.

Plan: mutation-cursor-external-taint (T03)

Co-authored-by: SCE <[email protected]>
Exercise external-taint marker fencing and conservative recovery through coordinate() so DB-open, snapshot, stale-marker, linked-worktree, and clear-failure paths cannot emit untrusted mutation evidence. Record the completed integration coverage for T04.

Plan: mutation-cursor-external-taint (T04)

Co-authored-by: SCE <[email protected]>
…ests

Keep the external-taint marker armed after a durable boundary when cleanup fails, while returning the committed CoordinateOutcome so mutation events remain available. Add recovery-transition coverage and document the pre-commit and post-commit failure semantics. Make the malformed batch response test deterministic by seeding only the messages stream and asserting the exact reconciliation request order.

Co-authored-by: SCE <[email protected]>
Identify the triggering Advance by its scope and event key, then verify that
recovery does not mark that boundary event as processed after a failed
invocation. Record the tightened AC8 validation in the
mutation-cursor-external-taint plan.

Co-authored-by: SCE <[email protected]>
@davidabram
davidabram force-pushed the mutation-cursor-external-taint branch from c158e43 to 2b7df35 Compare September 3, 2026 10:07
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