Commit 5245a66
ci(language-policy): DRY local Java/Kotlin check via estate reusable (#117)
## Why
PR #105 added the android/** carve-out via **two** mechanisms:
- (a) Prune `android/` from a local `find` step in
`.github/workflows/language-policy.yml`
- (b) Add `.hypatia-baseline.json` with `file_pattern: "android/**"`
The estate-wide reusable at
`hyperpolymath/standards/.github/workflows/governance-reusable.yml`
(called from this repo's `governance.yml`) **already** reads
`.hypatia-baseline.json` and exempts matched paths in its own
`language-policy` job (see `governance-reusable.yml:91-285`).
**(b) alone is sufficient.** (a) is a duplicate that uses the brittle
`find` mechanism the reusable explicitly warns against — `git ls-files`
respects `.gitignore` correctly.
## What this PR does
Removes the local `Check for Java/Kotlin files` step. The neurophone
`.hypatia-baseline.json` carve-out continues to handle the android/**
exemption via the estate-wide reusable.
## Net behaviour change
**Zero.** The local check duplicated the estate check. Both gate on
Java/Kotlin files; both exempt android/** via different mechanisms.
Removing the local check means there's one mechanism instead of two, and
the remaining mechanism is the auditable baseline file.
## Properties preserved
- Kotlin (`.kt`, `.kts`) is still fully banned — by the estate-wide
reusable's `enforce "Java/Kotlin files"` block.
- Non-Android Java (e.g. a stray `Foo.java` at repo root) is still
blocked — same path.
- The `android/**` carve-out is still respected via
`.hypatia-baseline.json`.
## Stale-entry cleanup at end of migration
When the Gossamer migration completes and `android/` is removed, the
baseline entry will become stale. The reusable's `Detect stale baseline
entries` job (`governance-reusable.yml:127+`) will warn. The entry can
be removed in the same PR that deletes `android/` (i.e. sub-PR #9 of the
migration sequence in RFC PR #97).
## Supersedes
- `hyperpolymath/standards#341` (closed) — estate-wide grep change was
redundant given the baseline mechanism already exists.
- `#107` (closed) — same intent as this PR but
pre-#105; rebase would have been a different change.
## Test plan
- [x] Workflow YAML is well-formed (visually verified).
- [ ] CI passes — local language-policy.yml runs without the Java/Kotlin
step; estate-wide reusable runs and exempts android/** via baseline.
- [ ] Negative test: a hypothetical `Foo.java` at repo root would still
trigger the estate-wide `Language / package anti-pattern policy` job
(verified by inspection of `governance-reusable.yml:345` + `enforce()`
at line 310 + `is_exempt()` at line 292).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6a5c79a commit 5245a66
1 file changed
Lines changed: 22 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
105 | 109 | | |
106 | 110 | | |
107 | 111 | | |
| |||
0 commit comments