fix: honor --incognito by disabling the experience tracker (plan 009)#78
Closed
DavertMik wants to merge 3 commits into
Closed
fix: honor --incognito by disabling the experience tracker (plan 009)#78DavertMik wants to merge 3 commits into
DavertMik wants to merge 3 commits into
Conversation
`explorbot --incognito` ("Run without recording experiences") flowed CLI ->
ExplorBot -> Explorer, and Explorer called `new StateManager({ incognito })` —
but StateManager's constructor took no parameters, so the flag was silently
dropped and the ExperienceTracker was always enabled. Incognito runs read and
wrote ./experience like normal runs.
Thread `incognito` into the StateManager constructor and pass
`{ disabled: options.incognito }` to ExperienceTracker (which already supports
`disabled`). Argumentless constructions keep today's enabled behavior via
`options.disabled ?? false`.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Explorbot Self-RegressionCommit
Attempt details
Session analysis — basic (native): Session AnalysisThe Issues list page core flows work: creating new issues, searching by text, filtering by label, and viewing issue details all function correctly. The status filter functionality works (ET-3 verification passed), but the automation stalled after verification, requiring investigation. Coverage
What works
Execution Issues
|
… (plan 010) (#79) * refactor: delegate StateManager knowledge loading to KnowledgeTracker StateManager contained a complete second implementation of knowledge-file loading (scanKnowledgeFiles + its own cache + dir resolution) that had diverged from KnowledgeTracker.loadKnowledgeFiles — most importantly, the StateManager copy did NOT run ${env.*}/${config.*} interpolation. Researcher (the only production consumer of the StateManager copy) therefore saw raw ${env.PASSWORD} text while Navigator, TaskAgent, ExperienceTracker and commands saw interpolated content for the same page. Delete the copy and delegate to KnowledgeTracker (the CLAUDE.md single owner of the knowledge dir), sharing one tracker instance from Explorer. Make the tracker scan recursively (superset of both implementations), invalidate its isLoaded cache on addKnowledge (so a same-instance /learn read sees the write), and unify the two divergent Knowledge types onto one exported interface. Intended behavior deltas: the 30s rescan is gone (in-app writes picked up via addKnowledge invalidation), recursive scan now applies to every consumer, and Researcher now receives interpolated knowledge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix: give KnowledgeTracker a 30s refresh TTL (mid-session knowledge staleness) Deleting StateManager's knowledge scanner (which rescanned every 30s) left the shared KnowledgeTracker caching forever; addKnowledge's isLoaded invalidation is per-instance, so /learn (which builds its own tracker) and hand-edited files were never picked up by Explorer's shared instance until restart — and CLAUDE.md's documented "30-second refresh" existed nowhere. Restore the refresh in the single owner: loadKnowledgeFiles re-scans when the cache is older than 30s (KNOWLEDGE_REFRESH_MS), so on-disk changes from any source reach every consumer. Same-instance addKnowledge still forces an immediate reload via isLoaded=false. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: DavertMik <davert@testomat.io> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
Closing — re-creating plans 009 and 010 as separate independent PRs off main (this branch had both entangled). |
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.
Implements plan 009 (
plans/009-wire-incognito-flag.md) — a P2 bug fix (deferred finding CORRECTNESS-03).Problem
explorbot --incognitopromises "Run without recording experiences". The flag travels CLI → ExplorBot → Explorer, and Explorer callsnew StateManager({ incognito: ... })— butStateManager's constructor took no parameters, so the object argument was silently ignored and theExperienceTrackerit created was fully enabled. Incognito runs read and wrote./experience/exactly like normal runs; the user's explicit "don't learn from this session" request was dropped without any error (no typecheck gate to catch it).Fix
Thread
incognitointo the constructor and pass it through to the tracker, which already supports{ disabled }:disabled: undefinedcollapses tofalsevia the tracker'soptions.disabled ?? false, so the two argumentlessnew StateManager()call sites keep today's behavior.explorer.ts:85was already correct and needs no edit.Verification
new StateManager({ incognito: true })→ disabled tracker; default → enabled. (Asserted via the plan's sanctioned(tracker as any).disabledfallback.)bun test tests/unit→ 728 pass, 0 fail;bun run lintclean.Known gap (out of scope, per plan)
Agents that construct their own
ExperienceTracker(Navigator, Captain) bypass this flag until the DI-consolidation plan lands.🤖 Generated with Claude Code