Skip to content

ci(organization): check that every enabled repository carries mise.toml, mise.lock, and its verify gate (ADR-0043) #117

Closed

Description

@bketelsen

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

  1. Add scripts/check-fleet-conventions.mjs. For every declaration under organization/repositories/** with fleet_state: "enabled", read the repository's default-branch head through the GitHub REST contents API (fetch; send Authorization: Bearer $GITHUB_TOKEN when the variable is set, unauthenticated otherwise — all fleet repositories are public) and require:
    • mise.toml and mise.lock present and parseable (TOML: a [tools] table exists in mise.toml; mise.lock is non-empty) — presence only, never a version compare.
    • A Go repository (go.mod present): a Makefile whose targets include verify, check, and ci (match ^verify:, ^check:, ^ci: at line start).
    • A Node repository (package.json present, no go.mod): package.json scripts.verify and scripts.check present.
      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.
  2. test/fleet-conventions.test.mjs: with a fake fetcher, prove (a) a conformant Go repo and a conformant Node repo pass, (b) a repo missing mise.lock fails naming mise.lock, (c) a Makefile lacking verify: fails naming the target, (d) a disabled declaration is not fetched.
  3. package.json: add "check:fleet": "node scripts/check-fleet-conventions.mjs". Do not add it to check (that gate stays offline); run it as its own job fleet-conventions in .github/workflows/ci.yml (permissions: contents: read, GITHUB_TOKEN: ${{ github.token }} in env, actions SHA-pinned with a version comment, persist-credentials: false, and the job must also trigger on merge_group like the others — core ADR-0042).
  4. Docs: docs/design/quality-loop.md line ~48 ("the organization gate checks presence, never versions") names the script and job; AGENTS.md "Code conventions" gains the npm run check:fleet line beside check: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.mjs passes and covers the four cases above; npm run check stays green and still needs no network.
  • grep -c 'version' scripts/check-fleet-conventions.mjs shows 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

  1. added
    snowcat
    on Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    snowcat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions