Skip to content

fix(modelinfo): index a qualified price entry by its own bare tail - #334

Merged
amiddavid merged 8 commits into
mainfrom
night0928/fixprice-work
Nov 11, 2026
Merged

amiddavid merged 8 commits into
mainfrom
night0928/fixprice-work

Conversation

@OsherElhadad

@OsherElhadad OsherElhadad commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Behavior change (owner approved, David Amid, 2026-11-11):

  • Who it affects: operators whose price list has a qualified entry, such as aws/claude-sonnet-5, while requests send the bare id.
  • Old: the bare id fell through to a family rate (bare claude-sonnet-5 billed 1.5x too high) or to the public map (bare gpt-5.6-sol priced too low).
  • New: it takes the qualified entry's price, window and compaction point, unless the entries are ambiguous.
  • Turn it off: add an explicit bare entry to the price list.

Second behavior change (owner approved, David Amid, 2026-11-11):

  • Who it affects: operators whose MODEL_PRICES file lists the same match twice.
  • Old: the file loaded, and the first entry won.
  • New: ParseTable refuses the file ("<match>" appears more than once). The proxy treats a bad price list as fatal, so it does not start.
  • Avoid it: remove the duplicate entry.

Data dependence: none. The change uses only model ids and prices. docs/data-dependence.md does not change.

Changed since round 1 (review at cb4c48e):

  • The ambiguity check now compares window and compaction point as well as price.
  • The Python reader (kv_ttl_cost_model.py) has the same bare-tail pass, variant strip, and duplicate and window checks.
  • ParseTable rejects a repeated match.
  • Parity test: bare-tail ids, [1m] variants, same-rate/different-window pair, duplicate-match test.
  • prices.example.yaml, ratefill_test.go and ratefilltest.go now describe the new rule and the four re-made fixture rows.
  • The test count is twelve new test functions in table_test.go, plus the harbor parity cases.

Summary

Closes #324.

Table.lookup never derived a bare-id index for a qualified entry (one whose
match contains / or ., e.g. aws/claude-sonnet-5) — unlike
modelinfo.LiteLLM.fetch, which does exactly this for the public price map
(m[full]=w; if _,ok:=m[tail]; !ok { m[tail]=w }). So a request whose model
field omitted the provider prefix the operator priced it under fell straight
past that specific entry to whichever wildcard family entry happened to
prefix-match — silently, ok=true, token_accounting='complete'.

On the live price list this overcharges every bare claude-sonnet-5 request
1.5x, and separately underprices bare gpt-5.6-sol by falling through Table
entirely (no family entry exists for it) to the public LiteLLM map instead of
the operator's own azure/gpt-5.6-sol entry — same root cause, opposite
direction.

Fix and precedence

Each qualified, non-family (match without a trailing *) entry's bare tail
(the part after its last /) is derived once at parse time and consulted
between the exact-match pass and the family/containment pass:

  1. exact match (full id, or a literal bare id the operator wrote on purpose)
  2. bare tail of a qualified entry (new — the fix)
  3. family prefix* and containment, competing in one pass ordered by match length (unchanged)
  4. the public LiteLLM map / static fallback (unchanged, outside Table)

An explicit bare entry the operator wrote on purpose always wins over a
derived tail — it's already an exact match in pass 1, so the new pass never
even runs for it.

Ambiguity. If two qualified entries under different providers would
derive the same bare tail at different rates (e.g. aws/claude-sonnet-5
and vertex/claude-sonnet-5 disagreeing), that tail is genuinely ambiguous —
resolving it either way means guessing which provider a bare request meant,
which is the exact mechanism that produced #324. I chose refuse and log
over first-wins/last-wins: the tail is left unindexed, falls through to the
family/public-map passes (same as if neither qualified entry existed), and a
slog.Warn names every ambiguous tail once at load time. First-wins is what
prices.example.yaml's comments already show operators working around by
hand for the opposite problem (a family default not covering a specific
member) — repeating that pattern silently for provider ambiguity felt like
reintroducing this same bug in a new shape.

Interaction with #323

