Repository navigation
test(network-escape): serve the last probe from a double and retire the burn-down list (objectui#7307) - #8289
Conversation
…he burn-down list (objectui#7307)
Batch 6, the last row of the network-escape burn-down.
`FlowNodeInspector.specKeys.test.tsx` reached a real socket at
`http://localhost:3000/api/v1/meta/object` three times per run — once per
render — because `FlowNodeInspector` renders `FlowReferenceField`, whose
`useMetadataListOptions` resolves options through `MetadataClient.list(type)`
over the authenticated wrapper's bare global `fetch`. It now serves that route
from the recording double the sibling `FlowNodeInspector.inactiveRetained.test.tsx`
carries: an empty `{ type, items: [] }` registry, which is byte-identical to what
the failed read already produced through the hook's `.catch`, so no assertion
moves. The double records every URL and its `afterEach` fails on any URL outside
the route, so an escape elsewhere reds here instead of vanishing.
That empties `KNOWN_ESCAPES`, so the burn-down machinery is retired with it,
which is what the ledger pin's own non-vacuity floor prescribed for reaching
zero. Gone: the set, the attributed-stderr branch that kept listed files green,
the known/unknown split, and the `Do NOT add this file to KNOWN_ESCAPES` line of
the `Fix:` text. Kept, untouched: the recording `fetch` wrapper and the
`afterEach` that fails ANY escape in ANY file — the standing guard of
objectui#6640, which was never part of the burn-down and now covers every file.
`scripts/__tests__/network-escape-ledger.test.ts` is replaced rather than
deleted: it now pins that the machinery is GONE (no export, no list in the
guard's code) and that the standing guard is still installed. The pressure the
old pin resisted went up, not away — every escape is now red with no list to
join, so re-creating the list is the cheapest wrong fix available to the next
author who meets that red. Its absence checks read the guard through
`scripts/js-comment-mask.mjs`, because the guard's header explains at length that
there is no list any more and a naive text search would find the name in prose.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
|
ACCEPT (#7307 batch 6 — the last row, and the burn-down list retired with it) — reviewed on the tree at head Verified from the diff, not the report:
Next: CI convergence → flip ready → post-flip guard → auto-merge SQUASH → queue confirmation → landing probe on re-fetched Generated by Claude Code |
|
Flip deferred: CI converged all green on Generated by Claude Code |
|
Armed: PR #8289 flipped ready at 2026-09-07T09:32:34Z on head Generated by Claude Code |
|
LANDED: merged at 2026-09-07T09:49:48Z as Generated by Claude Code |
Fixes #7307
Batch 6 — the last row of the network-escape burn-down. The ledger reaches zero here, so the burn-down machinery is retired with it.
BEFORE (base
fc32921aa)pnpm exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/FlowNodeInspector.specKeys.test.tsx— exit 0 (green while escaping, which is objectui#6640 exactly). Three attributed escapes, one per render:plus 3 ×
Error: connect ECONNREFUSED 127.0.0.1:3000.pnpm exec vitest run scripts/__tests__/network-escape-ledger.test.tson the base — exit 0, 3 tests,PINNED_LEDGER.length === 1.Traced call path:
FlowNodeInspectorrendersFlowReferenceFieldfor every reference-kind key on the selected node;useMetadataListOptions(FlowReferenceField.tsx:638) resolves options throughMetadataClient.list(type)—GET /api/v1/meta/objectover the authenticated wrapper's bare globalfetch(packages/auth/src/createAuthenticatedFetch.ts). Under happy-dom that global is a real HTTP client and the document URL defaults tohttp://localhost:3000, so the relative path resolved to a live socket. Same path the batch-5 siblingFlowNodeInspector.inactiveRetained.test.tsxfixed.AFTER (
e09bb3e50)inspectors/+scripts/__tests__/union, at final HEADrecord-details.hideEmptyRetired-7129.test.tsxThe guard's
afterEachis silent for the wholeinspectors/directory: 67 files, 770 tests, not one socket.The double is the shape the sibling carries — a recording router, not a blanket stub. It answers
/api/v1/meta/objectwith an empty{ type, items: [] }registry (byte-identical to what the failed read already produced through the hook's.catch, so no assertion moves), records every URL, and itsafterEachfails on any URL outside that route. Teardown order per objectui#7439:cleanup()beforevi.unstubAllGlobals().The retirement — decision (b), and why
The old pin's own non-vacuity floor prescribed this, verbatim: "If the ledger genuinely reached zero … delete the guard's KNOWN_ESCAPES machinery and this pin together, rather than leaving a pin that asserts nothing."
GONE from
vitest.setup.network-escape-guard.ts: theKNOWN_ESCAPESset; the attributed-stderr branch that kept listed files green (with the now-deadwriteStderr/StderrHostit existed for); theunknown = seen.filter(!KNOWN_ESCAPES.has)split; theDo NOT add this file to KNOWN_ESCAPESline of theFix:text; and the header's burn-down section, rewritten to record that the list reached zero on this card.KEPT, untouched: the recording
fetchwrapper and theafterEachthat fails ANY escape in ANY file — the standing guard of objectui#6640, which was never part of the burn-down. ItsFix:remedy (double + teardown order) stays, because it is still the remedy.The pin: (b), replaced, not deleted —
scripts/__tests__/network-escape-ledger.test.tsnow pins that the machinery is gone and the standing guard is still installed. Four axes:Kept at the same path deliberately: an agent who greps
network-escape-ledger— because the guard's old text told them the two move together — lands on the retirement pin and reads why there is no list.The absence checks read the guard through
scripts/js-comment-mask.mjs, the tree's one answer to "comment, or code?". That is load-bearing: the guard's header now explains at length that there is noKNOWN_ESCAPES, so a naive text search finds the name in prose and the pin could never go green. APROSE_ONLYcontrol asserts masking is actually working, so the negatives cannot pass over unmasked text.Ablation — the retirement pin reds if the list comes back
Mutated the committed tree (
git checkout HEAD --restore, absolute paths,trap … EXIT INT TERM): re-added anexport const KNOWN_ESCAPES = new Set([...])to the guard.On-disk proof, not an editor exit code —
export const KNOWN_ESCAPEScount0 → 1; blob94c4d099…→19226b8c….Result: exit 1,
2 failed | 3 passed— the namespace test (exports nothing) and the code test (declares no allowlist), which is the predicted direction and both halves.Restore proven by bytes, not by an exit code:
git hash-objectback to94c4d099bb946c65de342ebc0482e106ed17bbaa= the HEAD blob;git diff HEADempty;git statusclean.Standing-guard proof (scratch, never committed)
A scratch test in a file no list ever named, fetching
http://localhost:3000/api/v1/x, under the guard:Exit 1, with the full
Fix:text and no trailing "Do NOT add this file to KNOWN_ESCAPES" line. Scratch deleted;git statusclean andgit diff HEADempty afterwards.Mentions updated
packages/plugin-detail/src/renderers/__tests__/record-details.hideEmptyRetired-7129.test.tsx— its "⛔ NotKNOWN_ESCAPES: that list only shrinks" comment now says there is no list to join at all.scripts/check-doc-example-shared-reader.mjs— itsKNOWN_HAND_SPELLINGSheader cited the ledger as "the same shape"; now cites it in the past tense and points at what the file pins today.Deliberately not touched:
.changeset/network-escape-batch{1,2,3,4}.mdand.changeset/network-escapes-batch5.mdnameKNOWN_ESCAPES/PINNED_LEDGER. They are pending release notes describing what those PRs did, and they are accurate as written; rewriting four other PRs' unreleased changesets is the third-party touchcheck-changeset-overwrite.mjsexists to discourage.AGENTS.mddoes not name the list.Gates (exit codes, at
e09bb3e50)vitest run …/FlowNodeInspector.specKeys.test.tsxvitest run …/inspectors/ scripts/__tests__/vitest run …/record-details.hideEmptyRetired-7129.test.tsxpnpm lint:rootpnpm --filter @object-ui/app-shell --filter @object-ui/plugin-detail run type-checktsc --noEmitandtsc -p tsconfig.test.json, so the test files are covered)pnpm check:control-bytespnpm check:entry-guardnode scripts/check-changeset-presence.mjsnode scripts/check-changeset-overwrite.mjsnode scripts/check-changeset-no-major.mjsnode scripts/check-governed-queue-guard.mjs --test(all 6 paths)Dependency closure built first (
pnpm --filter '@object-ui/app-shell^...' --filter '@object-ui/plugin-detail^...' build) — without ittype-checkfails with 16 phantomTS2307s from stale/absentdist/*.d.ts, which would have read as "your change broke the imports".Changeset:
.changeset/network-escapes-batch6.md, empty frontmatter — test-only, no product source touched, nothing to release.Generated by Claude Code