Skip to content

failure-kind health invariant - #297

Merged
davidabram merged 6 commits into
mutation-cursor-close-neverseen-attributionfrom
mutation-trace-health-invariant
Oct 5, 2026
Merged

davidabram merged 6 commits into
mutation-cursor-close-neverseen-attributionfrom
mutation-trace-health-invariant

Conversation

@davidabram

Copy link
Copy Markdown
Member

No description provided.

@davidabram
davidabram added this pull request to stack #298 October 4, 2026 10:27
Define the protocol, migration, and store-decoding work needed to make `failure_kind` the semantic health source of truth while enforcing the redundant `tainted` bit. The plan sequences implementation, persistence migration, decoder validation, and their acceptance checks across T01, T02, and T03.

Plan: mutation-cursor-health-invariant

Co-authored-by: SCE <sce@crocoder.dev>
@davidabram
davidabram force-pushed the mutation-trace-health-invariant branch from bdb285a to 61095e7 Compare October 4, 2026 10:52
Use failure_kind as the semantic source of truth for taint, recovery, and coordinator admission while preserving tainted as the invariant-backed redundant bit. Add regression coverage for inconsistent stored health pairs and align the Quint model and mutation-trace documentation with the Rust behavior.

Plan: mutation-cursor-health-invariant (T01)

Co-authored-by: SCE <sce@crocoder.dev>
@davidabram
davidabram force-pushed the mutation-trace-health-invariant branch from b7a87b9 to a872c96 Compare October 4, 2026 11:33
Make `failure_kind` authoritative for the redundant `tainted` bit by rebuilding the worktree and event tables in migration 006 with a cross-column CHECK and legacy-row normalization. Add migration, schema-preservation, and rerun coverage through the real Turso runner, and document the invariant and completed implementation task.

Plan: `mutation-cursor-health-invariant`
Task: `T02`

Co-authored-by: SCE <sce@crocoder.dev>
@davidabram
davidabram force-pushed the mutation-trace-health-invariant branch from c6464e3 to 446dc4d Compare October 4, 2026 13:24
Treat `failure_kind` as the semantic health source while requiring `tainted` to match it at every store decode. Remove `tainted` from the event-page projection and derive attribution health from `failure_kind` alone, with pre-006 fixture regressions covering worktree and event readers.

Plan: `mutation-cursor-health-invariant`, T03.

Co-authored-by: SCE <sce@crocoder.dev>
@davidabram
davidabram force-pushed the mutation-trace-health-invariant branch from 0e4315a to a497f03 Compare October 4, 2026 13:48
davidabram and others added 2 commits October 4, 2026 17:43
Concurrent agent trace DB tests intermittently failed when parallel writers hit
`database is locked`. Add a bounded retry with a 30-second deadline and 10 ms
backoff around concurrent state, metadata, and delivery writes.

Record the validation result and remaining follow-up for
`mutation-cursor-health-invariant` (T02, T03).

Co-authored-by: SCE <sce@crocoder.dev>
Retry test-only database lock contention during concurrent-writer tests so assertions verify convergence and idempotency without depending on the production retry budget. Update the mutation-cursor-health-invariant validation report to record successful repeated agent_trace_db runs and the remaining production lock-contention follow-up.
Plan: mutation-cursor-health-invariant
@davidabram
davidabram merged commit fbb534e into main Oct 5, 2026
11 checks passed
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