Skip to content

test(source-control): give the capped-install case a 3s cap - #17282

Merged
kyle-sexton merged 2 commits into
mainfrom
fix/main-red-worktree-create-test
Nov 18, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
fix/main-red-worktree-create-test

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: main went red on a flaky test; this is the fix.

Summary

Main's run 44398915452 failed plugins/source-control/scripts/worktree-create.test.sh in the capped-install case. The 1s cap is timing-sensitive: it reproduced 2 of 30 times at cap 1 and 0 of 30 at cap 3.

Fix

Raise the case's WORKTREE_CREATE_DEPS_CAP_SECONDS from 1 to 3 and its expected warning text to match. The elapsed < 15 assertion still proves the 30s install is cut off. Test-only; the helper is unchanged.

Verification

bash plugins/source-control/scripts/worktree-create.test.sh: 388 assertions, 0 FAIL.

Related

The race came with a1ec2dc (#17170).

🤖 Generated with Claude Code

At a 1s cap the capped-install case fails about 2 runs in 30
on a loaded runner (main run 44398915452); at 3s it failed 0 of 30.
The elapsed bound (<15s) still proves the 30s install is cut.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T21:43:42.320242Z cd85e3c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed a130755e4b6238413a723d64404792d714dca3a4: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

I found no security issues in this PR.

The PR changes two files, and I read every hunk of both:

  • plugins/source-control/scripts/worktree-create.test.sh: one test case for a capped dependency install now sets WORKTREE_CREATE_DEPS_CAP_SECONDS=3 instead of 1. The warning text that case expects changes to match ("did not finish within 3s"). The helper script itself is unchanged.
  • .changes/source-control/fix-main-red-worktree-create-test-c8136663.md: a new changelog fragment marked bump: none.

Neither file matches a trusted path. Nothing here touches a trust control, a token, a secret, a workflow, a plugin manifest or a standing instruction. The PR description matches the diff and holds no embedded instructions.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed a130755e4b6238413a723d64404792d714dca3a4: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

This PR changes only a test. In the capped-install case of plugins/source-control/scripts/worktree-create.test.sh, WORKTREE_CREATE_DEPS_CAP_SECONDS goes from 1 to 3, and the expected warning text changes to did not finish within 3s to match. It also adds a changelog fragment with bump: none.

  • Correctness: The case still tests what it claims to:
    • The fake npm sleeps 30s.
    • elapsed < 15 at worktree-create.test.sh#L1281 still proves the cap cuts the install off. With a 3s cap and a child-reap wait of up to 2s, the margin is wide.
    • The child-PID liveness check is unchanged.
    • The warning-text assertion follows the new input value. It was not edited to fit changed helper code, and the helper itself is untouched.
  • Changelog fragment: bump: none with a non-empty reason is a form the fragment checker accepts (scripts/check-changelog-fragments.sh:8). A test-only change needs no version bump.
  • Loosened checks: None.
    • The changed value is the cap of the product under test, an input. It is not the test's own timeout (kind 8), a lowered threshold, or an assertion edited to match changed code (kind 2).
    • The test still fails if the helper ignores the cap, overruns it a lot, or leaves npm's child running.
  • Closing issue: None. The PR says no related issue, so there are no acceptance criteria to check.
  • Verification: The PR's result (388 assertions, 0 FAIL) and its flake rates (2 of 30 failures at cap 1, 0 of 30 at cap 3) are the author's claims. This lane did not run them.

Loosened-check verdict: fail (default; no loosened_check_verdict/loosened_check_patterns lines in the prompt); patterns: 0. There was no loosened_check_decision_record: line, so the citation requirement was not checked.

Verifier dropped 0 of 0 candidates.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 0c60196 Nov 18, 2026
45 checks passed
@kyle-sexton
kyle-sexton deleted the fix/main-red-worktree-create-test branch November 18, 2026 22:23
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant