Repository navigation
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Tracking
- Epic: [lifecycle-RSK] Run-state kernel #1790
- Size: 1 SP
- Blocked by: [lifecycle-RSK] RSK-04: Add the run field, write helpers, and the projection #1794
- Design doc:
docs/architecture/task-lifecycle-target-architecture.md(not yet onmain) - Ticket plan:
docs/architecture/task-lifecycle-run-state-kernel-tickets.md(not yet onmain)
Context
Shadow mode must report disagreement. Before any read flips, the kernel must agree with the fields on real traffic. A rejected event is also a divergence, because after a flip the kernel would drop that write. Some windows in the code are known races. The design doc lists them under "Known code races".
Developer Notes
- After each helper call, compare
runwith the projection from [lifecycle-RSK] RSK-04: Add the run field, write helpers, and the projection #1794, for the routed fields only. A field whose writes are not routed yet gets no events, so a comparison of it reports a false mismatch. Keep the routed fields in one list that each routing ticket extends: [lifecycle-RSK] RSK-06: Route latch and phase writes through events #1796 adds the latches andphase, and [lifecycle-RSK] RSK-10: Route stream, ask, and turn-field writes through events #1804 adds the stream, ask, and turn regions. - Log each mismatch and each rejected event with the state, the event, the field values, and
taskId. - Tag each mismatch with a race ID when it matches a known window. Count tagged and untagged mismatches as separate metrics.
- Load the ignore list from the known-races table. An entry with a fix ticket stays in the list only until that ticket merges. The fixes for R-1 ([lifecycle-RSK] RSK-17: Reset didFinishAbortingStream for each request #1801), R-3 ([lifecycle-RSK] RSK-20: Check abort before an ask posts #1803), and R-4 ([lifecycle-RSK] RSK-19: Keep the first abort reason #1802) have merged, so the list starts empty.
- Gate the comparison as described in the Rollout gate section. Do not gate the kernel.
- Do not throw on divergence in production. Log only.
Exit criteria: a forced divergence in a test produces one log line and one metric increment. A forced divergence on a known race that still has an open fix ticket produces a tagged mismatch, not an untagged one.
Reversibility: additive observability.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity