Repository navigation
Description
Quota refresh: newestMeasurement counts the terminal "lapsed" state against its own contract (PR #7898 review finding)
Finding (from PR review)
On PR #7898 (fix(quota-plane): lapsed OpenCode Go workspace renders as lapsed, not error (#1161)), Copilot review comment 4508796654 (Copilot, 2026-11-09T01:59:26Z, pm-stack/aggregator/src/quota-refresh.ts:36):
The docstring says "Newest non-error provider/pool measurement", but the helper now treats
"lapsed"as eligible (i.e., it's not filtered like"error"). Since"lapsed"is a terminal non-measurement state (windows cleared), counting it as a "measurement" could be misleading for consumers ofnewestMeasurement(e.g., if it's used to decide whether the view is stale and should auto-refresh). Recommendation: either (a) explicitly exclude"lapsed"here, or (b) update the function comment (and any related naming/usage) to reflect that terminal states can advance the "newest" timestamp.
No-response evidence
- No replies in the comment thread; the review thread is unresolved (GraphQL
reviewThreadsverified 2026-11-10 by this run: the thread containing comment 4508796654 hasisResolved: false). - PR fix(quota-plane): lapsed OpenCode Go workspace renders as lapsed, not error (#1161) #7898 head is unchanged at
e572e55ce340e79f4d49cad0f4aebd7fea55dc7dsince the comment (last commit 2026-11-09T01:54:23Z, before the comment); no fix commit followed it. The finding is past the 24-hour grace period for open PRs (comment 2026-11-09T01:59:26Z). - Issue search (open and closed) by PR number, file path, and keywords (
newestMeasurement lapsed,lapsed quota-refresh,7898) found no existing issue covering this finding.
Still-live evidence (current PR head)
Raw read at head e572e55ce3 agrees:
pm-stack/aggregator/src/quota-refresh.ts:32: docstring "Newest non-error provider/pool measurement in the view".- Lines 35-36: the
add()helper's state type includes"lapsed"and it returns early only for"error"— a lapsed pool/credential/provider timestamp therefore advances the newest-measurement value. isQuotaStale()(same file) decides staleness/auto-refresh offnewestMeasurement(), so a terminal lapse timestamp can make a view with no fresh measurements read as not stale.
Acceptance criteria
- Either
newestMeasurement()explicitly excludes the"lapsed"state, or the docstring/naming is updated to state that terminal states advance the newest timestamp AND that choice is pinned by a test — so the helper's contract andisQuotaStale()'s refresh decision are unambiguous. - Resolving by a documented decision on this issue is also acceptable.
Filed by the pr-comment-review job (run 2026-11-09 23:54 CST) under the queue cutover: labels applied at filing, standard agent note posted after filing, and a repo-task/v1 triage packet (kind: triage, priority 30) enqueued on repo-health-code-pilot.
Activity
developing-today commentedon Nov 10, 2026
CODE-2404
dezren39 commentedon Nov 10, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 10, 2026
🤖 Agent note · triaged
dezren39 commentedon Nov 10, 2026
🤖 Agent note · handed off
dezren39 commentedon Nov 10, 2026
🤖 Agent note · handed off
dezren39 commentedon Nov 10, 2026
agent-note:v1
lane: code-d
task: 14587
issue: #8125
stage: handed_off
note: Task 14587 (small_fix, issue #8125) revalidated fresh by lane code-d: issue OPEN, no hard-stop labels (held / user/owned / do-not-merge / do-not-auto-edit absent), no status/needs-triage. Execution lane row 5785 = opencode; handed off per 1b Rule 4 (scheduled shift is time-bounded; claimant is the persistent execution session). Attempts 2/4. Parked 1200s for claimant pickup.
dezren39 commentedon Nov 10, 2026
agent-note:v1
lane: code-d
task: 14587
issue: #8125
stage: handed_off
note: Task 14587 (small_fix, issue #8125) revalidated fresh by lane code-d: issue OPEN, labels kind/bug, task/small-fix, priority/normal; no hard-stop labels (held / user/owned / do-not-merge / do-not-auto-edit absent), no status/needs-triage. Execution lane row 5785 = opencode; handed off per runbook 1b Rule 4 (scheduled shift is time-bounded; claimant is the persistent execution session). Attempts 2/4. Parked 1200s for claimant pickup.
dezren39 commentedon Nov 10, 2026
agent-note: task 14587 handed off to opencode claimant (lane row 5785) by lane code-w. Handoff reason: scheduled shift is time-bounded; claimant is the persistent execution session. Issue #8125 verified OPEN with no hard-stop labels and no status/needs-triage (fresh gh, lane code-w 2026-11-10). Attempts 3/4. Parked 1200s for the claimant.
dezren39 commentedon Nov 11, 2026
Transition: picked up
Worker: repo-worker-code / OpenChamber lane 02cafe76-eafd-4d0b-aaa6-2b7a737d68dc
Task: 14587
Next: Revalidate prior assignment 5785 and avoid competing work.
dezren39 commentedon Nov 11, 2026
Transition: parked
Worker: repo-worker-code / OpenChamber lane 02cafe76-eafd-4d0b-aaa6-2b7a737d68dc
Task: 14587
Reason: Existing OpenCode execution assignment 5785 remains unresolved. Verify whether that claimant is active before starting competing work; retry after 30 minutes.
dezren39 commentedon Nov 11, 2026
🤖 Agent note · done — already_done (contract re-documented in PR #7898 itself)
lapsedfrom newestMeasurement, or (b) re-document the contract. (b) was taken, in PR fix(quota-plane): lapsed OpenCode Go workspace renders as lapsed, not error (#1161) #7898 itself: commit 912d172 ("fix(quota-plane): canonicalize provider id in Go lapse check; clarify newestMeasurement docstring (Copilot review, PR fix(quota-plane): lapsed OpenCode Go workspace renders as lapsed, not error (#1161) #7898)", 2026-11-10) changed the docstring at pm-stack/aggregator/src/quota-refresh.ts:32 from "Newest non-error provider/pool measurement" to "Newest provider/pool measurement stamp in the view, in epoch ms, or null. Error reads are excluded; a lapsed read contributes its stamp (it is a current terminal state, not a measurement of usage)." PR fix(quota-plane): lapsed OpenCode Go workspace renders as lapsed, not error (#1161) #7898 merged 2026-11-10T21:21:06Z with that commit in it. This issue was filed from the finding earlier the same day, before the fix commit landed — the packet/title itself names the re-document option as an acceptable resolution.already_done. No code change needed.