Skip to content

chore: dead-code sweep across core classes (plan 014, steps 1-6)#82

Merged
DavertMik merged 6 commits into
mainfrom
chore/dead-code-sweep
Jul 12, 2026
Merged

chore: dead-code sweep across core classes (plan 014, steps 1-6)#82
DavertMik merged 6 commits into
mainfrom
chore/dead-code-sweep

Conversation

@DavertMik

Copy link
Copy Markdown
Contributor

Implements plan 014 (plans/014-dead-code-sweep.md), Steps 1–6 — deletes provably-unreferenced code from the core classes. 339 deletions, ~30 insertions. No behavioral change: every item was grep-verified callerless before deletion, and the full suite stays green.

What's removed

  • action-result.ts: saveBrowserLogs(), saveHtmlOutput(), the now-dead browserLogsContent getter, unused Diff.ariaRemoved.
  • action.ts: expect(), caputrePageWithScreenshot(), waitForInteraction(), setActor(), getCurrentState() (exact dup of getActionResult()), the expectation field + prevActionResult local, 6 unused imports; the never-read experience param on Action.attempt/Explorer.attemptAction (dead arg stripped at all call sites, incl. boat/doc-collector).
  • explorer.ts: ensureActiveTestPageAvailable(), getCurrentUrl(), getConfigPath(), reload(), hasPlaywrightLocator(), setUserResolve()+userResolveFn; collapsed the impossible !this.config guards in getConfig()/start().
  • state-manager.ts: getCurrentContext(), getPreviousState(), loadHtmlFromFile() (byte-for-byte copy of ActionResult's), unused tag/outputPath imports + orphaned JSDoc.
  • explorbot.ts: isReady(), needsInput, getConfigParser(), unused agentEmoji; dead captain.setQuartermaster/setHistorian + rerunner.setQuartermaster wiring (kept tester's + rerunner.setHistorian).
  • navigator.ts: never-read experienceCompactor dep (field/param/assignment/import) + the construction arg; unused WebPageState. planner.ts: unused getStyles.
  • conversation.ts: write-only id + generateId(), production-unused addUserImage() (2 tests reworked to push a non-string message directly — same coverage). provider.ts: getProviderOptionsForAgent/getReasoningForAgentprivate; CONTEXT_LENGTH_PATTERNS → module const.

Verification

  • bun test tests/unit755 pass, 0 fail; bun run lint clean; bunx tsc --noEmit723 ≤ 724 baseline; bun test tests/integration/planner.test.ts → 11 pass.
  • Fable-reviewed (APPROVE) — every deletion verified callerless; the experience-param removal and guard collapses confirmed behavior-neutral.

Scope notes

🤖 Generated with Claude Code

DavertMik and others added 5 commits July 12, 2026 03:08
action-result.ts: delete uncalled saveBrowserLogs()/saveHtmlOutput(), the
now-dead browserLogsContent getter, and the unused Diff.ariaRemoved getter.

action.ts: delete uncalled expect(), caputrePageWithScreenshot(),
waitForInteraction(), setActor(), getCurrentState() (exact dup of
getActionResult()), the unused prevActionResult local and expectation field;
drop 6 unused imports. Remove the never-read `experience` param from
Action.attempt and Explorer.attemptAction and the dead arg at all call sites
(the callers' skip-experience intent was never functional — follow-up).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Delete uncalled Explorer methods: ensureActiveTestPageAvailable(), getCurrentUrl(),
getConfigPath(), reload(), hasPlaywrightLocator(), and setUserResolve() + the
never-read userResolveFn field (drop the forwarding line in explorbot.ts; keep
ExplorBot.setUserResolve and App.tsx). Collapse the impossible `!this.config`
guards in getConfig()/start() (config is a required ctor param). Drop unused
UserResolveFunction/outputPath imports. Also strip the now-dead 3rd attempt() arg
from boat/doc-collector call sites (it imports Explorer from src).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Delete uncalled getCurrentContext() and getPreviousState(), and loadHtmlFromFile()
(a byte-for-byte copy of ActionResult.loadHtmlFromFile). Drop the now-unused tag
and outputPath imports and an orphaned JSDoc block. (The knowledge scanner is left
untouched — plan 010 removes it and is not yet in main; see report.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
explorbot.ts: delete isReady(), needsInput field, getConfigParser(), the unused
agentEmoji local, and the dead captain.setQuartermaster/setHistorian +
rerunner.setQuartermaster wiring (captain consumes neither; rerunner consumes only
getHistorian). Keep tester's wiring and rerunner.setHistorian.

navigator.ts: delete the never-read experienceCompactor field/param/assignment/
import and drop the argument at the explorbot construction site; drop the unused
WebPageState import. planner.ts: drop the unused getStyles import.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Conversation: delete the write-only id field + generateId(), and the
production-unused addUserImage() (the two unit tests that used it now push a
non-string message directly, preserving their cleanupTag/hasTag coverage).

Provider: make getProviderOptionsForAgent/getReasoningForAgent private (only
internal callers), and move CONTEXT_LENGTH_PATTERNS to a module-level const.

Skipped (entangled with the still-open plan-007 PR #75, which rewrites clone()/
invokeConversation): Conversation.clone() and Provider.lastConversation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 12, 2026

Copy link
Copy Markdown

Explorbot Self-Regression

Commit 6051fc7 · run

Scenario Result Attempts Duration
basic (native) PASS 2/3 15m
experience: control OK — failed as expected 1/1 1m
experience: seeded PASS 1/3 57s

Attempt details

  • basic (native) attempt 1 — FAIL: login evidence: PASS (post-login plan=true, post-login research=true); research: PASS (files=7, wellFormed=true, keywords=7/3); scenarios: PASS (tests=7/5, features=4/3); tests passed: FAIL (3 passed, 2 failed (reporter: 3 passed, 2 failed))
  • basic (native) attempt 2 — PASS: login evidence: PASS (post-login plan=true, post-login research=true); research: PASS (files=7, wellFormed=true, keywords=7/3); scenarios: PASS (tests=6/5, features=4/3); tests passed: PASS (5 passed, 0 failed (reporter: 5 passed, 0 failed))
  • experience: control attempt 1 — PASS: control: OK — failed as expected (0 passed, 1 failed)
  • experience: seeded attempt 1 — PASS: seeded: PASS (1 passed, 0 failed)

Session analysis — basic (native):

Session Analysis

The Issues list feature was exercised across 5 tests covering creation, search, label filter, status filter, and detail view navigation. All core flows executed successfully: issues can be created and appear in the list with correct count, search filters the table to matching results, label and status dropdowns filter correctly, and clicking a row opens the detail view with full information.

Coverage

  • Pages: /issues, /issues?new=1, /issues?q=crashes&status=, /issues?label=1, /issues?q=&status=closed, /issues/5
  • Features: Issue creation via toolbar, search filtering, label filtering, status filtering, issue detail view

What works

  • Issue creationET-1 Create a new issue via toolbar button
  • Search filteringET-2 Filter issues by search term
  • Label filteringET-3 Filter issues by label
  • Status filteringET-4 Filter issues by status
  • Detail view navigationET-5 View issue details by clicking an issue row

Execution Issues

  • ET-3 Filter issues by label — initial click on "All labels" link failed, fell back to "Filter by label" button
  • ET-4 Filter issues by status — click on combobox option failed initially, recovered via selectOption

@DavertMik DavertMik merged commit 6d624a3 into main Jul 12, 2026
3 checks passed
@DavertMik DavertMik deleted the chore/dead-code-sweep branch July 12, 2026 09:45
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.

1 participant