Skip to content

fix(ci): validate complete event commit ranges on young repositories - #414

Merged
stackbilt-admin merged 4 commits into
mainfrom
fix/issue-409-complete-commit-range
Nov 2, 2026
Merged

stackbilt-admin merged 4 commits into
mainfrom
fix/issue-409-complete-commit-range

Conversation

@stackbilt-admin

Copy link
Copy Markdown
Member

Generated governance CI previously guessed a recent range, allowing early PR commits to escape validation and constructing an invalid HEAD~N boundary on young synthetic merge histories. Resolve the event's full base/head SHA range once and pass it to both validate and audit; PRs exclude GitHub's temporary merge, pushes cover all event commits. Initial pushes/manual runs check all reachable event-head history, deleted events are skipped, and malformed or unavailable event SHAs fail visibly instead of selecting a smaller range. Local convenience fallback now counts first parents so its boundary exists; explicit user ranges and trailer policy are unchanged.

Closes #409.

Depends on reviewed PR #405 (pnpm packageManager handling). This branch includes its prerequisite commit 7025a32; its main-targeted PR runs repository CI. The nine issue-only files and the combined npm/pnpm pinned/unpinned template hashes are tested together. No merge or force-push performed.

Validation: Windows Node 24.19.0 / pnpm 9.15.9, isolated worktree.

  • pnpm install --frozen-lockfile: passed.
  • pnpm run build, pnpm run typecheck: passed.
  • pnpm exec vitest run packages/cli/src/__tests__/workflow-mcp-backup.test.ts packages/cli/src/__tests__/setup.test.ts packages/cli/src/__tests__/github-commit-range.test.ts packages/cli/src/__tests__/git-helpers.test.ts packages/cli/src/__tests__/validate-per-commit.test.ts: 135/135 passed. Includes actual Bash resolver execution in real Git graphs, seven-commit PR and eight-commit push coverage, young merges, initial/manual runs, empty/single-commit histories, bad/missing SHAs, explicit bad ranges, and generated workflow history/idempotence.
  • pnpm run docs:check: passed (optional missing local doc-sync config skipped, papers lint passed).
  • Full pnpm run test: 1,961 passed, four failed / 1,965. Failures match the existing Windows baseline: bootstrap POSIX-path premise, context-refresh and serve-context path separators, and Ctrl-D fake-TTY behavior. Full log: .cache-409-full-tests.log in the issue worktree.
  • git diff --check, LF preservation across all nine issue-only files, smart-commit TypeScript and ADF evidence gates: passed.

Main CI's dependency audit remains an external blocker, addressed separately in PR #404 and the approved Zod-major migration #310. No audit suppression, governance policy relaxation, publication, deployment, production data changes, or remote branch deletion.

@stackbilt-admin
stackbilt-admin marked this pull request as ready for review November 2, 2026 18:18
@stackbilt-admin
stackbilt-admin merged commit b62f41c into main Nov 2, 2026
7 checks passed
@stackbilt-admin
stackbilt-admin deleted the fix/issue-409-complete-commit-range branch November 27, 2026 23:55
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.

validate and audit default range misses commits and fails on young repositories' pull requests

2 participants