GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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 #6031

New issue
Copy link
New issue
Copy link
Done
Done
design(pm-stack): browser-dependent quota watchdog — CDP scrape producers that self-repair, escalate to a browser-enabled agent#6031
Copy link
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codedesign/quota-planeDesign: quota-plane - all issues of this effort carry itepic/pm-stackReprioritization program epic (2026-11-12)kind/designA design proposal (design-architect): multi-step, phased, decision-bearingstatus/triagedTriaged and routed (see agent note)status:donetask/triageQueue packet kind: verify, reproduce, and route this item
Milestone
PM stack coherence

Description

@dezren39
dezren39
opened on Nov 5, 2026
Issue body actions

Directive

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

  • This is the quota-source specialization of code#1260 (pm-stack SLOs + self-healing: remediation catalogue, attempt caps/cooldowns, escalate only when remediation fails). Its catalogue entries fold back into design(pm-stack): SLOs + self-healing for the PM stack itself — freshness SLOs with error budgets, watchdog remediates before alerting #1260; code#1283 drills should eventually exercise it.
  • It revives the retired v1 Meta producer pattern (CDP scrape, code#1301) for the one case the 2026-11-03 "quota is gathered by asking OpenCode" ruling does not cover: no API path exists at the credential class held. Preference order per source stays API → usage-capable token → browser-under-watchdog.
  • Division of labor with openchamber#1619: that issue adds the Mistral key-validity provider (presence/validity via API). This program adds the plan usage read id(ci): bench-compare compares medians across different units — a unit change masks a real regression as -99.8% ok (and a zero baseline prints +inf%) #1619 proved the API cannot give. Both land; neither replaces the other.

Open questions (named, per #1260's rule)

  1. Escalation-unresolved threshold before a NEEDS DREW line: 24 h proposed. Not blocking.
  2. Recovery of a human-blocked incident: stay silent (closed issue is the record) — proposed.
  3. 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).

Activity

Next
  1. dezren39
    added
    status/needs-triageNot yet triaged; needs a first look
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    kind/designA design proposal (design-architect): multi-step, phased, decision-bearing
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

    @developing-today
    developing-todayBot
    on Nov 5, 2026 – with developing.today
    Contributor
    More actions

    CODE-1696

  3. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    Implementation split filed (this design carries no implementation work itself):

    • Watchdog core — impl(pm-stack): browser-dependent quota watchdog core — disk state, failure classes, repair ladder #6032 (disk state, failure classes, repair ladder, adapter loader, producer scaffolding)
    • Escalation mechanism — impl(pm-stack): quota watchdog escalation — fleet queue task + deduplicated incident issue for a browser-enabled agent #6033 (fleet queue task + deduplicated incident issue, auto-close on recovery, human-blocked surfacing)
    • Mistral adapter test #1 — openchamber#1630 (blocked on the Mistral sign-in lane's data-path outcome: Vibe token usage API vs console endpoint + cookie)

    Design note: ~/workspace/scratch/mistral-quota-watchdog-2026-11-04/design.md. Umbrella: #1260 (noted there). Companion reads: #5928, #4889, openchamber#1619.

  4. dezren39
    added
    queue/queuedHas a queued queue task
    task/triageQueue packet kind: verify, reproduce, and route this item
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 5, 2026
  5. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane code-w
    • Session / ID: task 10397
    • Found via: queue claim
    • Task: triage for issue design(pm-stack): browser-dependent quota watchdog — CDP scrape producers that self-repair, escalate to a browser-enabled agent #6031 — verify the design's acceptance state: implementation split filed, umbrella noted, open questions dispositioned
    • Expectation: effort class s; done = triage findings posted with evidence and task 10397 at a verified terminal state
    • Links: issue design(pm-stack): browser-dependent quota watchdog — CDP scrape producers that self-repair, escalate to a browser-enabled agent #6031 · implementation issue impl(pm-stack): browser-dependent quota watchdog core — disk state, failure classes, repair ladder #6032 · implementation issue impl(pm-stack): quota watchdog escalation — fleet queue task + deduplicated incident issue for a browser-enabled agent #6033 · umbrella issue design(pm-stack): SLOs + self-healing for the PM stack itself — freshness SLOs with error budgets, watchdog remediates before alerting #1260
  6. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane code-w
    • Session / ID: task 10397
    • Found via: queue claim
    • Task: triage complete for issue design(pm-stack): browser-dependent quota watchdog — CDP scrape producers that self-repair, escalate to a browser-enabled agent #6031 — design acceptance verified, open questions explicitly deferred with defaults recorded; implementation lives in the split issues
    • Expectation: done = findings below recorded; issue design(pm-stack): browser-dependent quota watchdog — CDP scrape producers that self-repair, escalate to a browser-enabled agent #6031 remains OPEN as the design record until its split lands
    • Links: issue design(pm-stack): browser-dependent quota watchdog — CDP scrape producers that self-repair, escalate to a browser-enabled agent #6031 · implementation issue impl(pm-stack): browser-dependent quota watchdog core — disk state, failure classes, repair ladder #6032 · implementation issue impl(pm-stack): quota watchdog escalation — fleet queue task + deduplicated incident issue for a browser-enabled agent #6033 · umbrella issue design(pm-stack): SLOs + self-healing for the PM stack itself — freshness SLOs with error budgets, watchdog remediates before alerting #1260 · adapter openchamber#1630

    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.
  7. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    on Nov 5, 2026
  8. 70 remaining items

  9. dezren39
    added
    status/in-progressQueue worker lifecycle state
    on Nov 9, 2026
  10. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    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:

    • Issue design(pm-stack): browser-dependent quota watchdog — CDP scrape producers that self-repair, escalate to a browser-enabled agent #6031 OPEN, no hard-stop labels. It is a design record carrying no implementation itself.
    • Watchdog core issue impl(pm-stack): browser-dependent quota watchdog core — disk state, failure classes, repair ladder #6032: CLOSED - PR feat(exporters): quota-watchdog decision layer — failure classes + repair ladder (#6032 slice 1) #7788 MERGED (quota-watchdog decision layer: failure classes + repair ladder). The fix packet task 12448 enqueued for impl(pm-stack): browser-dependent quota watchdog core — disk state, failure classes, repair ladder #6032 has landed.
    • Mistral adapter test #1, openchamber issue fix(id): carry emphasis/strong/strikethrough marks wrapping images through the markdown codec (#1407) #1630: CLOSED.
    • Escalation issue impl(pm-stack): quota watchdog escalation — fleet queue task + deduplicated incident issue for a browser-enabled agent #6033: still OPEN and already in the queue (labels queue/parked + work/assigned + status/waiting-dependency) - its fix packet exists, so no new packet is enqueued (dedupe).
    • Design open questions were explicitly deferred with defaults recorded by triage task 10397 (2026-11-05).

    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.

  11. dezren39
    added
    design/quota-planeDesign: quota-plane - all issues of this effort carry it
    epic/pm-stackReprioritization program epic (2026-11-12)
    and removed
    status/in-progressQueue worker lifecycle state
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 10, 2026
  12. dezren39
    added this to the PM stack coherence milestone on Nov 12, 2026
  13. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    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.

  14. dezren39
    removed their assignment
    on Nov 20, 2026
  15. dezren39 commented on Nov 24, 2026

    @dezren39
    dezren39
    on Nov 24, 2026
    MemberAuthor
    More actions

    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.

  16. dezren39
    closed this as completedon Nov 24, 2026
  17. developing-today
    added
    status:done
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/pm-stackpm-stack (Pad/Grist) in developing-today/codedesign/quota-planeDesign: quota-plane - all issues of this effort carry itepic/pm-stackReprioritization program epic (2026-11-12)kind/designA design proposal (design-architect): multi-step, phased, decision-bearingstatus/triagedTriaged and routed (see agent note)status:donetask/triageQueue packet kind: verify, reproduce, and route this item

    Type

    No type

    Projects

    No projects

      Milestone

      • PM stack coherenceNo due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.