Skip to content

feat(mod): on a subscription show the next message as a share of the 5-hour limit - #1135

Merged
amiddavid merged 2 commits into
mainfrom
band-next-share
Nov 12, 2026
Merged

amiddavid merged 2 commits into
mainfrom
band-next-share

Conversation

@amiddavid

@amiddavid amiddavid commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Behavior change

  • Who: subscription users of the band and the pane.
  • Old: one token figure for the cache state now: next message 90.0k rd (warm, green) or ○ cache cold · next message 90.0k wr (cold, amber).
  • New: when the learned 5-hour weights pass their checks, the share of the 5-hour limit, warm and cold: next message ≈0.1% of 5h · ≈1.5% if cold. A cold cache shows ○ cache cold · next message ≈1.5% of 5h. Without weights, the old token figure stays.
  • Approved: David Amid, in chat on 2026-11-11 (option 2 of the band discussion).
  • Switch: none. To undo, revert this PR.

Summary

The band now shows what a cold cache costs on a subscription. A cold message uses about 15 times more of the 5-hour limit than a warm one. The token figure could not show that.

Fixes #1095

What changed

  1. cg.py cachestate reads GET /api/me/fivehour-weights on a subscription (when the mod sends the window start). It adds fivehour_weights to the document only when the fit passed its gate.
    • It reads the endpoint at most once a minute, through the on-disk cache, with single flight and back-off.
    • After a failed read, it uses the last copy only while that copy is under 15 minutes old.
    • The mod adds no new request. The existing 15-second poll carries the weights.
  2. model.ts adds the share kind to nextPrice.
    • Warm share = prefix tokens × read weight. Cold share = prefix tokens × write weight.
    • The write weight is the one for the entry's tier (ttl_s 3600 = 1-hour, 300 = 5-minute). The band uses only a weight the fit learned (owner's decision, 2026-11-12). When the fit did not learn the entry's tier, the cold figure stays in tokens (90.0k wr). When the tier is not known, it is the write tier the fit learned (5-minute when it learned both).
    • Rounding: ≈1.5% below 10%, ≈12% from 10%, <0.1% for a tiny share.
    • The mod checks the gate again: ok, a learned read weight, and one learned write weight, each a positive number. Any failure gives the token figure.
  3. register.tsx draws the share as it draws dollars: warm in green, cold dim, cold-only in amber. Below 80 columns row 1 reads next 5h ≈0.1% · ≈1.4% cold. It fits 60 columns with the longest next-ping hint (↻ ping 59:59). The pane shows both shares, the prefix size, and at learned 5-hour weights (1,234 requests).
  4. Docs: docs/plugin/statusline.md (the Subscription bullets under row 1), docs/dashboard.md (who reads the weights), docs/data-dependence.md (the Learned 5-hour weights row).
  5. The Codex copy of cg.py is updated (TestCGScriptsAreVendoredIntoCodex).

Data dependence

Metadata only. No change of level. The band reads the cached prefix's token count and the fitted weights: numbers and flags. The plugin keeps the endpoint's answer in its local cache directory. It reads no request text.

  • Storage off (no dashboard): the endpoint does not answer. The band shows the token figure, as before.
  • Metadata only: works.
  • Everything: works, the same as metadata only.

How it was tested

  • claude plugin test context-guru-plugin: 121 pass, 1 fail. The fail is no data: the band is left to the engine, which also fails on origin/main.
  • New band and pane tests: warm and cold at 140 and 60 columns, the 60-column fit with the longest next-ping hint, the 1-hour tier, an unknown tier, tiny and large shares, five fallback cases (no weights, ok: false, no learned read weight, no learned write weight, a bad number), dollar mode with weights present, and a redraw when weights arrive on a later poll.
  • python3 -I scripts/test_cg_weights.py: 9 pass. It covers the gate, the one-minute cache, the 15-minute limit after a failed read, the back-off, and fail open.
  • A new Go test, TestCGFiveHourWeightsPythonTests, runs that Python file in CI. Go is not installed locally, so the Go tests did not run yet.

Technical notes

  • The cold share needs the proxy's cold price (next_cold_usd) to be present, and the warm share needs next_warm_usd, as the token figure did. Without it that figure does not show.
  • The share does not cap at the room left in the window. A share above 100% shows as is.

🤖 Generated with Claude Code

…5-hour limit

With learned 5-hour weights that pass their checks, the band and the pane
show the next message as a share of the 5-hour limit, warm and cold:
`next message ≈0.1% of 5h · ≈1.5% if cold`. A cold cache shows
`○ cache cold · next message ≈1.5% of 5h`. Below 80 columns the row reads
`next 5h ≈0.1% · ≈1.5% cold`, so it fits 60 columns.

- cg.py cachestate reads GET /api/me/fivehour-weights on a subscription,
  at most once a minute, through the on-disk cache. A failed read uses
  the last copy only while it is under 15 minutes old.
- The cold share uses the write weight of the entry's tier (ttl_s 300 or
  3600), else the write tier the fit learned.
- Without weights, or with a fit below its gate, the band keeps the one
  token figure. Dollar mode does not change.

Fixes #1095

Assisted-By: Claude
Signed-off-by: DAVID AMID <[email protected]>
@amiddavid

Copy link
Copy Markdown
Collaborator Author

Go tests on the eval box, head 464803d:

  • gofmt -l context-guru-plugin: clean.
  • CGO_ENABLED=1 go test -race -count=1 ./context-guru-plugin/...: ok, 382.9 s. This includes the new TestCGFiveHourWeightsPythonTests and TestCGScriptsAreVendoredIntoCodex.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.322 offload-review skill, @amiddavid's session fresh 2 of 2 1 of 2 464803dacf14 blocking

Verdict: blocking

Findings

  1. docs/data-dependence.md:252 — the generated page was edited by hand; the row file was not
    • What fails: the PR edits docs/data-dependence.md (the generated page) directly. It does not edit the row file docs/data-dependence/features/fivehour-weights.md, and it does not run go run ./cmd/gen-datadep. The row file still holds the old text, without the band sentences and without the "band: David Amid, #1095 (2026-11-11)" decision record. The next make datadep (Makefile:50) rebuilds the page from the row files (internal/datadep/datadep.go, cmd/gen-datadep/main.go) and silently drops the whole change.
    • Proof: git diff fa25367e..HEAD --stat -- docs/data-dependence.md docs/data-dependence/ shows one file changed, docs/data-dependence.md, 1 insertion 1 deletion. The features/ directory is untouched. CLAUDE.md says: edit the feature's row file, then run the generator; "Never edit that page by hand."
    • Fix: move the new sentences (and the band decision record) into docs/data-dependence/features/fivehour-weights.md, then run go run ./cmd/gen-datadep on a box with Go. Keep the generated diff that results.

Non-blocking

  • context-guru-plugin/hooks/model.ts:105 — with weights present and the proxy's price missing (next_warm_usd/next_cold_usd absent, prefix_tokens ≥ 1), nextPrice now returns kind share with both figures undefined. The pane then draws if the cache is warm unknown / if it is cold unknown plus the weights line, where it drew one next message unknown before. The band draws nothing, as before. Fail open holds; only the pane's edge-case words change.
  • context-guru-plugin/hooks/model.ts:110 — the ww === undefined guard is dead: the gate in fiveHourWeights guarantees at least one learned write weight, so writeWeight always finds one. Harmless defence.

What I checked

  • Read the full diff (11 files, +550/−27) and the code around every change.
  • cg.py (both copies): share_weights and fivehour_weights traced against cgcache.py (take_slot, backoff, record_failure, age_of, write_atomic) and Api.get (returns None on 404 or bad JSON, so an old proxy backs off, it does not crash). add_weights fails open on its own try/except, and runs only when the mod sends --window-start-ms (subscription only, register.tsx:90-91). The cached is None or take_slot(...) single-flight pattern matches the existing pane_get.
  • The two cg.py copies are byte-identical (TestCGScriptsAreVendoredIntoCodex covers cg.py).
  • The endpoint: dash/fivehourweights.go and dash/fivehourfit.go — route, field names (ok, weights, learned, requests), tier keys (cache_read, cache_write_5m, cache_write_1h), {} for an API key. All match what share_weights reads.
  • Gate parity: the Python gate and the TS gate in fiveHourWeights require the same things (ok, learned positive read weight, at least one learned positive write weight). A fit that passes one passes the other.
  • model.ts: nextPrice without weights keeps the old tokens behaviour exactly; writeWeight matches the documented tier rule; writeTier comes from the merged main entry (mainEntry copies ttl_s from the main thread); signature now includes v.weights, and anchor already includes ttl_s.
  • register.tsx: band and pane render paths for warm, cold, narrow (60 columns) and wide; width arithmetic for the longest row (◆ next 5h ≈0.1% · ≈2.7% cold ↻ ping 59:59 … hide dash ↗ = 56 cells at 60 columns, inside the cols - 4 budget the tests assert).
  • Tests read in full: register.test.tsx (new band/pane cases, the five fallback cases, the API-key case, the late-weights redraw) and test_cg_weights.py (gate, one-minute TTL, 15-minute fail-open, back-off, add_weights), plus the Go wrapper TestCGFiveHourWeightsPythonTests (requireTool exists in plugin_test.go; the script inserts its own directory into sys.path, so -I is safe). No test was run: live tests are not approved.
  • Data dependence: the PR states it at the top (metadata only, no level change), and the row's "Decided by" (David Amid) matches the approval named in the PR body. The process defect is finding 1.
  • TestDocsExamplesAreTheGoldens: the docs/plugin/statusline.md change touches prose bullets only, no golden block.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.322 offload-review skill, @amiddavid's session fresh 1 of 2 1 of 2 464803dacf14 blocking

Verdict: blocking

Findings

  1. docs/data-dependence.md:252 — the generated page was edited by hand. Its row file was not. The datadep test fails.
    • What fails: internal/datadep.TestGeneratedPageIsUpToDate builds the page from the row files and compares it with the checked-in page. The PR changed the "Learned 5-hour weights" row in docs/data-dependence.md only. docs/data-dependence/features/fivehour-weights.md still carries the old text. So the built page and the checked-in page differ, and the test fails on this head.
    • Proof: git diff fa25367..HEAD -- docs/data-dependence/ is empty (no row file changed). git diff fa25367..HEAD -- docs/data-dependence.md changes the row text of that one line. internal/datadep/datadep_test.go:12 (TestGeneratedPageIsUpToDate) fails when the two differ. CLAUDE.md says: edit the row file, then run go run ./cmd/gen-datadep; never edit the page by hand. The PR body says "Go is not installed locally, so the Go tests did not run yet", so this failure was not seen.
    • Also: the next person who runs the generator loses this PR's documentation change, because the generator writes the old row-file text back.
    • Fix: move the new sentences ("Since #1095 the Claude Code plugin's band and pane also use them … band: David Amid, #1095 (2026-11-11).") into the body of docs/data-dependence/features/fivehour-weights.md. Then run go run ./cmd/gen-datadep and commit the page it builds.

Non-blocking

  • scripts/cg.py:331 (fivehour_weights) — after a failed read, the served copy can be up to 15 minutes old. The fit inside it can be up to 15 minutes older still, because the endpoint caches a fit for 15 minutes. So the band can draw weights about 30 minutes old on the failure path. The docs state the copy-age rule honestly, and the weights move slowly. No change asked.
  • hooks/model.ts:72 (writeWeight) — an entry on the 5-minute tier, when the fit has no 5-minute weight (prices missing, only the 1-hour write learned), uses the 1-hour weight. That overestimates the cold share. This needs prices missing and a partial fit at the same time. Fail-safe direction. No change asked.
  • hooks/model.ts:105 (nextPrice) — with weights and an unpriced state (next_warm_usd and next_cold_usd absent), the pane now shows two unknown lines plus the weights line. Before, it showed one unknown line. The PR names this in its technical notes. Cosmetic.

