Skip to content

[AI:zf-builder] test: add a GitHub Actions CI pipeline to enforce the typecheck, build, and regression-guard test gates - #141

Merged
ntsd merged 5 commits into
mainfrom
task/zf-zs-e6a4b699
Nov 1, 2026
Merged

ntsd merged 5 commits into
mainfrom
task/zf-zs-e6a4b699

Conversation

@ntsd

@ntsd ntsd commented Nov 1, 2026

Copy link
Copy Markdown
Owner

[AI:zf-builder] Task: zf-zs-e6a4b699

Add a GitHub Actions CI pipeline to enforce the typecheck, build, and regression-guard test gates

Automated PR for task zf-zs-e6a4b699

Completed by: @zf-builder

ntsd added 5 commits October 28, 2026 10:12
…d, and regression-guard test gates

Task: zf-zs-e6a4b699

Add a GitHub Actions CI pipeline to enforce the typecheck, build, and regression-guard test gates
…d, and regression-guard test gates

Task: zf-zs-e6a4b699

Add a GitHub Actions CI pipeline to enforce the typecheck, build, and regression-guard test gates

@ntsd ntsd left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[AI:zf-reviewer] [Reviewer Feedback] Round 1: Approved for human review.

Scope: PR adds .github/workflows/ci.yml (57 lines) + a regression guard tests/ci-pipeline.test.mjs (204 lines). Exactly the P1 fix requested — a minimal CI pipeline enforcing the gates that only the locally-installed, bypassable pre-commit hook enforced. No unrelated churn, no drive-by reformatting (Rung 7 clean).

Ponytail 7-Rung checks:

  • No new dependencies. The guard resolves js-yaml via createRequire from the lockfile (transitive dep of astro) instead of adding a devDep — correct call, matches the repo convention of not adding deps for tests.
  • Workflow is minimal: single job, 4 gate steps + checkout/setup-node, least-privilege permissions: contents: read, no matrix/strategy/caching beyond cache: npm.
  • astro check correctly NOT included per the task constraint (@astrojs/check is not a devDep and its install prompt hangs non-interactive shells).
  • The guard test follows the repo's static-source-guard convention: top-level asserts over readFileSync, no framework, re-derives the test-file count instead of hard-coding a stale number.

Gate correctness (cross-checked against .zerofactory/precommit.sh):

  • Triggers: push: branches: [main] + pull_request — matches the task spec.
  • Order: npm ci → npx tsc --noEmit → npm run build → npm test, mirroring the pre-commit hook (typecheck before build, tests last).
  • node-version: 22 satisfies engines.node >= 22.18 (tracks latest 22.x patch); the guard cross-references the major against the package.json floor.
  • Guard cross-references scripts.build against astro build and scripts.test against node --test "tests/*.test.mjs", so a future stub-swap of the package.json scripts fails CI. Good depth without over-engineering.

Verified in workspace (all green):

  • npx tsc --noEmit — pass
  • npm run build (astro build) — pass, 2 pages built
  • npm test — 66/66 pass, including the new tests/ci-pipeline.test.mjs (also passes in isolation)
  • npm run lint (prettier --check + eslint) — pass
  • package-lock.json present, so npm ci will work in CI
  • PR is MERGEABLE against main; no existing review rounds on this commit

GOTCHA: In zero-share CI/workflow regression guards, js-yaml is only a transitive dep of astro — resolve it via createRequire(import.meta.url) rather than adding a direct devDep; also the on: key parses as YAML-boolean true under js-yaml (YAML 1.1), so normalize with workflow.on ?? workflow[true] before trigger assertions.

@ntsd
ntsd merged commit a4d4ecd into main Nov 1, 2026
1 check passed
@ntsd
ntsd deleted the task/zf-zs-e6a4b699 branch November 1, 2026 19:24
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