Repository navigation
Waiting runs go on by themselves, and texts say what actually happens - #924
Conversation
aa3af31 to
ec42334
Compare
Superseded by CoderHelm's latest review
ec42334 to
c3c13cb
Compare
Superseded by CoderHelm's latest review
|
Auto-merge |
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.
The stack-fix asserts in live::permissions and the wz incident case no longer interpolate the text built from the (invented) account id into their failure messages, and the incident's round summary local is named round_summary rather than account.
c3c13cb to
08c58bd
Compare
| None => {} | ||
| } | ||
| } | ||
| // Runs that stopped because their change closed: reopened, they wait |
There was a problem hiding this comment.
💬 Nit: Reopened runs are counted as resumed (correctness)
out.resumed += check_closed(state).await adds every run that moved to the sweep's resumed total. That includes runs that were only put back to waiting because their change was reopened, and those have not resumed. The log line resumed = ... at the end of check_all therefore overstates how many runs went on. Nothing in the code branches on this count, so it is a small logging inaccuracy.
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.
…ror reads as one a person must repair (#937) * A hand-off to a person is typed, and CoderHelm owns its own limits 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. * Waiting runs go on by themselves, and texts say what actually happens 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. * Usage-limit, reopened-change, approval and alert waits go on by themselves 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. * A woken run that couldn't be queued waits again, and only a closed change'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. * A run the token limit refuses pauses and goes on by itself, and no error 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. * A paused run reads as paused in the runs list and the palette, and sends 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. --------- Co-authored-by: coderhelm[bot] <272032808+coderhelm[bot]@users.noreply.github.com>
Summary
Runs that wait on a person now go on by themselves when the input arrives, and the texts that still handed people work CoderHelm does (or promised what didn't happen) say what actually happens.
Rebased onto main after #918 merged; it reuses
common::rendered::{person_text, clip}from there.Changes
common::run_wake,gateway/routes/run_wake.rs):resumes,waiting_for), and the run they start takes up the waiting run's plan and branch the way Retry does. A plain comment on a GitHub issue whose run waits now does the same (it used to be ignored unless it mentioned CoderHelm). The worker treats any reply to a waiting run as its answer, except a status-only note or "done elsewhere".run_wake::put_back), so the next event, sweep or Retry starts it. A woken security fix run starts as Retry starts it, as a new request for its unit's findings.run_recovery,run_fail, worker waits): no more "then press Retry" or "put it right". Each action names the one thing to do and where, and says the run continues by itself. Only an approval and a person's own stop of the run stay as decisions made where they are made.Repo: owner/nameline in the ticket's description, which the repo pick reads first; editing the ticket starts a new run). The "why that repo" text is cut at a word (clip), here and where the pick reason is made. "Turn it on in Repositories and re-run" now says the run continues once the repository is on.restore_file(omitfrom_ref)", "say why in your Evidence") stay in the fix round's prompt only.update_pr_descriptionin every fix round on a pull request, with the same guard as the feedback round. A round CoderHelm started asks for a rebuild from the branch, and the round's caller rebuilds the description. The round note tells the model to use the tool. The hand-off check now also catches "no tool that edits the PR description" and "someone needs to paste in ...".deploy-prod, stays the team's call). An unblock that ends in "or run the command yourself" or "or a person runs the command" is cut to its one way.RunWaitingOn.detailexample no longer says "Mark it ready once".person_textnow also fails on "put it right", "and re-run", "press Update again", "delete the failed stack, then", "add PR label", "no tool that edits", "paste in the replacement", and on words written for the model ("(omit...)", "in your Evidence", "put it back with...").wz_waits_go_on_by_themselveswith its page.Verification
cargo fmt --all --check,rustfmt --check --edition 2021 worker/src/passes/incidents/*.rscargo clippy -p common -p worker -p gateway --all-targets -- -D warningscargo test -p common -p worker -p gatewaypython3 -m unittest discover -s lambda/testsbrand_spelling.py,domain_examples.py