What I checked

  • The full diff (11 files) and the code around each change: scripts/cg.py (both copies), hooks/model.ts, hooks/register.tsx, hooks/register.test.tsx, types/index.d.ts, scripts/test_cg_weights.py, cg_cachestate_test.go, the three docs files.
  • The two cg.py copies are identical (diff clean), so TestCGScriptsAreVendoredIntoCodex holds.
  • The endpoint contract: dash/fivehourweights.go and dash/fivehourfit.go. The answer fields (ok, weights, learned, requests) and the tier names (input, cache_read, cache_write_5m, cache_write_1h, output) match what share_weights and fiveHourWeights read. The fit cache is 15 minutes, as the comments claim.
  • The gate is checked twice, in Python (share_weights) and in TypeScript (fiveHourWeights), with the same rules: ok true, a learned positive read weight, at least one learned positive write weight. I traced each field type (bool, string, NaN, 0, negative) through both gates. They agree.
  • Fail open: add_weights catches everything and leaves the field out; the band then keeps the token figure. fivehour_weights serves the last copy only under 15 minutes, else nothing. The mod re-checks the gate, so a bad cached document cannot break the band.
  • The on-disk cache: cgcache.read_json, age_of, take_slot, backoff, record_failure. The one-read-a-minute, single-flight and back-off rules match cachestate_cached and pane_get. The file name carries the port, so sessions share one copy.
  • The request budget: the weights read piggybacks on the existing cachestate poll. At most one network read per minute, timeout 3 s, backed off after failures. The mod sends --window-start-ms only on a subscription, so an API key never triggers the read.
  • Row 1 width at 60 columns: I recomputed the lengths for the share row with the longest ping hint (↻ ping 59:59, 56 chars with hide and dash ↗) and with ping off. The tests cover the worst case. The ping hint cannot exceed 59:59, because a ping must fire before the entry expires and the TTL is at most 3600 s.
  • The new tests: band and pane, warm and cold, 140 and 60 columns, the tier choice (1-hour entry, unknown tier), tiny and large shares, five fallback cases, dollars with weights present, and the late-arrival redraw. The Python tests cover the gate, the TTL, the 15-minute limit, the back-off and fail open. The Go test runs them in CI with python3 -I, and the script inserts its own directory into sys.path, so isolated mode works.
  • The PR body: it names the behavior change at the top, with the owner's approval and the undo path, and states the data dependence. Both are required by CLAUDE.md and RELEASING.md.
  • I did not run tests. Live tests were not approved, and Go is not installed here.

Round 1 of #1135:
- The cold share uses only a write weight the fit learned for the entry's
  tier. When the fit did not learn it, the cold figure stays in tokens
  (90.0k wr). Owner's decision, 2026-11-12.
- With weights but no price for either state, the pane shows one
  "next message unknown" line, as without weights.
- The band text for the learned 5-hour weights row moves into its row file,
  docs/data-dependence/features/fivehour-weights.md. The page is built again
  with go run ./cmd/gen-datadep.

Assisted-By: Claude
Signed-off-by: DAVID AMID <[email protected]>
@amiddavid

Copy link
Copy Markdown
Collaborator Author

Round 1 answers. All fixes are in commit 14d1ef0.

Both reviewers (blocking): the generated page was edited by hand

Fixed. The band text is now in the row file, docs/data-dependence/features/fivehour-weights.md. I restored the page from origin/main and built it again with go run ./cmd/gen-datadep on the eval box. go test ./internal/datadep/ ./components/all/ passes there. The page diff is now the generator's output: one row, the same as the row file.

Owner decision (David Amid, 2026-11-12): learned write weights only

