Skip to content

Delete options no caller sets, single-caller forwarders and dead selector alternates - #6013

Merged
max-sixty merged 2 commits into
mainfrom
codex-signal-bounds
Nov 15, 2026
Merged

max-sixty merged 2 commits into
mainfrom
codex-signal-bounds

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Max asked for a scan of the whole tree for code like the Codex adapter's 20 s bounds (#5994): mechanisms that guard a case that can't occur or is already covered, and layers with no second user. Nine read-only agents covered src/leaf, the browser runtime, the packages, the Worker, the hooks, build/ and dev/. The tree has little of that kind left: no compatibility reads, no validation repeated after an entry point, no deadline plumbing. What remains is mostly options no caller sets and wrappers with one caller. This deletes the ones a reading confirmed, for −70 production lines. Behaviour stays the same except in the dev readers, as the last item says.

  • Export's CSS traversal carried a declarations flag that was always False.
  • accept_event, PageTransaction.owned_by and page_events only forwarded. final_text and reply_so_far were the same function.
  • createThreadLanding built a stateless object whose members forwarded to module functions. landIn, landInThread and returnToThread are module exports now.
  • stageAuthoredStates took an existing map that every caller passed empty. presentedControl's fallback was applied three times. Margin rows typed four fields optional that their one caller always sets.
  • Eleven defaults that every caller overrides, in thread code and leaf-dev, are gone.
  • The dev browser readers still matched data-mid and .lf-thread[data-id], which the runtime no longer emits. That made leaf-dev site verify miss news on thread cards. They now read data-lf-event and the runtime's thread selector, and the website verifier tests' fixtures draw today's DOM.

The candidates left alone guard real cases. Draft validation covers records an earlier runtime wrote to localStorage. The unreadable-service branches cover a server started by another Leaf copy on the shared state home. Unreadable-throw handling covers untrusted sample code (#4739). The Worker's per-step timing logs (about 70 lines) have no reader in the repo, but they can be queried on Cloudflare, so they stay unless Max says otherwise.

Checks: pnpm run test:runtime (974 pass), the browser type check, pre-commit, 191 focused model, process and dev tests, and 11 browser tests over margin pins, obligation walks, replies and the website verifier.

This was written by Claude Code on behalf of max-sixty

A scan for layers that earn nothing found these, each with one caller or none
that uses it. No behaviour changes except where noted.

- Export's CSS traversal carried a `declarations` flag that was always False.
- `event_endpoint.accept_event` only forwarded to `_receive_event`; the body
  now has the public name. `PageTransaction.owned_by` only forwarded to
  `claimant_matches`.
- `AppServerEvents.final_text` and `reply_so_far` were one function.
- `createThreadLanding` built a stateless object whose members forwarded to
  module functions; `landIn`, `landInThread` and `returnToThread` are now
  module exports, and `declareThreadKeys` lands through `landIn` itself.
- `stageAuthoredStates` took an `existing` map every caller passed empty.
- `presentedControl` is one function in leaf.js; the obligation view and
  command hints no longer re-apply its fallback.
- Margin rows always carry `point`, `passage`, `order` and `fold`, so the
  type says so and the reads drop their `?.`/`??` branches.
- Defaults every caller overrides, in thread code and in leaf-dev
  (`merge_base`, `Profile.dominant`, `gallery.media`, `scroll_settled`,
  `reveal`, `overview`, `send_comment`, `LiveSession.during`), and the
  `page_events` alias.
- The dev browser readers matched `data-mid` and `.lf-thread[data-id]`, which
  the runtime stopped emitting. They now read `data-lf-event` and the
  runtime's own thread selector, so `leaf-dev verify-site` attributes news on
  a thread card to its thread again instead of only the panel's view; the
  website verifier tests' fixtures draw the current DOM.
@max-sixty
max-sixty merged commit 0e538e2 into main Nov 15, 2026
5 checks passed
@max-sixty
max-sixty deleted the codex-signal-bounds branch November 15, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants