Skip to content

fix(ci): harden hygiene gate with local pre-push check - #210

Merged
yansigit merged 3 commits into
devfrom
codex/ci-hygiene-hardening
Sep 2, 2026
Merged

fix(ci): harden hygiene gate with local pre-push check#210
yansigit merged 3 commits into
devfrom
codex/ci-hygiene-hardening

Conversation

@yansigit

@yansigit yansigit commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

Dominant deterministic CI failure across recent PRs (#209 first push, #184/#183 cursor syncs) is missing_regression_test (src/ changed without tests/). The gate correctly auto-drafts, but contributors discover it only after push, costing a full CI cycle.

This PR makes the failure cheap and local (ponytail: minimal diff, reuse, stdlib only, no new deps):

  • scripts/check-hygiene.mjs — local runner reusing .github/scripts/pr-hygiene.cjs (collectDeterministicHygieneFailures + HYGIENE_FAILURE_HINTS) via git diff (HEAD + working tree + untracked) so bun run check:hygiene mirrors CI hygiene/enforce-target.
  • package.json — adds check:hygiene and wires it as first step of prepush (fails fast before typecheck/test).
  • HYGIENE_FAILURE_HINTS — appends Local: bun run check:hygiene. to actionable hint.
  • Docs — PULL_REQUEST_TEMPLATE.md checklist adds test gate line; AGENTS.md Commands lists bun run check:hygiene.

SKIPPED macOS/Windows shards are intentional (changes.ci gate) — already documented in ci.yml header + path-filter comments; no workflow rewrite. Jules pool 3→4 already consistent (verified in agent-maintenance.cjs).

Verification

  • bun run typecheck — pass
  • bun test tests/repo-hygiene.test.ts — 12 pass
  • node scripts/check-hygiene.mjs on clean tree — ok (EC 0)
  • synthetic: src/router.ts edit without test — fails missing_regression_test (EC 1) with local hint
  • synthetic: same edit + untracked tests/dummy.test.ts — ok (EC 0)
  • empty_catch false positive fixed via /* fallback */ comments

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

- add scripts/check-hygiene.mjs reusing pr-hygiene.cjs (stdlib only, no new deps) so contributors catch missing_regression_test locally instead of via CI red
- wire bun run check:hygiene into prepush and package.json, enhance HYGIENE_FAILURE_HINTS with local command hint
- update PULL_REQUEST_TEMPLATE checklist and AGENTS.md commands to surface the gate
- fixes dominant deterministic CI failure (behaviorChanged without test) seen on #209, #184, #183; SKIPPED shard is intentional via changes.ci gate (already documented in ci.yml)
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

PR automation (bot-owned)

  • Class: same-repo-human (same-repo-human)
  • Base: bf70134884c7d40ba97e4295b94c39ab9c48ba0a
  • Head: 240fc30e71799e18805ba3b6a057e3a5ab595fba
  • Action: observed
  • Exact-head gate: BLOCKED (not-mergeable, check-missing, check-not-success)
  • Sensitive paths: .github/scripts/pr-hygiene.cjs, package.json
  • Maintainer auto-merge approval: NO
  • Bot merge evidence: NO
  • Next action: wait for exact-head checks

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

✅ READY

  • all PR quality gates passed.

Hygiene

Deterministic PR hygiene checks passed.

@github-actions
github-actions Bot marked this pull request as draft September 2, 2026 02:52
@github-actions
github-actions Bot marked this pull request as ready for review September 2, 2026 02:53
@yansigit
yansigit merged commit 73bddd9 into dev Sep 2, 2026
32 checks passed
@yansigit
yansigit deleted the codex/ci-hygiene-hardening branch September 2, 2026 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant