Skip to content

fix(dag): low-severity batch from the 2026-08-19 deep-dive audit - #372

Merged
LeXwDeX merged 4 commits into
devfrom
feat/349-issue349
Aug 19, 2026
Merged

fix(dag): low-severity batch from the 2026-08-19 deep-dive audit#372
LeXwDeX merged 4 commits into
devfrom
feat/349-issue349

Conversation

@LeXwDeX

Copy link
Copy Markdown
Owner

Closes#349

What (all 12 audit items dispositioned)

Code fixes:

  • NEW-1loop.ts — spawn failure boundary rethrows interrupts (Cause.hasInterruptsfailCause), parity with the file's own discipline; an instance teardown can no longer be persisted as a durable nodeFailed
  • NEW-2loop.ts — recovery-pause mirrors the replan-verdict gate: two attempts, defects folded, adoption abandoned only when the durable row is genuinely terminal; otherwise logs an error and leaves the workflow for the next instance load instead of silently stalling
  • REC-1recovery.ts — pending-node stale-child cancelSession wrapped in catchCause (same hardening as the running branch); a persistent failure no longer aborts the whole reconcile
  • BLK-02blocks.ts — hyphen/underscore writer-id normalization collisions rejected at compile time (block.compile_failed diagnostic)
  • BLK-03blocks.ts — verify serving ≥2 parallel-writer review routes rejected loudly (contract binds ONE fingerprint) instead of silently mapping only the first aggregator
  • CAP-02capture.ts/output-ref.ts — regex test span capped (100k chars), uniqueItems scan capped (1000 items, loud failure beyond), file-ref capture capped (64MiB stat-check, inline fallback beyond)
  • SW-L1supervision-sweep.ts — sweep's durable publishes run under an InstanceRef derived from the workflow row's directory+project, so live instances' summary publishers push swept settles to the TUI (previously bootstrap-refetch only)
  • F3sync.tsx — reconnect hook refreshes every stored goal (symmetric with refreshDagSummaries); a goal.cleared missed during a disconnect no longer leaves a stale sidebar indefinitely
  • F6keybind.tsdag.cancel.active added to Definitions + CommandMap (rebindable, in the config schema)
  • AGENTS.md — tool-call discipline hard rules (no duplicate parallel queries; one watch per CI wait) — recorded per maintainer request

Accepted as designed (no code change): SW-L2 (sweep cancel without ambient instance — self-documented, incident-correct), F4/F5 (event-surface record items).

Verification

  • bun test test/dag/ 600/600 across 51 files
  • typecheck green (packages/opencode + packages/tui)
  • repo lint 4839/4850 budget

- NEW-1: spawn failure boundary rethrows interrupts (parity with the file's
own catchCause discipline) instead of persisting a nodeFailed
- NEW-2: recovery-pause retries twice and only abandons adoption when the
durable row is genuinely terminal (mirrors the replan-verdict gate)
- REC-1: pending-node stale-child cancel is cause-hardened like the running
branch — a persistent failure no longer aborts the whole reconcile
- BLK-02: hyphen/underscore writer-id key collisions rejected at compile time
- BLK-03: a verify node serving multiple parallel-writer review routes is
rejected (the contract binds ONE fingerprint) instead of silently mapping
only the first aggregator
- CAP-02: regex tests capped at 100k chars, uniqueItems scan capped at 1000
items, file-ref capture capped at 64MiB (inline fallback beyond)
- SW-L1: sweep publishes stamp the workflow row's location so live instances'
summary publishers push swept settles to the TUI
- F3: TUI reconnect refreshes stored goals (a missed goal.cleared no longer
leaves a stale sidebar indefinitely)
- F6: dag.cancel.active added to the keybind Definitions/CommandMap
- AGENTS.md: tool-call discipline rules (no duplicate fan-out queries, one
watch per CI wait)
SW-L2 (cancel dies without ambient instance — acknowledged design) and F4/F5
(record items on the event surface) are accepted as designed.
Closes#349
…s the reconcile
The old test pinned the abort-on-cancel-failure behavior the audit flagged as
the REC-1 defect (the workflow became unadoptable in-process until restart).
@LeXwDeX
LeXwDeX merged commit 0370974 into devAug 19, 2026
9 of 10 checks passed
@LeXwDeX
LeXwDeX deleted the feat/349-issue349 branch August 19, 2026 11:02
Sign up for freeto 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

@LeXwDeX