Repository navigation
Fix #616: Refresh Review inbox relearn cache from tj optimize - #701
Merged
anshss merged 2 commits intoAug 9, 2026
Merged
Conversation
Contributor
|
| Filename | Overview |
|---|---|
| tokenjam/cli/cmd_optimize.py | Persists a direct-mode relearn finding to the Review inbox cache while leaving daemon and omitted-analyzer paths untouched. |
| tests/integration/test_cli.py | Verifies that full and relearn-only direct optimize runs replace a stale cached finding with the newly computed result. |
Sequence Diagram
sequenceDiagram
participant User
participant CLI as tj optimize
participant Analyzer as build_report
participant Cache as relearn_store
participant Inbox as Review inbox
User->>CLI: Run direct optimize
CLI->>Analyzer: Compute requested findings
Analyzer-->>CLI: OptimizeReport
alt Relearn finding present
CLI->>Cache: write_cache(finding)
end
CLI-->>User: Render report
Inbox->>Cache: Read persisted finding
Cache-->>Inbox: Relearn clusters
Reviews (4): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile
Axiya3749
force-pushed
the
fix/616-refresh-relearn-store
branch
from
August 6, 2026 12:23
4a33e8b to
da2dc19
Compare
Axiya3749
force-pushed
the
fix/616-refresh-relearn-store
branch
from
August 6, 2026 12:42
da2dc19 to
13657ed
Compare
Contributor
|
@Axiya3749 thanks for pr! lgtm! |
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.
tj optimizecomputed and displayed a fresh relearn finding locally, but never persisted that finding to the Review inbox cache. This allowed the CLI and inbox to report different cluster counts until the daemon independently recomputed the cache.Summary
tj optimizeruns.tj optimizeandtj optimize relearn.Related issue
Closes #616
Tests / Verification
env -u FORCE_COLOR .venv/bin/python -m pytest tests/integration/test_cli.py -k 'optimize and not validate' -q.venv/bin/ruff check tokenjam/cli/cmd_optimize.py tests/integration/test_cli.py.venv/bin/mypy tokenjam/cli/cmd_optimize.pygit diff --checkWhat's NOT in this PR
tj optimizeperform an inline recompute. The daemon continues to own its scheduled and explicit Rescan workflow.Checklist
tests/factories.py@anilmurtyas reviewer@anilmurty