fix(ci,engine): repair test sharding, case-variant ambiguity detection, post-merge CI
Test shards 3 and 4 were silently failing on every open PR because vitest's CLI parser was treating `--shard X/Y` as positional file filters whenever the arg arrived after a `--` separator. Removing the `--` in ci-test-shard.mjs restores per-shard slicing; verified locally that shard 1/4 and 2/4 now run distinct subsets. The two consistently-failing engine tests: 1. self-healing in-review-branch-rebind ambiguous case-variant detection: dedup keyed on lowercase branch name collapsed two physically distinct refs (allowed on Linux ext4) into one candidate, so the "applied" path ran instead of "ambiguous-candidates". Dedup now keys on the resolved SHA — macOS APFS still collapses (same ref, same SHA), Linux keeps both (distinct SHAs) and the ambiguity skip path fires as designed. 2. worktree-acquisition resume-misbinding spy: the production verifyResumeBranchNotMisbound returns early when `git merge-base HEAD main` fails, which is exactly what happens on shallow checkouts. Bumping the test-shards checkout to fetch-depth: 0 makes CI mirror the local git state these engine tests rely on. Also adds `push: branches: [main]` to PR Checks so regressions like this (which slipped into v0.33.0 with no post-merge run) go red immediately on landing instead of being discovered on the next PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
10
.github/workflows/pr-checks.yml
vendored
10
.github/workflows/pr-checks.yml
vendored
@@ -3,6 +3,10 @@ name: PR Checks
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
# Also run on every push to main so post-merge regressions surface
|
||||
# immediately instead of being discovered on the next PR.
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
concurrency:
|
||||
group: pr-checks-${{ github.ref }}
|
||||
@@ -69,6 +73,12 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
# Engine tests run real git operations (merge-base against main,
|
||||
# case-variant ref checks) that require full history. Shallow
|
||||
# clones silently break tests like worktree-acquisition's resume
|
||||
# misbinding path.
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node.js and pnpm
|
||||
uses: ./.github/actions/setup-node-pnpm
|
||||
|
||||
Reference in New Issue
Block a user