Skip to content

feat(opencode-claimant): stall nudges + stuck-holder escalation over babysitter verdicts (#1187) - #12688

Merged
dezren39 merged 1 commit into
mainfrom
felix/1234-stall-nudges
Nov 22, 2026
Merged

dezren39 merged 1 commit into
mainfrom
felix/1234-stall-nudges

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Summary

#1187's stall nudges — the one dispatch-v1.1 component still prose-only — landed as code, consuming the confirmed-stall verdicts #1338's babysitter engine (PR #12687) now produces as data. Epic context: #1234's scope names the babysitter loop as "progress verdicts, one stall nudge then escalation"; the detection half landed in #12687, this is the actuation half.

What changed (pm-stack/opencode-claimant, +102/−0 tracked, 2 new files)

  • nudges.py (new) — a pure planner + step in babysitter.py's pattern. Per babysitter round: a bound session in a confirmed stall gets a nudge through the claimant's verified prompt transport, at most 2 per stall episode; still confirmed-stalled with the budget spent, it escalates once as a stuck-holder agent-note on the bound issue. Unbound stalls are recorded, never driven (babysitter's rule). Episode state persists in nudge-state.json; an episode closes (and the budget resets) the first round the session stops reading confirmed-stalled.
  • Delivery discipline — a nudge counts only when _send_prompt confirms delivery (2xx or reconcile-proved landing); a failed send consumes no budget and retries next round. A failed escalation note does not mark the episode escalated (retries); an unaddressable binding (no repo/issue on the claimed row) is recorded no_issue_address once — a repo is never guessed.
  • claimant.py — _load_nudges_module (babysitter loader pattern), _post_stuck_holder_agent_note (hand-back note pattern), the nudge step in _fire immediately after the babysitter round (sessions, not candidates — it runs before the gate, like the round), and the record rides every fire-log entry under a nudges key.
  • babysitter.py — build_bindings additively carries repo from the row's packet (the shape normalize_row already lifts), which addresses the escalation note.
  • test_nudges.py (new, 15 tests) + registration in run_hermetic_tests.py.

Evidence

  • Fail-before (pristine origin/main 3532f9b, via git archive): the new suite errors at load — FileNotFoundError: nudges.py (the actuation surface does not exist on main).
  • Pass-after (this branch, sandbox — the suite is hermetic by construction: injected effect fakes, temp state dirs, the harness's fail-closed I/O guards): python3 -I run_hermetic_tests.py → 203 tests OK (188 pre-existing + 15 new), no forbidden-I/O violations. ruff format applied to all touched files; git diff --check clean.
  • The oracle is the subprocess/effect boundary plus the persisted state: episode walk nudge→nudge→escalate→stop, failed-send budget preservation, failed-note retry, unaddressed-escalation-once, episode-close budget reset, shadow-mutates-nothing, and the fires.jsonl nudges key.

Scope notes

Refs #1187, #1234, #1338. Do not merge — Felix reviews.


Run Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 22, 2026 21:50
@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dca418dd-0002-4450-acf8-110ce20a9aab
Commits

Reviewing files that changed from the base of the PR and between 3532f9b and 215229d.

Files selected for processing: 5

  • pm-stack/opencode-claimant/babysitter.py
  • pm-stack/opencode-claimant/claimant.py
  • pm-stack/opencode-claimant/nudges.py
  • pm-stack/opencode-claimant/run_hermetic_tests.py
  • pm-stack/opencode-claimant/test_nudges.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T21:52:11.522924Z 215229d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant