NF-5: Parallel dry-run + divergence detection #326

Closed
opened 2026-04-24 11:29:50 +00:00 by code-lead · 0 comments
Collaborator

As the platform, I want every webhook delivery to run BOTH the legacy handler AND the default flow (with flow side effects suppressed) so that the new engine's correctness can be audited before cutover.

Acceptance criteria

Feature flag

  • agents.jsonnode_flows.mode: "off" | "dry-run" | "live" (default "off").
  • In "dry-run" mode, matching flows run for every event but every mutating node short-circuits; its intended call is recorded in flow_node_runs.intent as JSON.

Divergence API

  • GET /flows/divergences?since= returns, per event, the legacy handler's actual side effects vs the flow's intended side effects, diff'd.
  • Daily summary: total events, matching flows, divergent-run count. Logged at startup and via a dashboard SSE event.

Dogfood

  • Dogfood deploy flips the flag to "dry-run"; soak at least one week.
  • Divergences investigated case-by-case; bugs fixed, expected differences documented.

Out of scope

  • Cutover — NF-6.

References

As the platform, I want every webhook delivery to run BOTH the legacy handler AND the default flow (with flow side effects suppressed) so that the new engine's correctness can be audited before cutover. ## Acceptance criteria ### Feature flag - [ ] `agents.json` → `node_flows.mode: "off" | "dry-run" | "live"` (default `"off"`). - [ ] In `"dry-run"` mode, matching flows run for every event but every mutating node short-circuits; its intended call is recorded in `flow_node_runs.intent` as JSON. ### Divergence API - [ ] `GET /flows/divergences?since=` returns, per event, the legacy handler's actual side effects vs the flow's intended side effects, diff'd. - [ ] Daily summary: total events, matching flows, divergent-run count. Logged at startup and via a dashboard SSE event. ### Dogfood - [ ] Dogfood deploy flips the flag to `"dry-run"`; soak at least one week. - [ ] Divergences investigated case-by-case; bugs fixed, expected differences documented. ## Out of scope - Cutover — NF-6. ## References - Spec: [`specs/node-flows.md`](../src/branch/main/specs/node-flows.md) § Migration path, phase 1. - Depends on NF-4 (#325).
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks#326
No description provided.