GeezerVison is showing github.com — design(pm-stack): browser-dependent quota watchdog — CDP scrape producers that self-repair, escalate to a browser-enabled agent · Issue #6031 · developing-today/code
design(pm-stack): browser-dependent quota watchdog — CDP scrape producers that self-repair, escalate to a browser-enabled agent #6031DescriptionDirective
Drew, 2026-11-04 ~23:18 CST: for providers whose quota/plan data can only be obtained through a logged-in website (Mistral is the first case), a CDP-driven browser scrape path is accepted — "but we'll need a watchdog agent that knows how to work a browser and can fix it whenever it breaks." If the data relies on a cookie, use the cookie. If self-repair fails, the watchdog triggers a task for a browser-enabled agent to fix it.
Design (landed with this issue)
Full design note: ~/workspace/scratch/mistral-quota-watchdog-2026-11-04/design.md (sandbox workspace). Shape:
- Three parts, all on the laptop: per-provider producer (oneshot, 15-min timer, writes the code#1301 file-export documents
~/atlas/<provider>-export/latest.json + history.jsonl, classifying its own failures), a generic watchdog core (oneshot offset after the gatherer tick; health state + repair ladder + escalation), and the gatherer, which ingests each source via its existing FILE_EXPORTS machinery (registry currently empty, ingestion code intact) with code#1268 last-known retention.
- Health model per source: last-success timestamp, consecutive-failure count, failure class —
session-expired / cookie-missing / endpoint-changed / browser-down / cdp-unreachable / rate-limited / unknown — each mapped to a repair.
- Repair ladder, cheapest first, attempt-capped and logged: (0) retain + disk-persisted cooldown (rate-limited only); (1) retry next tick; (2) re-validate/re-extract the session via CDP — primary pattern is the retired Meta producer's in-page fetch, where the cookie never leaves the browser; value extraction is the fallback and lands only in fleet secrets by name; (3) re-login in the browser via the standing Google SSO session ("click in and reset it") — a human-only challenge (2FA / verify-it's-you / passkey) makes the incident human-blocked and surfaces to Drew immediately; (4) escalate to a browser-enabled agent (fleet queue task with the full failure context + one deduplicated GitHub incident issue; auto-close on recovery).
- State on disk, always:
~/.local/state/pm-aggregator/quota-watchdog-state.json, atomic writes. This is the direct application of code#5928's lesson — the watchdog is a oneshot and must not repeat the in-process cooldown/cache mistake.
- Cadence: producers
*:0/15, watchdog offset on the same 15-min rhythm as the gatherer. Alerting: silent while self-repair works; Drew hears only human-blocked (immediately) or an escalation unresolved >24 h.
- Generality: per-provider adapter files (origins allowlist, data paths in preference order, cookie names, login hints, class map, thresholds). Mistral is adapter test #1; Claude console / Open Design (code#5060) are named later adopters.
- History: health observations feed the existing usage snapshot pipeline (code#4889) once its laptop path bug is fixed; interim is the producers'
history.jsonl convention — no parallel store.
Position vs existing work
Open questions (named, per #1260's rule)
- Escalation-unresolved threshold before a NEEDS DREW line: 24 h proposed. Not blocking.
- Recovery of a human-blocked incident: stay silent (closed issue is the record) — proposed.
- Producer source home:
pm-stack/exporters/ in this repo (proposed) vs beside the quota module in openchamber.
Implementation split (linked issues)
- Watchdog core: filed as a sibling issue in this repo, linked below.
- Escalation mechanism: filed as a sibling issue in this repo, linked below.
- Mistral adapter test #1: filed in developing-today-forks/openchamber, blocked on the sign-in lane's data-path outcome (Vibe token usage API vs console endpoint + cookie), linked below.
Acceptance criteria
- This design is reviewed and its open questions answered or explicitly deferred.
- The implementation issues linked from this issue exist and carry their own acceptance criteria (this issue carries no implementation work itself).
- The design's remediation-catalogue entries are reflected in code#1260's catalogue (comment or sub-issue link there).
Activitydeveloping-today commented on Nov 5, 2026 dezren39 commented on Nov 5, 2026 Implementation split filed (this design carries no implementation work itself):
Design note: ~/workspace/scratch/mistral-quota-watchdog-2026-11-04/design.md. Umbrella: #1260 (noted there). Companion reads: #5928, #4889, openchamber#1619. dezren39 commented on Nov 5, 2026 dezren39 commented on Nov 5, 2026 🤖 Agent note · done
Triage findings (verified fresh this shift)
- Issue design(pm-stack): browser-dependent quota watchdog — CDP scrape producers that self-repair, escalate to a browser-enabled agent #6031 is OPEN, no hard-stop labels (
held, user/owned, do-not-merge, do-not-auto-edit all absent), carrying Drew's 2026-11-04 directive verbatim and a complete design (three parts on the laptop, health/failure-class model, repair ladder, disk state per issue quota: claude read needs cross-tick memory — usage-endpoint 429 (proven) + oneshot gatherer defeats the fetcher's in-process cooldown/cache #5928's lesson, alerting posture). No packet defect — this is one of the best-specified design packets in the current batch.
- Acceptance item 2 (implementation issues exist with their own criteria): MET, verified. Issue impl(pm-stack): browser-dependent quota watchdog core — disk state, failure classes, repair ladder #6032 (watchdog core: disk state, failure classes, repair ladder, adapter loader, producer scaffolding) and issue impl(pm-stack): quota watchdog escalation — fleet queue task + deduplicated incident issue for a browser-enabled agent #6033 (escalation: fleet queue task + deduplicated incident issue, auto-close on recovery, human-blocked surfacing) are both OPEN in this repo; the Mistral adapter is openchamber#1630, OPEN and explicitly blocked on the Mistral sign-in lane's data-path outcome (Vibe token usage API vs console endpoint + cookie) — that blocker is recorded on both issues, not discovered here.
- Acceptance item 3 (catalogue reflected in issue design(pm-stack): SLOs + self-healing for the PM stack itself — freshness SLOs with error budgets, watchdog remediates before alerting #1260): MET per the filer's note — the split comment on this issue records "Umbrella: design(pm-stack): SLOs + self-healing for the PM stack itself — freshness SLOs with error budgets, watchdog remediates before alerting #1260 (noted there)", and issue design(pm-stack): SLOs + self-healing for the PM stack itself — freshness SLOs with error budgets, watchdog remediates before alerting #1260 is OPEN as the SLO/self-healing umbrella this design specializes.
- Acceptance item 1 (open questions answered or explicitly deferred): dispositioned here, explicitly deferred with defaults. (Q1) Escalation-unresolved NEEDS DREW threshold: proposed 24 h stands as the working default — it only tunes alerting, and the design already marks it non-blocking. (Q2) Human-blocked recovery stays silent with the closed incident issue as the record: stands as proposed. (Q3) Producer source home (
pm-stack/exporters/ here vs beside the quota module in openchamber): deferred to the claim of issue impl(pm-stack): browser-dependent quota watchdog core — disk state, failure classes, repair ladder #6032 with the design's own proposal (pm-stack/exporters/ in this repo, beside the gatherer's FILE_EXPORTS machinery it feeds) as the default — the decision is cheap to reverse before code lands and should not gate the core's start. None of the three needs Drew unless he wants to override a default; if he does, this comment is the place it will be noticed.
- Ordering: issue impl(pm-stack): browser-dependent quota watchdog core — disk state, failure classes, repair ladder #6032 (core) is the start; issue impl(pm-stack): quota watchdog escalation — fleet queue task + deduplicated incident issue for a browser-enabled agent #6033 (escalation) is ladder step 4 and can follow or parallel once the core's failure-class contract is fixed; openchamber#1630 waits on its named sign-in blocker, not on this design. No follow-up packet enqueued — the implementation work already has its own issues and will be claimed through them.
dezren39 commented on Nov 10, 2026
state: triaged (done)
task: 13048
issue: #6031
lane: code-v
Triage verdict (updated, task 13048): REAL AND CURRENT - remainder already in the queue
Re-triaged under Drew's triage doctrine (2026-11-07, #7016). This duplicates the verdict already recorded by task 12448 on 2026-11-08; what changed since then, verified fresh 2026-11-10 by lane code-v:
Task 13048 completes as triaged: the verdict is recorded here, and the only remaining scope (issue #6033) is already queued. Issue #6031 stays open as the design record until issue #6033 lands. dezren39 commented on Nov 17, 2026 agent-note:v1
Agent: repo-worker-code / any-f
state: triaged (task 18426, lane any-f, direct)
issue: #6031
Triage verdict: REAL AND CURRENT — remainder already routed (third confirmation)
Bulk-intake re-triage (2026-11-16 reload). This design record has been triaged twice before with the same verdict (task 10397, 2026-11-05; task 12448, 2026-11-08; restated by task 13048, 2026-11-10). Verified fresh 2026-11-17:
- design(pm-stack): browser-dependent quota watchdog — CDP scrape producers that self-repair, escalate to a browser-enabled agent #6031 OPEN, kind/design, status/triaged — a design record that, per its own disposition, remains open until its implementation split lands.
- Watchdog core impl(pm-stack): browser-dependent quota watchdog core — disk state, failure classes, repair ladder #6032: OPEN, queue/parked + work/assigned — a parked queue task carries the remainder.
- Escalation mechanism impl(pm-stack): quota watchdog escalation — fleet queue task + deduplicated incident issue for a browser-enabled agent #6033: OPEN, queue/queued — a queued task carries it.
- Mistral adapter (openchamber#1630): CLOSED — that leg of the split landed.
- Umbrella design(pm-stack): SLOs + self-healing for the PM stack itself — freshness SLOs with error budgets, watchdog remediates before alerting #1260: CLOSED.
So the split has not fully landed (#6032/#6033 outstanding), the design record correctly stays open, and the remaining work is already routed through the children's own queue tasks. No new follow-on is filed from this task: re-routing this issue is what produced the task 13048 multi-lane handoff loop in November. When #6032 and #6033 close, this record can be closed as a completed design.
dezren39 commented on Nov 24, 2026 Second-pass verdict — resolved in substance (2026-11-24)
Fresh GitHub state confirms the implementation split is complete:
- impl(pm-stack): browser-dependent quota watchdog core — disk state, failure classes, repair ladder #6032 (quota watchdog core) is CLOSED as done. Its completion record says PR feat(pm-stack): quota watchdog core — entry point, adapters, rung executors, systemd timer (#6032) #11243 merged, the watchdog oneshot/timer is active, state is persisted atomically over consecutive ticks, and the acceptance fixtures passed.
- impl(pm-stack): quota watchdog escalation — fleet queue task + deduplicated incident issue for a browser-enabled agent #6033 (escalation) is CLOSED as done. Its completion record says PR fix(pm-stack): rung-4 escalation speaks the validated queue contract (#6033) #11268 merged and the live rung-4 path was exercised, including dedupe, recovery closure, and human-blocked surfacing.
- quota: mistral browser-dependent usage read (Vibe plan) — producer + watchdog adapter #1 developing-today-forks/openchamber#1630 (Mistral adapter) is CLOSED.
- Umbrella design(pm-stack): SLOs + self-healing for the PM stack itself — freshness SLOs with error budgets, watchdog remediates before alerting #1260 is CLOSED.
Thus the three implementation legs named by this design have landed; no follow-on packet is needed. The prior design review explicitly dispositioned the open questions with defaults (24-hour ordinary escalation threshold; silent human-blocked recovery; producer home under pm-stack/exporters). Closing this design record as completed; the linked implementation issues remain the evidence trail.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|