Skip to content

chore(baseline): Fix the findings from the pre-push review of TicketManager's re-Apply #40

Closed

Description

@mpaulosky

The local pre-push review of TicketManager's re-Apply PR (mpaulosky/TicketManager#263, bringing #36-#39) found these in Owned Template files. Each is fixed in template/owned/ first and reaches the Fleet by a Rollout. None changes TicketManager's PR; R1 was accepted for it so the Rollout could proceed.

Critical

  • R1 .github/workflows/pr-automerge.yml:1807 (askCopilotOnce). The settle wait added for Template: a failed Copilot request inside the 30-second settle window triggers review:claude without the other workflows agreeing #23 runs only when the Copilot review request fails. The read-back catch (lines 1807-1812) and the head-moved break (1802-1804) return true about 5 s after the request, so review:claude can be added while the ask record is younger than COPILOT_ASK_SETTLE_MS. Claude Review then skips (it treats an ask younger than 30 s as Copilot able to review) and a later PR Auto-Merge run strips the label until another event or sweep re-adds it. It needs an API error or a push in the first seconds, and it self-heals. Suggested fix: one shared helper that leaves the record at least COPILOT_ASK_SETTLE_MS old (capped by COPILOT_ASK_WAIT_MS) on every path that returns true, with tests for the read-back error and head-change paths.

Advisory

  • R3 .sandcastle/lib/follow-up.mts:203. The skip reason "its branch name isn't one scripts/check-branch-name.sh accepts" is wrong for a dependabot/* PR since chore(baseline): Let the hook accept dependabot/* so a person can fix a Dependabot PR #37: the script accepts it and isHandOffBranch refuses it. Reword to "its branch name isn't a hand-off branch (feature/, fix/, hotfix/ or chore/)" and update the matching assertion.
  • R4 .github/workflows/pr-automerge.yml:88. The header says a request that fails or doesn't register counts as dropped "at once"; since fix(baseline): Wait out the settle window when the Copilot request fails #25 review:claude is added only after the settle window.
  • R5 .sandcastle/lib/branches.mts:44. The isHandOffBranch comment reads as if a hand-off branch must pass everything the script accepts, and the dependabot/* clause makes the line too wide. Reflow it: a hand-off branch is one the script accepts without --pr, minus dependabot/*.
  • R6 .github/scripts/tests/pr-automerge.test.mjs:1681. Nothing fails if the COPILOT_ASK_WAIT_MS cap on the settle wait is removed: the real-timer test asserts only a lower bound, and the mock-timer test sets the cap equal to the window. Add an upper bound, a case with the cap below the window, and one where the record write outlasts the window.
  • R7 .github/workflows/pr-automerge.yml:304. isCopilotBot has two branches no test reaches, the case-insensitive match and the [bot] suffix strip. Add cases for copilot-pull-request-reviewer[bot], COPILOT and a User named Copilot[bot], or drop the handling.
  • R8 scripts/tests/check-branch-name.test.sh:38. The shell-safe dependabot/* pattern from chore(baseline): Let the hook accept dependabot/* so a person can fix a Dependabot PR #37 has thin boundary tests: add refused cases for dependabot/, dependabot/a/, dependabot//a and a trailing newline, an allowed case with a dot, and a pre-push.test.sh case that pushes a dependabot/... branch.
  • R9 .github/workflows/sandcastle.yml:145. The "Install the skills" step now fetches from the Factory with a new base path and folder list, and an Application has no test for it. Confirm the Factory's tests cover the URL, base path and folder list, or add an extraction test that runs the step against a local bare repository.

Related: #27, #36, #37.

🤖 Generated with Claude Code

Activity

  1. mpaulosky commented on Nov 10, 2026

    @mpaulosky
    OwnerAuthor

    Two more findings from the second review run of mpaulosky/TicketManager#263, both from #37:

    • R11 scripts/check-branch-name.sh:33 (Edge cases, graded Warning). The shell-safe dependabot/ pattern (A-Za-z0-9._- per segment) now applies to the --pr form too, which accepted any dependabot/* before chore(baseline): Let the hook accept dependabot/* so a person can fix a Dependabot PR #37, so ci.yml's Branch name job would refuse a Dependabot branch with another character. The reviewer suspects @ (scoped npm packages) or + (build-metadata versions). All 146 real Dependabot branch names across the Fleet's repos match the pattern, 29 of them ungrouped with versions and pre-release suffixes, but none is an ungrouped scoped npm package, so the @ case is not settled by that data. Suggested fix: keep the --pr form as it was (any dependabot/*) and apply the shell-safe pattern only to the hook form, or confirm Dependabot's naming and widen the class; either way, add allowed and refused tests.
    • R19 docs/PROCESS.md:36. It says the pre-push hook refuses any branch name outside feature, fix, hotfix and chore. Since chore(baseline): Let the hook accept dependabot/* so a person can fix a Dependabot PR #37 the hook also accepts shell-safe dependabot/* names so a person can fix a Dependabot PR. Say so.

    R7 also has a missing-login branch in isCopilotBot that no test reaches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions