Skip to content

refactor: route babysit through structured monitors - #5177

Closed
kyleseaman wants to merge 1 commit into
token-monitors-dashboardfrom
codex/token-monitors-babysit
Closed

refactor: route babysit through structured monitors#5177
kyleseaman wants to merge 1 commit into
token-monitors-dashboardfrom
codex/token-monitors-babysit

Conversation

@kyleseaman

@kyleseaman kyleseaman commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Stack: #5171#5172#5173#5174#5175#5176#5177

Position: 7 of 7. Base: #5176.

Routes GitHub babysitting through bounded structured monitors, keeps a finite unsupported-target fallback, and adds executable lifecycle scenarios.

Verification: lifecycle scenarios, monitor regression suites, docs, brand, scrub, and stack-wide gates.

@github-actions

github-actions Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 6ce882d5b819008e51e9d7184a8ee12cc3532917 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 6ce882d

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 6ce882d5b819008e51e9d7184a8ee12cc3532917: <one-sentence reason>

@kyleseaman kyleseaman closed this Aug 23, 2026
@kyleseaman
kyleseaman deleted the codex/token-monitors-babysit branch August 23, 2026 05:18
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Aug 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 6ce882d5b819008e51e9d7184a8ee12cc3532917 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Moves GitHub-PR watch policy from 600 lines of advisory prose into engine-enforced bounded monitors; the retained legacy fallback stays finite by construction.

Watch

  • The legacy monitor_start recipe drops the old skill's stall-tripwire ("3 identical settled cycles → stop and escalate"), so an unsupported-target loop again coasts to its cap indistinguishably from convergence — the exact measured failure (4/4 loops cap-out) the old prose fought. Cost is now capped by the required runtime/cycle bounds, but the outcome ambiguity returns for non-GitHub targets until the engine grows more monitor kinds.

[DESIGN-REVIEWED] 6ce882d

@kyleseaman

Copy link
Copy Markdown
Collaborator Author

Replaced by #5186 after renaming the branch to remove the prefix.

@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — 🟡 CONCERNS

Premise-level review of 6ce882d5b819008e51e9d7184a8ee12cc3532917 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

All evidence gathered — the contract's counts are done (budget-check call sites, token_usage_known provenance, controller ordering). Emitting the review.

First-Principles-Verdict: CONCERNS

A "refactor" ships an undeclared behavior fix: an exhausted monitor no longer buys one more provider probe or BUSY redispatch — real, derived, but unnamed.

What this change ships

Intent: stop paying a full agent turn per babysit poll by routing GitHub PR watching through the server-side bounded monitor — a FIX to routing/cost.

  1. Babysit skill now issues one bounded monitor_watch; 547→78 lines — justified (deletion)
  2. Skill loads pointer-on-trigger instead of full-body injection — justified, declared in spec
  3. Spent budget now stops the monitor before another probe or BUSY redispatch — undeclared, rides along
  4. token_usage_known now visible to the agent via monitor_inspect — justified (skill reads it)
  5. monitor_start relabeled legacy fallback for unsupported targets only — justified
  6. autonudge_stop relabeled compatibility alias with durable retained outcome — justified
  7. monitor_watch reply now states application is pending until turn end — justified
  8. Legacy recipe requires finite interval, cycle cap, and runtime — justified
  9. New user doc monitoring.md plus two index rows — declared, justified
  10. Executable lifecycle scenario suite — declared

Watch

The description says only "Routes GitHub babysitting through bounded structured monitors", but the diff flips test_monitor_controller.py from dispatched.await_count == 2 to == 1: a spent budget previously bought one more redispatched agent turn and one more provider probe. That is a behavior fix under a refactor: type — derived (it enforces decision.py's own "a spent bound must never buy one additional unattended turn" invariant, and the spec hunk documents it), so the only gap is the framing; a human should know this PR changes runtime behavior, not just routing. Grep confirms no duplication: monitor_budget_reason had 4 post-probe call sites in autonudge.py; this adds the only pre-probe/pre-redispatch one, which the post-probe sites cannot reach by construction.

[FIRST-PRINCIPLES-REVIEWED] 6ce882d

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