The PR's first version used the 1-hour write weight on a 1-hour entry even when the fit had not learned it. That weight is the API price scaled to the account's spend, a guess. The owner chose: use only learned weights.

  • writeWeight now returns a weight only when the fit learned the entry's tier.
  • When it did not, the cold figure stays in tokens: next message ≈0.1% of 5h · 90.0k wr if cold. The pane shows if it is cold 90.0k wr, with no of 5h.
  • This also closes reviewer 2's note on the 5-minute tier that used the 1-hour weight.
  • docs/plugin/statusline.md and the PR description say so.

Non-blocking notes

  • Pane with weights and no price (both reviewers): fixed. With no price for either state, nextPrice falls through to the token kind, so the pane shows one next message unknown line, as without weights. New test.
  • The dead ww === undefined guard (reviewer 1): it is live now. With the learned-only rule, writeWeight returns undefined for a tier that was not learned.
  • Copy up to about 30 minutes old on the failure path (reviewer 2): kept, as you said. The docs state the rule.

Tests

  • claude plugin test context-guru-plugin: 122 pass, 1 fail. The failing test, no data: the band is left to the engine, also fails on origin/main.
  • Changed tests: the 1-hour tier with and without the learned 1-hour weight, in band and pane. The 60-column fit test now learns the 1-hour weight, so it still checks the longest form.
  • Eval box: go test ./internal/datadep/ ./components/all/ passes on this tree.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.322 offload-review skill, @amiddavid's session resumed 1 of 2 2 of 2 14d1ef0c4406 approve

Verdict: approve

Findings

None. My round-1 finding is fixed, and the new commit adds no defect I can show.

