Repository navigation
fix(baseline): Hold review:claude until the ask record settles on every path - #42
Merged
Merged
Conversation
…ry path askCopilotOnce returns true The settle wait of #23 covered only a failed request. A read-back that errors or finds the head moved returned true about 5 s after the request, so review:claude could be added while Claude Review still skipped a record that young and a later run stripped the label. Refs #40 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The moved-head fixture lacks a valid moved commit, causing an early return before labeling and leaving the label-age assertions unexercised.
1 open issue
What changed in this PR
This PR extends the Baseline’s Copilot settle wait to read-back errors and head changes, preventing those early exits from triggering Claude fallback prematurely. It also updates the Factory’s workflow copy; Applications receive the change through a Rollout.
Changes:
- Shares the capped settle-wait helper across all three early-exit paths.
- Adds timing tests for read-back errors, moved heads, and registered requests, plus an upper bound on the failed-request wait.
- Corrects the workflow header’s description of fallback timing.
| File | Description |
|---|---|
.github/workflows/pr-automerge.yml |
Synchronizes the Factory’s workflow with the Template fix. |
.claude/skills/repo-ci-baseline/template/owned/.github/workflows/pr-automerge.yml |
Adds shared settle waits and updates timing documentation. |
.claude/skills/repo-ci-baseline/template/owned/.github/scripts/tests/pr-automerge.test.mjs |
Adds head-change simulation and settle-wait timing assertions. |
Review effort: Balanced
… the label The moved head wasn't in the commit graph, so the caller stopped on the merge check and never added review:claude; the label-age assertions checked nothing. Refs #40 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mpaulosky
added a commit
to mpaulosky/TicketManager
that referenced
this pull request
Nov 10, 2026
## Why Re-Apply the repo-ci-baseline Template so this repo carries the Template changes from mpaulosky/Application_Factory#36, mpaulosky/Application_Factory#37, mpaulosky/Application_Factory#38 and mpaulosky/Application_Factory#39. ## What changed - `f1d2468` Apply commit, `apply.sh` output alone: brings mpaulosky/Application_Factory#36, mpaulosky/Application_Factory#37, mpaulosky/Application_Factory#38 and mpaulosky/Application_Factory#39. - `.claude/rules/sandcastle-hand-off.md` - `.github/scripts/tests/pr-automerge.test.mjs` - `.github/workflows/lint-actions.yml` - `.github/workflows/pr-automerge.yml` - `.github/workflows/sandcastle.yml` - `.sandcastle/lib/branches.mts` - `.sandcastle/lib/branches.test.mts` - `.sandcastle/lib/review-ledger.mts` - `.sandcastle/lib/review-ledger.test.mts` - `.sandcastle/lib/role-logs.mts` - `.sandcastle/lib/role-logs.test.mts` - `scripts/check-branch-name.sh` - `scripts/tests/check-branch-name.test.sh` ## Verification - The Apply commit is exactly `apply.sh`'s output on a branch up to date with `main`. - The pre-push gate (`scripts/gate.sh`) passed on `f1d2468`. - `427f43e` Apply commit, `apply.sh` output alone: brings mpaulosky/Application_Factory#36, mpaulosky/Application_Factory#37, mpaulosky/Application_Factory#38, mpaulosky/Application_Factory#39, mpaulosky/Application_Factory#41 and mpaulosky/Application_Factory#42. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

Fixes R1, the Critical from the pre-push review of mpaulosky/TicketManager#263 (see #40).
askCopilotOncewaited out the rest ofCOPILOT_ASK_SETTLE_MS(#23) only when the Copilot review request failed. Two other paths returnedtrueabout one poll after the request, with the ask record seconds old: the read-back'scatch, and thebreakwhen the head moved. The caller then addedreview:claude; Claude Review skips a record younger than 30 s and a later PR Auto-Merge run strips the label, so Claude's review waited for another event or sweep.waitOutSettle()(the same wait: the rest of the window, capped byCOPILOT_ASK_WAIT_MS) is called on all three paths. A registered request needs none, and an unregistered one already waited the whole read-back window.review:claude, until the record is 30 s old; a registered request ends the run early. Both new tests fail without the fix. The existing failed-request test now has an upper bound, so removing theCOPILOT_ASK_WAIT_MScap fails it (the run took 30 s); this is R6's missing bound. A record already older than the window is still untested.pr-automerge.ymlis copied over.scripts/gate.shpasses.Still in #40: R3, R5, R6 (the older-record case), R7, R8, R9, R19.
Rollout:
pr-automerge.ymland its test are Owned files, so this reaches the Fleet by a Rollout. TicketManager's re-Apply (#263) is waiting for it and then gets one review run covering both Template fixes.🤖 Generated with Claude Code