fix(ci): harden hygiene gate with local pre-push check - #210
Merged
Conversation
- 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)
|
✅ Deterministic PR hygiene checks passed. |
PR automation (bot-owned)
|
✅ READY
Hygiene✅ Deterministic PR hygiene checks passed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dominant deterministic CI failure across recent PRs (#209 first push, #184/#183 cursor syncs) is
missing_regression_test(src/changed withouttests/). 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) viagit diff(HEAD + working tree + untracked) sobun run check:hygienemirrors CI hygiene/enforce-target.package.json— addscheck:hygieneand wires it as first step ofprepush(fails fast before typecheck/test).HYGIENE_FAILURE_HINTS— appendsLocal: bun run check:hygiene.to actionable hint.PULL_REQUEST_TEMPLATE.mdchecklist adds test gate line;AGENTS.mdCommands listsbun run check:hygiene.SKIPPED macOS/Windows shards are intentional (
changes.cigate) — already documented inci.ymlheader + path-filter comments; no workflow rewrite. Jules pool 3→4 already consistent (verified inagent-maintenance.cjs).Verification
bun run typecheck— passbun test tests/repo-hygiene.test.ts— 12 passnode scripts/check-hygiene.mjson clean tree — ok (EC 0)src/router.tsedit without test — failsmissing_regression_test(EC 1) with local hinttests/dummy.test.ts— ok (EC 0)empty_catchfalse positive fixed via/* fallback */commentsChecklist