Commit 431adbb
authored
refactor(governance): subsume language-policy.yml + add deno-ci-reusable (semantics-level fix for estate-template drift) (#168)
## Why
Multiple PRs in the estate inbox are failing on a single bug class:
**per-repo workflow templates copy-drift away from the canonical estate
policy**. The repro that surfaced it was self-inflicted: PR #167 to this
repo failed its own \`Check for Banned Languages\` step because
\`language-policy.yml\` does a naive \`find -name \"*.py\"\` that
bypasses
\`.hypatia-baseline.json\` — even though the file in question is already
acknowledged there.
The same gap appears in absolute-zero, maa-framework, and any other repo
that still ships a local copy of either workflow. Patching each copy
individually treats the symptom; the foundational fix is to delete the
copies and consume a single reusable workflow.
## What changes
| File | Change |
|---|---|
| \`.github/workflows/governance-reusable.yml\` | language-policy job
extended: now also catches Makefiles, Java/Kotlin, Swift, Flutter/Dart,
V-lang manifests, ATS2 sources, and \`package.json\` with runtime
\`\"dependencies\"\`. All go through the existing \`enforce()\` /
\`is_exempt()\` helpers — so every newly-covered check honours
\`.hypatia-baseline.json\`, \`.hypatia-ignore\`, and inline \`#
hypatia:ignore …\` pragmas. |
| \`.github/workflows/language-policy.yml\` | Deleted.
\`governance.yml\` (the thin wrapper) already calls
\`governance-reusable.yml\` via \`workflow_call\`, so estate coverage is
unchanged — but the bug class becomes structurally impossible: the naive
find-based check no longer exists to be drift-copied. |
| \`.github/workflows/deno-ci-reusable.yml\` | **New**. Replaces the
broken \`rescript-deno-ci.yml\` template that's been failing across the
estate. Detects Deno targets/tests/config first and only runs
lint/fmt/test/check when applicable. Declares top-level
\`permissions:\`. Drops the banned \`npx rescript\` step and the
vestigial security-grep job. |
## What was broken in the old \`rescript-deno-ci.yml\`
Observed across absolute-zero #41 and tma-mark2 #41:
* \`deno test --allow-all\` ran unconditionally and exit-1'd on \`No
test modules found\` in repos without Deno tests.
* \`deno lint\` / \`deno fmt --check\` ran unconditionally and exit-1'd
on \`No target files found\` in repos without JS/TS targets.
* Missing top-level \`permissions:\` declaration — tripped
governance-reusable's workflow-security-linter.
* Still ran \`npm install && npx rescript\` even though ReScript was
banned in new code 2026-04-30 (per \`.claude/CLAUDE.md\`).
* Vestigial \`security\` job that grep'd for permission strings and did
nothing with the output.
## Downstream rollout
Each repo carrying \`rescript-deno-ci.yml\` or its own
\`language-policy.yml\` is now eligible to delete its copy and consume
the reusable:
\`\`\`yaml
jobs:
deno-ci:
uses:
hyperpolymath/standards/.github/workflows/deno-ci-reusable.yml@main
\`\`\`
Follow-up PRs will land per-repo against absolute-zero, tma-mark2, etc.
## Relationship to PR #167
#167 patches the tsconfig/rescript-config check in this same file to
honour \`.hypatia-baseline.json\`. This PR is orthogonal: #167 fixes a
single step's exemption logic; this PR consolidates two workflows so the
duplication itself goes away. Either can land first; rebase is trivial.
## Test plan
- [ ] Governance reusable still passes on this PR (its own CI run will
exercise the consolidated language-policy job, including against this
repo's \`a2ml-templates/state-scm-to-v2.py\` baseline entry — which the
reusable already honours).
- [ ] Workflow-security-linter check passes (deno-ci-reusable has SPDX +
top-level \`permissions:\`).
- [ ] Once merged, run a fanout PR converting \`absolute-zero\` +
\`tma-mark2\` to the wrappers and confirm green.1 parent 91d8b88 commit 431adbb
3 files changed
Lines changed: 151 additions & 193 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
304 | | - | |
305 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
306 | 307 | | |
307 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
308 | 323 | | |
309 | 324 | | |
310 | 325 | | |
311 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
312 | 333 | | |
313 | 334 | | |
314 | 335 | | |
| |||
340 | 361 | | |
341 | 362 | | |
342 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
343 | 373 | | |
344 | 374 | | |
345 | 375 | | |
| |||
This file was deleted.
0 commit comments