Skip to content

ci(.github): stop each doc-check review when its run ends - #31720

Draft
nickvigilante wants to merge 3 commits into
mainfrom
vigilante/docs-1478-doc-check-stop-stale-reviews-and-expired-token-reruns-from
Draft

nickvigilante wants to merge 3 commits into
mainfrom
vigilante/docs-1478-doc-check-stop-stale-reviews-and-expired-token-reruns-from

Conversation

@nickvigilante

@nickvigilante nickvigilante commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

doc-check reviews on the local Solstice model take a median of 150 minutes, so most runs time out.
The skill isn't the bottleneck: at an unloaded step time, the same reviews would take a median of 13 minutes.
The model is slow because doc-check alone keeps a median of 40 review chats active, and most of that work is wasted:

  • A review keeps running after its job stops waiting, and the next push queues another full review behind it.
  • A workspace left running past an hour holds an expired GitHub token, so the review that runs in it hits a 401 and posts nothing.

This PR makes each run stop its review when the run ends, so active reviews never outnumber running jobs, and every review starts with a fresh token.

Linear: DOCS-1478

Changes

  • cancel-in-progress: true: a new push cancels the PR's run in progress instead of queueing behind it.

  • New .github/scripts/doc-check-stop-review.sh. For the PR's review chat (found by the chat action's labels), it:

    • drops queued messages on the chat and its sub-agents, because finishing an interruption promotes the next queued message;
    • interrupts the chat and each active sub-agent, and waits until none is active;
    • stops the review workspace, including one whose earlier stop failed, and waits for the stop to finish.

    It ends within one time budget (STOP_BUDGET_SECONDS, 270 seconds by default, a third of it for the chats), and caps each request at the time left.
    It looks up the doc-check-pr-<N> workspace only for this repository's PRs, because the name has only the number.

  • The job runs the script before the review (Stop the previous review and its workspace) and after every run, including a cancelled one (Stop the review and its workspace, if: always()).
    The existing step that starts a stopped workspace then brings it up fresh, so the startup script mints a new installation token.

  • The concurrency group is keyed on the PR URL, so any new run for a PR, including a manual one, cancels the run in progress instead of stopping its review mid-run.

  • A PR with the doc-check label gets a review on every push until the label is removed, because a push now cancels the labeled run in progress. The skip summary and the file header say so.

  • The wait drops from 40 to 25 minutes, and timeout-minutes from 50 to 45. A review past the wait is stopped, the job fails, and the step summary says the job tried to stop it.

  • The old Stop the review workspace step is gone. It needed the action's workspace-id output, which the action doesn't set on a timeout, so it never ran for the reviews that most needed it.

Testing

  • End to end on dogfood, with two workflow_dispatch runs of this branch against this PR:

    • Cancel (run 1): run 2 cancelled it. Its last step interrupted the chat, which was waiting 5 seconds later, and stopped doc-check-pr-31720 (22:30:47 to 22:31:10 UTC).
    • Queueing: run 2's job stayed pending until run 1's last step finished, and started at 22:31:13.
    • Fresh start (run 2): Prepare the review workspace started the stopped workspace, and the review's gh calls worked.
    • Timeout (run 2): the wait ended at 25 minutes. The last step interrupted the chat, which is now waiting, and stopped the workspace.

    Neither review spawned a sub-agent, so interrupting sub-agents is covered only by the script test.
    Run 2's review made only a few model steps in 25 minutes, because 35 doc-check chats from before this PR were still running on the model.

  • bash .github/scripts/doc-check-stop-review.test.sh runs the real script against a fake Coder API (a fake curl and sleep on PATH), in 24 cases.
    They cover running and idle reviews with sub-agents and queued messages, requires_action and paused chats (with and without a next queued message), a chat that ignores interrupts, workspace builds that are in progress or never finish, a failed start, a stop that failed in this run or an earlier one, every failed request, slow requests that use up the budget, the exact workspace name match, another repository's PR, and a PR URL with a trailing CR.
    In the fake, an interruption and a workspace stop each last two reads, so the cases show that the script waits for them.
    Each of 14 deliberate breaks fails at least one case: no queue clearing, the queue read only once, interrupting treated as idle, requires_action ignored, no wait after the stop, a failed stop treated as stopped, no retry of an earlier failed stop, a substring name match, the name lookup run for another repository, no CR strip, no request time limit, request limits that ignore the budget, and no budget check in the chat or the workspace polls.
    No CI job runs shell tests, so this runs by hand on Linux, like the existing .github/workflows/test-*.sh scripts. The script needs bash 4 or later, which ubuntu-latest has.

  • shfmt, shellcheck, make lint/actions/actionlint, and make lint/actions/zizmor pass, with no zizmor findings.