Round-1 findings, both reviewers

  1. The generated data-dependence page was edited by hand (mine and reviewer 2's blocking finding). Fixed.
    • The band text now lives in docs/data-dependence/features/fivehour-weights.md:10, and the page was rebuilt.
    • I rebuilt the row line from the row file the way internal/datadep does it (front matter plus the body, joined to one line, pipes escaped). The result matches docs/data-dependence.md:252 byte for byte. The cumulative diff against the base touches one row line in the page and one line in the row file, nothing else. So TestGeneratedPageIsUpToDate has nothing left to catch. The author also reports it passing on the eval box.

My round-1 non-blocking notes

  • The pane's two unknown lines. Fixed. nextPrice now falls through to the token kind when the weights give no figure for either state (model.ts:114), so the pane shows one next message unknown line. I traced every combination (warm or cold cache, priced or unpriced, write weight learned or not): the fall-through fires only when both figures are undefined, which is exactly when the old priced check was false. The result matches the no-weights path. A new test covers it (register.test.tsx:475).
  • A 5-minute entry using the 1-hour weight. Resolved by a stronger rule. The owner decided the band uses only learned weights (writeWeight, model.ts:74). An entry whose write tier the fit did not learn keeps its cold figure in tokens (90.0k wr), with no of 5h. This removes the guess I flagged. docs/plugin/statusline.md and the PR description state the rule, and the commit message records the owner's decision of 2026-11-12.

Reviewer 2's round-1 notes (checked myself)

  • The dead ww === undefined guard. Agree with reviewer 2 that it was dead, and it is live now: with the learned-only rule, writeWeight returns undefined for an unlearned tier.
  • A copy up to about 30 minutes old on the failure path. The author kept it. Both reviewers asked for no change, and the docs state the rule. Accept.

The new commit (14d1ef0), reviewed as a first review

  • writeWeight (model.ts:74): learned1h is true only when write1h is a positive number (the gate at model.ts:64), so the learned path can never return undefined. With the tier unknown, the gate's "at least one learned write" keeps the fallback defined. Correct.
  • nextPrice (model.ts:105): the fall-through and the coldIsTokens flag. I traced the band and the pane for warm, cold, narrow and wide. A token cold figure carries no of 5h in either surface (register.tsx:341, register.tsx:512), and the colors match the no-weights path. Correct.
  • The tests: the tier test now covers a 1-hour entry with and without the learned 1-hour weight, in band and pane, and asserts wr of 5h never appears. The 60-column fit test now learns the 1-hour weight, so it still measures the longest form (↻ ping 59:59 plus hide and dash ↗, inside the 56-cell budget). The no-price test drops all three price fields and checks the one unknown line.
  • cg.py is untouched in this commit; the Python gate still passes unlearned weights through, and the mod's learned-only decision applies on the TypeScript side. The two copies stay identical.
  • Docs: statusline.md and the PR body both state the learned-only rule; the data-dependence row file and the page agree.

What I checked

  • Last review: round 1, 464803d, 2026-11-12T14:49:55Z.
  • New commits read: 1 (14d1ef0c "fix(mod): only learned write weights; data-dependence row file").
  • Read in full: 2 reviews, 2 comments, 0 inline comments (from the three files; the inline file is empty).
  • New items since my last review: the commit 14d1ef0 (reviewed above); the author's round-1 answer at 15:40 (each point checked above); the eval-box test report at 14:41 (predates my last review; it ran ./context-guru-plugin/..., which does not cover internal/datadep, so it does not contradict my round-1 finding); reviewer 2's round-1 review, read now as this round allows (checked above).
  • I did not run tests. Live tests are not approved, and Go is not installed here.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.322 offload-review skill, @amiddavid's session resumed 2 of 2 2 of 2 14d1ef0c4406 approve

Verdict: approve

Findings

None. Both round-1 blocking findings are fixed, and the fix commit introduces no new defect.

Earlier findings

  • Mine, finding 1 (data-dependence page edited by hand): fixed. The band text and the "band: David Amid, #1095" decision record now live in docs/data-dependence/features/fivehour-weights.md, and the page is the generator's output. I checked it myself without Go: the page's reason cell for that row is byte-identical to the row file's body (a local comparison script prints MATCH), the page diff touches that one row only, and the row file's front matter is unchanged. The author also ran go test ./internal/datadep/ ./components/all/ on the eval box; TestGeneratedPageIsUpToDate (internal/datadep/datadep_test.go:12) guards it from now on.
  • Mine, non-blocking (pane drew two unknown lines with weights and no price): fixed. nextPrice now falls through to the token kind when both figures are undefined (model.ts:113), and the new test with learned weights but no price for either state the pane shows one unknown line, not two pins it.
  • Mine, non-blocking (dead ww === undefined guard): resolved by design. With the learned-only rule, writeWeight returns undefined for an unlearned tier, so the guard is live.
  • Reviewer 1, finding 1: fixed, same fix as my finding 1. Agree with reviewer 1; I verified the fix the same way.
  • Reviewer 1, non-blocking (5-minute entry using the 1-hour weight overestimated the cold share): fixed by the learned-only rule, with the owner's decision named in the commit and the PR body.
  • Reviewer 1, non-blocking (copy up to ~30 minutes old on the failure path): kept, as reviewer 1 suggested. The docs state the rule. Agreed.

The new commit (14d1ef0)

  • The learned-only rule is sound and consistent. writeWeight (model.ts:74-77) returns a weight only for a tier the fit learned; with the tier unknown it uses the learned tier, and the gate in fiveHourWeights guarantees one of the two is learned, so the unknown-tier path always finds a weight. The scaled-API-price weight (learned false) is never shown as a share. This matches the owner's decision named in the commit message, the PR body, and docs/plugin/statusline.md.
  • The mixed figure is drawn correctly. coldIsTokens gates every of 5h suffix: the band's warm-branch cold suffix (register.tsx:359), the band's cold-cache branch (register.tsx:367), and the pane's cold line (register.tsx:512, 540). The warm line keeps its unit, because the read weight is always learned when the gate passed. The token cold figure keeps the warning color, as the old token figure did.
  • The fall-through keeps the old no-price behavior. With weights but no price for either state, nextPrice reaches the priced check with both prices absent, returns the token kind without a figure, and the pane shows one next message unknown line, as before the PR.
  • Tests cover the rule. The changed tier test covers the 1-hour entry with and without the learned 1-hour weight, in band and pane, plus the unknown tier; the 60-column fit test now learns the 1-hour weight so it still exercises the longest form (◆ next 5h ≈0.1% · ≈2.7% cold ↻ ping 59:5x, 56 of 56 cells). The new no-price test drops all three price fields from both the document and the main thread, so it really reaches the fall-through.

Non-blocking

  • context-guru-plugin/hooks/register.tsx:367 — the cold-cache band branch with an unlearned tier (○ cache cold · next message 90.0k wr, no of 5h) has no test. The mixed figure is pinned on the warm band and the pane only. A regression there would print 90.0k wr of 5h.
  • context-guru-plugin/hooks/register.tsx:356 — a very small edge: a warm cache with the warm state unpriced and the tier unlearned, below 80 columns, reads next 5h 90.0k wr cold: the 5h label with no share figure under it. It needs an old proxy (no next_warm_usd) together with a partial fit, so I do not ask for a change.

What I checked

  • Last review: round 1, 464803d, 2026-11-12T14:49:29Z
  • New commits read: 1 — 14d1ef0c fix(mod): only learned write weights; data-dependence row file
  • Read in full: 2 reviews, 1 comment, 0 inline comments (from the three files .review-in-reviews.txt, .review-in-comments.txt, .review-in-inline.txt; the inline file is empty)
  • New items since my last review, and what I did about each:
    • Reviewer 1's round-1 review (posted 26 s after mine, so unread in round 1): read in full. Its blocking finding is mine; its non-blocking 5m/1h note is fixed by the learned-only rule. No finding of theirs is unanswered.
    • The author's eval-box comment (Go tests pass on 464803d, including the new Python-test wrapper and the vendoring test): noted; I did not re-run anything, live tests are not approved.
    • The author's round-1 answers (15:40:27Z): each claim checked against the code — the row-file fix, the learned-only rule, the pane fall-through, the now-live guard, the kept 30-minute rule. All claims hold.
    • Commit 14d1ef0: full diff read, plus the code around every change (model.ts 40-120, register.tsx 330-370 and 505-545, the changed tests, both data-dependence files, statusline.md).
  • The generated page against its row file, without Go: the reason cell and the row body are byte-identical, the page diff is one row, the row file's front matter is unchanged.
  • The PR body: it now states the learned-only rule with the owner's decision and date, as statusline.md does.
  • docs/dashboard.md and the goldens: the commit does not touch them, and the statusline.md change is prose only, so TestDocsExamplesAreTheGoldens is safe.
  • I did not run tests. Live tests are not approved, and Go is not installed on this machine.

@amiddavid
amiddavid merged commit b7ac82a into main Nov 12, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Nov 12, 2026
amiddavid added a commit that referenced this pull request Nov 19, 2026
Plugin versions for v0.7.4:
- Claude Code plugin 0.7.3 -> 0.7.4 (#1096, #1135, #1174, #1177, #1199,
  #1216).
- Codex plugin 0.2.12 -> 0.2.13 (#1115, #1135).
- Pi package 0.1.1 -> 0.1.2 (#1113).
- Bob plugin 0.1.1 -> 0.1.2 (#1093, #1111, #1118, #1124, #1126, #1127).
  The owner's Bob hold (#1221) covers release tests only.
- OpenCode: PINNED_VERSION v0.7.3 -> v0.7.4 in opencode-plugin/index.js,
  its README, docs/how-to/install-opencode-plugin.md and 3 tests.

Behavior change: the version numbers; the OpenCode plugin's first start
downloads proxy v0.7.4. Release bumps are approved by the owner ("I
approve version bumps").

Data dependence: none.

Reviews: 2 offload review rounds (GLM): both approve at ab79001. After
it: 1422093, a merge of main with no hand resolution (remerge-diff 0;
approval-still-valid: SAME CHANGE).

Signed-off-by: DAVID AMID <[email protected]>
Assisted-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

band: on a subscription the next-message rd and wr figures are always equal

1 participant