Skip to content

docs(validation): RG3 realtime chaos (Phase A) — 238-kill re-cert result + candid caveats#159

Merged
dzhelezov merged 3 commits into
mainfrom
docs/rg3-chaos-validation
Jul 12, 2026
Merged

docs(validation): RG3 realtime chaos (Phase A) — 238-kill re-cert result + candid caveats#159
dzhelezov merged 3 commits into
mainfrom
docs/rg3-chaos-validation

Conversation

@dzhelezov

Copy link
Copy Markdown
Collaborator

Docs-only. Records the RG3 Phase-A realtime-chaos result (harness #158) into the validation dossier with candid, precisely-bounded caveats, and marks the RG3 gate row as MET in the stream-realtime campaign plan.

What changed

  • VALIDATION.md §5.11 (new, self-contained subsection): methodology + verbatim result + mock-fidelity caveats + an explicit "what this does NOT prove" boundary. It does not rewrite §5.8 — that consolidation is the later (RG6) dossier task.
  • .agents/plans/stream-realtime-production.md: the RG3 gate row annotated MET (Phase A, harness(rg3): realtime chaos kill/resume harness (Phase A) #158), pointing to §5.11 for the numbers and caveats. No other table rows restructured.

Methodology (RG3 Phase A)

A SIGKILL crash-timing suite (#158) that drives the actual stream-mode indexer (portal/portal-realtime.ts via a Ponder app) against a deterministic mock Portal (scripted /stream NDJSON with forks, 409 fork-negotiations, 204 idle phases, redelivery re-serves, /finalized-head script). A phase-aware kill controller reads the mock's "phase reached" markers so kills land deterministically in the intended state rather than by sleep-guessing. After each kill the process is restarted and the resumed store is digested and compared whole-cluster against an unkilled baseline for that class.

Six timing classes: K1 mid-append · K2 mid-stream at a varying interior block · K3 during redelivery await · K4 during a finalize-defer streak · K5 at a fork/409 cutover-handler entry (409 + wrong-fork variants) · K6 at the historical→realtime cutover.

Result (verbatim)

Metric Value
Kills, total 238 (7 sub-runs × 34: K1, K2, K3, K4, K5/409, K5/wrongfork, K6/cutover)
Timing classes 7 sub-runs across the 6 classes (≥6 required)
Clean resumes 238 / 238 (0 non-ok)
Store↔app digest match 238 / 238 byte-identical (0 mismatch)
Duplicate FINALIZED rows 0 (204 finalized rows scanned across K2–K5 — dup check load-bearing)

All three RG3 thresholds met: 238 ≥ 200 kills across 7 ≥ 6 classes, 100% clean resumes, byte-identical digests.

Non-vacuity self-certified in the harness. All 34 K6 kills recorded killStats.stream == 1 (kill lands on a real backfill→live cutover, not the startup /finalized-head probe — the original bug #158's adversarial review caught). K2's kill-block varied across 8 distinct interior blocks {103…110}, recovered empirically from the kill phase log. Both are load-bearing in the accepted conjunction (k6CutoverNonVacuousOk, k2KillSpreadOk), mutation-verified.

Candid caveats (folded into §5.11)

  • Mock-driven against scripted Portal semantics. Proves crash-timing safety (SIGKILL at any point in the ingest/finalize/cutover loop → byte-identical resume), not live-protocol reorg/finalize semantics.
  • K5 = mock-side handler reachability (409 + wrong-fork entries), not a real client fork-choice splice; the injected wrong finalized head is not consumed within the scenario window. The real wrong-fork-finalize FATAL guard is proven by the portal-realtime.test.ts unit test, not by K5.
  • K6 = MEDIUM–LOW-fidelity mock cutover — proves the fix (kills land on a live cutover, not startup), but the cutover is scripted, not organic.
  • invariant() = a fatal-string tripwire matching all seven real fatal throws in portal/portal-realtime.ts, not the primary death detector — a real client process-death fails the run regardless.

What it does / does not prove

Crash-timing safety against a scripted mock: the stream path resumes byte-identical after a SIGKILL at any point in its mock-driven ingest/finalize/cutover loop. It does not establish live-protocol reorg survival, live finalize-boundary reconciliation, multichain ordering, or long-run availability — those are RG4 (multichain stream soak + live crash drills) and RG5 (A/B soak).

Draft — held for independent review before un-drafting.

🤖 Generated with Claude Code

dzhelezov and others added 2 commits July 12, 2026 03:52
…ult + candid caveats

Record the RG3 Phase-A realtime-chaos result into the validation dossier and
mark the RG3 gate row as MET in the stream-realtime campaign plan.

VALIDATION.md §5.11 (new, self-contained): methodology (mock-driven SIGKILL
crash-timing suite over the actual stream-mode indexer, phase-aware kill
controller, whole-cluster digest vs unkilled baseline), the verbatim numbers
(238 kills across 7 timing-class sub-runs, 238/238 clean resumes, 238/238
byte-identical digests, 0 duplicate FINALIZED rows over 204 finalized rows
scanned), the K6-cutover non-vacuity fix + K2 kill-spread self-certification,
and the candid mock-fidelity caveats (scripted not live semantics; K5 =
handler reachability; K6 = MEDIUM-LOW-fidelity cutover; invariant() = fatal
tripwire not the primary death detector) with an explicit "what this does NOT
prove -> RG4/RG5" boundary. Does not rewrite §5.8 (that is the RG6 task).

Harness source: #158.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ee nit)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dzhelezov dzhelezov marked this pull request as ready for review July 12, 2026 03:57
…erage scope)

Fold two taste-seat candor nits on the RG3 Phase-A subsection, both in the
weakening/precision direction:
- K6 caveat: 'live stream cutover' → 'stream-phase cutover (after a block has
  actually streamed)', removing 'live' where the passage is conceding low
  mock fidelity (the doc draws a sharp mock-vs-live boundary elsewhere).
- Conclusion: 'SIGKILL at any point in ... loop' → 'at each of the exercised
  crash points (the K1–K6 timing classes) spanning ... loop', so the sentence
  claims discrete crash-class coverage, not continuous per-instruction coverage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dzhelezov dzhelezov merged commit d56d34b into main Jul 12, 2026
14 checks passed
@dzhelezov dzhelezov deleted the docs/rg3-chaos-validation branch July 12, 2026 10:54
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