Commit 9eadd50
chore(portal): wave-4 dead-code removal and simplifications
Removes the verified-dead code and never-fire machinery from the wave-4
review; no behavior change on any production path.
Deletions (grep-verified zero importers):
- portal/realtime.ts + realtime.test.ts — the RPC endpoint-probe module;
nothing imported it and it shipped in the published npm artifact.
- portal/config.ts — the pre-wiring-patch injection path; sync-upstream.sh
already annotated it "(deleted)" and excluded it from the graft. Its sole
remaining importer, harness/compat/analyze.test.ts's withPortal case, is
dropped with it (getPortalDataset/withPortal were used only there) so the
repo-root `node --test harness/compat/*.test.ts` job stays green.
- StateDiff/toStateDiff + statediffs.json fixture — no producer or consumer.
- DiscoveryState.status — written on every transition, read by nothing
(and wrong as telemetry under chained extensions).
- checksEnabled/checksStrict — unreferenced invariant-mode helpers.
- rankTraces' strict INV-5 assert — ranks are strictly increasing by
construction (the forEach counter); same rationale as INV-2's
deliberately-omitted per-row assert. INVARIANTS.md cell updated.
Simplifications:
- reconcile()/portalRealtimeEvents' anchor is REQUIRED — the optional
legacy mode preserved exactly the blind-append hole INV-10 closed, and
production always passed an anchor.
- FinalizedHead collapses to { number, hash? } (the bare-number variant
was test-only).
- streamHotBlocks' inline field-projection fallbacks are replaced by the
shared BLOCK_FIELDS/LOG_FIELDS constants (single source, no drift).
- traceSafeChunkBlocks loses its "compat" re-export in portal-transform
and its env-reading default parameter (INV-14: env is parsed once into
PortalConfig; the shell always passes cfg.traceChunkBlocks).
- STREAM_REALTIME drops the always-true Boolean(chain.portal) conjunct.
Graft suite green on 0.16.6 and 0.15.17 (15 files, 205 tests each);
harness/compat green (6 tests, the withPortal case dropped with config.ts).
Portal-layer coverage +1.0 stmts (the dead module leaves the denominator).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 06b9f99 commit 9eadd50
18 files changed
Lines changed: 76 additions & 545 deletions
File tree
- harness/compat
- portal
- __fixtures__
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
91 | 90 | | |
92 | 91 | | |
93 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 101 | + | |
105 | 102 | | |
106 | 103 | | |
107 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | | - | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
0 commit comments