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
.changeset/ci-engine-test-fixes.md
Normal file
10
.changeset/ci-engine-test-fixes.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
"@runfusion/fusion": patch
|
||||
---
|
||||
|
||||
Fix two engine reliability bugs surfaced by CI sharding repair:
|
||||
|
||||
- Self-healing in-review branch rebind now dedups case-variant candidate refs by resolved SHA rather than lowercase name, so two distinct branches sharing a case-insensitive name on case-sensitive filesystems (Linux) are correctly flagged as ambiguous instead of one being silently picked.
|
||||
- CI test sharding: removed the `--` separator between `pnpm test` and `--shard`, which vitest's CLI parser was treating as end-of-flags and turning the shard selector into a positional file filter — silently disabling sharding so every shard ran the full suite. Test shards now run their actual slice.
|
||||
- CI test-shards jobs now check out with `fetch-depth: 0` so engine tests that depend on real git history (merge-base, ref resolution) behave the same on CI as locally.
|
||||
- PR Checks workflow now also runs on push to `main`, so post-merge regressions surface immediately instead of waiting for the next PR.
|
||||
Reference in New Issue
Block a user