Decision log

Measurements: every doc-check-bot chat shared with the organization since Oct 30 17:54 UTC, read from GET /api/v2/chats and each chat's messages: 244 parent review turns and 468 sub-agent turns, each timed from its user message to its last message.

  • Finished reviews: median 150 minutes, p90 655. Only 12 of the 159 finished turns with at least 5 model steps took 20 minutes or less. 83% of review time is waiting on the model.
  • A median review makes 29 model steps. With up to 31 doc-check chats active, the median step took 11 to 22 seconds. With 32 to 47 active, it took 221 seconds.
  • The unloaded estimate behind the 25-minute wait: for each of the 134 reviews with at least 5 model steps in chats that were idle when measured, its model steps × 15 seconds (the middle of 11 to 22) plus its measured tool time. The median is 13 minutes, p75 40, and p90 90, and 86 of the 134 fit in 25 minutes.
    Most of the tail is tool time spent waiting on sub-agents, which ran under the same load. Without that wait, the median is 9 minutes and p90 26.
    The median is per review, so it is not the product of the median step count and the median step time.
  • doc-check keeps a median of 40 chats active (p90 66, max 81). At one point on Nov 3, 24 parent chats and 7 sub-agents were running, with 17 more reviews queued behind busy chats.
  • Separately, 159 of all 244 turns hit a GitHub 401. It is a coincidence that this matches the 159 above.
    47 hit it in their first 10 minutes, on a workspace that was still running from an earlier review. 112 hit it partway through, typically about 100 minutes in.
    The 401s follow from slow reviews, because a review past an hour outlives its token, so they don't explain the step times.

Why stop instead of report: #31707 (closed) kept the 40-minute wait and turned a timeout on a running chat green. It assumed the review would still post later, but most of those reviews end on the 401, and the ones that keep running are the load.

Why interrupt sub-agents one by one: I found no code in chatd that cascades an interrupt from a parent chat to its children.

Why if: always() on the last step: GitHub runs always() steps when a run is cancelled, so a run that a newer push cancels still stops its review before the newer run starts.
The concurrency group is on the job, so a run whose job is skipped (for example, a label other than doc-check) doesn't cancel the running review.
The script ends within its 270-second budget, inside the 5 minutes GitHub gives an always() step after a cancel. The steps' 6-minute timeout-minutes only catches a script that hangs past it.

Tradeoffs Nick accepted: a new push discards the review of the older commit, and a review past 25 minutes is stopped and fails the check.
A push also cancels a manual run's review. On a PR whose changed files all skip review, the push run then skips too, so the workflow comment says to dispatch again after the push or add the label.

Next (separate PR): fewer steps per review. The workflow builds the review packet (PR metadata, diff, comments, changed docs) and runs Vale before the chat starts, and the skill uses one agent by default, with sub-agents only for large docs diffs.

Review findings not taken (accepted by the reviewer):

  • Remove the CR strip on PR_URL: kept, because parsers here tolerate CRLF input by policy, and it costs one line.
  • Share one exact-name workspace lookup across the three steps that use it: the other two steps predate this PR, so that refactor is separate.
  • Cap how many PRs review at once: tracked in DOCS-1480, after this PR's effect is measured, because the cap's threshold depends on it.
  • Start the stopped workspaces by ID, in case a chat named its workspace something other than doc-check-pr-<N>: the chat created doc-check-pr-31720 in the end-to-end test, and a review whose workspace is stopped can start it itself.

Follow-ups found in review (not changed here):

  • No CI job runs the repository's shell test scripts.
  • The coder-workflow-bot template mints its GitHub installation token once at startup, so any session past an hour gets 401s.
  • Prepare the review workspace says "Workspace state is usable" after a failed build.
  • The dispatch URL check accepts any owner/repo, but the workspace name uses only the PR number. The stop script now skips the name lookup for other repositories; the other steps still use the number alone.
  • chatd's only concurrent-agent cap is deployment-wide, so a deployment can't cap one model or one bot user.
  • Reviews still running from before this PR keep running until their PR gets another run.

Generated by Coder Agents on behalf of @nickvigilante.

doc-check reviews on the local model took a median of 150 minutes,
because doc-check alone kept about 40 review chats active and each model
step slowed from about 20 seconds to over 200. Most of that load was
wasted: a review kept running after its job stopped waiting, the next
push queued another full review behind it, and a workspace left running
past an hour held an expired GitHub token, so 159 of 244 reviews ended
on a 401.