#323 proposes redeploying at main and states a falsification check of
"cost_usd unchanged, only the counterfactual moves." This PR breaks that
check
— it moves cost_usd itself, not just the baseline counterfactual.
If both land in the same release: recorded spend goes down on this corpus
(the sonnet-5 correction outweighs the gpt-5.6-sol one), and that is the
correct, expected effect of fixing a real overcharge — don't read the
combined deploy as a regression because cost_usd moved. (M-meas flagged
this same interaction on #323 already.)

Verification

Independently re-derived against the 2026-09-28 00:15 UTC read-only snapshot
(snap/cg.db, 264,163 requests), from a from-scratch Python port of the
actual fixed Table.lookup/deriveBareTails (not a reuse of anyone else's
workaround script):

claude-sonnet-5 bucket (token_accounting='complete', 46,028 rows):
  recorded cost_usd   $2917.27
  after-fix cost_usd  $1946.41
  overcharge          $970.85     <- matches phase-1 measurement exactly
  ratio               1.4988  (≈ 2.28 / 1.52, not exactly — see note below)

gpt-5.6-sol bucket (956 rows):
  recorded cost_usd   $41.04
  after-fix cost_usd  $53.26
  underprice          $12.22      <- matches phase-1's "~$12.22" exactly

(Correction, caught by REV's independent review: 2.28/1.52 is exactly 1.5, not
1.4988 — the observed ratio is real but not literally the clean rate ratio.
Re-rating the raw tokens at today's exact $2.28 family rate for all 46,028 rows
gives $2919.62, not quite recorded's $2917.27 — a ~0.08%/$2.35 gap. Since every
cost component scales by exactly 1.5x between these two entries, the aggregate
ratio should be exactly 1.5 if every row had been priced at today's exact rate
for the whole 41.4-day window; the small gap most likely means prices.yaml was
edited at least once during that window. Doesn't change the $970.85 conclusion,
which is recorded cost_usd vs. the after-fix replay — the correct comparison —
not two rates divided by each other.)

Update: REV's hypothesis above is now CONFIRMED by direct measurement, not
left as a leading guess — see finding P2-13 in PHASE2.md. A per-week implied rate
on the bare claude-sonnet-5 bucket (1e6 × Σcost_usd / Σ(fresh + read×0.1 + write×1.25 + 5×output)) shows a clean step change: the first week
(2026-08-17, 347 rows) bills at 2.11849; every week after (30,357+ rows) bills
at exactly 2.28000. prices.yaml really was edited once, in the corpus's
first few days. Magnitude checks out: 347/46,028 rows (0.754%) at a rate 7.1%
lower predicts ~0.054% aggregate reduction against the observed 0.080% — same
order, the remainder plausibly row-size weighting. $970.85 is unaffected and
still agrees to the cent across all three independent derivations (M-meas,
this PR, REV). Also worth knowing for anyone doing a per-week or time-series
read of this corpus: 2026-08-17 to 08-19 is a deployment bootstrap window with
its own behavior (this rate step, and separately #329's saved_usd=0 defect,
both land there) — exclude it or report with/without it rather than reading a
step or trend across those three days as steady-state.

No ambiguous tails exist in the current live prices.yaml (checked against
the real Table via LoadTable, not just the Python replay) — the ambiguity
path is exercised only by TestAmbiguousBareTailFallsThroughInsteadOfGuessing.

Behavior change

Who it affects. An operator whose price file has a qualified entry (match with a
/ or a ., such as aws/claude-sonnet-5), and a client that sends the model id
without the provider prefix.

Old. The bare id fell past the qualified entry to a family rate, or to the public
LiteLLM map.

New. The bare id takes the qualified entry's price. Window and compaction point follow
the same entry. If two qualified entries share the tail and differ in price, window or
compaction point, the tail is not indexed, a load-time warning names it, and the old
fall-through applies.

On the live list this lowers the price of bare claude-sonnet-5 from $2.28 to $1.52 (46,028
rows, $970.85) and raises bare gpt-5.6-sol by $12.22. It moves cost_usd itself (see
#323 above).

A second change: ParseTable now refuses a price file that repeats a match. Before, the
file loaded and the first entry won. The Python reader refuses it too. Remove the duplicate
entry to fix the error.

How to turn it off. Write a literal bare entry for the id (for example claude-sonnet-5).
An exact bare entry wins before the new pass runs. To keep the old fall-through for a
whole tail, remove the qualified entry.

Owner's yes. Given by David Amid, 2026-11-11.

Data dependence

None. The change reads only the operator's price file and model ids. No new data source,
so docs/data-dependence.md needs no row.

Tests

internal/modelinfo/table_test.go — twelve new test functions: the #324 regression
(fails on pre-fix code), an explicit bare entry beating a qualified tail, an
ambiguous tail falling through, a bare id with only a family entry, a bare id with
neither a qualified nor a family entry reporting unknown, a prefixed id not taking
another provider's tail, a same-rate tail, same-rate tails that differ in window or
in compaction point (ambiguous), a same-window tail keeping its window, and a repeated
match being rejected.

deploy/harbor/kv_ttl_price_parity_test.go — the Python price reader now has the same
bare-tail pass. The parity test queries a bare tail, a [1m] variant of it, and a
same-rate/different-window pair, and a second test checks that both readers refuse a
repeated match.

$ go test ./internal/modelinfo/... -v
... (all pass, including all pre-existing cases)
ok  	github.com/rossoctl/context-guru/internal/modelinfo	0.244s

$ go test -race ./internal/...
ok  	github.com/rossoctl/context-guru/internal/modelinfo	1.759s
(+ every other internal/* package, all ok)

$ go test -run '<accounting/billedfactor/cachecost test names>' ./dash/...
ok  	github.com/rossoctl/context-guru/dash	1.142s

gofmt -l and go vet ./internal/modelinfo/... are both clean.

Not touched

/etc/context-guru/prices.yaml (live config, read-only via sudo cat for
verification), the deployed service, cg-control.db. No merge, no deploy.

Table.lookup never derived a bare-id index for a qualified entry
(one whose match contains "/" or "."), unlike LiteLLM.fetch, which
does this for the public price map. So a request whose model id
omitted the provider prefix an operator priced it under fell past
that specific entry to whichever wildcard family entry happened to
prefix-match, silently, with ok=true and token_accounting=complete.

On the live price list this overcharged every bare claude-sonnet-5
request 1.5x ($970.85 on the snapshot corpus, closes #324) and
underpriced bare gpt-5.6-sol by falling through to the public map
instead of its own explicit azure/gpt-5.6-sol entry.

Fix: derive each qualified, non-family entry's bare tail once at
parse time and consult it between the exact-match pass and the
family/containment pass, so a bare id resolves to the specific
entry it is the tail of before any wildcard is tried. An explicit
bare entry the operator wrote on purpose still wins outright (it is
already an exact match). A tail that two differently-priced
qualified entries would both claim is ambiguous and is deliberately
left unindexed rather than guessing: it falls through to the family/
public-map passes, logged once at load time.

Independently replayed against the 2026-09-28 snapshot corpus
(264,163 requests): reproduces the $970.85 overcharge and 1.4988
(=2.28/1.52) ratio exactly, and the ~$12.22 gpt-5.6-sol underprice.

Signed-off-by: Osher-Elhadad <[email protected]>

@OsherElhadad OsherElhadad 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.

Independent review (REV) — PR #334 (fix(modelinfo): index a qualified price entry by its own bare tail)

Reproduced everything below myself: own worktree, own SQL against the read-only snapshot, own
from-scratch test cases (not reused from the PR or from FIX-price's report), sudo cat of the
live /etc/context-guru/prices.yaml for verification only (never written). No spend, no
systemctl action, no writes to the snapshot or the control DB.

The precedence chain — correct, and I attacked it rather than read it

Traced lookup: (1) exact match against every entry's match (e.match==full||e.match==tail) —
this can only ever hit a literal bare entry or a full qualified id, never a qualified entry's
bare tail (since a qualified entry's match always contains / or . by definition, so it can
never equal a bare tail string); (2) the new bareTail map; (3) family/containment, one pass,
longest-match-first (unchanged). Confirmed deriveBareTails skips any tail already claimed by a
literal entry (so an intentional bare entry can never be shadowed by a derived one) — the
literal[e.match] check runs before the tail is ever considered.

I wrote 3 additional adversarial tests beyond the author's own 6, none reused:

  • Three-way ambiguity (not just two providers) — still falls through to the family rate
    correctly. PASS.
  • Pathological match strings ("aws/", "/" — trailing/bare slash) — deriveBareTails
    does not panic (wrapped in a recover() to be sure) and a real sibling entry still resolves
    correctly. PASS.
  • Ambiguous tail with no family fallback at all — reports ok=false rather than silently
    resolving to either provider's rate. PASS.

Regression test: verified it genuinely fails on pre-fix code, not just asserted

Checked out main's table.go with the PR's new table_test.go on top (own git surgery, not
trusting the PR body's claim): TestBareIDResolvesToQualifiedEntryNotFamily324 fails on main
exactly as described (bare claude-sonnet-5: in = $2.28/MTok, want $1.52 ... got the family rate).
The other 4 new tests happen to also pass on pre-fix code, which is expected — they exercise
precedence rules the old 2-pass lookup already handled correctly by construction (explicit-bare,
family-fallback, unknown-id), not the #324 regression itself. Restored the fix branch afterward.
go test -race ./internal/... — ran myself, all packages pass (adjudicate, cheapmodel, coref,
extract, logging, modelinfo, redact, skills, tokens).

slog.Warn reachability — confirmed, not assumed

No slog.SetDefault anywhere in this repo, so the ambiguity warning goes through Go's default
handler → os.Stderr, the same mechanism cmd/context-guru-proxy/main.go already uses for
every other operator-facing startup warning (e.g. "no --manager-email set", "no email path
configured"). Under systemd that's the journal, reachable via install.sh status. I saw it fire
literally, in test output: WARN model price list: bare id is ambiguous.... Not a black hole.

Malformed-file fail-closed behavior — untouched, verified by reading, not just trusting the diff

deriveBareTails is called only as the last line of ParseTable, after every existing
validation (negative rate, zero rate, no match, unknown YAML key via KnownFields(true))
already returns early on error. A malformed file never reaches it. Combined with the
panic-safety test above, I'm satisfied this doesn't introduce a new way for a bad file to load
"successfully."

Independent re-derivation of $970.85 / 1.4988 / $12.22 — third method, matches to the cent

Neither reusing M-meas's SQL nor FIX-price's Python port: straight SQL against requests' raw
token columns (fresh_input, cache_read, cache_write, output_tokens) and the live
prices.yaml rates (aws/claude-sonnet-5: $1.52/$7.60; family claude-sonnet*: $2.28/$11.40;
azure/gpt-5.6-sol: $5.00/$30.00), applying the documented cache fracs directly:

SELECT COUNT(*), SUM(cost_usd),
       SUM((fresh_input + cache_read*0.1 + cache_write*1.25)*2.28e-6 + output_tokens*11.40e-6),
       SUM((fresh_input + cache_read*0.1 + cache_write*1.25)*1.52e-6 + output_tokens*7.60e-6)
FROM requests WHERE model='claude-sonnet-5' AND token_accounting='complete';

-- n=46028, recorded=$2917.2661, family-rate-recompute=$2919.6181, aws-rate-recompute=$1946.4121

$1946.4121 matches the PR's after-fix figure exactly. $2917.2661 − $1946.4121 = $970.8540
— matches $970.85 exactly. Same for gpt-5.6-sol (own query, azure rate, cache_write frac=1.0
since neither "gpt" nor "azure" contains "claude"/"anthropic"): recorded $41.0383, correct-rate
$53.2572, underprice $12.2189 ≈ $12.22, exact match. Three independent derivations (M-meas's
original, FIX-price's Python port, and this SQL recompute) now agree to the cent.

One small, non-blocking thing I chased down while I was in there: the PR states "ratio 1.4988
(== 2.28/1.52 exactly)" — but 2.28/1.52 is exactly 1.5, not 1.4988. The observed ratio really
is 1.4988 (recorded/after-fix), but it isn't literally the clean rate ratio: my own
"family-rate-recompute" ($2919.62, using today's $2.28 rate on the raw tokens) doesn't quite match
recorded ($2917.27) either — a ~0.08%/$2.35 gap. Since input/output/cache-read/cache-write all
scale by exactly 1.5x between these two specific entries (verified: both contain "claude" so both
get the same 1.25x cache-write premium, and neither states an explicit cache override), the
aggregate ratio should be exactly 1.5 if every one of the 46,028 rows was priced at today's exact
family rate the whole time. The small gap says a few of the 41.4 days' worth of rows were probably
priced under a slightly different (historical) rate before prices.yaml was last edited — not a
code defect, doesn't change the $970.85 conclusion (which matches recorded exactly, the only
correct baseline), and not something this PR needs to account for. Flagging only so "1.4988 ==
2.28/1.52 exactly" in the PR body gets corrected to something like "≈2.28/1.52" — a reader who
divides those two numbers will get 1.5 and wonder if they misread something.

The self-reported $1,047.97-vs-$958.63 discrepancy — confirmed sound

I didn't need to reproduce FIX-price's mistake to confirm the fix: my SQL above computes the
after-fix cost by re-rating the raw tokens once and comparing directly against recorded cost_usd
(the correct baseline) for each bucket separately, exactly the corrected method they describe
arriving at. Landing on $970.85 and $12.22 independently, via a third method that never took the
wrong turn (replay-vs-replay) in the first place, is itself the confirmation that recorded-vs-
single-replay is the right comparison and their diagnosis (double-counted reimplementation noise
from comparing two replays instead of one replay against ground truth) is consistent with getting
a clean, exact-cent match by avoiding exactly that mistake.

Verdict

Passes. Precedence is correct and matches its own documentation; the ambiguity decision is
implemented as described and is genuinely observable (not a silent log); deriveBareTails cannot
panic or bypass fail-closed loading on a malformed file; the regression test is real (verified
failing on main, not just asserted); the headline dollar figures are independently reproduced to
the cent via a third, from-scratch method. One text-only nit (the "1.4988 == 2.28/1.52 exactly"
line) — not blocking, just worth a one-word edit ("≈" for "==").

@OsherElhadad

Copy link
Copy Markdown
Collaborator Author

Thanks for the independent re-derivation and the catch. Fixed the PR body: "1.4988 (== 2.28/1.52 exactly)" -> "≈ 2.28/1.52, not exactly" with a note. Also fixed my own attribution error while I was in there -- I'd originally called the $2.35 gap "float-reimplementation noise" in my report, which doesn't hold up dimensionally (float64 summation error over 46,028 rows is nowhere near $2.35). Your explanation (the price file was probably edited at least once during the 41.4-day window, since the ratio should be exactly 1.5 if every row had been priced at today's exact rate the whole time) is the right one and I've corrected the report to credit it. Doesn't change $970.85/$12.22/the fix itself -- three independent derivations (M-meas, mine, yours) still agree to the cent on those.

Resolve the table_test.go conflict (both sides appended tests; keep both).

Review fixes:
- Use the bare-tail index only for a request with no provider prefix, so
  vertex/claude-sonnet-5 no longer takes aws/claude-sonnet-5's rate.
- Treat a shared tail as ambiguous only when the providers' prices differ,
  as the comment already said.
- Rename the misnamed family-fallback test; add an inline #324 acceptance
  test, a vertex-prefix test and a same-rate test.
- Update ratefill_before.json: bare claude-sonnet-5 now resolves to
  aws/claude-sonnet-5 (it was recorded as unpriced, which is the #324 bug).

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: DAVID BOAZ <[email protected]>
@boazdavid
boazdavid marked this pull request as ready for review November 11, 2026 09:14

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator

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 cb4c48e8 blocking

Verdict: blocking

Findings

  1. internal/modelinfo/table.go:212 — the ambiguity rule compares only price, but the derived tail also serves window and compaction point
    • What fails: the operator lists one model under two providers at the same rate with different
      metadata, e.g. aws/claude-sonnet-5 (in 1.52, window: 200000) and
      vertex/claude-sonnet-5 (in 1.52, window: 1000000). The prices are equal, so
      deriveBareTails does not mark the tail ambiguous and indexes it. A bare request
      claude-sonnet-5 takes whichever claiming entry sorts first — here vertex/..., the
      longer match. Window then returns 1000000 and WindowExact reports it as exact. If the
      bare traffic is the aws deployment, every window-scaled trigger (a summarizer's
      min_request_frac, the warm sweep's turns-left estimate) runs against a 5x-too-high
      window, confidently and marked exact. The same holds for compaction_point, which sizes
      the sweep. The rule's own comment, "two providers at one rate are not a guess", is true
      for the rate and false for the metadata the entry also carries.
    • Proof: lookup is shared. The new pass (table.go:277-281) returns the bareTail entry,
      and Window (table.go:328), WindowExact (table.go:313) and CompactionPoint
      (table.go:320) all call t.lookup. deriveBareTails marks a tail ambiguous only when
      prev.price != e.price (table.go:212); window and compactionPoint are never
      compared. No new test exercises Window or CompactionPoint through a bare-tail hit —
      all eight new tests check Price only.
    • Fix: treat a tail as ambiguous also when the claiming entries differ in window or
      compactionPoint, not only in price. Add a test: two same-price entries with different
      windows; the bare id must not report one provider's window as exact.

Non-blocking

  • internal/modelinfo/testdata/ratefill_before.json — the fixture's stated contract is now
    stale. ratefilltest.go says the values were "made on origin/main c2a06dd, before any
    code changed", and Check's failure text says "before the refactor it was". This PR edits
    4 rows, so the file no longer holds those "before" values. Say in the fixture or its
    comment that rows for bare claude-sonnet-5 were re-baselined by #334.
  • The PR body says "six new cases" and lists five; the diff adds eight test functions. Doc
    drift only.
  • deriveBareTails (table.go:211): an entry whose match string repeats an earlier one
    bypasses the ambiguity check (prev.match != e.match) and overwrites the indexed tail, so
    a duplicated match at two rates can price aws/x and bare x differently. Garbage input;
    ParseTable could reject duplicate matches instead.

What I checked

  • Full diff of internal/modelinfo/table.go, table_test.go, testdata/ratefill_before.json,
    and the code around each change: Normalize/stripVariant, ParseTable, lookup,
    Price.Resolved, Chain.
  • The new precedence is sound. For a bare request, pass 2 fires only on exact tail equality,
    and every pass-3 competitor for that id (a family prefix of it, or a qualified entry
    contained in it) is strictly shorter than the qualified entry's full match. Pass 1 still
    wins for an explicit bare entry and for a family whose stripped match equals the id.
  • The ambiguity detection is sound for prices: the first claimer is never replaced, so any
    later entry at a different price flags the tail, and if none differs, all are equal.
    Finding 1 is the one hole: metadata other than price is not compared.
  • The full == tail guard is correct: a prefixed request (vertex/claude-sonnet-5) never
    takes another provider's tail. Verified against TestOtherProvidersPrefixDoesNotTakeAQualifiedTail.
  • The LiteLLM reference in the comment is accurate (litellm.go:206-207, 230-232 does
    first-wins tail indexing). This PR deliberately deviates (refuse-and-log) for ambiguity;
    the deviation is documented and tested.
  • The shipped deploy/service/prices.example.yaml: no two qualified entries share a bare
    tail, so no ambiguity warning fires on it; aws/claude-sonnet-5 ($1.52) and
    azure/gpt-5.6-sol ($5.00) are the only tails the new pass adds, matching the two
    regression-test claims. The google/gemma tail also becomes reachable bare — intended,
    same rule.
  • The 4 changed fixture rows: re-derived the arithmetic (in 3.0/MTok, out 15, cache read
    0.1x/0.2x/0.3x per doc frac, cache write 1.25x/1.5x, 1h 2x). All values match the
    aws/claude-sonnet-5 entry in the test table. All other rows are unchanged by the new pass,
    as expected.
  • The PR names the behavior change at the top (who it affects, old and new behavior, the
    #323 cost_usd interaction). It prices only from the operator's own file; no new data
    dependence, so docs/data-dependence.md needs no row.
  • Live tests were not run (not approved); Go is not on this machine.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator

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 cb4c48e8cd57 blocking

Verdict: blocking

Findings

  1. deploy/harbor/kv_ttl_cost_model.py:615 — the guarded Python port of Table did not get the bare-tail pass, so the two implementations of one money question now disagree.

    • What fails: the drift test's own header (kv_ttl_cost_drift_test.go:5-11) says kv_ttl_cost_model.py is a port of modelinfo.Table, the test is the guard, and Go is right when they disagree. This PR changes the Go side only. After it, a bare id that is the tail of a qualified entry prices differently in each: Go returns aws/claude-sonnet-5's $1.52 for claude-sonnet-5; Python's _lookup (lines 623-632) has no bare-tail pass, so it returns the family rate or known=False. The harbor analyses price real corpus rows this way: kv_ttl_predictor_arms.py:503 and kv_ttl_keepalive_policy.py:818 load the operator file into PriceBook and call for_model(r.model) per request, and the PR body itself counts 46,028 bare claude-sonnet-5 rows in the corpus. So #324 survives in every Python-side dollar figure — the predictor arms and the keepalive policy still see the 1.5x overcharge this PR fixes in Go.
    • Proof: kv_ttl_cost_model.py:623-632 — pass 1 matches match == full or match == tail (the entry's own id, not a derived tail), then families and containment. No step derives a qualified entry's bare tail. The parity guard kv_ttl_price_parity_test.go:36-41 queries no bare tail of a qualified entry (claude-sonnet-5 and gpt-5.5 are queried only with their prefixes), so it stays green and hides the divergence.
    • Fix: port deriveBareTails and the full == tail pass into _lookup (same rules: skip family and bare entries, skip a tail a literal entry claims, drop an ambiguous tail with a warning). Add a bare-tail id, e.g. claude-sonnet-5, to the parity test's ids so the guard covers the new pass.
  2. internal/modelinfo/table.go:212 — the ambiguity guard compares Price only, so window and compaction_point are guessed silently.

    • What fails: two qualified entries share a bare tail at the SAME price but state different window or compaction_point. prev.price != e.price is false, so the tail is indexed to whichever entry sorts first, and Table.Window/WindowExact/CompactionPoint (lines 313-334) resolve the bare id to that entry. WindowExact reports the window authoritative, so it overrides the public map with confidence.
    • Proof: tableEntry (table.go:39-49) carries window and compactionPoint outside Price; the comparison at line 212 cannot see them. Example: an operator lists aws/x (window 200000) and vertex/x (window 1000000) at one rate. A bare x request gets 200000 as EXACT. Fraction triggers and the warm sweep's turns-left estimate then run on the other provider's window, with no log line. That is the same silent guessing the guard exists to stop — its own comment (table.go:187-191) says a bare request for an ambiguous tail "cannot be resolved without guessing which provider it meant", and window is part of what the entry means.
    • Fix: treat a tail as ambiguous when the claiming entries differ in price, window or compactionPoint — compare the whole entry except match. Or keep Window/CompactionPoint on the old passes and let the bare-tail index serve Price only.

Non-blocking

  • deploy/service/prices.example.yaml:85-90 is now stale. It says the families catch the bare aliases because the missing prefix is not normalised. After this PR the specific entries catch them first. The file documents every other matching rule, so it should also state the new one: a qualified entry answers its own bare tail, and a tail two providers price differently is dropped with a load-time warning.
  • Pre-existing, not changed by this PR: a family entry x* still exact-matches a bare x in pass 1, because its trimmed match equals the request's tail (table.go:267-271). So a specific aws/x cannot win the bare id when a family x* exists. The literal skip in deriveBareTails is consistent with that, but it leaves one corner of #324's shape open. Worth an issue of its own.
  • The PR text says "six new cases"; the diff adds eight test functions. The merge commit 4a2e599 names the extra three.
  • ratefill_before.json: four rows were regenerated after the fix. The provenance comment in ratefill_test.go:11-12 ("fixture made on origin/main c2a06dd... before any code changed") now holds for only part of the file.

What I checked

  • The full diff (3 files) and every commit: 173c5a0, merge 4a2e599, merge cb4c48e.
  • deriveBareTails by hand: ambiguity with two and three same-tail entries, in both price orders; same-price tails; duplicate match strings; prefix and bare entries skipped; a tail claimed by a literal entry skipped. The ambiguity decision is sound for prices.
  • lookup precedence: the exact pass, the full == tail gate (variant-suffixed ids like claude-sonnet-5[1m] and decorated ids like vertex/claude-sonnet-5 behave correctly), the family/containment pass. Normalize (modelinfo.go:208) read in full.
  • All eight new tests re-derived by hand against the example file and the inline tables. Each asserts what it claims. The example file really carries aws/claude-sonnet-5 at $1.52 (line 54), azure/gpt-5.6-sol at $5.00 (line 71) and claude-sonnet* at $2.28 (line 92).
  • The four changed ratefill_before.json rows re-derived by hand: the plain, readfrac, writefrac and bothfracs arithmetic for aws/claude-sonnet-5 at 3/15 all match.
  • Every other test that builds a Table (internal/modelinfo, kvcache, dash, keepalive, proxy, proxyapp, components/offload, deploy/harbor) checked for bare-id queries whose answer would change. None queries a bare tail of a qualified entry — which is exactly why finding 1 stays hidden.
  • The example file's behavior change enumerated model by model: only bare claude-sonnet-5 ($2.28 to $1.52) and the no-family tails (gpt-5.6-sol, gemini-3-*, gemma) change; every other bare alias lands on a rate identical to its family's.
  • The chain wiring (cmd/context-guru-proxy/main.go:1480-1536) and LiteLLM.fetch (litellm.go:200-232), which the PR claims to mirror. The claim is accurate.
  • The PR body names the behavior change at the top, as CLAUDE.md requires. Data dependence is unchanged: the feature reads the operator's config file only, so no docs/data-dependence.md row moves.
  • I did not run Go builds or tests; live tests are not approved and Go is not on this machine.

@amiddavid

Copy link
Copy Markdown
Collaborator

Integrator note after GLM round 1 at cb4c48e. Both reviewers block. Please fix these, then run round 2 (offload-review):

  1. Ambiguity compares price only (internal/modelinfo/table.go:212, both reviewers). Two qualified entries at one rate but with a different window or compaction_point still index the bare tail. Window, WindowExact and CompactionPoint then give one provider's window as exact for a bare id. Fix: a tail is ambiguous when the entries differ in price, window or compaction point. Or let the bare-tail pass serve Price only. Add a test.
  2. The Python port did not change (deploy/harbor/kv_ttl_cost_model.py:615, reviewer 2). The drift test says this file ports modelinfo.Table. Bare claude-sonnet-5 now prices differently in Go and in Python. Port the bare-tail pass into _lookup, and add a bare-tail id to kv_ttl_price_parity_test.go.
  3. Non-blocking: deploy/service/prices.example.yaml:85-90 describes the old rule. ratefill_before.json now holds 4 re-made rows; say so where the fixture says it was made before any change. The PR text says six new cases; the diff has eight.

Also needed in the PR text:

  • A Behavior change section. The change affects operators with a qualified price entry, such as aws/claude-sonnet-5. Old: a bare model id fell through to a family rate, or to the public map. New: it takes the qualified entry's price. The PR counts 46,028 bare claude-sonnet-5 rows that were billed 1.5x too high. Say who it affects, the old and the new behavior, and how to turn it off. The owner must say yes before the merge.
  • A Data dependence section (I expect none: prices and model ids only).

…ion point differ

deriveBareTails compared only price, but Window, WindowExact and
CompactionPoint read the same entry. Two providers at one rate with
different windows made the bare id report one provider's window as exact.

ParseTable now rejects a repeated match, which bypassed the ambiguity check.
Note in ratefill_test.go that the claude-sonnet-5 rows were re-baselined.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: DAVID BOAZ <[email protected]>
kv_ttl_cost_model.py is a port of modelinfo.Table and had no bare-tail pass, so
the harbor analyses still priced a bare claude-sonnet-5 at the family rate.
Add the pass and the ambiguity rule, put a bare tail in the parity test, and
update the stale note in prices.example.yaml.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: DAVID BOAZ <[email protected]>
@boazdavid

Copy link
Copy Markdown
Collaborator

Round 1 findings are fixed in f9a6025 and the commit after it.

Reviewer 1, finding 1, and reviewer 2, finding 2 (same defect):

  • deriveBareTails now marks a tail ambiguous if price, window or compactionPoint differ.
  • Tests: different window, different compaction point, same window keeps its window.

Reviewer 2, finding 1:

  • kv_ttl_cost_model.py now has the bare-tail pass and the ambiguity rule.
  • claude-sonnet-5 and vertex/claude-sonnet-5 are now in the parity test. It passes with PyYAML on Python 3.12.

Non-blocking items:

  • prices.example.yaml note updated.
  • ratefill_test.go comment says the four claude-sonnet-5 rows were re-baselined.
  • ParseTable rejects a repeated match.
  • The family x* that exact-matches a bare x is not changed. It is older than this PR. It needs its own issue.
  • The PR body count of new cases still needs an edit.

@boazdavid boazdavid left a comment

Copy link
Copy Markdown
Collaborator

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 @boazdavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.241 offload-review skill, @boazdavid's session fresh 2 of 2 2 of 2 1f0a5bd30fb0 blocking

Verdict: blocking

Findings

  1. deploy/harbor/kv_ttl_cost_model.py:644-674 — the Python port of the new ambiguity rule compares rates only, so Go and Python price the same bare id differently again.

    • What fails: an operator lists one model under two providers at the same rate but with different window or compaction_point, plus a family fallback. Example: aws/claude-sonnet-5 (in 1.52, window 200000), vertex/claude-sonnet-5 (in 1.52, window 1000000), claude-sonnet* (in 2.28). Go now drops the tail as ambiguous (table.go:223 compares price, window and compaction point), so a bare claude-sonnet-5 falls through to the family and prices at $2.28. Python's _derive_bare_tails compares rates() only, indexes the tail, and prices the bare id at $1.52. from_operator_file (lines 534-561) never reads the window or compaction_point keys, so the Python side cannot see the difference. The harbor analyses (kv_ttl_predictor_arms.py:503, kv_ttl_keepalive_policy.py:818) then quote a different dollar figure than the proxy for the same rows — the exact divergence that round-1 finding 1 closed.
    • Proof: Go deriveBareTails (table.go:221-227) marks the tail ambiguous and lookup pass 3 (table.go:293-296) returns the family entry. Python _derive_bare_tails (kv_ttl_cost_model.py:663-668) checks rates(prev[1]) != rates(price); rates() (line 650-652) touches price fields only, and ModelPricing has no window field. The parity guard kv_ttl_price_parity_test.go does not cover the shape: its YAML (lines 25-35) has one qualified entry per tail, so the two-entries-one-tail case never reaches the test.
    • Fix: read window and compaction_point in from_operator_file, carry them with the entry, and include them in the ambiguity comparison. Add a same-rate different-window pair to the parity test YAML, and query its bare tail, so the guard covers the rule.
  2. PR text — the sections the integrator asked for on 2026-11-11 are still missing.

    • What fails: the integrator note (issue comment, 09:43:25Z) says the PR text needs a Behavior change section (who it affects, old and new behavior, how to turn it off, the owner's yes) and a Data dependence section. Neither is in the PR body at head 1f0a5bd3. The Tests section still says "six new cases" and lists five; the branch now adds twelve test functions in table_test.go. The author said at 10:03 that the count edit "still needs an edit", and no later change did it.
    • Proof: PR body fetched on 2026-11-11 — no "Behavior change" heading, no "Data dependence" heading, "six new cases" present. git diff fd6f3865..HEAD -- internal/modelinfo/table_test.go adds twelve func Test... functions.
    • Fix: add both sections and correct the count before merge. CLAUDE.md makes the named behavior change a merge gate, and this PR moves cost_usd itself.

Non-blocking

  • Python from_operator_file accepts a duplicated match that Go's ParseTable now rejects (table.go:129-132). In _derive_bare_tails the prev[0] != match branch is therefore reachable in Python, and a later duplicate overwrites the indexed tail (kv_ttl_cost_model.py:664-668). Garbage input only; Go refuses the file at startup, so the operator must fix it before the proxy runs. Porting the duplicate rejection would close it.
  • The Go slog.Warn (table.go:237) and the Python warnings.warn still say "different rates", but the rule now also covers window and compaction point. Message drift only.

What I checked

  • Last review: round 1, cb4c48e, 2026-11-11T09:42:33Z
  • New commits read: 2 — f9a6025 "fix(modelinfo): Treat a bare tail as ambiguous when window or compaction point differ", 1f0a5bd "fix(harbor): Port the bare-tail pass to the Python price reader"
  • Read in full: 3 reviews, 3 comments, 0 inline comments (from the three files)
  • New items since my last review:
    • Integrator note by amiddavid, 09:43:25Z. Checked each request. Items 1 and 3 are done (verified in code). Item 2 is done in code but incomplete in the port — finding 1. The PR-text requests are not done — finding 2.
    • Author comment by boazdavid, 10:03:10Z. Verified each claim: the Go ambiguity fix, the Python pass, the parity ids, the example-yaml note, the ratefill comment, the duplicate rejection. All true except the port is narrower than the Go rule (finding 1). The author's own "PR body count still needs an edit" is still open — finding 2.
    • Commits f9a6025 and 1f0a5bd. Reviewed below.
  • Earlier findings:
    • Reviewer 1 finding 1 and my round-1 finding 2 (ambiguity compares price only): fixed. table.go:223 now compares price, window and compactionPoint. Three new tests cover different window, different compaction point, and same window kept. ParseTable rejects a repeated match, which closes the duplicate-match bypass. The first-claimer logic stays sound: ParseTable now guarantees unique matches, so prev.match != e.match is always true on a second claimer, and any difference marks the tail.
    • My round-1 finding 1 (Python port missing the pass): fixed in pass, not in rule — the bare-tail pass and the full == tail gate are in _lookup, claude-sonnet-5 and vertex/claude-sonnet-5 are in the parity ids, and all harbor entry points use from_operator_file. But the ambiguity comparison is price-only — finding 1.
    • OsherElhadad's review (2026-09-28): its nit ("1.4988 == 2.28/1.52 exactly") is fixed in the PR body ("≈ 2.28 / 1.52, not exactly", with the confirmed rate-step note). Nothing else in it asks for change.
    • Round-1 non-blocking items: prices.example.yaml note updated and accurate; ratefill_test.go comment states the re-baseline; the family x* exact-match corner stays open by the author's choice — accepted, it predates this PR and deserves its own issue; the "six new cases" count is still wrong — finding 2.
  • The new Go tests re-derived by hand against lookup and deriveBareTails: each asserts what it claims, including the negative assertions (ok=false, exact=false) and the positive aws-prefixed control.
  • The ratefill fixture: the new rule does not move it. Its table has one qualified entry per tail, so the window comparison never fires; no re-baseline was needed, and none was made.
  • The parity test re-derived by hand for each new id: bare claude-sonnet-5 takes aws/claude-sonnet-5 in both implementations; vertex/claude-sonnet-5 matches nothing in either; aws/claude-sonnet-5-5 still takes the containment hit. The author's "passes with PyYAML on Python 3.12" is consistent with the code; I could not run it, Go and the test harness are not on this machine.
  • Price is comparable (modelinfo.go:65-76, float64 fields only), so the != at table.go:223 compiles and compares every field.
  • No code was changed, committed or pushed. The only file written is .review.md.

@boazdavid boazdavid left a comment

Copy link
Copy Markdown
Collaborator

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 @boazdavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.241 offload-review skill, @boazdavid's session fresh 1 of 2 2 of 2 1f0a5bd30fb0 blocking

Verdict: blocking

Findings

  1. deploy/harbor/kv_ttl_cost_model.py:619 — the Python lookup does not strip the [...] variant suffix, so the new bare-tail pass misses a variant-suffixed bare id that Go resolves

    • What fails: query claude-sonnet-5[1m] against deploy/service/prices.example.yaml. Go's Normalize (modelinfo.go:208-229) strips the trailing [1m], so lookup pass 2 returns aws/claude-sonnet-5 at $1.52. Python's _lookup sets full = (model or "").strip().lower() and strips nothing; the bare-tail map key is claude-sonnet-5, so claude-sonnet-5[1m] misses, pass 3 returns family claude-sonnet* at $2.28. The harbor analyses keep the exact 1.5x overcharge this PR fixes in Go, for [1m] traffic. Before this PR both engines said $2.28; the port made them diverge.
    • Proof: modelinfo.go:208-229 vs kv_ttl_cost_model.py:619-620. No variant strip exists anywhere in the Python file. The parity test ids include claude-sonnet-5 but no claude-sonnet-5[1m]. With that id added to the current fixture, Go answers known at in=3.0 (the aws/claude-sonnet-5 entry) and Python answers known=False (no family covers sonnet-5 in that table) — the parity test fails.
    • Fix: strip one trailing bracketed group in _lookup before the passes, as stripVariant does. Add claude-sonnet-5[1m] to the parity test ids.
  2. deploy/harbor/kv_ttl_cost_model.py:644 — the ported ambiguity rule is the rule before f9a6025, not the Go rule this PR ships

    • What fails: an operator file with aws/x (in 1.0, window: 200000), vertex/x (in 1.0, window: 1000000) and family x* (in 3.0). Go (table.go:223) marks the tail ambiguous, because the windows differ, and drops it; bare x prices at the family rate, 3.0. Python compares rates only (rates() at line 650), because from_operator_file (lines 534-561) never reads window or compaction_point — the keys are silently ignored. Python indexes the tail; bare x prices at 1.0. The two engines disagree on a money figure. The duplicate-match rejection (table.go:129-132) was also not ported: Python accepts a repeated match, and the prev[0] != match bypass at line 664 then indexes the LAST duplicate while _lookup's exact pass returns the FIRST, so aws/x and bare x price from different entries — and the same file fails to load in Go outright.
    • Proof: the traces above, read off the code. The parity fixture has no same-tail pair and no duplicate entry, so TestPythonPriceReaderMatchesGoTable stays green and hides both divergences.
    • Fix: track window/compaction_point per entry in from_operator_file and compare them in _derive_bare_tails; reject a repeated match at load, as ParseTable does. Add a same-price different-window pair plus a family entry, and a duplicate entry, to the parity fixture.
  3. PR text — the body still lacks what the integrator asked for and what CLAUDE.md requires before merge

    • What fails: no Behavior change section and no Data dependence section, both requested in the integrator note of 2026-11-11. The new duplicate-match rejection is itself a behavior change — old: a file with a repeated match loaded and priced; new: ParseTable returns an error — and it is named nowhere in the PR body. The Tests section still says "six new cases" and lists five; the diff adds twelve test functions. The author's reply of 2026-11-11 says the count edit is still pending.
    • Proof: the PR body as of head 1f0a5bd3 (saved and read in full this round). git diff fd6f3865..HEAD -- internal/modelinfo/table_test.go | grep -c "^+func Test" returns 12.
    • Fix: add the two sections. Name the duplicate rejection: who it affects (an operator whose file repeats a match), old and new behavior, and how to avoid it (remove the duplicate). For the bare-tail change, say how to turn it off (write a literal bare entry, which wins pass 1). Correct the test count.

Non-blocking

  • deploy/service/prices.example.yaml:90 says "or give different windows". The rule also drops a tail whose entries differ in compaction_point. One word missing.
  • Go's Price comparison stays stricter than Python's in one corner: one entry states cache_write explicitly, the other leaves it blank, and a file-level cache_write_frac makes the effective rates equal. Go sees CacheWrite 1.4 vs 0 and drops the tail; Python compares the computed write_5m and keeps it. Same direction as finding 2; settle it when the two rules are unified.
  • The missing variant strip also breaks Python pass 1 for literal entries: query gemini-2.5-pro[1m] returns Go's literal gemini-2.5-pro entry ($1.25) and Python's gemini-2.5* family ($0.30). Pre-existing before this PR; the fix for finding 1 fixes this too.
  • The family x* corner (a family entry exact-matches a bare x in pass 1, so a specific aws/x cannot win the bare id): the author declined with the reason that it is older than this PR and needs its own issue. The reason is right; reviewer 2 asked for the same issue.

What I checked

  • Last review: round 1, cb4c48e, 2026-11-11T09:40:17Z.
  • New commits read: 2 — f9a6025 (window and compaction point join the ambiguity rule; ParseTable rejects a repeated match), 1f0a5bd (the bare-tail pass ported to the Python price reader).
  • Read in full: 3 reviews, 3 comments, 0 inline comments (the inline file is empty). Also the PR body in full.
  • New items since my last review, and what I did about each:
    • Reviewer 2 round-1 review (09:42:33Z). Read in full. Its finding 1 (the Python port) is the item behind my findings 1 and 2; its finding 2 matched my round-1 finding 1.
    • Integrator note (09:43:25Z). Items 1 and 2 are done in code but incompletely (findings 1 and 2). The PR-text items are not done (finding 3).
    • Author reply by boazdavid (10:03:10Z). Each claim checked against the diff: the Go ambiguity fix, the three new tests, the Python pass, the parity ids, the example-yaml note, the ratefill comment, the duplicate rejection — all present as stated, except the port is unfaithful (findings 1 and 2) and the PR body is unchanged (finding 3).
  • Earlier findings: my round-1 finding 1 (window and compaction point not compared) is fixed — table.go:223 compares all three, and TestSameRateDifferentWindowTailIsAmbiguous, TestSameRateDifferentCompactionPointTailIsAmbiguous and TestSameRateAndWindowTailKeepsItsWindow cover it. My non-blocking items: the ratefill provenance comment is fixed (ratefill_test.go:11-13); the PR-body count is not (finding 3); the duplicate-match bypass is fixed in Go only (finding 2).
  • deriveBareTails re-traced by hand with two and three same-tail entries, in both sort orders: the first claimer is never replaced, each later entry is compared against it, so the extended comparison is sound. An entry with a window and one without also count as different, which is the conservative direction.
  • ParseTable's duplicate check: it runs on the lowercased match before the * is trimmed, so AWS/x after aws/x is caught (tested), and a family x* beside an exact x stays two distinct entries, as before.
  • kv_ttl_cost_model.py read in full around the change: ModelPricing, from_operator_file, _lookup, _derive_bare_tails, hit's read-rate fill from the queried model (matches Go's Price.Resolved). The rates() masking of the entry id and the derived read rate is right for what it compares; the gap is what it does not compare (finding 2).
  • The parity fixture traced by hand for every id in the list, Go side against Python side. All agree on the current fixture; the ids that would disagree (claude-sonnet-5[1m], a same-tail pair with different windows, a duplicate) are not in it.
  • The PR names the bare-tail behavior change in the Summary (who, old, new, the corpus counts) but not how to turn it off, and does not use the section names the integrator asked for (finding 3).
  • Live tests were not run; live tests are not approved and Go is not on this machine.

…he Python reader

Compare window and compaction_point in the Python bare-tail rule, strip a
trailing [variant] suffix in _lookup, and reject a repeated match at load, as
modelinfo does. Add the cases to the parity test and say compaction point in
the warning and the example file.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: DAVID BOAZ <[email protected]>

@boazdavid boazdavid left a comment

Copy link
Copy Markdown
Collaborator

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 @boazdavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.241 offload-review skill, @boazdavid's session resumed 2 of 2 3 of 3 a0c1269dcf2d blocking

Verdict: blocking

Findings

  1. deploy/harbor/kv_ttl_cost_model.py:541-567 — the new duplicate check and the meta map disagree about the key, so a family-plus-specific pair either fails to load or gets the wrong window in the ambiguity rule.

    • What fails: the check if match in meta runs on the match BEFORE the * is trimmed, but meta is keyed by the match AFTER the trim. Two consequences for a file that carries both aws/x* (a family) and aws/x (a specific), which Go's ParseTable accepts because its seen map keys the untrimmed match (table.go:121-134):
      • Family first, specific second: the specific entry's untrimmed aws/x is already a meta key (the family set it), so Python raises "'aws/x' appears more than once" and refuses a file the proxy runs on.
      • Specific first, family second: no raise, but meta["aws/x"] is overwritten with the family's (window, compaction_point). The ambiguity comparison then uses the family's metadata for the specific entry. Example: aws/x (in 1.0, window 100000), aws/x* (in 2.0, no window), vertex/x (in 1.0, no window). Go marks the tail ambiguous (windows 100000 vs 0) and prices bare x at the family rate, 2.0. Python compares (0,0) vs (0,0), indexes the tail, and prices bare x at 1.0.
    • Proof: kv_ttl_cost_model.py:541-544 (check before trim) vs 567 (meta[match] after trim); rates() at 660-664 reads meta.get(match, (0,0)). Go's seen check (table.go:129-132) uses the untrimmed match, so aws/x and aws/x* never collide there, and Go's tableEntry carries window per entry, so no overwrite is possible. The new TestPythonPriceReaderRejectsADuplicateMatchLikeGo uses two identical aws/x entries, and the parity fixture has no family-plus-specific pair, so neither test catches it.
    • Fix: key the duplicate check on the untrimmed match, as Go does — a separate seen set. Carry (window, compaction_point) per entry, not in a dict keyed by the trimmed match — for example extend the entries tuple. Add the family-plus-specific pair to the parity fixture.
  2. PR text — the body is unchanged since round 2 and still lacks what the integrator asked for and what CLAUDE.md requires before merge.

    • What fails: no Behavior change section and no Data dependence section, both requested in the integrator note of 2026-11-11 09:43:25Z. The Tests section still says "six new cases" and lists five; the diff adds twelve test functions in table_test.go. The duplicate-match rejection that f9a60259 added to ParseTable is itself a behavior change — old: a file with a repeated match loaded and priced; new: ParseTable returns an error and the proxy does not start — and it is named nowhere in the PR body. I agree with reviewer 1, round-2 finding 3, and checked it myself: the body saved this round is byte-for-byte the round-2 body.
    • Proof: PR body fetched at head a0c1269d (saved and read in full). No "Behavior change" heading, no "Data dependence" heading, "six new cases" at the Tests section.
    • Fix: add both sections before merge. Name the bare-tail change (who, old, new, how to turn it off: write a literal bare entry, which wins pass 1) and the duplicate rejection (who, old, new, how to avoid it: remove the duplicate). Correct the count. CLAUDE.md makes the named behavior change and the owner's yes a merge gate.

Non-blocking

  • rstrip("*") in Python (kv_ttl_cost_model.py:544) strips all trailing * characters; Go's TrimSuffix strips one. An id ending in ** trims differently. Garbage input only.
  • The rates() masking still compares a slightly different field set than Go's Price != (one entry states cache_write, the other leaves it blank under a file-level frac): Go is stricter and can drop a tail Python keeps. Pre-existing port design, same direction as before; not introduced by this commit.

What I checked

  • Last review: round 2, 1f0a5bd, 2026-11-11T10:08:09Z
  • New commits read: 1 — a0c1269 "fix(harbor): Match the Go ambiguity, variant and duplicate rules in the Python reader"
  • Read in full: 5 reviews, 3 comments, 0 inline comments (from the three files). Also the PR body in full.
  • New items since my last review:
    • Reviewer 1's round-2 review (10:11:37Z). Read in full. Its finding 1 (variant strip missing in Python) was new to me — I verified it against modelinfo.go:208-229 and the pre-commit Python, and it was correct. Its finding 2 matched my round-2 finding 1 plus the duplicate port. Its finding 3 matched my round-2 finding 2.
    • Commit a0c1269. Reviewed below.
    • No new issue comments; the comment list still ends at 10:03:10Z.
  • Earlier findings:
    • My round-2 finding 1 (Python ambiguity compares rates only): fixed. from_operator_file now reads window and compaction_point into meta, rates() includes them, and the parity fixture gains the aws/ambig-model/vertex/ambig-model pair with the ambig* family — exactly the shape I asked for. The port is faithful except for the meta keying — finding 1.
    • My round-2 finding 2 (PR text): not fixed — finding 2.
    • My round-2 non-blocking (duplicate rejection not ported): fixed in intent, defective in the keying — the rejection exists and has a parity test, but the check and the meta map disagree about the key — finding 1.
    • My round-2 non-blocking (warning text says "different rates"): fixed on both sides; prices.example.yaml now says "windows or compaction points".
    • Reviewer 1's round-2 finding 1 (variant strip): fixed. The Python strip (kv_ttl_cost_model.py:627-628) matches Go's stripVariant exactly, including the corner cases: rfind("[") > 0 mirrors i <= 0 (no opener, or the whole id is the group), and only one group is stripped. The strip runs before the tail is computed, as in Normalize. The parity ids gain claude-sonnet-5[1m] and gemini-3-flash-preview[1m].
    • Reviewer 1's round-2 finding 2: fixed, same as my round-2 finding 1, with finding 1's defect.
    • Reviewer 1's round-2 finding 3: not fixed — finding 2.
    • Reviewer 1's round-2 non-blocking items: the example-yaml wording is fixed; the cache_write explicit-vs-blank corner is unchanged (my non-blocking above); the family x* corner stays declined with the reason "older than this PR, needs its own issue" — I checked the reason and accept it.
  • The new commit's Go side: only the slog.Warn message text changed. Re-read deriveBareTails and ParseTable in full around it; no behavior change.
  • The parity fixture traced by hand for every id, Go side against Python side at head a0c1269d: bare ambig-model → tail dropped (windows differ), family ambig* 3.0 in both; aws/ambig-model → 1.0 in both; claude-sonnet-5[1m] → strip → bare-tail → aws/claude-sonnet-5 3.0 in both; gemini-3-flash-preview[1m] → strip → gemini* 2.0 in both. All agree.
  • Mapping is imported (kv_ttl_cost_model.py:246), so the new _derive_bare_tails signature resolves.
  • The shipped prices.example.yaml has no family-plus-specific pair sharing a trimmed key (all aws/* and azure/* entries are exact; the families are bare claude-*), so finding 1 does not fire on the shipped file — it fires on a legal file shape Go accepts.
  • I did not run Go or Python tests; live tests are not approved and Go is not on this machine.
  • No code was changed, committed or pushed. The only file written is .review.md.

@boazdavid boazdavid left a comment

Copy link
Copy Markdown
Collaborator

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 @boazdavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.241 offload-review skill, @boazdavid's session resumed 1 of 2 3 of 3 a0c1269dcf2d blocking

Verdict: blocking

Findings

  1. deploy/harbor/kv_ttl_cost_model.py:567 — meta is keyed by the trimmed match, so a family sibling overwrites the exact entry's window and compaction point, and Python drops or keeps a tail Go decides the other way

    • What fails: the duplicate check at line 541 runs on the match WITH its *, so aws/claude-sonnet-5 and aws/claude-sonnet-5* are two legal entries in both engines — a natural file shape: the exact rate for the id, the family default for its siblings. But meta[match] at line 567 is written AFTER rstrip("*"), so both entries write the same key and the later one wins. File order then decides which entry's (window, compaction_point) the ambiguity rule sees. Example: aws/claude-sonnet-5 (in 1.52, window 200000), then aws/claude-sonnet-5* (in 1.52, no window), then vertex/claude-sonnet-5 (in 1.52, window 200000). Go: both claimants carry window 200000 and one price, the tail is indexed, bare claude-sonnet-5 prices at 1.52. Python: the family sibling has overwritten meta["aws/claude-sonnet-5"] to (0, 0), the comparison sees (0, 0) against (200000, 0), the tail is dropped with a warning, and the bare id falls through to a family rate or unknown. The reverse order of the two aws entries hides the bug — it is order-dependent and silent.
    • Proof: lines 541-544 and 567 of kv_ttl_cost_model.py, read against table.go, where each tableEntry carries its own window and compactionPoint (table.go:169-170) so no collision is possible. The parity fixture has no exact entry paired with its own family sibling plus a second provider, so TestPythonPriceReaderMatchesGoTable stays green.
    • Fix: key meta by the untrimmed match (unique by the new duplicate check), or carry (window, compaction_point) in the entry tuple as Go's tableEntry does. Add the shape to the parity fixture: an exact entry, its own family sibling, and a second provider on the same tail.
  2. PR text — round-2 finding 3 is still not fixed: the body is unchanged

    • What fails: no Behavior change section and no Data dependence section, both requested by the integrator on 2026-11-11 and required by CLAUDE.md before merge. The duplicate-match rejection is a behavior change — old: a file with a repeated match loaded and priced; new: ParseTable and from_operator_file both refuse it — and it is named nowhere in the PR body. The Tests section still says "six new cases"; the branch adds twelve test functions in table_test.go and one in kv_ttl_price_parity_test.go. The author said on 2026-11-11 that the count edit was still pending; no later change did it.
    • Proof: the PR body fetched this round at head a0c1269d and read in full — "six new cases" at line 111, no "Behavior change" or "Data dependence" heading anywhere. git diff fd6f3865..HEAD -- internal/modelinfo/table_test.go | grep -c "^+func Test" returns 12.
    • Fix: add the two sections. Name the duplicate rejection (who: an operator whose file repeats a match; old: loads and prices; new: load error; avoidance: remove the duplicate). Say how to turn the bare-tail change off (write a literal bare entry, which wins pass 1). Correct the count.

Non-blocking

  • from_operator_file reads window and compaction_point but skips Go's validation of them: Go refuses a negative window or a compaction_point above the window (table.go:135-140); Python accepts the file and uses the values in the ambiguity comparison. The new duplicate test's own comment says the analyses must not price from a file the proxy would not start on. No wrong money figure directly — the values feed only the drop/keep decision.
  • The cache-write strictness corner from my round-2 note is still open: one entry states cache_write explicitly, the other leaves it blank, a file-level cache_write_frac makes the effective rates equal. Go compares the stated CacheWrite (1.4 against 0) and drops the tail; Python compares the computed write_5m and keeps it. Unchanged by this commit.

What I checked

  • Last review: round 2, 1f0a5bd, 2026-11-11T10:11:37Z.
  • New commits read: 1 — a0c1269 "fix(harbor): Match the Go ambiguity, variant and duplicate rules in the Python reader".
  • Read in full: 5 reviews, 3 comments, 0 inline comments (the inline file is empty). Also the PR body in full, re-fetched this round.
  • New items since my last review: only commit a0c1269. No review, comment or inline comment was posted after 10:11:37Z. Reviewer 2's round-2 review (10:08:09Z) predates my round-2; I read it in full this round anyway. I agree with its finding 1 (the Python ambiguity rule compared rates only) — fixed by this commit, with the collision in my finding 1 left. I agree with its finding 2 (the PR text) — my finding 2. Its two non-blocking items (duplicate rejection not ported; warning text drift) are both fixed.
  • Earlier findings:
    • My round-2 finding 1 (variant suffix not stripped in Python): fixed. _lookup now strips one trailing bracketed group before the passes. Traced against stripVariant edge cases: no opener, an id that is only the group, an unterminated bracket, two stacked groups — all match Go. The parity ids add claude-sonnet-5[1m] and gemini-3-flash-preview[1m]; traced on both engines, they agree.
    • My round-2 finding 2 (the ported ambiguity rule was the pre-f9a60259 rule; no duplicate rejection): fixed except the collision. Window and compaction point are now read and compared, a repeated match is refused at load in both engines, the parity fixture has the same-rate different-window pair with a family fallback, and TestPythonPriceReaderRejectsADuplicateMatchLikeGo covers the duplicate on both sides. The remaining hole is finding 1.
    • My round-2 finding 3 (PR text): not fixed — finding 2.
    • My round-2 non-blocking items: the example-yaml wording is fixed ("windows or compaction points"); the Go and Python warnings now say "differ in rate, window or compaction point"; the family x* corner stays deferred to its own issue by the author's choice — accepted, it predates this PR.
  • The new parity fixture traced id by id on both engines: ambig-model is dropped as ambiguous in both and takes the ambig* family at 3/15; aws/ambig-model is an exact hit in both; every pre-existing id still agrees.
  • The Python duplicate check catches a case-different repeat (AWS/x after aws/x), because the check runs on the lowercased match, as Go's does. Mapping is imported and from __future__ import annotations is present, so the new annotation cannot fail at import.
  • The meta collision traced in both directions: family sibling later in the file corrupts the exact entry's values (Go keeps, Python drops); a family sibling carrying the other provider's window can make Python keep a tail Go drops. Both orders read off lines 541-567 and the sort at line 570.
  • Live tests were not run; live tests are not approved and Go is not on this machine.

…ke Go

A family sibling (aws/x*) shared its trimmed match with the exact entry and
overwrote its window. Keep the map to exact entries, check duplicates on the
match as written, and refuse a negative window or a compaction point above it.
Add an exact entry with its family sibling and a second provider to the parity
fixture.

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: DAVID BOAZ <[email protected]>
@boazdavid

Copy link
Copy Markdown
Collaborator

Round 3 findings are fixed in baceab0, and the PR body is now updated.

  • Python meta map: an exact entry and its family sibling (aws/x, aws/x*) no longer share one key. The map holds exact entries only. The duplicate check uses the match as written, like Go.
  • Python from_operator_file now refuses a negative window and a compaction_point above the window, like ParseTable.
  • One trailing * is trimmed, like Go's TrimSuffix.
  • Parity fixture: an exact entry, its family sibling and a second provider on one tail.
  • PR body: it has Behavior change and Data dependence sections, names the duplicate-match rejection, and has the corrected test count. The earlier body edit failed on a GitHub API error. Round 3 reviewed the old body.

Still open: the owner's yes in Behavior change, and the explicit-versus-blank cache_write corner.

@boazdavid boazdavid left a comment

Copy link
Copy Markdown
Collaborator

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 @boazdavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.241 offload-review skill, @boazdavid's session resumed 1 of 2 4 of 4 baceab0429a3 approve

Verdict: approve

Findings

None.

Non-blocking

  • The explicit-versus-blank cache_write corner is still open, and the author says so: one entry states cache_write, the other leaves it blank, a file-level cache_write_frac makes the effective rates equal. Go compares the stated CacheWrite (1.4 against 0) and drops the tail; Python compares the computed write_5m and keeps it. Both engines stay deterministic and the input is contrived. Worth a follow-up issue, not a change in this PR.
  • The PR body's Owner's yes line says pending. CLAUDE.md makes the owner's yes a merge gate. Do not merge until it is recorded.

What I checked

  • Last review: round 3, a0c1269, 2026-11-11T10:22:19Z.
  • New commits read: 1 — baceab0 "fix(harbor): Key the window map by the exact entry and validate it like Go".
  • Read in full: 6 reviews, 4 comments, 0 inline comments (the inline file is empty). Also the PR body in full, re-fetched this round.
  • New items since my last review, and what I did about each:
    • Reviewer 2's round-3 review (10:21:12Z, one minute before my round-3; read in full this round). Its finding 1 is my round-3 finding 1 plus one more consequence I had missed: with the family sibling FIRST, the old code's duplicate check keyed on the untrimmed match against meta keys keyed on the trimmed match, so a legal exact+family pair was refused outright. I checked that consequence against the round-3 code — it is correct. Its finding 2 is my round-3 finding 2. Its non-blocking rstrip("*") point (Go trims one *, the old Python trimmed all) is correct.
    • Author comment by boazdavid (10:23:38Z). Each claim checked against the diff: all true.
    • Commit baceab0. Reviewed below.
    • The PR body update. Verified in full — see my round-3 finding 2.
  • Earlier findings:
    • My round-3 finding 1 (meta keyed by the trimmed match; family sibling overwrites the exact entry's window; false duplicate refusal in the family-first order): fixed. The duplicate check now uses a separate seen set keyed on the match as written, * included, exactly as Go's seen map keys it (kv_ttl_cost_model.py:537, 542-544 vs table.go:121-134), so an exact entry and its family sibling never collide in either order. meta is written only for non-prefix entries (line 575-576); a non-prefix match is stored as written and seen guarantees the written form is unique, so meta keys are unique and no overwrite is possible in any file order. The parity fixture now carries the exact shape I asked for: aws/famsib-model (window 200000), aws/famsib-model* (a different rate, no window), vertex/famsib-model (window 200000), queried bare, prefixed and as a sibling.
    • My round-3 finding 2 (PR text): fixed. The body now has a Behavior change section (who it affects, old, new, the corpus numbers, the duplicate-match rejection named with its old and new behavior and how to avoid it, how to turn the bare-tail change off — write a literal bare entry), a Data dependence section (none; no docs/data-dependence.md row needed), and the corrected count: "twelve new test functions", which matches git diff fd6f3865..HEAD -- internal/modelinfo/table_test.go | grep -c "^+func Test" = 12, and the parity file's second test is named in prose. The author's note that the earlier body edit failed on a GitHub API error explains why round 3 saw the old body.
    • My round-3 non-blocking items: the window/compaction validation gap is fixed — Python now refuses a negative window or compaction point and a compaction point above the window, with the same conditions as table.go:135-140 (window > 0 and compaction > window, negative check), placed after the trim as in Go. The cache_write corner stays open, acknowledged by the author. The family x* corner stays deferred to its own issue — accepted, it predates this PR.
  • The new fixture traced id by id on both engines: bare famsib-model — both engines index the tail (prices equal, windows equal at 200000 because meta now holds the exact entry's window, not the family's) and price it at the vertex entry's 1/5; aws/famsib-model — exact hit at 1/5 in both; aws/famsib-model-2 — the family's 2/9 in both. If the round-3 bug were still present, the family would have zeroed meta["aws/famsib-model"], the tail would drop, and the bare id would answer unknown in Python against 1/5 in Go — the fixture catches the bug it was built for.
  • The one-* trim (line 546, match[:-1] if prefix else match) matches Go's TrimSuffix: aws/x** keeps one * in the trimmed match in both engines. Reviewer 2's round-3 non-blocking is closed.
  • The check order in from_operator_file (empty match, duplicate, trim, window/compaction validation, rate validation) matches ParseTable's order, so the two readers refuse the same files for the same first reason.
  • deploy/harbor/kv_ttl_cost_model.py read in full around the change; no other behavior moved. The Go side of the PR is unchanged since round 3 except the warning text already reviewed then.
  • Live tests were not run; live tests are not approved and Go is not on this machine. The author reports the parity test passes with PyYAML on Python 3.12; the traces above are consistent with that.

@boazdavid boazdavid left a comment

Copy link
Copy Markdown
Collaborator

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 @boazdavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.241 offload-review skill, @boazdavid's session resumed 2 of 2 4 of 4 baceab0429a3 approve

Verdict: approve

Findings

None.

Non-blocking

  • The merge gate is still open: the owner's yes. The Behavior change section ends with "Owner's yes. Needed before merge: pending", and the author's reply of 10:23:38Z names it as still open. CLAUDE.md says an agent never decides this. Do not merge before the owner says yes in the PR. This is the one remaining item, and it is not a code defect.
  • The explicit-versus-blank cache_write corner is still open, by the author's choice: one entry states cache_write, the other leaves it blank under a file-level cache_write_frac that makes the effective rates equal. Go compares the stated value (against 0) and drops the tail; Python compares the computed write_5m and keeps it. Pre-existing port design, contrived file shape, both reviewers have held it non-blocking since round 2.
  • Pre-existing, unchanged by this PR: Python ignores an unknown YAML key that Go's KnownFields(true) rejects, so a typo'd key (windo:) makes Go refuse the file and Python load it with window 0. Also int(m.get("window") or 0) truncates a fractional window where Go's decode errors. Garbage input both.

What I checked

  • Last review: round 3, a0c1269, 2026-11-11T10:21:12Z
  • New commits read: 1 — baceab0 "fix(harbor): Key the window map by the exact entry and validate it like Go"
  • Read in full: 6 reviews, 4 comments, 0 inline comments (from the three files). Also the PR body in full, re-fetched this round.
  • New items since my last review:
    • Reviewer 1's round-3 review (10:22:19Z). Read in full. Its finding 1 (the meta keying) is the same defect as my round-3 finding 1; its finding 2 (PR text) is the same as my round-3 finding 2. Both are fixed by this commit — verified independently below. Its non-blocking item (Python skipped Go's window/compaction validation) is also fixed by this commit.
    • Author comment by boazdavid (10:23:38Z). Each claim checked against the diff: the seen set on the written match, meta for exact entries only, the window and compaction validation, the single-* trim, the new parity fixture, and the PR-body sections. All true. Its "still open" list matches mine.
    • Commit baceab0. Reviewed below.
    • The PR body, re-fetched and read in full: it now has a Behavior change section (who, old, new, the duplicate-match rejection named, how to turn it off, owner's yes pending), a Data dependence section (none), and the corrected count ("twelve new test functions", plus the parity test described). The round-3 finding is closed. The author says the earlier body edit had failed on a GitHub API error, which explains why round 3 saw the old body.
  • Earlier findings:
    • My round-3 finding 1 (meta keyed by the trimmed match; duplicate check on the untrimmed match): fixed. The duplicate check now uses a separate seen set keyed by the match as written, * included — exactly Go's seen map (kv_ttl_cost_model.py:537-544 vs table.go:121-134). meta is written only by non-prefix entries (line 575-576); an exact entry's written match equals its trimmed match and the seen check makes it unique, so no collision is possible and file order no longer matters. The parity fixture gains the shape both reviewers asked for: aws/famsib-model (exact, window 200000), aws/famsib-model* (family), vertex/famsib-model (second provider), with famsib-model, aws/famsib-model and aws/famsib-model-2 in the query list.
    • My round-3 finding 2 (PR text): fixed, except the owner's yes, which is a human step, named as pending in the body itself.
    • My round-3 non-blocking (rstrip("*") strips all stars): fixed — match[:-1] if prefix else match strips exactly one, as Go's TrimSuffix (kv_ttl_cost_model.py:546).
    • My round-3 non-blocking (the cache_write corner): still open, non-blocking, acknowledged by the author.
    • Reviewer 1's round-3 findings 1 and 2: same as mine, both fixed. Its non-blocking window-validation item: fixed — negative window or compaction point, and a compaction point above the window, are now refused (kv_ttl_cost_model.py:547-552), matching table.go:135-140.
    • The family x* exact-match corner: still declined with the reason "older than this PR, needs its own issue". I checked the reason again and accept it.
  • The new fixture traced by hand on both engines, in all four doc variants (plain, readfrac, writefrac, both): the two famsib-model claimants carry one price and one window in both engines, the tail is indexed, bare famsib-model prices at 1.0 in both; aws/famsib-model is an exact hit at 1.0; aws/famsib-model-2 takes the exact entry by containment (longest-first stable sort, exact before family at equal length) at 1.0 in both. The read_derived masking and the per-family cache_write_frac_for behave identically for both claimants, so the rates comparison agrees in every variant.
  • The seen check traced on the corner cases: aws/x twice rejected; AWS/x after aws/x rejected (lowercased, as Go); aws/x beside aws/x* accepted, with meta holding only the exact entry's values in both file orders.
  • The validation order and messages match Go's set of rejections; the message text uses the lowered match where Go uses the written one. Cosmetic only.
  • I did not run Go or Python tests; live tests are not approved and Go is not on this machine.
  • No code was changed, committed or pushed. The only file written is .review.md.

@amiddavid

Copy link
Copy Markdown
Collaborator

Integrator note: the owner approved the behavior change on 2026-11-11 ("approve behavior change"): a bare model id now takes the price of the operator's qualified entry for it. Please put that in the Behavior change section, with how to turn it off.

I see the 4 fix commits up to baceab0. When you are done, please run offload-review round 2 on the final head and message the integrator session.

- prices.example.yaml: wrap the bare-alias note to the file's line width.
- ratefilltest.go: say that #334 re-made the four sonnet-5 fixture rows.

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

Copy link
Copy Markdown
Collaborator

Integrator note on the approval at 42ed07d:

  • Round 4 (2 GLM reviewers) approves baceab0, with no findings.
  • 42ed07d after it changes only comment lines: the # comment block in deploy/service/prices.example.yaml (re-wrapped) and a // comment in internal/modelinfo/ratefilltest.go. approval-still-valid.sh prints CHANGED, because its comments-only check covers .go and .sh files only. I read the delta: comment text only. Under the owner's comments-only rule, both approvals still count.
  • The PR text now has both behavior changes, with the owner's yes (2026-11-11), and the Data dependence section. The round 2-4 notes about the missing sections were against older bodies.
  • I merge when CI is green.

@amiddavid
amiddavid merged commit b125d4b into main Nov 11, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Nov 11, 2026
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.

modelinfo.Table: a qualified entry's price is unreachable for its own bare tail — claude-sonnet-5 overbilled 1.5x

3 participants