Repository navigation
perf: measure the second create and its teardown in the lynx-table gate - #235
Merged
Merged
Conversation
Every op in the deterministic wire-cost gate measures a first create on a virgin root. No cross-framework harness measures create that way past its first repetition: the web runner rebuilds a case's pre-state before each sample, so repetition 2 onward creates over whatever the previous clear left behind. A path available only to a virgin container therefore reads as fast here and slow there, and nothing in this suite could tell the two apart. Add `clear` and `recreate` to `runTable`, last and in that order so every op above them keeps measuring the tree the first create built. Both carry the same one-command gate the first create does: retiring a run names the run, not its rows, and mounting the replacement is the same single template-run command the first mount was. Both hold at 1k and 10k. What the command counts cannot see is how much of that one command the receiver expands back into per-host work, so `meta.rows_*.warmCycle` records it beside the create/recreate prepare split. Today the clear synthesizes ten commands per row — 100,000 at 10k — with `denseValidate` at zero, which says the certified teardown was never attempted and the `destroy-run` went to the expansion fallback. Those stay informational rather than gated because the receiver is paying them now; issue #230 carries the attribution. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019RsC3U39kUuLKajZANeTVy
This was referenced Aug 29, 2026
Huxpro
marked this pull request as ready for review
August 30, 2026 12:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#230 Order 3, the attribution half. This adds the instrument the split needed and
reports what it found; no product code changes.
Every op in the deterministic wire-cost gate measures a first create on a virgin
root. No cross-framework harness measures create that way past its first repetition:
the web runner rebuilds a case's pre-state before each sample
(
RESET_EACH_SAMPLEinpackages/runner/src/harness-web.mjs), so repetition 2 onwardcreates over whatever the previous clear left behind. A path available only to a virgin
container therefore reads as fast in this suite and slow in that one, and nothing here
could tell the two apart. That is exactly the shape of the ~728 ms create residual at
10k.
clearandrecreateare added torunTable, last and in that order, so every opabove them keeps measuring the tree the first create built. Both carry the same
one-command gate the first create does — retiring a run names the run, not its rows,
and mounting the replacement is the same single template-run command the first mount
was. Both hold, at 1k and 10k.
What the command counts cannot see is how much of that one command the receiver
expands back into per-host work, so
meta.rows_*.warmCyclerecords it beside thecreate/recreate prepare split.
What it found
clear.synthesizedCommandsclear.denseValidatecreatepreparerecreateprepareA certified teardown consumes the
destroy-runwhole and synthesizes nothing. Theexpansion fallback rebuilds one remove, one destroy and one listener detach per host
out of accepted state — the ten commands per row above. The zero beside it is the
proof: the certified path times its validation in
denseValidate, so zero means it wasnever attempted and the
destroy-runwent toexpandRecordsRunTeardown.Root cause, from a temporary probe at the two decision sites (reverted, not in this
diff): the app negotiates
compactAck: 1andlazyPublicInstances: 1, and its createcommit still reaches
prepareLynxHostBatchwith{ announcesPublicInstances: true }and nothing else.
deferPublicInstancesandincrementalCompactRequested(
core/transport.ts) both hang offpostFirstTreeLazyPublicInstances, which is onlyever set inside the first-tree adoption handoff; the main thread's
record.postFirstTreeUpgradeis symmetric, set only inactivateFirstTreeCapabilities.A root that paints no first screen never reaches either, so no commit after its first is
compact, no
teardownMirrorCandidateis accepted, and every clear takes the fallback.Full attribution, including a candidate fix that failed and what its failure proved
about
state.compactHosts, is on #230.Left deliberately un-gated:
synthesizedCommandsand the prepare split. The receiver ispaying them today, and landing a knowingly-red gate would be worse than recording the
number where a fix has to move it.
Validation
pnpm format:checkpnpm typecheckpnpm testnode benchmarks/bench.mjs --only lynx-table --ratios— PASS, 30/402 guardschecked (was 26 before this diff).
commands + synthesizedCommandsandcommands + createdElementsbreaches all four at 10001x / 7001x / 100001x /70001x and exits 1. Restored.
LYNX_TABLE_SCALES=1000,10000 node run.mjs 1at both scales.pnpm format:fileson every changed file, andpnpm sync(no generated changes).benchmarks/lynx-table/workload.tsbelongs to no TypeScript project —typecheck:filesdeclines it — so the Vite build inside
run.mjsis its only typecheck, and it builds.Risk / follow-ups
node --test benchmarks/lynx-table/stages/*.test.mjshas one pre-existing failureon the merged base
8938c1260, unrelated to this diff and reproduced with theworktree stashed:
stages/results/issue57-clear-teardown.jsonis no longerbyte-identical to what
writeEvidenceJsonproduces — the record predates theheapand
wireblocks the writer now emits. Worth a separate refresh; I did not touch ithere.
run.mjsis slightly longer at 10k.new-lynx@8938c1260has been queued since 03:06:39Z andnever started, so this branch's base has no repository CI evidence of its own.
Provenance
agent-authored)Generated by Claude Code