Repository navigation
Delete options no caller sets, single-caller forwarders and dead selector alternates - #6013
Merged
Merged
Conversation
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.
leaf-agent
approved these changes
Nov 15, 2026
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.
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/anddev/. 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.declarationsflag that was always False.accept_event,PageTransaction.owned_byandpage_eventsonly forwarded.final_textandreply_so_farwere the same function.createThreadLandingbuilt a stateless object whose members forwarded to module functions.landIn,landInThreadandreturnToThreadare module exports now.stageAuthoredStatestook anexistingmap that every caller passed empty.presentedControl's fallback was applied three times. Margin rows typed four fields optional that their one caller always sets.data-midand.lf-thread[data-id], which the runtime no longer emits. That madeleaf-dev site verifymiss news on thread cards. They now readdata-lf-eventand 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.