Skip to content

fix: close three pre-2.10.0 gaps found by release verification - #851

Merged
admarble merged 1 commit into
mainfrom
fix/pre-2.10.0-release-gaps
Jul 29, 2026
Merged

admarble merged 1 commit into
mainfrom
fix/pre-2.10.0-release-gaps

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Pre-release verification of the 27 unreleased commits since v2.9.0 surfaced three gaps that all ship green today, plus one recurring test-portability bug.

1. The documented glob form never worked under zsh

#838 fixed the script's resolver, but every caller doc still showed the form unquoted. zsh — the default macOS shell — aborts on an unmatched glob before the script runs:

zsh:1: no matches found: feature/838-*

bash passes it through literally, which is why it was never caught. Quoted in the script's own usage text, docs/troubleshooting.md, and all three fullsolve/SKILL.md mirrors.

The rm -rf ...-* line in troubleshooting.md is deliberately left unquoted — that one wants shell expansion.

2. sequant sync never re-pinned .mcp.json

syncSequantMcpPin's contract has named this the update/sync path since #793, but only update.ts called it, so a plain sync left the pin stale. Wired into syncCommand ahead of the "already up to date" fast path, for the reason update.ts documents: a version-only upgrade leaves every template byte-identical and returns early, which is exactly when the pin most needs refreshing.

Verified end to end in a scratch project — dry-run reports without writing, real sync writes, second sync is correctly silent.

sync.test.ts never chdirs, so an unmocked pin call resolved process.cwd() to this repo and rewrote the tracked .mcp.json. Mocked, and covered by two tests that both fail when the pin call is removed.

3. The #838 test never asserted the remote branch delete

Its own header names three consumers of the resolved ref. It asserted gh pr list --head and git branch -D, but not git push origin --delete — the one line still written as:

git push origin --delete "$RESOLVED_BRANCH" 2>/dev/null || true

A regression reintroducing the raw argument there deleted nothing and still printed "Cleanup complete!" at exit 0 — the exact silent-failure class #838 exists to close.

Mutation-verified: the new assertion fails for the shorthand and glob forms and passes for the literal form, where raw and resolved coincide.

4. Hermetic git in the test suite

Four harnesses committed without -c commit.gpgsign=false, so they were green in CI (no signing key) and red for any contributor with commit signing enabled — including all 16 tests of the new #838 file.

That one-liner has been added to main five separate times, each inside an unrelated feature PR whose new test file happened to commit: #528 (45decdc4), #537 (9bb54319), #748 (fd9b67e0), #760 (db0cee47), #803 (54eb6c28) — plus a docs entry (3ae47446, 2026-01-06) documenting the failure. It recurred anyway in #838's and #842's new files.

The per-file convention is itself the recurring bug, and CI structurally cannot catch this class: no signing key, no global config, no hooks. The only detector is a contributor's machine, where the cheapest response is always another one-liner.

So vitest.global-setup.ts now sets GIT_CONFIG_GLOBAL and GIT_CONFIG_SYSTEM to /dev/null. Workers fork after global setup and inherit it. Verified by removing qa-stagnation.test.ts's per-file fix entirely: 26/26 pass on the guard alone.

This also closes sibling leaks nothing defended against — core.hooksPath would run the contributor's hooks inside test repos, core.autocrlf would corrupt fixtures on Windows.

The four per-file calls are kept as defense in depth: they document intent and still work if a file is run outside this vitest config.

Verification

Full suite on a signing-enabled machine: 221 files, 4581 passed, 0 failed (was 34 failed). Build and lint clean. lint:skill-sync 44/44 synced, lint:skill-gates no violations.

Follow-ups filed, not in scope here

#844 wrong-branch deletion · #845 bare parseInt · #846 swallowed install status · #847 npm ci hardcoding · #848 exit-0 on error · #849 state reconciliation · #850 AC parser

Pre-release verification of the 27 unreleased commits since v2.9.0 surfaced
three gaps that all ship green today.

1. The documented glob form never worked under zsh. #838 fixed the script's
   resolver but every caller doc still showed the form UNQUOTED, and zsh (the
   default macOS shell) aborts on an unmatched glob before the script runs:
   "zsh:1: no matches found: feature/838-*". bash passed it through literally,
   which is why it was never caught. Quote it in the script's own usage text,
   docs/troubleshooting.md and all three fullsolve/SKILL.md mirrors. The
   `rm -rf ...-*` line in troubleshooting.md is deliberately left unquoted —
   that one wants shell expansion.

2. `sequant sync` never re-pinned .mcp.json. syncSequantMcpPin's contract has
   named this the `update`/`sync` path since #793, but only update.ts called
   it, so a plain sync left the pin stale. Wired into syncCommand ahead of the
   "already up to date" fast path, for the reason update.ts documents: a
   version-only upgrade leaves every template byte-identical and returns early,
   which is exactly when the pin most needs refreshing.

   sync.test.ts never chdirs, so an unmocked pin call resolved process.cwd() to
   this repo and rewrote the tracked .mcp.json. Mocked, and covered by two
   tests that both fail when the pin call is removed.

3. The #838 test file never asserted the remote branch delete. Its own header
   names three consumers of the resolved ref; it asserted `gh pr list --head`
   and `git branch -D` but not `git push origin --delete` — the one line that
   is still `2>/dev/null || true`. A regression reintroducing the raw argument
   there deleted nothing and still printed "Cleanup complete!" at exit 0, the
   exact silent-failure class #838 exists to close. Verified by mutation: the
   new assertion fails for the shorthand and glob forms and passes for the
   literal form, where raw and resolved coincide.

Also: hermetic git in the test suite. Four harnesses committed without
`-c commit.gpgsign=false`, so they were green in CI (no signing key) and red for
any contributor with commit signing enabled — including all 16 tests of the new
#838 file.

That one-liner has been added to main five separate times, each inside an
unrelated feature PR whose new test file happened to commit: #528 (45decdc),
#537 (9bb5431), #748 (fd9b67e), #760 (db0cee4), #803 (54eb6c2) — plus a
docs entry (3ae4744, 2026-01-06) documenting the failure. It recurred anyway in
#838's and #842's new files. The per-file convention is itself the recurring
bug, and CI structurally cannot catch this class: no signing key, no global
config, no hooks.

So `vitest.global-setup.ts` now sets GIT_CONFIG_GLOBAL and GIT_CONFIG_SYSTEM to
/dev/null. Workers fork after global setup and inherit it. Verified by removing
qa-stagnation.test.ts's per-file fix entirely: 26/26 pass on the guard alone.
This also closes sibling leaks nothing defended against — core.hooksPath would
run the contributor's hooks inside test repos, core.autocrlf would corrupt
fixtures on Windows.

The four per-file calls are kept as defense in depth: they document intent and
still work if a file is run outside this vitest config.

Full suite: 221 files, 4581 passed, 0 failed, on a signing-enabled machine
(was 34 failed).

Entire-Checkpoint: 2c3335696b52
@admarble
admarble merged commit d23b99a into main Jul 29, 2026
8 checks passed
@admarble
admarble deleted the fix/pre-2.10.0-release-gaps branch July 29, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant