Skip to content

Release v0.1.2 - #7

Merged
anilmurty merged 1 commit into
mainfrom
release-v0.1.2
Apr 7, 2026
Merged

anilmurty merged 1 commit into
mainfrom
release-v0.1.2

Conversation

@anilmurty

Copy link
Copy Markdown
Contributor

Summary

Bump version to 0.1.2 with changelog covering all changes since v0.1.1.

Fixed

  • ocw serve wrong metrics port
  • Launchd daemon install graceful degradation
  • DuckDB lock error when CLI runs alongside ocw serve

Added

Changed

  • README and CLAUDE.md updates

After merge

Create a GitHub release with tag v0.1.2 to trigger the PyPI publish workflow.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@anilmurty
anilmurty merged commit 0e92245 into main Apr 7, 2026
4 checks passed
@anilmurty
anilmurty deleted the release-v0.1.2 branch April 8, 2026 20:57
anilmurty pushed a commit that referenced this pull request Jul 2, 2026
The "tokenmaxxing → tokenminimizing" cultural shift (June 2026) means a
spend-brag card now repels while an efficiency/quota card aligns, and the
subscription majority has no dollar spend to brag about at all. The old card
rendered an (ironic) spend-tier ladder — the wrong polarity.

Reframe the card to a quota/efficiency artifact:
- Lead with the context-COMPOSITION headline from #4's
  compute_context_diagnostic: what share of quota went to overhead (re-reading
  history / CLAUDE.md / tool output) vs real work (uncached input + output).
- Classify into 5 efficiency tiers keyed on the overhead share (lower = leaner
  = a better tier), replacing the 6-tier spend ladder.
- Render quota-native via core/framing, mirroring #5's polarity: headline is a
  token-share / "% of cycle tokens"; dollars are demoted to a secondary
  "Implied API value" line shown only for api plans, suppressed for
  subscription / local / unknown. No dollar spend-brag for subscription users.
- Frame the action line as reclaimable quota (points at tj context).
- Add a --weekly "Quota Wrapped" recap preset (7-day window + recap copy).

The card now needs a direct DuckDB connection (it reads context composition),
matching tj context / tj quota-audit. Tests rewritten to assert the efficiency
framing (composition + reclaimed, not spend-brag) and quota-native suppression
of dollars for a subscription plan, plus weekly mode and the api secondary line.
Updated the two forward-looking release checklists and CLAUDE.md to match.

Co-Authored-By: Claude <[email protected]>
anilmurty added a commit that referenced this pull request Jul 23, 2026
…ost advisories (#525)

* feat(optimize): monthly savings basis, auto-computed cost advisories, resend adapter

The Review inbox needs numbers on an explicit "/ mo" projected basis, kept
separate from the window-scoped figures Overview/Optimize already compare
tiles against. Relearn clusters and cost proposals now carry their own
estimated_monthly_usd/estimated_monthly_tokens fields (relearn extrapolates
occurrences over the corpus's own observed timespan; cost proposals reuse
downsize's existing 30-day projection or a generic window-days
extrapolation for every other analyzer). Relearn also derives a blended
$/token rate from the cluster's own sessions when one is inspectable, so a
priceable figure can lead instead of falling back to tokens-only.

Cost-proposal recomputation previously ran only on the manual refresh
endpoint, so a fresh install's cost-advisories tab stayed on "never_run"
indefinitely. tj serve now schedules the same startup-kick + 6h-interval
job the relearn detector already has, and a failed recompute records and
surfaces its error instead of silently degrading to an empty list.

The resend (context re-send) analyzer had real recoverable savings but no
cost-proposal adapter and was excluded from COST_ANALYZERS; it now has one,
alongside a comment on why summarize deliberately stays out (it owns a
separate curate/diff review surface this single-card shape can't represent).

Co-Authored-By: Claude <[email protected]>

* feat(ui): restructure Review inbox into tabbed layout

Rebuilds the Review inbox around three tabs (Recurring mistakes / Cost
advisories / Applied) instead of one long stacked page, matching the
approved mockups:

- Two headline stat tiles: estimated recoverable per month (dollars when at
  least half the open items are priceable, tokens otherwise) and verified
  saved.
- Human-readable fix-type badges instead of internal rung/analyzer jargon
  (PROMPT TWEAK / CACHE BREAKPOINT / GUARDRAIL for relearn; DOWNSIZE / CACHE
  / TRIM / etc for cost advisories), with the internal detail kept in a
  tooltip.
- Items sort by est./mo descending within each tab; past 8 open items the
  remainder collapses into one expandable row with bulk dismiss/mark-applied
  actions, so a long tail of small fixes reads as one bundled decision
  instead of dozens of peers.
- The cost-advisories tab shows an inline warning when the last scheduled
  refresh failed, instead of reading a stale/empty list as "nothing to
  report."
- Applied items always show their estimate labeled "est.", never a
  "verified" chip — the post-hoc verification pass that would produce a
  real measured figure was already removed from this codebase for making
  unsupportable realized-savings claims, and the dead verdict/ledger
  scaffolding that used to render an inert placeholder here is removed too.

Plan-tier dollar suppression, the per-item Approve/Apply modal, bulk
dismiss, and localStorage dismissal keys all carry over unchanged.

Co-Authored-By: Claude <[email protected]>

* test: update UI regression fixtures for the redesigned Review inbox

Follows the Review inbox restructure: component/string fixtures now match
the tabbed layout, monthly-basis figures, and renamed row/card components.

Co-Authored-By: Claude <[email protected]>

* test: cover monthly-basis fields, resend adapter, and the honest applied tile

Adds unit coverage the prior commits landed without: relearn's corpus-window
extrapolation and blended dollar rate (including the degrade-on-query-
failure and no-conn paths), the generic vs. downsize-native monthly
extrapolation split in cost_proposals.py, the resend adapter's advisory
shape, and recompute_cost_proposals' locking + error-surfacing (a failed
recompute records its error without wiping the last good result, and clears
on the next success).

Also updates the UI regression fixtures for the "Fixes applied" tile's final
wording (the founder revised behavioral requirement #7 mid-implementation
to explicitly ban any "verified" claim and specify the exact sub-line copy)
and drops a genuinely-unused pre-existing import ruff flagged in the same
file.

Co-Authored-By: Claude <[email protected]>

* fix(ui): sort Cost/Recurring tabs by tokens, format billions, fix tail dollar rule

Real-data validation against a live 40-day store surfaced three gaps:

Sort order wasn't savings-descending on either tab. sortByEstMonthly ranked
by dollars the instant ANY item in the list carried one, leaving every other
(tokens-only) item tied at rank 0 and rendered in adapter-insertion order.
Tokens are the one figure every item on this page carries, priced or not, so
ranking now uses estimated_monthly_tokens uniformly; dollars stay a per-item
display preference (estMonthlyLine), decoupled from ranking, since comparing
a priced item against a tokens-only one for ordering purposes would mean
inventing a conversion rate.

Large token counts rendered ugly at billion scale ("11268.0M tok" instead of
"11.3B tok") — fmtTokens gets a billion-scale branch above the existing
million/thousand ones.

The collapsed long-tail row's combined figure used the same "dollars if ANY
item has one" rule as the old sort, understating a mostly-tokens-only tail
as a tiny dollar sum; it now uses the same priceable-majority rule the
headline stat tile already applies.

Co-Authored-By: Claude <[email protected]>

* fix(optimize): backfill monthly-basis fields on a pre-redesign cost cache

The founder's headline "Model over-sizing" card had a genuinely computable
dollar figure (its own evidence text showed "$1.15 per 30 days") but the
card's headline still rendered tokens. The adapter code that sets
estimated_monthly_usd is correct and was verified to match its own evidence
text exactly for a fresh recompute; the discrepancy traces to a cost-proposal
cache written before the monthly-basis fields existed on CostProposal, whose
JSON simply lacks those keys. Reading a stale entry back would otherwise show
a tokens-only headline for a priceable item indefinitely, until the next
successful scheduled recompute (up to 6h away).

list_cost_proposals now backfills estimated_monthly_usd/estimated_monthly_tokens
from the window-basis fields (which every cache entry, old or new, always
carries) on read, mirroring the existing defensive proposal-ID stamping this
same function already does for the identical reason: a stale cache resolves
correctly without forcing a recompute. A fresh proposal (which always has
these fields set via _with_monthly_extrapolation) is never touched.

Co-Authored-By: Claude <[email protected]>

* feat(ui): always show dollars on the Review inbox, scoped to that page only

Deliberate product decision: the Review inbox's dollar figures are a
savings/waste comparison, not a billed-amount claim, so this page now shows
them unconditionally rather than falling back to tokens for a
subscription-dominant account the way every other dollar figure in the app
does. Verified against a real account (87% subscription-billed, Max 20x
plan): the API payload already carried correct estimated_monthly_usd values
for every priced item, but the page was needlessly gating them behind the
same plan-tier suppression rule that governs Overview/Optimize/etc.

ReviewInboxView now always passes suppressed=false to every dollar-first
decision point on the page (the two stat tiles, each row/card, the
collapsed-tail combined figure, and the Applied tab). dollarsSuppressed()
itself is untouched and still governs every other surface in the app.

One documented exception survives the carve-out: the resend/TRIM card is a
structural token-share measurement, not a savings claim (its own evidence
text says so), so it stays tokens-only even though its own
estimated_monthly_usd is a real, non-null number — routed through a small
shared helper so the exclusion can't be bypassed at any of the several call
sites that read a dollar figure.

Verified end-to-end against a live 40-day store via headless browser: the
two "Model over-sizing" cards that previously showed tokens-only now show
their dollar figures ($0.76 and $0.36 per month), the posthog MCP removal
shows $396.00, the resend card stays token-only, and the headline tile shows
$525.40.

Co-Authored-By: Claude <[email protected]>

* fix: pin ruff below 0.16 to unblock CI's Lint step

ruff 0.16.0 (released after main's last verified-green CI run) expanded
ruff's own default lint rule set. This project has no [tool.ruff.lint]
select/ignore block, so it always runs whatever the installed ruff
version's defaults are. An unpinned `ruff` in the dev extras meant CI's
`pip install -e ".[dev,mcp]"` picked up 0.16.0 the moment it hit PyPI and
started flagging roughly 470 pre-existing patterns across the whole
codebase that 0.15.x never checked, breaking every PR's Lint step (the
first step in the test job, before Type check or Run tests) for a reason
with zero relation to that PR's own diff.

Pinned to the 0.15.x line, verified clean against the exact version
(0.15.22) CI last ran green with on main. Bulk-fixing or re-triaging the
~470 newly-flagged patterns is out of scope here; that's a deliberate
future ruff bump, not a side effect of an unrelated PR.

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: Anil Murty <[email protected]>
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.

1 participant