Repository navigation
docs(proxy): sharpen what the lost-credit counters can and cannot tell - #1105
Conversation
Fix 3 wording notes from round 2 of the review of #1099. - A key mismatch in one shared store also raises keepalive_pings_priced, so the "missing rises, priced stays 0" rule cannot see it. - Failing pings give the same pattern as an unwired host. Say how to tell them apart: the keeper counters pings, failed and skipped. - Say which case the substitute-ping sentence covers: a wired host and a committed substitute. HELP text and comments change. No code logic changes. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
amiddavid
left a comment
There was a problem hiding this comment.
| 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 | 47a8aa64008d |
blocking |
Verdict: blocking
The PR rewrites the help text of keepalive_rescue_facts_missing in three places. It is
docs only: no behavior change, no data-dependence change, so no row file is needed. I
checked every new claim against the code. Most claims hold. One sentence does not.
Findings
- docs/reference/reference.md:200 — "The ping rows'
statusin the dashboard show the same" is wrong for 2 of the 3 named failure kinds.- What fails: An operator follows the doc, looks at the ping rows in the dashboard, and draws the wrong conclusion. A refused ping (a 4xx, one of the doc's own examples of
failed) leaves no ping row at all. A ping with no usage (the doc's other example offailed) leaves a row whosestatusis 2xx, so the status looks fine. Only theskippedkind (429 or 5xx) shows a failing status in a row. - Proof:
keepalive/keeper.go:1553— the code's own comment saysoutcomeFailed // stopped, no audit row. Infire,case outcomeFailed: return(keepalive/keeper.go:1520-1521) returns beforerecord1, so noKeepAliveReportis emitted and no dashboard row is written. The 4xx branch (keepalive/keeper.go:1582-1587) and the 401/403 branch (keepalive/keeper.go:1566-1573) both returnoutcomeFailed; a transport error returns even earlier (keepalive/keeper.go:1509-1515). The no-usage branch returnsoutcomeFailedRecorded(keepalive/keeper.go:1589-1595), which does record a row — with the 2xx status the provider returned, not a failing one. OnlyoutcomeTransient(429 or 5xx,keepalive/keeper.go:1577-1580) records a row whose status shows the failure. The only emission sites for ping rows arerecord1,recordSubstitutePingand the manual path (keepalive/keeper.go:1744,keepalive/substitute.go:278,keepalive/manual.go:190). - Fix: Restrict the sentence to the case that holds, for example: "A 429 or 5xx also shows as the
statusof the ping's row in the dashboard. A refused ping leaves no row, and a ping with no usage leaves a row with a 2xx status." Or drop the sentence.
- What fails: An operator follows the doc, looks at the ping rows in the dashboard, and draws the wrong conclusion. A refused ping (a 4xx, one of the doc's own examples of
Non-blocking
- The new "either … or …" framing (
docs/reference/reference.md:200) omits one wiring mistake: a host that callsPingSavingswith a store other thanOptions.Pings. That host also showskeepalive_rescue_facts_missingrising withkeepalive_pings_pricedat0(proxy/proxy.go:3101readsh.opts.Pings; the other store counts the priced pings no one reads). "Does not wire the ping side" can be read to cover it. Consider saying "or wires it to another store". failedalso counts transport errors (keepalive/keeper.go:1509), andskippedalso counts pings never sent: no spare slot (keepalive/keeper.go:1445,1480) or a body that could not be built (keepalive/keeper.go:1491). For those, "the pings fire and fail" is not exact — the ping never went out. The diagnosis "not an unwired host" still holds. The parentheticals name one cause each, not all.metrics/metrics.go:1108: the new comment line runs past 300 characters. The file has long comment lines already, so this is a note, not a request.
What I checked
- The full diff:
docs/reference/reference.md,metrics/metrics.go,proxy/promexport.go. Three lines, one claim rewritten in three places. No behavior change; no test pins the changed help wording (proxy/promexport_coverage_test.goandproxy/pingunpriced_test.gopin values only). - "Priced stays 0 when pings keep failing":
PingSavings(proxy/accountant_ping.go:126-144) returns beforenotePricedfor a non-2xx ping or one with no usage, and stores no facts. The next request then haskaPings > 0andaccPingWindow == "", so it counts as missing (proxy/dashcapture.go:850-852). Holds. - "A key mismatch inside one shared store does not fit this pattern":
notePriced(proxy/accountant_ping.go:139) runs before theputunder the key, so a mismatched key still raiseskeepalive_pings_priced. Holds. - The
/statscounter names and meanings:keepalive/keeper.go:1798-1812(pings,skipped,failed),noteOutcome(keepalive/keeper.go:1559): 429 or ≥500 →skipped; ≥400 →failed; no usage →failed. The/statsmerge isproxy/proxy.go:3059-3063. Names and the 429/5xx reading hold; the parentheticals are partial (see Non-blocking). - "A committed substitute ping stores ping facts": both substitutes book through
recordSubstitutePing(keepalive/substitute.go:241-296), which emits aKeepAliveReportwith status 200 and the call's usage; the proxy's emitter then callsPingSavings(cmd/context-guru-proxy/main.go:1041), which stores the facts when usage is nonzero. The sweep incrementse.pingsbeforefireruns (keepalive/keeper.go:1359), so the span readskaPings > 0and needs those facts. Holds, including the no-usage caveat. - That the keeper's counters appear in
/statsonly after something pinged (proxy/proxy.go:3059), so "pingsat0means nothing pinged" also covers an absent field. - That no other doc still carries the old "key mismatch" claim: only
docs/reference/reference.md:200mentions it. - Data dependence: no component or feature changed, so no row file is due.
docs/data-dependence/is untouched, correctly.
amiddavid
left a comment
There was a problem hiding this comment.
| 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 | 47a8aa64008d |
blocking |
Verdict: blocking
Findings
-
docs/reference/reference.md:200 — "The ping rows'
statusin the dashboard show the same" is wrong for mostfailedcauses.- What fails: An operator follows the doc to the dashboard to confirm failing pings. For a refused ping (a 4xx that is not 429) or a transport error, no ping row exists at all. For a no-usage ping, the row's status is 2xx. Only the 429 or 5xx case leaves a row with a failing status.
- Proof:
keepalive/keeper.go:1520-1521—outcomeFailedreturns withoutrecord1; the comment atkeeper.go:1553says "stopped, no audit row". Refused pings take that path (keeper.go:1581-1587, and 401/403 with a credential atkeeper.go:1565-1573). A transport error returns beforerecord1(keeper.go:1508-1515). A no-usage ping records its row with the 2xx status it got (keeper.go:1594→keeper.go:1522-1523). Only the transient case records the failing status (keeper.go:1516-1519). - Fix: Say the rows show only the 429 or 5xx answers. A refused ping or a transport error leaves no row; a no-usage ping shows a 2xx row with zero usage.
-
docs/reference/reference.md:200 —
skippedis not "(a 429 or 5xx)"; it counts about nine other causes, and most mean no ping was sent.- What fails: A tenant at its rate or concurrency limit has every ping turned away before dispatch.
skippedrises, keeperpingsstays 0, andmissingrises whilepricedstays 0 — the exact pattern this row diagnoses. The operator reads "skipped (a 429 or 5xx)" and concludes the pings fire and fail. No ping fired. - Proof:
skippedis incremented atkeepalive/keeper.go:1577(429 or 5xx) and also atkeeper.go:859(dead credential at record),keeper.go:866(body overMaxBodyBytes),keeper.go:895(thinking enabled),keeper.go:1011andkeeper.go:1017(below limits, over budget, done),keeper.go:1268(memory eviction),keeper.go:1445andkeeper.go:1480(no rate or concurrency spare — the ping is never sent, and returns beforek.pings.Addatkeeper.go:1507),keeper.go:1491(ping body could not be built), andkeepalive/manualhold.go:238(manual-hold eviction). - Fix: Define
skippedas "a ping that was counted but not sent or not answered usefully: a 429 or 5xx answer, no spare rate or concurrency, a gate refusal at record, or an eviction". Or list only the causes that fit this diagnostic and say the rest mean no ping fired.
- What fails: A tenant at its rate or concurrency limit has every ping turned away before dispatch.
-
docs/reference/reference.md:200 —
failedalso counts transport errors, which the definition omits.- What fails: A dead route or a network partition fails every ping before an answer.
failedrises, but the doc defines it as "a refused ping, or one with no usage". The reader has no way to know the counter covers this case, although it is a main way "its pings keep failing". - Proof:
keepalive/keeper.go:1508-1509— a dispatch error incrementsfailed("a transport error: counted, not stopped") before any status exists. - Fix: Add "or one that never reached the provider" to the parenthetical.
- What fails: A dead route or a network partition fails every ping before an answer.
Non-blocking
- "
pingsat0means nothing pinged" is wrong for a manual-only span:PingNow(keepalive/manual.go:79) never increments the keeper's process-widepings. A manual press is priced, sokeepalive_pings_pricedrises and the diagnostic pattern does not arise. Worth a clause, not a must. proxy/promexport.go:696andmetrics/metrics.go:1108name the counters without defining them, so findings 1-3 touch the reference page only.
What I checked
- The key-mismatch claim: correct.
PingSavingscallsst.notePriced()on every converted ping through the shared store (proxy/accountant_ping.go:139), before the keyedput. A key mismatch inside one store leaves facts unreadable but still raiseskeepalive_pings_priced, which reads that store (proxy/proxy.go:3101). - The failing-pings cause: correct. A non-2xx or no-usage ping is not converted (
proxy/accountant_ping.go:133-136), so nothing is priced and no facts are stored; the next return raisesmissing(proxy/dashcapture.go:850-851). - The substitute claim: correct. A committed substitute reports status 200 with usage and a window (
keepalive/substitute.go:277-293), soPingSavingsstores its facts and the next return does not raisemissing. A substitute with no usage stores nothing, and the entry's ping count was already raised atkeepalive/keeper.go:1359, so the return can raise it. - "Moves only with the dashboard on": correct and unchanged. The savings tracker exists only when
opts.Dashboard != nil(proxy/proxy.go:447-449). - The
/statscounters exist underkeepalivewith the namespings,failed,skipped(keepalive/keeper.go:1798-1807,proxy/proxy.go:3059-3061). - Data dependence: none needed. Docs and help text only; no component or feature changed.
- No test pins the changed HELP text, so the commit needs no test updates for that.
Round 1 of the review found three wrong claims. - Dashboard ping rows show a failure only for a 429 or 5xx. A refused ping or a transport error leaves no row. A no-usage ping leaves a row with a 2xx status. - skipped also counts pings never sent, so it does not prove that pings fire and fail. Use pings with failed for that. - failed also counts a transport error. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
Round 1 repliesAll 3 findings are fixed in
Tests: |
amiddavid
left a comment
There was a problem hiding this comment.
| 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 | d4956ee4607e |
blocking |
Verdict: blocking
Findings
- docs/reference/reference.md:200 — the rewritten
skippedguidance drops the 429/5xx cause, so the diagnostic has no rule for an overload storm and one sentence is wrong there.- What fails: A provider in overload answers every ping with 429 or 5xx. Every ping goes out, fails, is never priced, and
missingrises withpricedat0— the exact "its pings keep failing" case this row diagnoses. The counters then read:pingsrising,failedflat,skippedrising. Neither new rule fires: rule 1 needsfailedrising, rule 2 needspingsflat. Worse, "so do not read it as a failed ping" is wrong in this storm: thereskippedcounts exactly failed pings. The operator is left with no/statsreading, and the sentence points away from the right one. - Proof:
keepalive/keeper.go:1576-1580— a 429 or 5xx incrementsskipped(neverfailed; thestatus >= 400branch at:1581is checked after and never reached by a 429), the entry is not stopped, and the next ping slot retries, sopingskeeps rising (keeper.go:1507). Such a ping is not priced and stores no facts (proxy/accountant_ping.go:133-136), so the next return raisesmissing(proxy/dashcapture.go:850-851). The how-to states the same cause: "A 429 or 5xx (an overload) is transient: countedskipped, and the next ping slot retries" (docs/how-to/cache-keepalive.md:300). The round-1 text named it ("skipped(a 429 or 5xx)"); the fix removed it instead of keeping it beside the never-sent causes.metrics/metrics.go:1108andproxy/promexport.go:696point topingsandfailedonly, so they carry the same gap. - Fix: Keep one clause for it, for example: "
skippedcounts a 429 or 5xx answer too — the ping went out and failed transiently, visible aspingsandskippedrising together — and pings never sent (...), soskippedalone does not say which."
- What fails: A provider in overload answers every ping with 429 or 5xx. Every ping goes out, fails, is never priced, and
Non-blocking
- The dashboard clause does soften finding 1 in practice: "a 429 or 5xx ping leaves a row with that status" gives the operator the storm's signature in the dashboard, so the passage is not wholly blind to it.
- Reviewer 2's round-1 note about a host that calls
PingSavingswith a store other thanOptions.Pingsis not addressed. It was non-blocking ("does not wire the ping side" can be read to cover it), and I agree with that reading. No change needed. metrics/metrics.go:1108is still one comment line of about 200 characters. Reviewer 2 already noted the length; the file has longer ones. No change needed.
What I checked
- Last review: round 1, 47a8aa6, 2026-11-11T19:30:52Z.
- New commits read: 1 —
d4956ee4"docs(proxy): fix the failing-ping hints in the lost-credit counter text" (3 files, 3 lines). - Read in full: 2 reviews, 1 comment, 0 inline comments (from the three saved files).
- New items since my last review, and what I did about each:
- Commit
d4956ee4: read the full diff and the changed lines in each file. Verified every new claim against the code (below). - The author's reply comment at 2026-11-11T19:33:20Z: read in full. Its account of the three fixes matches the diff.
- Reviewer 2's round-1 review (posted 4 seconds before mine): read in full now, as round 2 requires. Its finding 1 is my finding 1; its non-blocking notes are handled above.
- Commit
- My round-1 findings, and the other reviewer's:
- "The ping rows'
statusshow the same" (mine 1, reviewer 2's 1): fixed. The new text names all three cases and each is correct — a 429/5xx ping records its row with that status (keeper.go:1516-1519), a no-usage ping records a 2xx row (keeper.go:1594→:1522-1523), a refused ping or a transport error records no row (keeper.go:1520-1521,:1508-1515). skippedmisdefined as "(a 429 or 5xx)" (mine 2): the wrong definition is gone and the never-sent list is correct — no spare (1445, 1480), gate refusals (859, 866, 895, 1011, 1017), evictions (1268,manualhold.go:238), body not built (1491). But the fix dropped the 429/5xx cause, which is finding 1 above.failedomits transport errors (mine 3): fixed. "failedcounts a refused ping, a ping with no usage, and a ping that never reached the provider (a transport error)" matcheskeeper.go:1582,:1589and:1509.
- "The ping rows'
- The two new /stats rules, checked on their own: "
pingsrising withfailedrising means the pings went out and failed" — holds;failedincrements only on dispatched pings (keeper.go:1509,:1566,:1582,:1589). "skippedrising withpingsflat means the keeper did not send them" — holds; everyskippedcause that can rise whilepingsstays flat sends no ping (all sites listed above sit beforek.pings.Addatkeeper.go:1507). - The rest of the row is unchanged from round 1 and stayed correct: the key-mismatch claim, the failing-pings cause, the substitute sentences, and the dashboard-bound claim were all verified in round 1 against the same code.
- Data dependence: still none due. Docs and help text only;
docs/data-dependence/untouched. - Live tests were not run, per instructions. The author reports
go test ./proxy/ ./metrics/ -run 'Prom|Stats|Golden|Unpriced|PingSavings|Coverage'passes; no test pins this wording, so the claim is plausible but unverified by me.
amiddavid
left a comment
There was a problem hiding this comment.
| 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 | d4956ee4607e |
blocking |
Verdict: blocking
The fix commit d4956ee4 addresses every round-1 finding, and the new dashboard-rows
sentence now matches the code. But the rewrite of the skipped rules dropped one cause:
a ping that got a 429 or 5xx answer. That failure mode now falls through the new rules,
and one rule denies it. One finding.
Status of round-1 findings
- Reviewer 1, finding 1 / my finding 1 — the dashboard ping rows claim: fixed. The new sentence ("a 429 or 5xx ping leaves a row with that status, a ping with no usage leaves a row with a 2xx status, and a refused ping or a transport error leaves no row") matches the code exactly. I re-checked it against
outcomeFailed(keepalive/keeper.go:1520, comment at:1553),outcomeFailedRecorded(:1589) andoutcomeTransient(:1577). - Reviewer 1, finding 2 —
skippedis not "(a 429 or 5xx)": fixed in direction, but the fix overcorrected. The never-sent causes are now listed and complete. The fix also dropped the one sent-and-failed cause, which is my finding 1 below. - Reviewer 1, finding 3 —
failedomits transport errors: fixed. "failedcounts a refused ping, a ping with no usage, and a ping that never reached the provider (a transport error)" now matches all fourfailed.Addsites (keepalive/keeper.go:1509,:1566,:1582,:1589). - My non-blocking wrong-store note: not addressed. It was optional; "does not wire the ping side" can be read to cover it. No request.
- Reviewer 1's non-blocking "pings at 0" note: addressed by removing that sentence.
Findings
- docs/reference/reference.md:200 — the new
skippedrules drop the 429/5xx answer, so a real failing-pings mode falls through them, and "do not read it as a failed ping" denies it.- What fails: An upstream that answers 429 or 5xx to every keep-alive ping. Such a ping is not priced and stores no facts (
proxy/accountant_ping.go:133-136), sokeepalive_rescue_facts_missingkeeps rising whilekeepalive_pings_pricedstays0— the exact pattern this row diagnoses, and the row's own first sentence counts it ("a return after a ping that got a non-2xx answer"). In/statsthis mode reads:pingsrising,failedflat,skippedrising. None of the new rules fires: "pings rising with failed rising means the pings went out and failed" does not apply (failedis flat), "skipped rising with pings flat means the keeper did not send them" does not apply (pingsrises). The reader is left with "do not read it as a failed ping" — but for this share ofskippedthe ping did go out and did fail. The natural conclusion is the other branch of the dichotomy, "the host does not wire the ping side", and the operator hunts a wiring bug that does not exist. - Proof:
keepalive/keeper.go:1577— a 429 or ≥500 answer incrementsskipped(outcomeTransient). This runs after the dispatch and afterk.pings.Add(1)at:1507, so the ping went out and was counted.record1runs for it (:1516-1518), so the dashboard row exists.PingSavingsrefuses a non-2xx ping (proxy/accountant_ping.go:133-136): not priced, no facts stored, so the next return raisesmissing(proxy/dashcapture.go:850-852). The round-1 text named this cause ("skipped (a 429 or 5xx)"); reviewer 1's round-1 fix proposal also kept it in the definition. The fix commit removed it fromskipped's causes entirely. The pointers inmetrics/metrics.go:1108andproxy/promexport.go:696were changed from "pings, failed and skipped" to "pings and failed" and inherit the same gap. - Fix: Name the 429/5xx answer as a
skippedcause with its own rule, for example: "skippedalso counts a ping that got a 429 or 5xx answer: that ping went out and was not priced either, so credit is lost the same way. The rest ofskippedis pings never sent (no spare rate or concurrency, a gate refusal, an eviction, a body that could not be built);skippedalone is not proof of a failed ping." Then "pings, failed and skipped" is a sound pointer again inmetrics/metrics.goandproxy/promexport.go.
- What fails: An upstream that answers 429 or 5xx to every keep-alive ping. Such a ping is not priced and stores no facts (
Non-blocking
- The wrong-store wiring (a host that calls
PingSavingswith a store other thanOptions.Pings) is still not named in the "either … or …" dichotomy. Unchanged from round 1, optional.
What I checked
- Last review: round 1, 47a8aa6, 2026-11-11T19:30:48Z
- New commits read: 1 —
d4956ee4"docs(proxy): fix the failing-ping hints in the lost-credit counter text" - Read in full: 2 reviews, 1 comment, 0 inline comments (from
.review-in-reviews.txt,.review-in-comments.txt,.review-in-inline.txt) - New items since my last review: the fix commit
d4956ee4(read the full diff and the code around it); the author's round-1 reply at 2026-11-11T19:33:20Z (read, each claim checked against the code); reviewer 1's round-1 review at 19:30:52Z (posted 4 s after mine, so new to me — read in full, its three findings compared with mine and with the fix). - Every new claim in the rewritten row, against the code:
- "
pingsrising withfailedrising means the pings went out and failed": all fourfailed.Addsites (keepalive/keeper.go:1509,:1566,:1582,:1589) run after the dispatch and afterk.pings.Add(1)at:1507. Holds. - "
failedcounts a refused ping, a ping with no usage, and a ping that never reached the provider (a transport error)": complete against the same four sites (401/403 with a credential at:1566and other 4xx at:1582are both refusals). Holds. - "
skippedrising withpingsflat means the keeper did not send them": everyskipped.Addsite except:1577runs before any dispatch, and:1577always comes withpingsrising. Sound. Holds. - "
skippedalso counts pings never sent (no spare rate or concurrency, a gate refusal, an eviction, a body that could not be built)": complete against the never-sent sites —:1445and:1480(spare,k.spareat:597reserves rate and concurrency headroom),:859,:866,:895,:1011,:1017(gates at record),:1268andkeepalive/manualhold.go:238(evictions),:1491(body build). Holds for the never-sent share; the sent-and-failed share at:1577is the finding above. - The dashboard-rows sentence: matches
outcomeFailed(no row),outcomeFailedRecorded(2xx row) andoutcomeTransient(429/5xx row). Holds.
- "
- That
metrics/metrics.go:1108andproxy/promexport.go:696changed only their counter pointers, consistent with the reference row. No behavior change; no test pins the changed wording (checked in round 1, unchanged). - Data dependence: none due. Docs and help text only.
A ping with a 429 or 5xx answer adds to pings and to skipped, not to failed. The round-1 text hid this. Restore it in the reference, the HELP text and the Snapshot comment. Name the wrong-store wiring too. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
Round 2 repliesThe finding is fixed in
Non-blocking: the wrong-store wiring. Added. The unwired list now reads "(no Tests: |
amiddavid
left a comment
There was a problem hiding this comment.
| 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 | 3 of 3 | 53d89e1f7a68 |
approve |
Verdict: approve
Findings
None.
Non-blocking
- None. The wrong-store wiring note from round 1 is now in the text, and the counter definitions match the code.
What I checked
- Last review: round 2, d4956ee, 2026-11-11T19:37:46Z.
- New commits read: 1 —
53d89e1f"docs(proxy): say that skipped also counts a ping that got a 429 or 5xx" (3 files, 3 lines). - Read in full: 4 reviews, 2 comments, 0 inline comments (from the three saved files).
- New items since my last review, and what I did about each:
- Commit
53d89e1f: read the full diff and each changed line. Verified every changed claim against the code (below). - Reviewer 2's round-2 review at 2026-11-11T19:37:47Z: read in full. Its finding 1 is my round-2 finding; the author's fix covers both. Its non-blocking wrong-store note is now addressed in the text.
- The author's round-2 reply at 2026-11-12T07:11:13Z: read in full. Each claim in it matches the diff and the code.
- Commit
- My round-2 finding, and reviewer 2's round-2 finding (the same gap): fixed. The row now says "
skippedcounts a ping that got a 429 or 5xx answer: it went out, was not priced, and lost credit the same way, sopingsandskippedrise together." I re-checked it:keepalive/keeper.go:1576-1580incrementsskippedfor a 429 or 5xx afterk.pings.Add(1)at:1507, so the ping went out andpingsrises with it;PingSavingsrefuses a non-2xx ping (proxy/accountant_ping.go:133-136), so it is not priced and stores no facts, and the next return raisesmissing(proxy/dashcapture.go:850-851). The first rule now reads "pingsrising withfailedorskippedrising means the pings went out and failed", so an overload storm (pingsandskippedup,failedflat) fits it. - The new wrong-store clause, "PingSavings on a store other than
Options.Pings": correct.keepalive_pings_pricedreadsh.opts.Pings.Priced()(proxy/proxy.go:3101,proxy/promexport.go:700) and the request path reads facts from the same store (proxy/dashcapture.go:219). A host that prices into another store showsmissingrising withpricedat0. - The rest of the
skippedtext, unchanged from round 2 and still correct: "skippedrising withpingsflat means the keeper did not send them" — every never-sentskippedsite runs beforek.pings.Add(keeper.go:1445,:1480,:1491,:859,:866,:895,:1011,:1017,:1268,keepalive/manualhold.go:238). "The rest ofskippedis pings never sent (no spare rate or concurrency, a gate refusal, an eviction, a body that could not be built)" — matches those sites. "skippedalone does not say which" — true, both shares exist. metrics/metrics.go:1108andproxy/promexport.go:696point topings,failedandskippedagain. Sound now that all three are defined correctly in the reference row.- All earlier-verified claims are unchanged at this head: the key-mismatch sentence, the failing-pings cause, the dashboard ping-rows sentence, the substitute sentences, and the dashboard-bound claim (rounds 1-2).
- Data dependence: none due. Docs and help text only;
docs/data-dependence/untouched. - Live tests were not run, per instructions. The author reports the same test set passes; no test pins this wording.
|
Integrator note: the owner added this PR to v0.7.4 (2026-11-12). Reviewer 1 blocks in the last round. Please fix the finding, run the next offload-review round, then tell the integrator session. |
amiddavid
left a comment
There was a problem hiding this comment.
| 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 | 3 of 3 | 53d89e1f7a68 |
blocking |
Verdict: blocking
The fix commit 53d89e1f restores the 429/5xx cause of skipped and names the
wrong-store wiring, so my round-2 finding is fixed. But the fix also folded skipped
into the failure rule: "pings rising with failed or skipped rising means the pings
went out and failed." The skipped limb of that rule is not sound, and it contradicts
the hedge in the same paragraph. One finding.
Status of earlier findings
- My round-2 finding / reviewer 1's round-2 finding —
skippeddropped the 429/5xx cause: fixed. The row now names the cause ("it went out, was not priced, and lost credit the same way, sopingsandskippedrise together"), the pointers inmetrics/metrics.go:1108andproxy/promexport.go:696say "pings, failed and skipped" again, and an overload storm now fits a rule. Verified againstkeepalive/keeper.go:1576-1580(the 429/5xx branch incrementsskippedafterk.pings.Add(1)at:1507). - My round-1 and round-2 non-blocking wrong-store note: added, and correct. "(
PingSavingson a store other thanOptions.Pings)" matches the code:keepalive_pings_pricedreadsh.opts.Pings(proxy/proxy.go:3101), so facts priced into another store raise nothing the handler reads. - Round-1 findings (both reviewers): still fixed. This commit does not touch the dashboard-rows sentence, the
faileddefinition, or the never-sent list; all were verified against the code in round 2. - Reviewer 1's round-2 non-blocking notes: read. I agree with all three (the dashboard clause softens the storm gap; the wrong-store note needed no change then; the comment length needs none now).
Findings
- docs/reference/reference.md:200 — the rule "
pingsrising withfailedorskippedrising means the pings went out and failed" is wrong in itsskippedlimb, and it contradicts the paragraph's own hedge.- What fails: A host that never calls
PingSavings(unwired — one of the two branches this diagnostic exists to tell apart), whose pings are healthy, with ordinary never-sent skips: a thinking-enabled session refused at record, a body over the limit, a spare refusal under load, an eviction. The counters read:pingsrising (healthy pings,k.pings.Add(1)counts every dispatched ping atkeepalive/keeper.go:1507),skippedrising (never-sent causes, no ping dispatched),failedflat.keepalive_rescue_facts_missingrises withkeepalive_pings_pricedat0, because no facts are ever stored (proxy/accountant_ping.go:141is never reached; the next return raises missing atproxy/dashcapture.go:850-852). The rule fires and says "the pings went out and failed". No ping failed — the host is unwired. The operator chases upstream failures instead of the missingPingSavingscall. The same paragraph says "soskippedalone does not say which" — one sentence asserts what the other says cannot be read fromskipped. - Proof: The never-sent
skipped.Addsites run with no ping dispatched and do not stop other sessions' pings from raisingpings:keepalive/keeper.go:895(thinking enabled at record — the code's own comment measures 17 of 357 addressable misses with such a predecessor),:866(body too large),:859(dead credential),:1011/:1017(below limits, over budget, done),:1268andkeepalive/manualhold.go:238(evictions),:1445/:1480(no spare),:1491(body not built). Only:1577(a 429 or 5xx answer) implies a dispatched ping. Sopingsrising withskippedrising has two live readings: the 429/5xx storm (pings went out and failed) and never-sent skips beside healthy pings (nothing failed). The counters alone cannot tell them apart — which is what the hedge says. The storm case my round-2 finding named needs only the signature "pingsandskippedrise together", not this rule; both my and reviewer 1's round-2 fix proposals kept the failure rule onfailedalone. - Fix: Keep the rule on
failedalone: "pingsrising withfailedrising means the pings went out and failed." Then give the ambiguous signature its own sentence: "pingsandskippedrising together withfailedflat is either a 429 or 5xx storm or never-sent skips beside healthy pings; the ping rows in the dashboard tell them apart (a 429 or 5xx status against a 2xx with usage)." The dashboard sentence already in the row names both row shapes, so this adds one clause.
- What fails: A host that never calls
Non-blocking
metrics/metrics.go:1108andproxy/promexport.go:696say "pings, failed and skipped" without the rules. As pointers to the reference row they are fine; the finding above touches the reference page only.
What I checked
- Last review: round 2, d4956ee, 2026-11-11T19:37:47Z
- New commits read: 1 —
53d89e1f"docs(proxy): say that skipped also counts a ping that got a 429 or 5xx" (3 files, 3 lines) - Read in full: 4 reviews, 2 comments, 0 inline comments (from
.review-in-reviews.txt,.review-in-comments.txt,.review-in-inline.txt) - New items since my last review, and what I did about each:
- Commit
53d89e1f: read the full diff and the code around each change. Verified every new claim (below). - The author's round-2 reply at 2026-11-12T07:11:13Z: read in full. Each claim about the diff checks out against the code; the rule change it describes is my finding 1.
- Reviewer 1's round-2 review at 2026-11-11T19:37:46Z: posted one second before mine, so new to me. Read in full. Its finding 1 is my round-2 finding; its non-blocking notes are addressed under "Status".
- Commit
- Every new claim in the rewritten row, against the code:
- The wrong-store addition ("
PingSavingson a store other thanOptions.Pings"): accurate,proxy/proxy.go:3101readsh.opts.Pingsonly. - "
skippedcounts a ping that got a 429 or 5xx answer: it went out, was not priced, and lost credit the same way, sopingsandskippedrise together": holds —keepalive/keeper.go:1576-1580incrementsskippedafter the dispatch andpings.Addat:1507; a non-2xx ping is not priced (proxy/accountant_ping.go:133-136). - "
skippedrising withpingsflat means the keeper did not send them": still holds — everyskippedcause except:1577sends no ping, and:1577always comes withpingsrising. - "The rest of
skippedis pings never sent (no spare rate or concurrency, a gate refusal, an eviction, a body that could not be built)": complete against the never-sent sites (verified in round 2, unchanged). - "
pingsrising withfailedorskippedrising means the pings went out and failed": thefailedlimb holds (allfailed.Addsites are post-dispatch); theskippedlimb is finding 1. - The dashboard-rows sentence, the
faileddefinition and the substitute sentences: unchanged by this commit, verified in rounds 1 and 2.
- The wrong-store addition ("
metrics/metrics.go:1108andproxy/promexport.go:696: pointer text only, consistent with the reference row. No behavior change; no test pins this wording (checked in round 1).- Live tests were not run, per instructions. The author reports
go test ./proxy/ ./metrics/ -run 'Prom|Stats|Golden|Unpriced|PingSavings|Coverage'passes andgofmt -lis clean; plausible, unverified by me. - Data dependence: none due. Docs and help text only;
docs/data-dependence/untouched.
skipped counts both a 429 or 5xx answer and pings never sent. Only failed rising with pings proves failing pings. Say how the dashboard rows tell the skipped causes apart. Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
Round 3 repliesThe owner granted a 4th round. Reviewer 2, finding 1: the
This change is |
amiddavid
left a comment
There was a problem hiding this comment.
| 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 | 4 of 4 | 29fb21579108 |
approve |
Verdict: approve
Findings
None.
Non-blocking
- None.
What I checked
- Last review: round 3, 53d89e1, 2026-11-12T07:13:06Z.
- New commits read: 1 —
29fb2157"docs(proxy): do not read a rising skipped as a failed ping" (1 file, 1 line). - Read in full: 6 reviews, 4 comments, 0 inline comments (from the three saved files).
- New items since my last review, and what I did about each:
- Reviewer 2's round-3 review at 2026-11-12T07:15:47Z (blocking): read in full and checked. Its finding is right, and my round-3 approve missed it: I read the failure rule's
skippedlimb as sound "under the diagnostic premise", but that premise holds only on a wired host. The unwired branch of the dichotomy — healthy pings, noPingSavingscall,pricedat0— plus ordinary never-sent skips also makespingsandskippedrise withfailedflat, and the rule then names the wrong branch. Reviewer 2's scenario stands. - The integrator note at 2026-11-12T07:13:18Z: read. It asks for the fix and the next review round; both happened.
- The author's round-3 reply at 2026-11-12T07:26:36Z: read in full. Its account of the fix matches the diff.
- Commit
29fb2157: read the full diff and the changed row in the file. Verified every new claim (below).
- Reviewer 2's round-3 review at 2026-11-12T07:15:47Z (blocking): read in full and checked. Its finding is right, and my round-3 approve missed it: I read the failure rule's
- Reviewer 2's round-3 finding: fixed. The failure rule now uses
failedalone — "pingsrising withfailedrising means the pings went out and failed" — which holds: everyfailed.Addsite runs after the dispatch (keeper.go:1509,:1566,:1582,:1589). The ambiguous signature now has its own sentence: "pingsandskippedrising together withfailedflat is either a 429 or 5xx storm or never-sent skips beside healthy pings." I checked both readings against the code. The storm: each dispatched ping raisespings(keeper.go:1507) and thenskippedon the 429 or 5xx (keeper.go:1576-1580), neverfailed. The other reading: the never-sentskippedsites (keeper.go:859,:866,:895,:1011,:1017,:1268,:1445,:1480,:1491,keepalive/manualhold.go:238) run with no ping dispatched, while healthy pings on an unwired host raisepingswithout raisingpriced. No sentence in the row now reads a risingskippedas a failed ping. - The new disambiguation sentence, "The dashboard ping rows tell them apart: a 429 or 5xx status against a 2xx with usage": correct. A transient ping records its row with the failing status (
keeper.go:1516-1519); a healthy ping records a 2xx row with its usage (record1→ the emitter,keeper.go:1744), and the row is written whether or notPingSavingsis called (cmd/context-guru-proxy/main.go:1041-1044), so an unwired host still shows it. - The rest of the row is unchanged from round 3 and stayed correct: the
faileddefinition, the never-sent list, "skippedrising withpingsflat means the keeper did not send them", the wrong-store clause, the key-mismatch sentence, the dashboard-rows sentence, the substitute sentences, and the dashboard-bound claim. metrics/metrics.goandproxy/promexport.goare untouched by this commit; their "pings, failed and skipped" pointers remain sound as pointers to the reference row, as reviewer 2's non-blocking note accepts.- Data dependence: none due. Docs only;
docs/data-dependence/untouched. - Live tests were not run, per instructions. The change is
.mdonly, so none were needed.
amiddavid
left a comment
There was a problem hiding this comment.
| 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 | 4 of 4 | 29fb21579108 |
approve |
Verdict: approve
The fix commit 29fb2157 adopts the text proposed in round 3. The failure rule uses
failed alone, the unclear pings+skipped signature gets its own sentence, and the
dashboard rows are named as the discriminator. Every sentence in the row now matches the
code. No findings.
Status of earlier findings
- My round-3 finding — the
skippedlimb of the failure rule: fixed. The rule reads "pingsrising withfailedrising means the pings went out and failed" (failedonly, sound: everyfailed.Addsite runs after the dispatch,keepalive/keeper.go:1509,:1566,:1582,:1589). The ambiguous signature has its own sentence: "pingsandskippedrising together withfailedflat is either a 429 or 5xx storm or never-sent skips beside healthy pings." That is exactly the two readings the counters cannot tell apart. The contradiction with the hedge is gone; no sentence now reads a risingskippedas a failed ping. I checked the author's claim of that in the row text — it holds. - My round-2 finding (429/5xx cause restored), my round-1 finding (dashboard rows), reviewer 1's round-1 findings: all still fixed. This commit touches only the counter sentences; the other parts of the row are unchanged from
53d89e1fand were verified in earlier rounds. - My round-1 non-blocking wrong-store note: added in round 3, still correct.
Findings
None.
Non-blocking
- None.
metrics/metrics.go:1108andproxy/promexport.go:696keep the pointer "pings, failed and skipped" without the rules; the reference row defines all three, so the pointers are sound.
What I checked
- Last review: round 3, 53d89e1, 2026-11-12T07:15:47Z
- New commits read: 1 —
29fb2157"docs(proxy): do not read a rising skipped as a failed ping" (1 file, 1 line:docs/reference/reference.md) - Read in full: 6 reviews, 4 comments, 0 inline comments (from
.review-in-reviews.txt,.review-in-comments.txt,.review-in-inline.txt) - New items since my last review, and what I did about each:
- Commit
29fb2157: read the full diff. Verified each new and changed sentence against the code (below). - Reviewer 1's round-3 review at 2026-11-12T07:13:06Z (approve, posted while I wrote mine): read in full. It accepted the
failed-or-skippedrule as sound; my round-3 finding showed theskippedlimb was not, and the author fixed it. Nothing else in it to act on. - The integrator note at 2026-11-12T07:13:18Z: read. It asks for the fix, this round, and then a word to the integrator session. The finding is fixed and this review closes the round.
- The author's round-3 reply at 2026-11-12T07:26:36Z: read in full. Every claim in it matches the diff and the code, including "No sentence in the row now says that a rising
skippedmeans a ping failed".
- Commit
- The changed sentences, against the code:
- "
pingsrising withfailedrising means the pings went out and failed": sound, all fourfailed.Addsites are post-dispatch and post-pings.Add(keepalive/keeper.go:1507). - "
skippedcounts a ping that got a 429 or 5xx answer (it went out and was not priced), and also pings never sent (no spare rate or concurrency, a gate refusal, an eviction, a body that could not be built)": both shares named, complete against everyskipped.Addsite —keepalive/keeper.go:1577for the answer,:1445,:1480,:1491,:859,:866,:895,:1011,:1017,:1268andkeepalive/manualhold.go:238for never sent. - "So
pingsandskippedrising together withfailedflat is either a 429 or 5xx storm or never-sent skips beside healthy pings": sound — only:1577ties askippedincrement to a dispatched ping, and never-sent skips do not stop other sessions' pings from raisingpings. - "The dashboard ping rows tell them apart: a 429 or 5xx status against a 2xx with usage": sound —
outcomeTransientrecords a row with the 429/5xx status (keepalive/keeper.go:1516-1518), healthy pings record 2xx rows with usage throughrecord1. - "
skippedrising withpingsflat means the keeper did not send them": unchanged, sound (verified in rounds 2 and 3). - The rest of the row is unchanged from
53d89e1f: the unwired list with the wrong-store clause, the key-mismatch sentence, thefaileddefinition, the dashboard-rows sentence, the dashboard-bound claim and the substitute sentences were all verified in rounds 1 to 3.
- "
- This commit is
.mdonly, so no test run is due. No behavior change anywhere in the PR; no test pins the changed wording (checked in round 1). - Data dependence: none due. Docs and help text only;
docs/data-dependence/untouched.
Bob setup skips a context-guru-proxy that cannot serve the preset it writes: older than v0.7.1 (cannot list its cache strategies), or older than v0.7.2 for the default preset bob-ultrahigh. Setup then downloads the latest release, so a Mac with an old proxy on PATH (for example from brew) still installs cleanly. Behavior change: Bob users who run setup with such an old proxy on PATH or in the plugin's own path. Old: setup used it, and the cache strategy commands then failed with the update error. New: setup skips it and downloads the latest release. Owner's yes, 2026-11-12, in the integrator session: "1111 approve". Data dependence: none. Reviews: 3 offload review rounds (Claude backend). Round 3: both approve at f9108e6, which is the PR head (a merge of main after #1093 and #1105). Signed-off-by: Vitaly Zabershinsky <[email protected]> Assisted-By: Claude Opus 5.5 <[email protected]>
Summary
/statscounterskeepalive_pings_pricedandkeepalive_rescue_facts_missing.What changed
docs/reference/reference.md, the two counter rows:/stats:pings,failed(refused ping or no usage) andskipped(429 or 5xx). The ping rows'statusin the dashboard show the same.proxy/promexport.goHELP text andmetrics/metrics.gocomment: same "or its pings keep failing" fix.How it was tested
go test ./proxy/ ./metrics/ -run 'Prom|Stats|Golden|Unpriced|PingSavings|Coverage'passes.gofmt -lon the two Go files reports nothing.Data dependence
None. Docs and help text only.
Behavior change
HELP text only. No logic change.