A new push now cancels the PR's run in progress. A new script stops the
PR's review chat and its sub-agents, drops their queued messages, and
stops the review workspace. The job runs it before the review, so the
review starts on an idle chat and a freshly started workspace, and after
every run, including a cancelled one. The wait drops to 25 minutes, and
a review past it is stopped and fails the job.

Refs DOCS-1478
@linear-code

linear-code Bot commented Nov 3, 2026

Copy link
Copy Markdown

DOCS-1478

@nickvigilante

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review

coder-agents-review Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Chat: Review posted | View chat
Requested: 2026-11-03 23:51 UTC by @nickvigilante
Spend: $35.02 / $100.00

Review history
  • R1 (2026-11-03): 12 reviewers, 6 Nit, 2 P2, 7 P3, 13 P4, COMMENT. Review
  • R2 (2026-11-03), 6 Nit, 2 P2, 7 P3, 13 P4, COMMENT. Review
  • R3 (2026-11-03): 10 reviewers, 9 Nit, 2 P2, 10 P3, 22 P4, COMMENT. Review
  • R4 (2026-11-03), 9 Nit, 2 P2, 10 P3, 22 P4, COMMENT. Review

deep-review v0.13.0 | Round 4 | bc5dd20..bf1aa8b

Last posted: Round 4, 43 findings (2 P2, 10 P3, 22 P4, 9 Nit), COMMENT. Review

Finding inventory

Finding inventory: PR #31720

Findings

