GeezerVison is showing github.com — aggregator: OpenCode Go reset dates are paired by section position, not by workspace — one missing or extra 'monthly reset' line shifts both workspaces' resets · Issue #1626 · developing-today/code
aggregator: OpenCode Go reset dates are paired by section position, not by workspace — one missing or extra 'monthly reset' line shifts both workspaces' resets #1626DescriptionProblem
The OpenCode Go quota extractor pairs each workspace with its monthly reset by global position in the section, not by the paragraph the reset appears in. One missing or one extra monthly reset … line silently shifts both workspaces' reset dates — each pool renders the other's reset, or a stale historical one, with no error anywhere.
pm-stack/aggregator/src/quota-extract.ts, goWorkspace (:152-176):
// Resets appear in the same paragraph order as the workspaces.
const resets = [...s.matchAll(/monthly reset (\w{3}) (\d{1,2}), (\d{2}:\d{2}) UTC/gi)];
const r = name === "Personal" ? resets[0] : resets[1];
Both Go pools share the one ### OpenCode Go section (POOL_SPECS, :276/:284 — the same sectionOf text is passed to both extractors). The workspace percentages are matched per-workspace by name, but the resets are collected section-wide and indexed [0]/[1]. The pairing holds only while every workspace paragraph carries exactly one reset line and nothing else in the section mentions one — and the quota view this parses is a human document that, per this file's own header, "preserves dated observations", so extra dated reset mentions in the section are expected over time.
Evidence (verified on main be7cf62)
Probe on the laptop driving the real extractQuotaPools from quota-extract.ts (sha256 29729137…, identical in both clones; probe + log in the fleet bookkeeping probe-2026-10-28-laneA-goreset/, run twice with identical output), now = 2026-10-28T12:00:00Z:
- CTRL — Personal paragraph with
monthly reset Nov 3, 00:00 UTC, Lab paragraph with monthly reset Nov 9, 00:00 UTC → Personal resetsAt 2026-11-03, Lab resetsAt 2026-11-09. Correct.
- BUG — Personal paragraph with no reset line, Lab paragraph with
monthly reset Nov 9, 00:00 UTC → Personal resetsAt 2026-11-09 (Lab's reset), Lab resetsAt null. Personal inherits the other workspace's reset; Lab loses its own.
- BUG2 — a stray historical line
monthly reset Oct 5, 00:00 UTC earlier in the section, then the CTRL paragraphs → Personal resetsAt 2026-10-05 (the stale mention, rendered in the past), Lab resetsAt 2026-11-03 (Personal's reset). Both wrong, shifted by one.
monthDayTime (:37-45) compounds BUG2: its roll-forward only fires when the date is more than 30 days in the past, so the stale Oct 5 reset is served as a reset date three weeks in the past instead of being recognised as not-this-cycle.
Why it matters
The quota page is the fleet's spend-steering surface: the Go workspaces carry a rotation order ("burn before Lab per rotation order", :168-170) driven by these windows and their reset dates. A shifted pairing tells the operator Personal resets six days later than it does and that Lab never resets — or, in the BUG2 shape, that Personal's reset already passed. Nothing fails loudly: the extractor is fail-soft by design, so the wrong dates render as authoritative.
Acceptance criteria
- Each Go workspace's monthly reset is taken from its own paragraph (or an equivalently anchored match — e.g. the reset nearest/following that workspace's own percentage line), never by section-wide index.
- A workspace paragraph without a reset line yields
resetsAt: null for that workspace and does not consume another workspace's reset.
- An extra
monthly reset mention elsewhere in the section (historical note, prose) does not shift either workspace's reset.
- Regression tests cover all three shapes: the paired control, the missing-reset paragraph, and the stray-mention section (the probe fixtures in the fleet bookkeeping are directly reusable).
- Existing aggregator test suites still pass.
Activitydeveloping-today commented on Oct 28, 2026 dezren39 commented on Oct 28, 2026 🤖 Agent note · state: filed
- Agent: new-issue-creator job (new-issue-creator-code-a, lane A)
- Session / ID: cron new-issue-creator-code-a run 2026-10-28 03:35 CDT
- Found via: filed this run
- Task: Triage the OpenCode Go reset-pairing defect: goWorkspace in pm-stack/aggregator/src/quota-extract.ts pairs monthly resets by section-wide index (resets[0]/resets[1]) instead of by workspace paragraph, so a missing or stray 'monthly reset' line shifts both workspaces' reset dates. Verified with a Bun probe on the laptop driving the real extractQuotaPools (control correct; missing-reset and stray-mention fixtures both mis-paired).
- Expectation: effort/s — done looks like per-paragraph reset anchoring plus regression tests for the control, missing-reset, and stray-mention shapes.
- Links: probe + log in fleet bookkeeping (probe-2026-10-28-laneA-goreset)
dezren39 commented on Oct 28, 2026 dezren39 commented on Oct 28, 2026
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|