Skip to content

Remove code nothing reads and correct references to names that are gone - #5696

Merged
leaf-agent merged 2 commits into
mainfrom
nightly/unread-runtime-state
Nov 8, 2026
Merged

leaf-agent merged 2 commits into
mainfrom
nightly/unread-runtime-state

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

This removes four pieces of code nothing reads and corrects comments, a test docstring, a note and an eval rubric that name things since renamed or removed. The one change that affects a result is the shared-contribution-actions rubric: it accepted className, an entry option the runtime has refused since #5329, and failed answers that use action or voice, which ENTRY_OPTIONS accepts. It now lists exactly the entry options, and a runtime test (tests/runtime/contribution-entry-schema.test.mjs) fails when the rubric's options, behaviors, tones, ranks or states differ from CONTRIBUTION_ENTRY_SCHEMA, which now also lists the entry options under options. Nothing else changes at runtime.

Dead code:

  • buttonReadings / buttonCommand in keyboard/scopes.js. The map was still filled on every button reflection, but Previews say only the keys that reach a control and take Escape first wherever they show; the shift watch credits a preview riding its target #5638 moved its two runtime readers (command hints and control keys) onto reachingNow. Five asserts in tests/runtime/command-controls.test.mjs read it. Each of those tests still asserts the button's aria-disabled, and where it presses the button, what the press runs.
  • publishing() on the application in framework/application.js, which has no caller.
  • A second aria-label write on the command reference's close control. closeControl already writes that label through roleElement.
  • PredecessorReading.committed_active in validation/source_history.py, which no reader uses. The local variable of that name still picks the predecessor.

Stale references:

  • undo.js says a Resolve offers Undo, but since Offer each moment's next press at the panel field's end #5630 a Resolve offers Undo only when it leaves no thread open.
  • traffic.js says sends and acked count only /api/event, but they also count /api/media uploads.
  • lf-call-diff.js names setChildren; rows are placed with setChildLists.
  • margin-layout.js and annotation-theme.css name seatRows, which is now seatRow.
  • Three chrome.css comments name foldOut and msgNode, which no longer exist, or describe a rule that no longer follows them.
  • A tests/browser/margin/test_entries.py docstring names syncInlineOffers, which no longer exists.
  • notes/feeds/README.md linked the closed Explore independent jobs #4058 as open work. It now points at the notes/threads.md section that issue's closing comment named.

Verified locally:

  • pnpm run test:runtime: 898 pass. The new test fails when className is put back in the rubric.
  • tsc -p browser/types/tsconfig.json.
  • pnpm run check:browser and pnpm run test:browser.
  • tests/model/test_interact_document.py and test_interact_anchors.py: 308 pass.
  • pre-commit on the changed files, including knip, eslint and dependency-cruiser.

Found by the nightly survey and review of recent commits. Two findings are left out on purpose:

  • data-lf-go-to-active has lost its only stylesheet reader (Draw the contents map inside its sidebar track #5637), but ten tests and dev/leaf_dev/states.py use it as the signal that the sequence is armed.
  • The developing-leaf glossary still names seatRows. It sits under .claude/, which needs the control-plane owner's approval.

Dead code:
- keyboard/scopes.js: drop `buttonReadings` and its `buttonCommand` reader.
  #5638 moved command hints and control keys onto `reachingNow`, leaving only
  tests reading it. The five command-controls asserts that read it go; each
  test still asserts the button's `aria-disabled` and what its press runs.
- framework/application.js: drop the `publishing()` method, which nothing calls.
- keyboard/command-reference.js: drop an `aria-label` write that `closeControl`
  already makes.
- validation/source_history.py: drop `PredecessorReading.committed_active`,
  which nothing reads; the local of that name still picks the predecessor.

Stale references:
- evals/shared-contribution-actions: the rubric's accepted entry options now
  match `ENTRY_OPTIONS`. It accepted `className`, which the runtime refuses
  since #5329, and refused `action` and `voice`, which it accepts.
- undo.js: a Resolve offers Undo only when it leaves no thread open (#5630).
- traffic.js: `sends` and `acked` also count /api/media uploads.
- lf-call-diff.js: rows are placed with `setChildLists`.
- margin-layout.js, annotation-theme.css: `seatRows` is `seatRow`.
- chrome.css: drop three comments naming `foldOut`, `msgNode` and a rule that
  no longer follows them.
- tests/browser/margin/test_entries.py: inline hosts are built in
  inline-contributions.js, not `syncInlineOffers`.
- notes/feeds/README.md: #4058 is closed; point at notes/threads.md's section.

No runtime behavior changes.
@max-sixty

Copy link
Copy Markdown
Owner

@leaf-agent The rubric fix still leaves a handwritten copy of ENTRY_OPTIONS in evals/shared-contribution-actions/case.yaml. The base AGENTS.md requires a code-owned list to be referenced, or a test to hold a necessary prose list to its code owner; tests/AGENTS.md includes eval fixtures among schema consumers. Please derive the rubric options from browser/runtime/contribution-model.js, or add a focused consistency test that fails when the two lists differ. That protects the scoring rubric from the same drift this PR repairs.

This was written by Codex on behalf of max-sixty

The `shared-contribution-actions` rubric spells out the entry options and
enum values the runtime accepts, a handwritten copy of `ENTRY_OPTIONS` and
the schema's value lists. `CONTRIBUTION_ENTRY_SCHEMA` now also lists the
entry options under `options`, and a runtime test fails when the rubric's
lists differ from the schema's, so the rubric can't drift again the way
its `className` did.
@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Added the consistency test in bd5c2aa. CONTRIBUTION_ENTRY_SCHEMA now also exports the entry options under options, with ENTRY_OPTIONS built from that list. tests/runtime/contribution-entry-schema.test.mjs parses the rubric and fails when its options, behaviors, tones, ranks or states differ from the schema. With className put back in the rubric, the test fails. pnpm run test:runtime passes (898), and the type check and pre-commit pass on the changed files. module-annotations.md now mentions the new options field.

@leaf-agent
leaf-agent merged commit 7bbf429 into main Nov 8, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the nightly/unread-runtime-state branch November 8, 2026 07:15
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.

Explore independent jobs

2 participants