Repository navigation
feat(PTYCAP-04): lifetime inject counter + kill switch + 60% alarm + 20M cap (stacked on #505) - #506
Merged
Conversation
Contributor
AgentAutofix AI ReviewclaudePASSED
codexPASSED No findings. agyadvisory -- not part of the gate decision PASSED No findings. Result: Both AI reviewers passed Reviewer models (requested pin, not independently confirmed):
|
finedesignz
added a commit
that referenced
this pull request
Oct 13, 2026
… draft PR #506) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
finedesignz
marked this pull request as ready for review
October 13, 2026 22:58
…in after #505 squash); releaseInject retries and parks failures Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqBYNFyRHsavnRSJZihaZ6
finedesignz
force-pushed
the
phase-ptycap-04-lifetime-counter-kill-switch
branch
from
October 14, 2026 17:05
ec2237e to
ec8908f
Compare
Owner
Author
|
Rebased onto main after #505's squash (clean re-apply of the Phase 4 diff) and fixed the codex blocking finding: Full QC panel (3 fresh-context reviewers) on ec8908f:
Minors are tracked for follow-up; none widen a spend path. Merging when Woodpecker qc + docs-drift are green. Generated by Claude Code |
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.
PTYCAP Phase 4: Lifetime Inject Counter + Kill Switch (DRAFT, QC BLOCKED)
Stacked on #505 (Phase 3). Merge #505 first. The base is
maininstead of the Phase 3 branch because Woodpeckerqc.yamlonly runs for PRs intomain, and the postgres:16 service is the only place the new SQL is proven.What ships
automation_inject_ledgerwith a server-setcounterKey:task:<id>for orchestrator and schedulertriage:<application_uuid>heal:<userId>:<repo>REMO_AUTOMATION_LIFETIME_INJECT_CAP). A one-time 80% warning page and an exhaustion page go out. The owner reset needs step-up.REMO_AUTOMATION_KILL_SWITCH./api/automation: engage needs no step-up, while release and reset do.session.startor run command, on the autospawn, scheduler, TEAB, orphan-resume, auto-launch and/api/sessions/healpaths.REMO_TOKEN_CAP_ALARM_PCT). It is event-driven at token ingest, uses a durable claim with a delivered flag, and sends at most once per user per local day.message.id, emitting only positive per-bucket deltas. Supervisor is bumped to 0.15.1.Owner notes before deploy
REMO_ORCHESTRATOR_DAILY_TOKEN_CAPis unset. Human PTY usage counts toward it. Check the prod env before deploying; this PR changes no prod env.supervisor-v0.15.1tag).Gates
check-baseline: pass=2701, skip=259, fail=0. No new skips.tsc: 427 errors, all pre-existing; no new errors.docs:sync: clean.QC
/qc: three seats ran: Sonnet adversary, Sonnet correctness/SQL and Codex.
hub/src/orchestrator/orphan-resume.tsreopenOrphanIfNoReplacementusesUPDATE ... NOT EXISTS, which does not serialize against a concurrent replacement INSERT. Fix: take the same per-user advisory lock thatlaunchOrchestratorholds (auto-launch.ts:~160) around the reopen.hub/src/scheduler/senders/{supervisor,teab,work}.tsre-arm a one-time task onschedule_kindalone, so a manual Run Now on a completed once task that hits a late halt gets re-enabled. Fix: passonceClaimedinto the run context and re-arm only when it is true, plus a regression test.Verifier and CI
04-VERIFICATION.md): SC-1 through SC-4 PASS. NO-SHIP at 8447cdf because CI was red from two e2e fixture defects.project_dir,machinelaunch arg). The CI re-run is pending.🤖 Generated with Claude Code