ci(gates): add filename-policy gate (no monolith naming outside internal/api)#455
Merged
Conversation
…nal/api) Ports seed's check-filename-policy.sh to stem for fleet enforcement parity. The gate fails if any handlers_*.go / jobs_*.go file exists outside internal/api (unless it's the eponymous file of a package named for that token). The handlers_/jobs_ prefixes are meaningful grouping *only* inside the flat internal/api monolith; once a concern is decomposed into a capability package the package name already supplies that context, so the prefix becomes stutter and must be dropped. This locks in the ADR-0011 internal/api strangle discipline: a future decomposition that carries the monolith's grouping prefix forward fails CI instead of silently coupling the vocabulary outward. Green on the current tree (zero handlers_/jobs_ files outside internal/api).
Contributor
License Compliance ReportAll dependencies pass license compliance checksGo Dependencies
npm DependenciesSee full report in workflow artifacts Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0 |
Contributor
License Compliance ReportAll dependencies pass license compliance checksGo Dependencies
npm DependenciesSee full report in workflow artifacts Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0 |
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
Ports seed's
check-filename-policy.shto stem for fleet enforcementparity. The gate fails if any
handlers_*.go/jobs_*.gofile existsoutside
internal/api(unless it is the eponymous file of a package namedfor that token, e.g.
internal/platform/jobs/jobs.go).The
handlers_/jobs_filename prefixes are meaningful grouping onlyinside the flat
internal/apimonolith. Once a concern is decomposed into acapability/leaf package, the package declaration already supplies that
context, so the prefix becomes stutter and must be dropped. This is not a Go
language rule — the toolchain accepts these names — it is an
architecture-consistency gate that keeps the ADR-0011
internal/apistranglehonest: monolith vocabulary stays in the monolith and is dropped on the way
out. (The four leaves landed so far —
ratelimit,sse,tlsutil,cors—already follow this: none carries a
handlers_/jobs_prefix.)Seed already runs this gate; niac gets it in a sibling PR (#831). The gate is
green on the current tree (zero
handlers_/jobs_files outsideinternal/api) and only ever fires when a future decomposition carries theprefix forward.
Linked Issue
Related to #450
Testing Evidence
The new CI step runs after the JSON wire-casing gate, mirroring seed's
ordering.
Security and Release Checklist
code, no behaviour change.
input (no command-injection surface).
executable bit set.