Skip to content

chore: dead-code sweep steps 7-10 (agents + trackers)#86

Open
DavertMik wants to merge 4 commits into
mainfrom
chore/dead-code-sweep-2
Open

chore: dead-code sweep steps 7-10 (agents + trackers)#86
DavertMik wants to merge 4 commits into
mainfrom
chore/dead-code-sweep-2

Conversation

@DavertMik

Copy link
Copy Markdown
Contributor

Completes plan 014 — the remaining steps of the dead-code sweep (steps 1–6 landed in #82). Deletes provably-unreferenced code from the agents and trackers. ~186 deletions, no behavioral change: every item was grep-verified callerless (including tests) before deletion, and the full suite stays green.

What's removed

  • tester.ts: unused promptLogStep(), the write-only executionLogFile field + its assignment/outputDir/stale comment, the dead isStateChanged computation (its only reader was a commented-out block, also removed), and unused imports (WebPageState, Note, codeToMarkdown, ConfigParser).
  • researcher.ts: unused textContent() + the unused node:path join import. research-result.ts: unused updateSection().
  • captain.ts: unused getConversation()/cleanConversation() (callers use Tester's). driller.ts: unused getCurrentPlan()/getConversation() + currentConversation field/assignment + dead Conversation import. fisherman.ts: unused getMode().
  • rerunner.ts: unused listTests() + its now-dead import; the always-'' test field dropped from healedSteps and from Historian.rewriteScenarioInFile's param type; the redundant includes guard removed there (String.replace already no-ops when the substring is absent).
  • historian.ts / historian/utils.ts: the unused isNonReusableCode/stripComments re-exports (every consumer imports from step-analyzer directly).
  • experience-tracker.ts: unused hasRecentExperience() and the no-op cleanup() (comment-only body) + its StateManager.cleanup() call and 2 test calls. knowledge-tracker.ts: unused resolve import. experience-compactor.ts: the ExperienceFile re-export (compact-command repointed to experience-tracker directly).

Skipped (re-verify found them not-dead)

  • Captain.processExecutionError() — production-dead, but its 4 tests mock Explorer.handleExecutionError, so they can't be retargeted to test real logic (the plan's suggested retarget). Kept method + tests per the plan's STOP guidance.

Verification

bun run lint exit 0; bunx tsc --noEmit728 = before-count (not higher); bun test tests/unit764/0; bun test tests/integration63/0. Diff is deletions + import repoints only. Fable-reviewed (APPROVE after fixing one orphaned import): all deletions confirmed callerless, same-named live methods (Tester.getConversation, ExplorBot.getCurrentPlan, StateManager.cleanup, …) untouched, and the two non-pure-deletions (redundant guard, no-op cleanup) confirmed behavior-neutral.

🤖 Generated with Claude Code

DavertMik and others added 4 commits July 13, 2026 00:53
Tester: delete unused promptLogStep(), the write-only executionLogFile field +
its assignment/outputDir/stale comment, the dead isStateChanged computation (its
only reader was a commented-out block, also removed), and unused imports
WebPageState/Note/codeToMarkdown. Researcher: delete unused textContent().
research-result: delete unused updateSection().

Skipped (re-verify found live callers): researcher's `join` import (used across
the file) — the plan's assumption it was unused no longer holds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Captain: delete unused getConversation()/cleanConversation() (callers use
Tester's, not Captain's). Driller: delete unused getCurrentPlan()/getConversation()
+ the currentConversation field/assignment + now-dead Conversation import.
Fisherman: delete unused getMode(). Rerunner: delete unused listTests() + its
now-dead test-files import; drop the always-'' `test` field from healedSteps and
from Historian.rewriteScenarioInFile's param type; remove the redundant
`includes` guard there (String.replace already no-ops when the substring is
absent). Delete the unused re-exports in historian.ts and historian/utils.ts
(every consumer imports isNonReusableCode/stripComments from step-analyzer directly).

SKIPPED: Captain.processExecutionError() — production-dead but its 4 tests mock
Explorer.handleExecutionError, so they can't be retargeted to test real logic
(the plan's suggested retarget). Kept method + tests per the plan's STOP guidance.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ExperienceTracker: delete unused hasRecentExperience() and the no-op cleanup()
(body was comment-only); drop the guarded cleanup() call from StateManager.cleanup()
and the two afterEach() test calls. KnowledgeTracker: drop the unused `resolve`
import. ExperienceCompactor: drop the `export type { ExperienceFile }` re-export;
repoint compact-command to import ExperienceFile from experience-tracker directly
(the original source).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tester.ts: ConfigParser (its only use was the deleted executionLogFile block).
researcher.ts: node:path `join` (all in-file `.join(` are Array.prototype.join;
the node:path import was unused — a Step 7 plan item I first mis-skipped on a
grep false-positive).

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 67d2907 · run

Scenario Result Attempts Duration
basic (native) FAIL 3/3 28m

Attempt details

  • basic (native) attempt 1 — FAIL: login evidence: PASS (post-login plan=true, post-login research=true); research: PASS (files=5, wellFormed=true, keywords=7/3); scenarios: PASS (tests=8/5, features=4/3); tests passed: FAIL (4 passed, 1 failed (reporter: 4 passed, 1 failed))
  • basic (native) attempt 2 — FAIL: login evidence: FAIL (post-login plan=false, post-login research=true); research: PASS (files=1, wellFormed=true, keywords=6/3); scenarios: FAIL (tests=0/5, features=0/3); tests passed: FAIL (no Results line)
  • basic (native) attempt 3 — FAIL: login evidence: FAIL (post-login plan=false, post-login research=true); research: PASS (files=1, wellFormed=true, keywords=6/3); scenarios: FAIL (tests=0/5, features=0/3); tests passed: FAIL (no Results line)

Session analysis — basic (native):

Session Analysis

The Issues page filtering and search capabilities were tested. Core flows for creating issues, filtering by status, filtering by label, and text search all work. However, combining status and label filters simultaneously is not supported—the UI resets one filter when applying the other.

Coverage

  • Pages: /issues
  • Features: Create issue, filter by status, filter by label, text search, combined filters

What works

  • Create issue with all fieldsET-1 Create New Issue with All Fields
  • Filter by statusET-2 Filter Issues by Status
  • Filter by labelET-3 Filter Issues by Label
  • Text searchET-4 Search Issues Using Text Search

Defects

[Medium] Label filter resets status filter, preventing combined filtering

Affects: ET-5 Apply Combined Filters (Status and Label)
Reproduce:

  1. Apply status filter (e.g., "Open")
  2. Click a label filter link (e.g., "bug")
    Evidence: URL changes to /issues?label=1, dropping the status parameter. Result shows only label filter applied.
    The UI has no combined filter mechanism. Clicking a label link acts as a navigation that replaces the existing filter state rather than adding to it.

Execution Issues

  • ET-1 Create New Issue with All Fields — status column locator failed to find "Open" text despite status being functional in other tests

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