# Sev Status Location Summary Round Reviewer Posted
CRF-1 P3 Author fixed (5a270bc) doc-check.yaml:62 cancel-in-progress cancels a label-forced review; the push run may skip review on nodocs PRs R1 Netero Yes
CRF-2 P4 Author fixed (5a270bc) doc-check-stop-review.sh:175 Failed workspace lookup prints no warning R1 Netero Yes
CRF-3 P4 Author fixed (5a270bc) doc-check-stop-review.sh:53 clear_queue swallows read and delete failures silently R1 Netero Yes
CRF-4 P4 Author contested; panel closed R3 (1/1 accept) doc-check-stop-review.sh:147 CR strip handles input that cannot occur R1 Netero Yes
CRF-5 P4 Author fixed (5a270bc) doc-check-stop-review.test.sh:246 Four warning branches have no test case R1 Netero Yes
CRF-6 P4 Author contested; panel closed R3 (1/1 accept, refactor moved to out of scope CRF-49) doc-check-stop-review.sh:174 Exact-name workspace lookup duplicated in three places R1 Netero Yes
CRF-7 Nit Author fixed (5a270bc) doc-check.yaml:153 ci_docs omits doc-check-stop-review.test.sh R1 Netero Yes
CRF-8 Note Note (body) doc-check.yaml test-go-pg CI failures are unrelated to this diff R1 Netero No
CRF-9 P2 Author fixed (5a270bc) doc-check.yaml:61 Dispatch and pull_request runs for one PR are in different groups and now stop each other's review; the interrupted run goes green with no review R1 Mafuuu P2, Takumi P3, Hisoka P3, Mafu-san P3, Meruem P3, Leorio P3 Yes
CRF-10 P2 Open (re-raised R3: both dogfood runs ran 38970da, not 5a270bc) doc-check.yaml:56 Cancel ordering, deployed interrupt behavior, and fresh-token claim never run end to end R1 Mafu-san P2, Leorio P3 Yes
CRF-11 P3 Author fixed (5a270bc) doc-check-stop-review.sh:124 stop_workspace reports a failed or canceled stop build as "Stopped" R1 Meruem, Leorio, Chopper Yes
CRF-12 P3 Author contested; panel closed R3 (3/3 accept; stale-tree half fixed in 5a270bc) doc-check-stop-review.sh:62 paused omitted from any_active and stale tree checked after clear_queue; a restarted chat is reported stopped R1 Gon P3, Melody P4, Bisky P4 Yes
CRF-13 P3 Author fixed (5a270bc) doc-check-stop-review.sh:37 curl has no --max-time; one hung request blocks cleanup until the job or cancel limit R1 Meruem Yes
CRF-14 P3 Deferred (DOCS-1480) doc-check.yaml:490 No bound on concurrent reviews across PRs; a burst past the model's knee times out every review R1 Pariston Yes
CRF-15 P3 Author fixed (5a270bc) doc-check-stop-review.test.sh:110 Fake API finishes transitions on the next read, so no case proves the script waits R1 Bisky Yes
CRF-16 P3 Author fixed (PR description: sets are distinct) doc-check.yaml:490 Two different measurement sets share the count 159 without saying how they relate R1 Mafu-san Yes
CRF-17 P4 Author fixed (5a270bc) doc-check-stop-review.sh:96 requires_action chat back in running waits a full 60 s round before the second interrupt R1 Takumi Yes
CRF-18 P4 Author contested; panel closed R3 (2/2 accept) doc-check-stop-review.sh:178 Script stops workspaces found by chat workspace_id, but Prepare restarts only the one found by name R1 Meruem P4, Melody Note Yes
CRF-19 P4 Author fixed (5a270bc) doc-check-stop-review.test.sh:262 archived-chat case and archived filters cover a state the list endpoint does not return R1 Bisky Yes
CRF-20 P4 Author fixed (5a270bc) doc-check.yaml:490 A review stopped at the wait fails the check with no step summary R1 Chopper Yes
CRF-21 P4 Author fixed (5a270bc) doc-check-stop-review.sh:142 Build-timeout warning names the workspace by ID, other lines by name R1 Chopper P4, Gon Nit, Leorio Nit Yes
CRF-22 P4 Author fixed (5a270bc) doc-check-stop-review.sh:6 Script header repeats the callers' rationale and describes history R1 Gon Yes
CRF-23 P4 Author fixed (5a270bc) doc-check-stop-review.sh:70 Interrupt round bound is an unnamed literal in two places R1 Gon Yes
CRF-24 P4 Author fixed (5a270bc) doc-check-stop-review.sh:53 limit=1 reads as a queue limit; the full queue comes back on any uncursored read R1 Gon Yes
CRF-25 Nit Author fixed (5a270bc) doc-check-stop-review.sh:60 Comments say "generating" for a predicate that also matches requires_action and interrupting R1 Gon Yes
CRF-26 Nit Author fixed (5a270bc) doc-check-stop-review.test.sh:2 Test header restates setup and omits that no CI job runs it R1 Gon Yes
CRF-27 Nit Author fixed (5a270bc) doc-check.yaml:268 Two steps run the same script under different names; checkout step uses a third R1 Gon Yes
CRF-28 Nit Author fixed (5a270bc) doc-check-stop-review.test.sh:131 run_case calls its jq-expression argument STATE_JSON R1 Gon Yes
CRF-29 Nit Author fixed (5a270bc) doc-check.yaml:489 Comment says about 15 minutes; description says median 13 R1 Mafu-san Yes
CRF-30 Note Note (body) doc-check.yaml:499 Cleanup worst case (about 360 s) exceeds GitHub's 5-minute limit for always() steps after a cancel R1 Takumi No
CRF-31 Note Note (body) doc-check.yaml:256 Job now runs a checked-out script with the session token; no new capability for same-repo PRs R1 Kurapika No
CRF-32 Note Dropped by orchestrator (confirmation, asks no change) doc-check-stop-review.sh:160 Chat lookup scoped to bot-owned chats R1 Kurapika No
CRF-33 Note Dropped by orchestrator (confirmation, asks no change) doc-check-stop-review.test.sh:184 Test claims and five breaks reproduced R1 Mafu-san No
CRF-34 Note Dropped by orchestrator (confirmation, asks no change) doc-check-stop-review.sh:65 chatd statements in script match repo code R1 Mafu-san No
CRF-35 P2 Dropped by orchestrator (comment states what each constant bounds, which the code does not show) doc-check-stop-review.sh:24 Polling comment multiplies constants R1 Gon No
CRF-36 P2 Dropped by orchestrator (sentence names both sources at once; no consequence) doc-check-stop-review.sh:172 First comment sentence restates jq lines R1 Gon No
CRF-37 P2 Dropped by orchestrator (one redundant clause in an otherwise rationale comment) doc-check.yaml:497 Comment restates step name R1 Gon No
CRF-38 P2 Dropped by orchestrator (section divider in a long test file; no consequence) doc-check-stop-review.test.sh:182 "--- Cases ---" carries no information R1 Gon No
CRF-39 P2 Dropped by orchestrator (subsumed by CRF-4, which removes the case and comment) doc-check-stop-review.test.sh:281 CR comment repeats script and case name R1 Gon No
CRF-40 P4 Dropped by orchestrator (22 is curl's documented --fail code inside a fake curl) doc-check-stop-review.test.sh:51 exit 22 unexplained R1 Gon No
CRF-41 OOS Out of scope (body) doc-check.yaml:215 Dispatch URL check accepts any owner/repo but workspace name uses only the PR number R1 Kurapika No
CRF-42 OOS Out of scope (body) .github/workflows/test-*.sh No CI job runs the repo's shell test scripts R1 Bisky No
CRF-43 OOS Out of scope (body) coderd/x/chatd/agentadmission.go:12 chatd agent cap is deployment-wide and fixed, not per model or user R1 Pariston No
CRF-44 OOS Out of scope (body) coder-workflow-bot template Workspace mints its GitHub token once at startup R1 Pariston No
CRF-45 OOS Out of scope (body) doc-check.yaml:352 Workspace start wait duplicates the 180-second budget inline R1 Gon No
CRF-46 OOS Out of scope (body) doc-check.yaml:342 Prepare step prints "usable" for a failed stop or start build R1 Meruem No
CRF-47 P4 Dropped by orchestrator (GitHub docs: concurrency group names are case insensitive, so a mixed-case pr_url shares the group) doc-check.yaml:63 Mixed-case dispatch URL puts the run in a separate group R3 Netero No
CRF-48 P4 Open doc-check.yaml:520 Step summary hard-codes "25 minutes", repeating wait-timeout-seconds R3 Netero Yes
CRF-49 OOS Out of scope (body) doc-check.yaml:304 Exact-name doc-check-pr-N lookup in three places (CRF-6 refactor, no ticket) R3 Netero No
CRF-50 P3 Open doc-check-stop-review.sh:18 Comment claims a 5-minute bound; poll counts exclude request time and multiply per chat and workspace R3 Gon P3, Meruem P4, Leorio P4, Mafu-san P4 Yes
CRF-51 P3 Open doc-check-stop-review.sh:147 stop/failed or stop/canceled left by an earlier run warns but is never retried R3 Chopper P3, Meruem P4 Yes
CRF-52 P4 Open doc-check.yaml:520 Timeout summary says the job stopped the review even when the script warned it did not R3 Leorio, Mafuuu Yes
CRF-53 P4 Open doc-check.yaml:64 A push cancels a forced dispatch review on a nodocs PR and the push run skips R3 Mafuuu Yes
CRF-54 P4 Open doc-check-stop-review.sh:175 Dispatch for another repo's PR with the same number stops this repo's running review workspace R3 Mafuuu Yes
CRF-55 P4 Open doc-check.yaml:173 Label now forces a review on every push, but user-facing text describes a one-time review R3 Kite Yes
CRF-56 P4 Open doc-check-stop-review.test.sh:78 Fake promotes a paused chat on any delete; real path deletes a promoted row and warns on 404 R3 Bisky Yes
CRF-57 P4 Open doc-check-stop-review.test.sh:244 Interrupt-spacing check aborts the suite under errexit when grep matches nothing R3 Bisky Yes
CRF-58 P4 Open doc-check.yaml:275 timeout-minutes 6 on both cleanup steps has no stated tie to the script's bounds R3 Gon Yes
CRF-59 P4 Open doc-check-stop-review.sh:148 Failed-build warning is not a sentence and omits the consequence R3 Leorio Yes
CRF-60 P3 Open doc-check.yaml:495 13-minute unloaded median has no derivation; decision-log numbers give 5 to 11 minutes R3 Mafu-san Yes
CRF-61 Nit Open doc-check-stop-review.test.sh:243 Test comment "not the end of a wait" describes the round 1 stop_chat R3 Gon (P2, downgraded: no behavior consequence) Yes
CRF-62 Nit Open doc-check-stop-review.sh:121 name="$1" holds the workspace ID until the first read R3 Gon Yes
CRF-63 Nit Open doc-check.yaml:57 Concurrency comment says "new commit", but a labeled run brings no new commit R3 Kite (Note) Yes
CRF-64 Note Dropped by orchestrator (praise and a local mise trust setting, asks no PR change) doc-check-stop-review.test.sh:27 Fake holds waits; test needs MISE_TRUSTED_CONFIG_PATHS locally R3 Kite No
CRF-65 OOS Out of scope (body) doc-check.yaml:50 doc-check label on a merged PR runs a review and can recreate a deleted workspace R3 Kite No

Contested and acknowledged

CRF-4 (P4, doc-check-stop-review.sh:147) - CR strip handles input that cannot occur

  • Finding: Netero proposed removing the carriage-return strip on PR_URL, its comment, and the crlf-pr-url case, because PR_URL is built on ubuntu-latest from html_url or the validated dispatch input and cannot end in \r.
  • Author defense: The repository owner's policy is that parsers tolerate CRLF input and test it; the strip costs one line and keeps the script safe if the URL comes from another source.
  • Panel closure (R3, 1/1): Netero, the agent that raised it, accepted: keeping the strip costs one line and one case for input the workflow does not produce, and no behavior breaks.

CRF-6 (P4, doc-check-stop-review.sh:174) - Exact-name workspace lookup duplicated in three places

  • Finding: Netero proposed sharing one exact-name workspace lookup between the script, Prepare the review workspace, and delete-workspace.
  • Author defense: The other two lookups are in steps this PR does not otherwise touch; moving them widens the diff past the load fix. Left for a separate change (no ticket).
  • Panel closure (R3, 1/1): Netero, the agent that raised it, accepted that sharing the lookup means moving two older inline steps into .github/scripts, and moved that refactor to the out-of-scope list for a human decision (CRF-49).

CRF-12 (P3, doc-check-stop-review.sh:62) - paused chat reported stopped

  • Finding: Re-read the tree after clear_queue before any_active, and add paused to any_active.
  • Author defense (partial): stop_chat now re-reads the tree on every poll and interrupts any running chat, with a paused-chat case. paused stays out of any_active, because a paused chat is not generating and cannot be interrupted.
  • Panel closure (R3, 3/3): Gon, Melody, and Bisky, the agents that raised it, verified the re-read on poll 0 and accepted leaving paused out: a paused chat generates nothing, Interrupt has no case for the paused state, and only the bot's token can edit the queued message. Bisky's new finding CRF-56 covers the fake's paused model.

CRF-14 (P3, doc-check.yaml:490) - No bound on concurrent reviews across PRs

  • Finding: Count running doc-check chats before sending the prompt and skip above a threshold.
  • Author defense: Agreed; the threshold depends on post-PR concurrency, so it is measured first. Do not re-evaluate. Tracked in DOCS-1480.

CRF-18 (P4, doc-check-stop-review.sh:178) - Prepare restarts only the workspace found by name

  • Finding: The script stops workspaces found by each chat's workspace_id and by the name doc-check-pr-N, but Prepare the review workspace starts only the named one. Proposed: write stopped IDs to GITHUB_OUTPUT and start those.
  • Author defense: On dogfood the chat created doc-check-bot/doc-check-pr-31720, and the prompt tells a review to call start_workspace on a stopped (not dormant) workspace, so a differently named workspace costs a few model steps, not a failed review.
  • Panel closure (R3, 2/2): Meruem and Melody, the agents that raised it, accepted. chatd tells the model to start a stopped workspace (coderd/x/chatd/prompt.go:58, coderd/x/chatd/chatd.go:114), and that start runs the startup script, so the token is fresh; the cost is one tool error and one start_workspace call.

Round log

Round 1

Netero first pass: 1 P3, 5 P4, 1 Nit, 1 Note. No P0, panel proceeds. Law not run (effective additions 522).
Round type: round 1, full panel. Multi-domain (bash plus GitHub Actions YAML, session-token handling and shell-out), target 9-12. Specialists: Kurapika (secrets, token in CI), Melody (script to Coder API wire format), Takumi (cancellation, always() cleanup, polling). Core: Pariston, Mafuuu. Pool: Bisky (tests), Hisoka, Mafu-san, Gon, Leorio, Chopper. Wildcard (random from distilled set): Meruem.
Panel: 2 P2, 6 P3 (plus Netero P3), 8 P4 (plus Netero 5), 5 Nit (plus Netero 1), 2 Note (body), 9 dropped, 6 out of scope. Reviewed against bc5dd20..38970da.
Cross-check: CRF-9 convergent across six reviewers, set to P2 (Mafuuu, higher wins). CRF-10 kept at P2: keep argument (three unobserved mechanisms decide whether the PR meets its goal) outweighs the draft-status argument. GitHub docs confirm always() steps keep running after a cancel, force-terminated at 5 minutes (CRF-30). Gon's comment findings rated P2 downgraded to P4/Nit or dropped: no behavior consequence.

Round 2 update

BLOCKED. CRF-14 deferred without a ticket ("planned as a follow-up", no issue linked). No review. Churn guard: 24 addressed, 1 acknowledged (CRF-18), 2 contested (CRF-4, CRF-6), 1 deferred without ticket (CRF-14). Status cells unchanged until the panel runs. Head: 5a270bc.

Round 3

Churn guard PROCEED: CRF-14 now tracked in DOCS-1480. Head unchanged (5a270bc). Round type: fix round. Since the last panel round (R1, 38970da) no files were added or renamed, no PR goal changed, effective additions grew 117; stop_chat and stop_workspace were rewritten, but every change traces to a round 1 finding, so this is not a restructure. Netero reused its R1 agent (CRF-4, CRF-6 contested): both closed 1/1; new CRF-48 P4; CRF-47 dropped (GitHub docs: concurrency group names are case insensitive). Panel: dispute check-in reusing R1 agents for Meruem and Melody (CRF-18) and Gon, Melody, Bisky (CRF-12 partial contest). New agents: Takumi (stop_chat poll rewrite, CRF-13/17 fixes), Chopper (CRF-11/20/21 messages and summary), Leorio (mandatory: error messages and comments changed), Mafuuu (CRF-9 concurrency fix), Mafu-san (CRF-10/16 verification claims in PR text). Gon mandatory (comments touched). Wildcard (random): Kite.
Panel: Takumi no findings (CRF-9, CRF-17 verified). Fixes verified by reviewers: CRF-1, 2, 3, 5, 7 (Netero), 9 (Mafuuu, Meruem, Takumi), 11 (Meruem, Chopper, Leorio), 13 (Meruem), 15, 19 (Bisky), 17 (Takumi), 20, 21 (Chopper), 21 to 28 (Gon). CRF-10 re-raised: GitHub API (unauthenticated) returns head_sha 38970da for runs 41729412601 and 41731313388; 5a270bc committed 23:03:21Z after both. New: 3 P3, 9 P4 (plus Netero CRF-48), 3 Nit, 1 dropped, 1 out of scope. CRF-50 convergent at Gon's P3 (higher wins). CRF-51 at Chopper's P3 (reproduced). Gon's CRF-61 P2 downgraded to Nit: keep argument (a stale comment hides which wait the check rules out) loses to no behavior consequence. Reviewed against 38970da..5a270bc.

Round 4 update

BLOCKED. CRF-10 silent: the R3 re-raise (runs tested 38970da) has no author reply, its thread was resolved without a response, and Testing still cites only runs 41729412601 and 41731313388 with no tested SHA. No review. Churn guard: 15 of 16 open findings addressed in bf1aa8b (CRF-48, 50 to 63), status cells unchanged until the panel verifies. Head: bf1aa8b.

About deep-review

CRF = Coder Review Finding (P0-P4, Nit, Note)

Reviewer Focus
Bisky tests
Chopper ops/errors
Churn-guard change verification
Ging language modernization
Gon naming
Hisoka edge cases
Killua perf
Kite change integrity
Knov contracts
Knuckle SQL
Komugi flake/determinism
Kurapika security
Law decomposition
Leorio docs
Luffy product
Mafu-san process
Mafuuu contracts
Melody dispatch/pairing
Meruem structural
Nami frontend
Netero mechanical checks
Pariston premise testing
Pen-botter product gaps
Razor verification
Robin duplication
Ryosuke Go arch
Takumi concurrency
Zoro shape

🤖 Managed by Coder Agents.

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds a script that stops a PR's doc-check chat, sub-agents, and workspace before and after each run, sets cancel-in-progress: true, and cuts the wait to 25 minutes. Findings: 2 P2, 7 P3, 13 P4, 6 Nit.

Out of scope (needs a ticket or explicit acceptance by a human):

  • .github/workflows/doc-check.yaml:215: the dispatch URL check accepts any owner/repo, but the workspace name uses only the PR number, so a dispatch for other/repo/pull/123 starts, and now also stops, the workspace of coder/coder PR 123.
  • .github/workflows/test-*.sh: no CI job runs the repository's shell test scripts, including this PR's, so each one stops matching the code it tests without anyone seeing a failure.
  • coderd/x/chatd/agentadmission.go:12: chatd's only concurrent-agent cap is deployment-wide and fixed (5 root, 10 sub-agent slots, or off), so a deployment cannot cap one model or one bot user.
  • coder-workflow-bot template (not in this repository): the workspace mints its GitHub installation token once at startup, so any session past one hour gets 401s.
  • .github/workflows/doc-check.yaml:352: the workspace start wait repeats the same 180-second budget inline (seq 36, sleep 5), so a change to the script's budget leaves this one unchanged.
  • .github/workflows/doc-check.yaml:342: Prepare the review workspace starts the workspace only for stop/stopped and prints "Workspace state is usable." for a failed stop or start build, so the review runs on a workspace whose last build failed.

Notes:

  • The test-go-pg and test-go-pg-17 failures are not caused by this diff; .github/actions/test-go-pg/action.yaml references none of the changed files.
  • The cleanup step's worst case (3 interrupt rounds of 60 s plus a 180 s workspace wait, about 360 s) is longer than the 5 minutes GitHub gives always() steps after a cancel. The newer run's Stop the previous review repeats the stop, so the result is a force-terminated step in the cancelled run's log.
  • The job now runs a checked-out script with DOC_CHECK_CODER_SESSION_TOKEN. For same-repository pull_request runs the PR author already controls the workflow file at the same ref, so this adds no new capability.

🤖 This review was automatically generated with Coder Agents.

Comment thread .github/workflows/doc-check.yaml Resolved
Comment thread .github/workflows/doc-check.yaml Resolved
Comment thread .github/workflows/doc-check.yaml Resolved
Key the concurrency group on the PR URL, so a manual run and a pull
request run for one PR cancel each other instead of stopping each
other's review. Keep forcing a review while the PR has the doc-check
label, because a push now cancels the labeled run.

In the script, interrupt again on the next poll, re-read chats after
dropping their queues, warn on every failed request, give each request
a 30-second limit, and treat only a stopped build as stopped: a failed
start gets a stop, and a failed stop warns. Bound both cleanup steps,
and say in the step summary when a review is stopped at the wait.

Cover each warning branch, failed builds, and paused chats in the test,
and keep transitions in the fake API for two reads, so the cases show
that the script waits for them.

Refs DOCS-1478
@nickvigilante

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review of 5a270bc. The author replied to every round 1 finding, and the commit addresses most of them. One finding is deferred with no ticket, so this round's review is blocked until it is resolved:

  • No bound on concurrent reviews across PRs (.github/workflows/doc-check.yaml:496). The reply says the cap is planned as a follow-up, once the post-PR concurrency is measured, but no issue is linked; DOCS-1478 is this PR's own ticket. This needs a human decision: link a ticket for the cap, or state that shipping without one is accepted, given that a burst of PRs past the model's slow-down point gives zero finished reviews.

The panel reviews the new commit, including the two contested findings and the acknowledged one, after this is resolved.

🤖 This review was automatically generated with Coder Agents.

@nickvigilante

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review of 5a270bc, which responds to round 1. Most round 1 findings are fixed, and reviewers confirmed the fixes in the code and tests. The carriage-return strip, the shared workspace lookup, the workspace restart by name, and leaving paused out of any_active are accepted as defended, and the concurrency cap is tracked in DOCS-1480. The end-to-end testing finding is reopened, because both dogfood runs ran 38970da, not this head. New findings: 3 P3, 9 P4, 3 Nit.

Out of scope (needs a ticket or explicit acceptance by a human):

  • .github/workflows/doc-check.yaml:304: the exact-name doc-check-pr-<N> lookup exists in Prepare the review workspace, delete-workspace, and doc-check-stop-review.sh, so a rename that misses one copy makes that lookup find no workspace.
  • .github/workflows/doc-check.yaml:220: the dispatch URL check accepts any owner/repo, but the prompt hard-codes coder/coder and the workspace name uses only the PR number, so a dispatch for another repository reviews the wrong PR.
  • .github/workflows/doc-check.yaml:50: a doc-check label added to a merged PR passes the job if and runs a review; if delete-workspace already deleted doc-check-pr-<N>, the review creates a new one that no later event deletes.

🤖 This review was automatically generated with Coder Agents.

Comment thread .github/workflows/doc-check.yaml Resolved
Comment thread .github/workflows/doc-check.yaml Resolved
Comment thread .github/workflows/doc-check.yaml Resolved
Comment thread .github/workflows/doc-check.yaml Resolved
Comment thread .github/workflows/doc-check.yaml Resolved
The stop script now ends within one time budget (STOP_BUDGET_SECONDS,
270 seconds by default) instead of per-loop sleep counts, and caps each
request at the time left. It also stops a workspace whose earlier stop
failed, re-reads a chat's queue after each delete, and looks up the
doc-check-pr-<number> workspace only for this repository's pull requests.

The workflow comments and summaries now match: any run in the group
cancels the one in progress, the label reviews every later push, the
timeout summary no longer repeats the wait or claims the stop worked, and
both cleanup steps say what their 6-minute limit covers.

Refs DOCS-1478
@nickvigilante

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review of bf1aa8b. The commit responds to every round 3 code finding except one. This round's review is blocked until that one gets a response:

  • The end-to-end runs in Testing ran 38970da, not the code under review (.github/workflows/doc-check.yaml:56). Its thread was resolved with no reply, and Testing still cites only runs 41729412601 and 41731313388 without naming the tested commit. Since then, 5a270bc and bf1aa8b rewrote stop_chat and stop_workspace, added the time budget, and moved the concurrency key to the PR URL; none of that has run on GitHub or the deployed Coder, and a manual run overlapping a pull request run has not run at any commit. Response needed: repeat the cancel and timeout runs at the current head (plus one manual run overlapping a pull request run) and name the SHA in Testing, or state in Testing that the runs tested 38970da and list what they do not cover.

The panel reviews bf1aa8b after this is resolved.

🤖 This review was automatically generated with Coder Agents.

This branch has not been deployed

No deployments
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