Skip to content

Commit 303b762

Browse files
dzhelezovclaude
andcommitted
docs(plan): RG0 ratified — RT-G13 isolated cutover clamp verified INERT (NOT-A-BUG)
RG0's ground-truth question (does the isolated historical->realtime cutover adopt a stale-LOW refetched boundary?) is resolved: it does NOT. Upstream's own adoption guard in getHistoricalEventsIsolated breaks before the assignment whenever (finalizedBlock.number - syncProgress.finalized.number) <= finalityBlockCount; a stale-low clamp gives a negative delta, always <= finalityBlockCount, so the below-floor boundary is never adopted. The multichain site's floor: is load-bearing only because that site's post-catchup assignment is unconditional; the isolated site has no such path. Verified three ways: two blind reviewers (independent reasoning + grafted-source read across all pinned versions) plus a first-hand re-check of raw upstream 0.16.9 historical.ts:827-835. RT-G13 reclassified must-verify->must-fix => should-fix: RT-2 still lands the floor for defense/doc-parity, but the mutation-verified test pins the upstream guard (weaken the <= comparison => stale-low block adopted => fail), not the floor. Records the RG0 verdict + marks the RG0 gate MET in the campaign plan. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent d56d34b commit 303b762

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

.agents/plans/stream-realtime-production.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ and nowhere else; it is gated on the complete dossier, not on judgment.
3434

3535
| Gate | Name | One-line exit criterion |
3636
|------|------|------------------------|
37-
| RG0 | Ground truth ratified | This plan merged; RT-G13 (cutover floor) verified true-bug-or-not with a written verdict |
37+
| RG0 | Ground truth ratified | This plan merged; RT-G13 (cutover floor) verified true-bug-or-not with a written verdict. **MET** — plan merged ([#157](../../pull/157)); RT-G13 verified **INERT / NOT-A-BUG** (upstream guards isolated adoption — verdict in the RT-G13 register entry below), so RT-2 reclassifies to should-fix (defense / doc-parity). |
3838
| RG1 | Must-fix code landed | RT-1/RT-2/RT-3 merged: mutation-verified tests, committee review, both-version gates green |
3939
| RG2 | Fail-loud audit complete | Fatal-injection suite + silent-gap fuzzer green in CI; no enumerated silent path survives |
4040
| RG3 | Realtime chaos passed | ≥200 kills across ≥6 timing classes, 100 % clean resumes, byte-identical digests. **MET (Phase A, [#158](../../pull/158))** — 238 kills / 7 timing-class sub-runs, 238/238 clean, byte-identical, 0 dup FINALIZED; K6-cutover + K2-spread non-vacuity self-certified. Numbers + candid mock-fidelity caveats in VALIDATION §5.11. |
@@ -177,6 +177,23 @@ gates RG1), **should-fix** (lands during the campaign, doesn't gate the label by
177177
`floor: hexToNumber(params.syncProgress.finalized.number)` mirroring the multichain site. Even if
178178
upstream is proven to guard, land the floor anyway as a cheap docstring-parity/defense fix — but
179179
then classified should-fix and the test asserts the floor is inert.
180+
- **RG0 verdict — VERIFIED, NOT-A-BUG (isolated adoption is guarded, not unconditional).** Grafted
181+
upstream `packages/core/src/runtime/historical.ts` (`getHistoricalEventsIsolated`; raw-upstream
182+
0.16.9 lines 827–835, grafted lines shift down where the Portal clamp is inserted above the guard)
183+
`break`s *before* the boundary assignment whenever
184+
`hexToNumber(finalizedBlock.number) − hexToNumber(params.syncProgress.finalized.number) <= params.chain.finalityBlockCount`,
185+
and only otherwise runs `params.syncProgress.finalized = finalizedBlock`. A stale-LOW clamp yields a
186+
**negative** delta, which is always `<= finalityBlockCount` (≥ 0), so the `break` fires and the
187+
below-floor boundary is **never adopted**. The multichain site's `floor` is load-bearing only because
188+
*its* post-catchup assignment is unconditional (`syncProgress.finalized = finalizedBlocks[i]` for
189+
every chain once catchup fires); the isolated site has no such unconditional path. Confirmed by two
190+
blind reviewers (independent reasoning + a grafted-source read across all pinned versions —
191+
0.15.17 / 0.16.6–0.16.9, same guard shape) and re-verified first-hand against raw upstream 0.16.9.
192+
**Reclassified must-verify→must-fix ⇒ should-fix (RT-2, defense / doc-parity):** still land the
193+
`floor` mirroring the multichain site, but the mutation-verified test **pins the upstream guard**
194+
(weaken the `<= finalityBlockCount` comparison ⇒ a stale-low block gets adopted ⇒ the test fails),
195+
**not** the floor — removing the floor alone cannot fail the test, since the guard already prevents
196+
the regression.
180197

181198
### RT-G14 (new) — Restart/resume of the realtime region: zero empirical evidence
182199
- **Analysis**: the design argument is sound — crash recovery reverts unfinalized app rows to the
@@ -209,7 +226,7 @@ gates RG1), **should-fix** (lands during the campaign, doesn't gate the label by
209226
| RT-G10 | must-fix | RT-1 (progress watchdog) |
210227
| RT-G11 | must-fix | RT-1 (read idle bound → reconnect) |
211228
| RT-G12 | must-fix | RT-1 (poll decoupled from delivery) |
212-
| RT-G13 | must-verify → must-fix | RT-2 (isolated cutover floor) |
229+
| RT-G13 | verified INERT (RG0) → should-fix | RT-2 (floor for parity; test pins the upstream guard, not the floor) |
213230
| RT-G14 | evidence | RG3 |
214231
| RT-G15 | evidence | RG3 K5 + RG2 seam test |
215232

0 commit comments

Comments
 (0)