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 and others added 8 commits September 1, 2026 14:31
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 <sce@crocoder.dev>
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 <sce@crocoder.dev>
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 <sce@crocoder.dev>
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 <sce@crocoder.dev>
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 <sce@crocoder.dev>
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 <sce@crocoder.dev>
…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 <sce@crocoder.dev>
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 <sce@crocoder.dev>
@davidabram
davidabram force-pushed the mutation-cursor-external-taint branch from 2b03320 to 2a0fa06 Compare September 1, 2026 12:48
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