Repository navigation
#4: plain tj onboard honors --plan / prompts for plan tier - #148
Merged
Merged
Conversation
Plain `tj onboard` only prompted for daily budget and silently ignored `--plan`, so `[budget.<provider>] plan` was never written — breaking plan-aware dollar rendering and contradicting the docs. - The plain path now honors `--plan <tier>` non-interactively and prompts for it interactively (Claude-first: offers the Anthropic tiers). An OpenAI-only tier (plus/team/enterprise) is routed to `[budget.openai]`; everything else to `[budget.anthropic]`. Non-interactive with no `--plan` writes no plan section (no hang, no presumptuous default). - Confirmation line + CLAUDE.md wording updated to match. The `--claude-code` / `--codex` global integration flows are unchanged. Tests: --plan writes the right [budget.<provider>] section (api/max_5x → anthropic, plus → openai), no-plan non-interactive writes none, output is valid TOML. Full suite green (711); ruff/mypy clean. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This was referenced Jun 19, 2026
Merged
HoomanDgtl
pushed a commit
to HoomanDigital/tokenjam
that referenced
this pull request
Jun 20, 2026
TokenJam v0.4.0 — major release. Significant new product surface beyond the 0.3.x patch cadence: - TokenJam Lens UI rebrand: Overview triage front door, Optimize detail tab, real charts (uPlot, vendored offline), URL-state filters, plan-tier-aware framing on all dollar-bearing surfaces. - Reuse — the 5th analyzer + `tj report --reuse` artifact export (HTML + Markdown skeleton sidecars). - New `core/framing.py` — single source of truth for plan-tier rendering, consumed by both CLI and REST API. - `estimated_recoverable_usd` contract on every savings analyzer (Metabuilder-Labs#111), normalized to a single time basis (Metabuilder-Labs#122) so Overview tiles are directly comparable. - `cache_write_tokens` surfaced through DB → API → CLI → UI (Metabuilder-Labs#149) — fixed the ~91% hidden cost driver on cache-heavy workloads. - Security: `.tj/config.toml` untracked (Metabuilder-Labs#145) + CI guard (`tests/unit/test_no_tracked_dev_secrets.py`). - 17 v0.3.5 post-release findings closed (Metabuilder-Labs#141) + 5 Lens UI bug rounds (Metabuilder-Labs#126-Metabuilder-Labs#136) + onboard `--plan` honored on plain path (Metabuilder-Labs#148). ## Also in this commit **Step 6 in the pre-release checklist** is corrected to match real behavior: `tj report --reuse` with the daemon running exits with the "needs direct database access" hint (workaround: `tj stop`). Long-term fix tracked as Metabuilder-Labs#154 for v0.4.1. **Test outputs committed.** `tests/results/` was gitignored; flipping it so per-release pre-release test logs ship as part of the repo for historical reference. Two v0.4.0 result logs included: the first pass (which surfaced two bugs fixed in PR Metabuilder-Labs#153) and the clean re-run after those fixes landed. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.
Closes #4 (from the v0.3.5 smoke test #141 — HIGH).
Plain
tj onboardonly prompted for daily budget and silently ignored--plan(_prompt_planwas wired only into the--claude-code/--codexflows), so
[budget.<provider>] planwas never written — breaking plan-awaredollar rendering and contradicting the docs/CLAUDE.md.
Fix
--plan <tier>non-interactively and promptsfor it interactively. It's Claude-first: the prompt offers the Anthropic tiers,
an OpenAI-only
--plan(plus/team/enterprise) is routed to[budget.openai],everything else to
[budget.anthropic].--planwrites no plan section (no hang underCI/non-TTY, no presumptuous default) — current behavior preserved when unused.
and updated the CLAUDE.md onboard wording.
The
--claude-code/--codexglobal integration flows are unchanged.Tests
tests/unit/test_onboard_plan.py:--planwrites the right[budget.<provider>]section (api/max_5x → anthropic, plus → openai), no-plannon-interactive writes none, and the generated config parses as valid TOML.
Full suite green (711);
ruff check tokenjam/+mypyclean.Note
The reporter ran
tj onboard --plan api --forceand got a silent no-op — thatexact case now writes
[budget.anthropic] plan = "api".