Repository navigation
Description
Problem
ADR-0043 decides: "Core checks presence, not versions. The organization gate verifies that an enabled Go repository has mise.toml, mise.lock, and the three targets; it never reads or compares a version." Nothing implements it. scripts/check-organization.mjs (via scripts/lib/organization-validation.mjs) validates only this repository's organization/ tree; .github/workflows/ci.yml has no job that looks at a fleet repository. A repository that drops the convention today fails a worker's lease (make lint → "provision every pinned tool with: mise install"), not core's gate — Snowcat's rollout plan Phase 6, item 3, observed 2026-08-24.
All seven fleet_state: enabled declarations currently conform (std, clix, updex, firn, snowcat, core, snowcat-cockpit), so the first run must be green.
Change
- Add
scripts/check-fleet-conventions.mjs. For every declaration underorganization/repositories/**withfleet_state: "enabled", read the repository's default-branch head through the GitHub REST contents API (fetch; sendAuthorization: Bearer $GITHUB_TOKENwhen the variable is set, unauthenticated otherwise — all fleet repositories are public) and require:mise.tomlandmise.lockpresent and parseable (TOML: a[tools]table exists inmise.toml;mise.lockis non-empty) — presence only, never a version compare.- A Go repository (
go.modpresent): aMakefilewhose targets includeverify,check, andci(match^verify:,^check:,^ci:at line start). - A Node repository (
package.jsonpresent, nogo.mod):package.jsonscripts.verifyandscripts.checkpresent.
Print one line per repository (ok frostyard/std/FAIL frostyard/x: mise.lock missing) and exit non-zero on any failure. A network or API error is a failure that names the repository and status, never a skip. Take the fetch function as an injectable parameter so a unit test can drive it.
test/fleet-conventions.test.mjs: with a fake fetcher, prove (a) a conformant Go repo and a conformant Node repo pass, (b) a repo missingmise.lockfails namingmise.lock, (c) a Makefile lackingverify:fails naming the target, (d) a disabled declaration is not fetched.package.json: add"check:fleet": "node scripts/check-fleet-conventions.mjs". Do not add it tocheck(that gate stays offline); run it as its own jobfleet-conventionsin.github/workflows/ci.yml(permissions: contents: read,GITHUB_TOKEN: ${{ github.token }}inenv, actions SHA-pinned with a version comment,persist-credentials: false, and the job must also trigger onmerge_grouplike the others — core ADR-0042).- Docs:
docs/design/quality-loop.mdline ~48 ("the organization gate checks presence, never versions") names the script and job;AGENTS.md"Code conventions" gains thenpm run check:fleetline besidecheck:organization.
Acceptance criteria
- On the PR's own CI, a job named fleet-conventions runs and its log contains one
ok frostyard/<name>line for each of the seven enabled declarations, and the job is green on the PR head. node --test test/fleet-conventions.test.mjspasses and covers the four cases above;npm run checkstays green and still needs no network.grep -c 'version' scripts/check-fleet-conventions.mjsshows no version comparison logic (presence only; a comment is fine).
Constraints
Scripts, tests, one workflow job, and the two doc lines. No change to organization/schemas/** or the surfaces contract (ADR-0043: "the repository surfaces contract gains no execution-profile schema"). .github/workflows/** is review-required at high risk — declare the tier and expect a human to mark ready. Making fleet-conventions a required check on the default branch is a separate operator step (scripts/apply-repo-settings.sh), not this PR.
Activity