Repository navigation
A run the token limit refuses pauses and goes on by itself, and no error reads as one a person must repair - #937
Merged
Merged
Conversation
A hand-off is a PersonOnly from a closed set (a named permission an owner or admin grants, a product decision, an approval the rules require, a credential, work someone else holds, a real-world action), built only through common::person_only. Words about CoderHelm's sandbox, allowlist, budgets, tools, CI use, labels, tests or reads make an OwnProblem instead: an internal alert and one run-page line. The person gate, hand-backs and a fix round's NEEDS A PERSON line all go through it. On its own pull request the reviewer blocks only on what a route can satisfy (review_feasible). A pull request with no progress for a day is diagnosed, retried along its next route and alerted (own_problems::check on the sweep). Hand-offs are counted per team by reason, own problems by subject, with the time each pull request spent blocked. Incident case xd_own_limits_never_a_persons.
A run waiting on a person resumes when what it waits for arrives: a comment or reply on its ticket (Jira, or a plain comment on the GitHub issue), access granted on GitHub or a repository turned on, or usage limits saved that allow runs. Wait actions name the one thing to do and where, never "then press Retry". The wrong-repo note names the `Repo:` line and cuts its reason at a word. Tests-and-scope notes no longer quote the coding model's instructions. Fix rounds get update_pr_description with the feedback round's guard. PR labels are CoderHelm's to add, and an unblock never ends in "or run the command yourself". The updater waits out a busy stack and retries a rollback caused by throttling by itself; a failed update stack in another account gets one AWS admin action. person_text guards each of these texts.
…elves Runs waiting on the usage limit start again from the 15-minute sweep once the team's limit allows runs, so a new month resets them. A run whose change closed goes back to waiting when the change is reopened, and goes on when it merges. An answered approval resumes the same run with the work it kept. An alert run resumes when its alert fires again and closes when it clears; its wait says what to do first, then Retry on the run page.
…ange's stop is read as one - A wake (gateway event or the worker's limit sweep) that marked the waiting run superseded but couldn't queue its new run puts it back to waiting, with the status key and ending it had, only while it still holds that wake's write (common::run_wake::put_back). The ticket is serialized before the write, so only the send can fail after it. - A woken security fix run starts as Retry starts it: a new request for its unit's findings (security::retry_event), not its ticket again. - The change-wait sweep reads a run as "its change closed" only when its wait is that stop (change_wait::waits_on_close). A run keeps the change it waited on after it went on, so a later question, approval or person's stop is never overridden. - A comment no longer restarts a run a person stopped or put back to draft (HumanOnly::PersonAction); only that person's Retry or ready does. - A label item that names production, a release or a publish in any word (deploy-prod, release, CI:DEPLOY_PRODUCTION) stays the team's call. - An update stack still rolling back (_IN_PROGRESS) is told to wait, never to update again or delete. - one_way finds its cut in an ASCII-lowercased copy, so the offset is always a char boundary of the text it cuts.
…s change builds on
…roblems this change routes to
…ror reads as one a person must repair
A model call refused by the team's monthly token limit ("limit reached")
was read as an error nobody knew, so the run stopped as "an error it
doesn't know how to repair ... put it right, then press Retry" and waited
on a person past the month's turn.
- The refusal is a typed pause (common::token_room, Kind::TokenLimit):
the run keeps its continuation and resumes in place, from the step that
was refused, when the month turns or the limit is raised. #924's
wake_limit_waits hands these waits to token_room::wake_team.
- New runs wait for token room when what is left is less than a run of
their kind takes; a run under way waits before building; runs in
progress come first on what is left.
- Warnings at 80% and 95%, once each a month, with the day the limit runs
out at this pace; /api/usage gives warn_level and projected_at.
- A schedule at 00:00 and 00:01 UTC on the 1st sends the sweep; a saved
limit sends it at once; a paused run gets no reminder.
- A teammate's branch is left as it is: the run works on <branch>-N and
says so once.
- An error nobody classified is CoderHelm's own problem: retried with
longer waits, then parked with an internal alert (#930's own_problems);
the generic frame is gone and person_text refuses it.
- Runs an older release stopped this way are found by their stored words
and resumed after the deploy.
- Incident case xg_token_limit_pauses_and_resumes.
…nds run.paused
- RunSummary gains pause (the list reads waiting_on), and the search the
command palette uses carries it too, so a run paused on the token limit
is never listed as waiting for an answer.
- A pause sends the new webhook event run.paused, with its line in error;
run.needs_input stays for waits a person ends. Both are in the catalog,
so the OpenAPI document lists them.
- The event scrubber no longer redacts the plain word after "token"
("token limit"); a credential after it still is.
coderhelm
Bot
dismissed
their stale review
December 1, 2026 04:45
Superseded by CoderHelm's latest review
Contributor
|
Auto-merge |
Conflicts with #924's merged commits are resolved on this branch's side: the token-limit pause replaces the unknown-error stop and widens the limit sweep's filter. The tree equals main plus this branch's own two commits.
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
A model call refused by the team's monthly token limit stopped the run as "CoderHelm met an error it doesn't know how to repair", headed "Look at what stopped the run, put it right, then press Retry" and "Needs a person". The run then waited for a person even after the month turned. The error classifier only knew the older wording of the limit ("limit exceeded"). Every model call now says "limit reached", so the refusal was read as an error nobody knew. Nothing warned before the limit, and new runs kept starting into it. A run whose ticket branch held a teammate's commits, with no pull request, stopped with the same frame.
This change makes the limit a typed pause that resumes by itself, from the step that was refused. New runs wait for room instead of starting into the limit. Admins are warned at 80% and 95%. A teammate's branch no longer stops a run. The generic frame can't be produced any more.
It builds on #924 (runs waiting on the usage limit go on by themselves) and #930 (typed hand-offs,
OwnProblem). The branch merges both heads, so its diff includes their commits until they land. The change itself is the last commit. The dashboard half is CoderHelm/coderhelm#514 (merged: the paused run page and the 80% and 95% banner) and CoderHelm/coderhelm#527 (the runs list, the palette and the webhooks docs).Changes
common::token_room,run_recovery):token_room::refusalreads both wordings of a refusal, wherever it sits.Kind::TokenLimit, neverUnknown.usage_limitbuilds a typedPause, kept on the run'swaiting_on. Its one line: "Paused: this month's token limit is used up (40.3M of 40M). Resumes by itself on Dec 1, 00:00 UTC when the month turns, or as soon as an admin raises the limit." The page, the ticket and the record all say that line.needs_inputwith theusage_limithand-back, which Waiting runs go on by themselves, and texts say what actually happens #924'swake_limit_waitsreads. The pause is never written as a person's step.stop_for_personandend_withcallkeep_resume_message) and never opens a stopped draft.token_room::wake_team, called from Waiting runs go on by themselves, and texts say what actually happens #924'swake_limit_waits) claims the run with one conditional write. It then sends that continuation: the same run, from its checkpoint, with its plan, branch and finished steps.token_room::pace_line). The email templates gain the pace line./api/usagegiveswarn_levelandprojected_atper limit for the dashboard's banner.waiting_on(LIST_ATTRS), andRunSummarygainspause, so a paused run shows as paused in the list and the command palette (A paused run reads as paused in the runs list and the palette, and its last step is short coderhelm#527), never as waiting for an answer.run.paused, with the pause line inerror.run.needs_inputstays for waits a person ends. Both are in the event catalog, so the OpenAPI document and the docs' event list carry them.resolve_run_branchchecks whether the ticket's branch holds commits CoderHelm didn't make with no pull request. If so, the run works on the first free (or its own)<branch>-N.unknown_stopis gone. An error nobody classified is CoderHelm's own problem.own_problems::alert.rendered::person_textnow refuses "doesn't know how to repair".needs_inputruns whose stored words hold a refusal (token_room::waits_on_limit). It resumes them in place after the deploy.xg_token_limit_pauses_and_resumes, with its page.vo's guarantee is updated for unknown errors.Verification
-2;token_room,run_recovery,run_fail,token_limitsand the warning email, plus a stuck-run sweep test (no reminder for a paused run), the list'spause(only while the run still waits), and the webhook event (run.pausedfor a pause,run.needs_inputfor a person's wait, both matching the catalog's schema).cargo fmt --all --check;rustfmt --check --edition 2021 worker/src/passes/incidents/*.rs;cargo clippy -p common -p worker -p gateway --all-targets -- -D warnings;cargo test -p common -p worker -p gateway;brand_spelling.pyanddomain_examples.py.docs/api/openapi.jsonwere written again from the code.