Repository navigation
feat(claimant): babysitter verdict rounds over all sessions (#1338) - #12687
Merged
Merged
Conversation
added 2 commits
November 22, 2026 21:43
) New babysitter.py in pm-stack/opencode-claimant: one round enumerates every root session (bound or unbound; unbound are observed, never driven) and assigns a #1338 verdict - progressing / stalled / done-unreported / blocked / walled / idle - under the #1192 stall 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 past poll.py's zombie bound). Session facts are poll.py's verified shapes only; pool attribution is the session's model provider; pool wall state is an input read from pool-state.json in the claimant state dir (unread is recorded, never invented). The round record carries the full verdict table plus a changed-only delta; state persists between rounds so confirmation has a memory. Oracle: test_babysitter.py, 23 tests over synthetic poll-shaped snapshots - the rule's truth table, two-round confirmation, walled/blocked/CI vetoes, delta-only changes, and the step's live/shadow persistence contract. Registered in run_hermetic_tests.py. Fail-before: the suite errors on origin/main (babysitter.py absent - the verdict surface does not exist there); pass-after: 23/23, full hermetic suite 188.
_fire runs babysitter_step after supervision, before the gate, so the round happens whatever the launch outcome; the record rides every fire-log entry under the babysitter key (the hand_back/provider_wall precedent). A failed round is recorded as an error entry and never breaks dispatch. Live fires append the round to babysitter-rounds.jsonl and persist round state; shadow fires mutate nothing. README gains the Babysitter Rounds section beside Hand-Back.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 20 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
3 tasks
This was referenced Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First code slice of #1338: the babysitter's verdict rounds exist as code in
pm-stack/opencode-claimant, riding the claimant fire — the seat's only always-running code sweep (10-min cadence, inside #1338's 20-min round interval). Until now the rounds existed only as prose in theopenchamber-conductor/openchamber-babysitterMuse jobs, both disabled since 2026-11-02/03 (registry rows verified), so no verdicts have been produced anywhere since.babysitter.py(new) — the round engine. One round enumerates every root session (bound or unbound; unbound are observed, never driven — the module classifies only) and assigns a Babysitter live: interval rounds over all OpenCode sessions with verdicts, quota, and pool attribution #1338 verdict: progressing / stalled / done-unreported / blocked / walled / idle. Stall rule per Babysitter live: interval rounds over all OpenCode sessions with verdicts, quota, and pool attribution #1338 + Pilot: session stall taxonomy — observable signatures of stalled vs healthy long sessions #1192: 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 (poll.py'sACTIVE_SET_STALE_MSzombie bound). Session facts are poll.py's verified shapes only (no second timing implementation — the opencode-claimant(poll/claimant): snapshot rewrite dropped poll.py's test-pinned cap API (36/36 tests error) and inverted cap_room — idle reads as saturated, busy launches unbounded #6609 divergence rule); pool attribution is the session'smodel.providerID(the aggregator mapper's fields); pool wall state is an input read frompool-state.jsonin the claimant state dir (mode-file pattern; unread is recorded aspool_state: "unread", never invented). The record carries the full verdict table plus a changed-only delta, per-session pool, walled-pool flags the round they happen, and anunclassifiedlist for sessions whose timing cannot be read (named, never verdicted on absent evidence). Unknown CI never proves a stall.claimant.py—_fireruns one round per fire after supervision, before the gate (rounds are about sessions, not candidates, so the round happens whatever the launch outcome); the record rides every fire-log entry under thebabysitterkey (thehand_back/provider_wallprecedent). A failed round is recorded as an error entry and never breaks dispatch. Live fires append the record tobabysitter-rounds.jsonland persistbabysitter-state.json(the confirmation memory); shadow fires compute and mutate nothing.test_babysitter.py(new, 23 tests) + registration inrun_hermetic_tests.py; README gains a Babysitter Rounds section beside Hand-Back.Acceptance state after this PR (evidence on #1338): criterion 1's mechanism lands (rounds as code on a running cadence) but the criterion itself — three live rounds recorded — needs this code deployed to the laptop claimant and the laptop leg, which is down this evening; criterion 2's detector lands with its two-round confirmation proven hermetically on synthetic stalls (the criterion's "synthetic" arm), the live arm rides the same deployment; criterion 3's mechanism lands (per-session pool + same-round walled flagging) with the live quota feed (who writes
pool-state.json) as the named follow-up slice. Nudges are deliberately not here: they are #1187's next slice, which consumes these confirmed stalls.No schedule is created, changed, or retired by this PR (the rounds ride the already-registered claimant/executor OpenChamber task), so
doc/fleet-schedule-registry.mdis untouched; the registry's disabled babysitter/conductor rows remain accurate for those Muse jobs. No new dependencies (Python stdlib only).Evidence
11d888814):python3 test_babysitter.py→FileNotFoundError: .../pm-stack/opencode-claimant/babysitter.py— the verdict surface does not exist on main.b712b540b):python3 test_babysitter.py→Ran 23 tests ... OK; full package suitepython3 -I run_hermetic_tests.py→Ran 188 tests ... OK(165 pre-existing + 23 new), no forbidden-I/O violations. The suite is hermetic by design (injected snapshots, temp state dirs), so the sandbox is a valid venue; live-server verification is the deployment remainder named above, not claimed here.Merge Danger
Low. The claimant change is additive: one new module, one new optional
log_firekey (defaultNone, same shape as thehand_backaddition), and one guarded step in_firewhose failure is caught and recorded rather than propagated. Shadow-mode behaviour is unchanged except for the computed record in the fire log. The one behavioural surface to watch after deployment: live fires begin writingbabysitter-rounds.jsonl/babysitter-state.jsonin the claimant state dir and readingpool-state.jsonthere — all new files, no existing file's format changes.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.