Skip to content

fix(dag): audit race-window fixes — dev to main - #153

Merged
LeXwDeX merged 2 commits into
mainfrom
dev
Jul 31, 2026
Merged

fix(dag): audit race-window fixes — dev to main#153
LeXwDeX merged 2 commits into
mainfrom
dev

Conversation

@LeXwDeX

@LeXwDeX LeXwDeX commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Promotes dev to main with the DAG audit fixes from #152:

  • HIGH: recoverWorkflow adoption idempotency (synchronous reservation; no duplicate reconcile / entry overwrite / orphaned fibers)
  • MEDIUM: stepping race windows closed — workflow-control handlers cross-check the durable row under evalLock; Dag.step counts queued as in-flight
  • MEDIUM: per-workflow lock convention type-enforced via WorkflowLock witness

Regression tests: test/dag/dag-adoption-step-races.test.ts (verified failing pre-fix, passing post-fix). Local: opencode dag 305/305, core dag 89/89, typecheck ×2 green. No schema / API / SDK changes.

LeXwDeX and others added 2 commits July 31, 2026 11:02
- recoverWorkflow: synchronous recovering-set reservation makes adoption
  idempotent across the startup scan and the WorkflowReplanned re-adoption
  path; a rejected recovery pause now abandons adoption instead of dying
- workflow-control handlers (paused/stepped/resumed) cross-check the durable
  row under the evalLock before mutating runtime flags; the stepped handler
  refuses to spawn while a node is in flight, and Dag.step counts queued
  admissions as in-flight
- per-workflow lock convention is now type-enforced: guarded commands take a
  WorkflowLock witness only withWorkflowLock can mint
- lint ratchet 4690 -> 4711 (new test harness as-never idioms + witness mint)
fix(dag): close adoption, stepping and lock-witness race windows
@LeXwDeX
LeXwDeX merged commit b330cd4 into main Jul 31, 2026
17 of 18 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