Skip to content

refactor: drop redundant Pilot experienceTracker param + tracker access cleanup#85

Merged
DavertMik merged 2 commits into
mainfrom
refactor/tracker-di-cleanup
Jul 13, 2026
Merged

refactor: drop redundant Pilot experienceTracker param + tracker access cleanup#85
DavertMik merged 2 commits into
mainfrom
refactor/tracker-di-cleanup

Conversation

@DavertMik

@DavertMik DavertMik commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #84 (merged). Removes the remaining redundant tracker plumbing and tidies access.

Changes

  • Pilot: same footgun as Navigator — its only caller passed the shared ExperienceTracker and Pilot already holds explorer, so the optional experienceTracker? param + || null was pure redundancy. Dropped the param and the field; getExperienceToc() derives it lazily from explorer.
  • createAgentTools: took experienceTracker + a getState closure solely to build the learnExperience tool — redundant for Pilot/Tester/Captain/Navigator (all derived them identically from explorer), while Rerunner encoded "no experience tool" by omitting them. Replaced both with a single explicit withExperience flag (default on); the tracker + state are derived lazily inside the tool's execute (registering tools never touches getExperienceTracker, so minimal test explorers are safe). Rerunner passes withExperience: false. Removes the duplicated getState closure from all four call sites.
  • Captain.getKnowledgeTracker()explorBot.knowledgeTracker() (owned instance; works before the explorer starts).
  • Type-only importsimport type (state-manager, captain, historian, navigator); dead ActionResult imports removed (explorbot, web-mode).

Verification

bun run lint clean; bunx tsc --noEmit at baseline (no new src errors); full unit 765/0 (incl. a new withExperience: false case); integration 63/0.

Deliberately not changed

Knowledge mid-session-refresh TTL stays removed per the "knowledge is persistent" decision.

🤖 Generated with Claude Code

…ss cleanup

- Pilot: same redundancy as Navigator — its only caller passed the shared
  ExperienceTracker and Pilot holds `explorer`. Drop the param and the field;
  derive lazily in getExperienceToc() (avoids touching explorer at construction,
  which the duck-typed test explorer lacks).
- Captain.getKnowledgeTracker(): use explorBot.knowledgeTracker() (the owned
  instance) instead of getExplorer().getKnowledgeTracker() — works before the
  explorer is started.
- Convert now-type-only tracker imports to `import type` (state-manager, captain,
  historian, navigator) — trims runtime import edges.

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 3fc32ec · run

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

Attempt details

  • basic (native) attempt 1 — PASS: login evidence: PASS (post-login plan=true, post-login research=true); research: PASS (files=8, 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 page functionality was explored: creating issues, searching by text, filtering by status, filtering by label, and clearing filters. All core flows work correctly.

Coverage

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

What works

  • Create issueET-1 Create new issue via toolbar button
  • Search by textET-2 Search for issue by text and verify filtered results
  • Filter by statusET-3 Filter issues by status and verify results
  • Filter by labelET-4 Filter issues by label and verify results
  • Clear filtersET-5 Clear search filters and verify full list restored

…ence flag

createAgentTools took experienceTracker + a getState closure purely to build the
learnExperience tool — redundant for Pilot/Tester/Captain/Navigator (all derived
them identically from explorer), and Rerunner encoded "no experience tool" by
omitting them. Replace both params with a single `withExperience` flag (default on);
derive the tracker + state lazily inside the tool's execute (so registering tools
never touches getExperienceTracker — safe for minimal test explorers). Rerunner
passes withExperience: false to keep excluding it. Drops the duplicated getState
closure from all four call sites.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@DavertMik DavertMik merged commit 3ec0349 into main Jul 13, 2026
3 checks passed
@DavertMik DavertMik deleted the refactor/tracker-di-cleanup branch July 13, 2026 19:44
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