Skip to content

Babysitter live: interval rounds over all OpenCode sessions with verdicts, quota, and pool attribution #1338

Closed

Description

@dezren39

Work (Drew, 2026-10-27)

Stand up the babysitter as a live scheduled job (openchamber- babysitter, every 20m), implementing #1185's design with #1192's
detector:

  • Every round: enumerate ALL sessions at the laptop OpenChamber
    location (and any future locations), bound or unbound, and give
    each a verdict: progressing / stalled / done-unreported / blocked
    / walled (402-class) / idle.
  • Stall rule (from Pilot: session stall taxonomy — observable signatures of stalled vs healthy long sessions #1192's census): suspect when ≥20 min since the
    session's last activity AND no live CI on its bound PR; confirm on
    a second suspect round or on expiry-equivalent silence. Nudge at
    most twice (message injection where the API shape is verified —
    verify by the session's next assistant message), then escalate to
    the fleet as a stuck-holder case.
  • Report per round only what changed: new stalls, nudges sent,
    harvests ready (done-unreported sessions whose PR merged or work
    completed → the owning queue task gets completed by its lane, the
    babysitter flags it), quota snapshot per pool in use, and which
    pool each active session is drawing on + whether that choice looks
    effective (progress per the session's own checkpoints).
  • Data out: append round observations to the babysitter log in the
    goal workspace (the pool-intelligence and meta-reviewer jobs read
    it); unbound sessions are observed, never driven.

Acceptance criteria

  • The job exists and has completed three rounds with per-session
    verdicts recorded.
  • One real (or synthetic) stall is detected inside two rounds
    of the rule's threshold.
  • Every report names each active session's pool; a session on a
    walled pool is flagged the round it happens.

Extends #1185; depends on openchamber#524 for the clean last-activity
field (rounds poll what's available until then). Child of the pool &
routing intelligence epic. Filed by Muse (operator) 2026-10-27.

Activity

  1. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  2. added
    area/infraInfrastructure, deployment, and operations
    effort/mMedium: expected under 1 day of work
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 27, 2026
  3. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Oct 31, 2026
  4. 96 remaining items

  5. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: progress
    by: agent felix (kind muse, Muse sandbox seat; shortlist take)
    at: 2026-11-22

    Slice landed for review: #12687 — the babysitter's verdict rounds as code in pm-stack/opencode-claimant. Not merged; Felix reviews.

    STATE MAP (reconciled fresh today against origin/main 11d8888, the schedule registry, and this seat's scheduler):

    THIS SLICE (PR #12687): babysitter.py's round engine rides the claimant fire (every 10 min - inside the 20-min round cadence; the claimant/executor OpenChamber task is enabled and already registered, so no schedule changes and the registry is untouched). Every root session, bound or unbound, gets a verdict (progressing / stalled / done-unreported / blocked / walled / idle) under the #1192 rule: suspect at >=20 min silent with no live CI on the bound PR, confirmed on a second suspect round at the same activity stamp or on expiry-equivalent silence. Per-session pool attribution from the session's model provider; walled pools flagged the round they happen; changed-only delta in every record; live fires append babysitter-rounds.jsonl and persist the confirmation state, shadow fires mutate nothing. Fail-before: suite errors on main (babysitter.py absent). Pass-after: 23/23 new tests, full claimant hermetic suite 188/188 in the sandbox (hermetic by construction - injected snapshots, temp state dirs). No new dependencies.

    #1187 RELATIONSHIP VERDICT: #1338 is not #1187's stall-nudges item, and this slice is not the nudge slice. #1187's missing piece was "a running sweep successor to the disabled conductor" for its criterion 3 - this round engine is that sweep's detection half, now in code on a running cadence. Nudges (message injection on confirmed stalls, max two, verify-by-next-message) remain #1187's next slice, and they now have confirmed-stall verdicts as data to consume instead of a prose conductor's log.

    REMAINS, in order:

    1. Deployment + live verification (the criteria's live arm): after PR feat(claimant): babysitter verdict rounds over all sessions (#1338) #12687 merges, the laptop claimant picks it up on its next install; then three live rounds recorded in babysitter-rounds.jsonl tick criterion 1, and the first live (or continued synthetic) stall inside two rounds ticks criterion 2. Venue note: the laptop leg is down this evening (fleet shell lands on htch-runtime), so this could not be run from here today. Ready condition: laptop leg back + PR merged.
    2. Quota feed for pool-state.json: wire the quota gatherer (the aggregator's quota-current pipeline) to write pool-state.json in the claimant state dir, so criterion 3's walled flagging runs on live quota instead of an operator file. After this PR: python3 -I run_hermetic_tests.py in pm-stack/opencode-claimant still passes, and a live round whose pool-state.json names a pool walled at 100% flags that pool's sessions in the same round's record.
    3. Harvest hand-off: done-unreported verdicts currently carry harvest_ready (bound PR merged, when known); the owning task's completion stays its lane's job per the issue text - the babysitter flags, it does not complete.
  6. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Progress from felix: still working

  7. added a commit that references this issue on Nov 22, 2026
  8. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: merged
    by: agent felix (kind muse, Muse sandbox seat)
    at: 2026-11-22

    Merged: #12687 — the verdict rounds are code again.

    What landed: babysitter.py in pm-stack/opencode-claimant — one verdict round per claimant fire (10-minute cadence), enumerating every root session (bound or unbound; unbound are observed, never driven) and assigning the issue's verdicts under the #1192 rule (suspect at 20+ minutes silent with no live CI on the bound PR; confirmed on a second suspect round at the same activity stamp or expiry-equivalent silence). The round rides every fire-log entry; live fires append babysitter-rounds.jsonl and persist confirmation state; shadow fires mutate nothing. Felix re-ran the full claimant hermetic suite at review: 188/188 OK. Care points held: unknown CI can never prove a stall, timing-unreadable sessions are named unclassified rather than verdicted, and pool wall state is an input (pool-state.json), never invented.

    Context: the criteria were verified against the prose conductor on 2026-11-01, but both Muse babysitter/conductor jobs have been disabled since 2026-11-02/03 — no verdict round had run in three weeks. The gap was a running mechanism, and it is now in the claimant's cadence rather than a separate job.

    Remains, in order: deployment + live verification (three live rounds tick criteria 1 and 2's live arm — the laptop leg is back as of this afternoon, so this can proceed on install); the quota feed writing pool-state.json so the walled verdict runs on live quota; harvest stays flag-only by design. Relationship to #1187: this engine is the detection half its stall-nudges criterion needs — nudges remain #1187's next slice, now able to consume confirmed-stall verdicts as data.

  9. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Released by felix (outcome: free). Babysitter verdict-round engine merged as PR #12687; issue remains open for live verification and quota feed

  10. added and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 22, 2026
  11. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: progress
    by: agent felix (kind muse, Muse sandbox seat; via the #1334 reconciliation pass)
    at: 2026-11-22

    Quota feed landed for review: #12689 — the gatherer now writes pool-state.json.

    What it does: a pure projection (aggregator src/pool-state.ts) of each tick's quota-current.json into the babysitter's pool-state shape, keyed by the canonical OpenCode provider id; gather-quota.ts writes it into the claimant state dir after quota-current.json, fail-soft (POOL_STATE_PATH override). A wall is asserted only from a fresh ok entry under derive.ts poolState's rule (any window >= 100%); stale/errored entries surface as state with no wall and no percent. Evidence on the PR: fail-before on origin/main, pool-state suite 11/11, claimant hermetic 203/203, and a cross-language check — babysitter.read_pool_state reads the projection back (fresh wall lands, stale wall does not). No new dependencies; no schedule change (rides the gatherer's existing tick).

    Remaining on #1338 after this merges: deployment + live verification only — the laptop claimant and gatherer pick the code up on install; three live rounds tick criteria 1 and 2's live arm.

  12. added a commit that references this issue on Nov 22, 2026
  13. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: merged
    by: agent felix (kind muse, Muse sandbox seat)
    at: 2026-11-22

    Merged: #12689 — the quota feed is wired.

    The aggregator's gather-quota tick now projects each quota-current refresh into the babysitter's pool-state shape (new src/pool-state.ts), keyed by the canonical OpenCode provider id that sessions carry, and writes pool-state.json into the claimant state dir, fail-soft, on the existing 15-minute tick — no schedule change. Wall semantics follow the house rules: a wall is asserted only from a fresh ok entry with a window at 100%; stale or errored entries surface as state with no wall and no percent. Felix verified at review: pool-state suite 11/11, claimant hermetic suite 203/203, plus the lane's cross-language contract check (the Python reader reads the TS projection back: fresh 100% pool reads walled, a 3-hour-stale 100% pool does not).

    What remains on #1338 is now only deployment + live verification: on install, the laptop claimant and gatherer pick this up and three live rounds tick criteria 1–2's live arm.

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

    area/infraInfrastructure, deployment, and operationseffort/mMedium: expected under 1 day of workepic/opencode-platformReprioritization program epic (2026-11-12)epic/pool-routingEpic: pool-routing - all issues of this effort carry itkind/featureNew feature or capability requestmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivequeue/queuedHas a queued queue tasksource/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions