Skip to content

repo: incidental-complexity sweep (−1.9k LOC) - #260

Merged
lannbot merged 1 commit into
mainfrom
review/incidental-complexity
Sep 2, 2026
Merged

repo: incidental-complexity sweep (−1.9k LOC)#260
lannbot merged 1 commit into
mainfrom
review/incidental-complexity

Conversation

@lannbot

@lannbot lannbot commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Adversarial review for incidental complexity across the whole tree, then execution of every finding. Five parallel reviewers over disjoint territories; every deletion verified against repo-wide usage (consumers, generated code, CI) before removal. Net: +614 / −2386.

Dead code (verified zero callers)

  • deferredCapability, setMaxFlatResultsForTesting (+ MAX_FLAT_RESULTS now const), containsAsyncValue, NO_EVENT, isBulkListKind — orphans of the PR embedder: structured-clone-safe boundary forms (A20, #131) #219 window
  • no-op try/catch in translateCached (both branches rethrew unmodified)
  • tools/browser/gen-overlay.ts (no invoker; classifier frozen at closed M3A-1)
  • tools/smoke-c0/repro_stream_pump.ts + repro task (fixed bug, superseded by host_pump_test.ts)
  • duplicate debug-id minting in intrinsics unified onto dbgId (trace ids now correlate across probes)

Speculative hedges

  • sockets platform seam: optional-capability members made required — the seam has one backend and it implements all of them; one dead fallback would have livelocked a guest (would-block instead of not-supported) if ever reachable. Option-honesty not-supported paths preserved.
  • cli({ passthrough }) — set by nobody, buggy (newline-injecting)
  • http({ version }) rc re-keying — only caller was its own test with a fabricated version; the manual re-key escape remains documented
  • sync() accessor-property branch — hedged an input the producer never produces
  • digest structural-diff machinery — unreachable from the real handshake (bindgen embeds only the hash, firstDivergence always null); contracts/digest.md amended to the behavior that ships: fails fast on mismatch. Codegen comment fixed + six generated headers regenerated (comment-only delta).

Surface trims (the breaking labels)

  • runtime: @internal version/casing parser exports off ./embedder (parseLeafName, parseSemver, trackKey, …); DigestMismatch.firstDivergence field removed
  • wasi: CliOptions.passthrough, HttpOptions.version removed
  • ct-runner: @internal re-exports (Context/tags/TESTS_INTERFACE…) and the ./imports + ./run subpaths removed; ImportAnalysis kept (return type of public analyzeImports)
  • protocol: RUNTIME_COPIES un-exported (own doc: @internal; the contract's example uses Symbol.for)

Versions: lockstep 0.5.2 → 0.6.0 (+ RUNTIME_VERSION), protocol 0.2.4 → 0.3.0. Conventions goldens byte-identical.

Consolidation

  • protocol mark-decorator triplication → module-private makeMark (exports, messages, behavior byte-identical; tests unchanged)
  • bindgen CLI: bare-vs-generate-subcommand duplication deleted (bare form kept — the one generated headers document)
  • wit-bindgen-core dependency dropped: its only use was Source as a string buffer; replaced with a snapshot-verified byte-identical local buffer, freeing wit-parser to pin =0.252.0 alongside translator-shim's wasmparser and deleting the 28-line pin-pairing essay

Fixtures / config / docs

  • yield-only + backpressure-probe guests deleted (built every CI run, consumed by no test)
  • harness/deno.json browser:* tasks + dead exports map removed (lanes run via just browser-lane)
  • AGENTS.md gates listing collapsed onto the justfile (it had drifted: missing three recipes)
  • stale sync-streams upstream filing kit dropped (pin advanced past its base; tracker File the upstream findings (IROH-1; component-model tracker) #15 untouched)
  • deletion-event archaeology (CM#705/pin-advance migration map: CM#705 removes the may_enter flag/trap #173 and older series) rewritten as forward rationale or removed across runtime and xfail.ts — per operator directive, zero documentation of deletion events

Gates

Full just gates green over the final tree (core suites through conformance/sched-seeds/shells in one run; browsers/smoke-tls/smoke-c0 after a one-time just browsers-install in this worktree). test-npm caught one reviewer miss — the consumer smoke probed the removed ct-runner/run subpath — fixed by dropping the stale probe entry.

…ges, deletion archaeology

Adversarial review across all territories; every deletion verified
against repo-wide usage (incl. consumers, generated code, CI).

Dead code: deferredCapability, setMaxFlatResultsForTesting,
containsAsyncValue/NO_EVENT/isBulkListKind, no-op try/catch in
translateCached, gen-overlay.ts, repro_stream_pump.ts, unified
duplicate debug-id minting onto dbgId.

Speculative hedges: sockets platform seam optional-capability guards
(one backend, implements everything), cli({passthrough}),
http({version}) rc re-keying, sync() accessor branch, unreachable
digest structural-diff machinery (contracts/digest.md amended:
'fails fast on mismatch').

Surface trims (breaking labels): runtime embedder @internal
version/casing exports; ct-runner @internal re-exports plus ./imports
and ./run subpaths; protocol RUNTIME_COPIES. Lockstep 0.5.2 -> 0.6.0
(+ RUNTIME_VERSION), protocol 0.2.4 -> 0.3.0. Conventions goldens
untouched.

Consolidation: protocol mark-decorator triplication -> makeMark;
bindgen CLI bare-vs-subcommand dedupe; wit-bindgen-core dropped for a
local Source buffer (snapshot-verified byte-identical), wit-parser
=0.252.0 pairing with translator-shim.

Fixtures/config/docs: yield-only + backpressure-probe guests deleted
(built every CI run, consumed by nothing); harness/deno.json browser:*
tasks and exports map; AGENTS.md gates listing collapsed onto the
justfile (it had drifted); stale sync-streams upstream filing kit
dropped. Deletion-event archaeology (CM#705/#173 and older series)
rewritten as forward rationale or removed throughout runtime and
xfail.ts.
@lannbot lannbot added breaking/runtime Breaks @polyengine/runtime published surface (caret-incompatible): minor must bump this cycle breaking/wasi Breaks @polyengine/wasi published surface (caret-incompatible): minor must bump this cycle breaking/ct-runner Breaks @polyengine/ct-runner published surface (caret-incompatible): minor must bump this cycle breaking/protocol Breaks @polyengine/protocol published surface (caret-incompatible): minor must bump this cycle labels Sep 2, 2026
@lannbot
lannbot enabled auto-merge September 2, 2026 02:39
@lannbot
lannbot merged commit 19417e2 into main Sep 2, 2026
3 checks passed
@lannbot
lannbot deleted the review/incidental-complexity branch September 2, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking/ct-runner Breaks @polyengine/ct-runner published surface (caret-incompatible): minor must bump this cycle breaking/protocol Breaks @polyengine/protocol published surface (caret-incompatible): minor must bump this cycle breaking/runtime Breaks @polyengine/runtime published surface (caret-incompatible): minor must bump this cycle breaking/wasi Breaks @polyengine/wasi published surface (caret-incompatible): minor must bump this cycle

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants