Reproduce the CI vale error gate in just ci

just ci now fails on the error-level findings the CI vale job fails on. gce/vale-check.sh builds the job's project-mode config and disabled rules from .gitlab-ci.yml, then lints the tracked and new markdown with the styles snapshot the catalog's ci-tools image carries, fetched once from its pinned ref and cached.

Closes #15 (closed)

Mode selection

flowchart TD
    S["vale-check.sh"] --> V{"vale on PATH?"}
    V -- no --> F
    V -- yes --> C{".gitlab-ci.yml still includes<br/>vale@6 in project mode?"}
    C -- no --> F
    C -- yes --> Y{"styles cached<br/>or fetched?"}
    Y -- no --> F["mode=FALLBACK<br/>gitlab_base.Possessive only<br/>a pass says PARTIAL"]
    Y -- yes --> P["mode=parity<br/>vale --minAlertLevel=error"]
  • VALE_CHECK_MODE=parity exits 2 on any "no" branch instead of falling back, so a forced run never downgrades.
  • The static job has no vale, so just ci there runs the fallback and says so. The vale job stays the gate.
  • PossessiveProperNouns is a warning and does not fail the job, so the fallback leaves it out.
  • just vale-selftest runs fixtures through each mode, the styles fetch against a fabricated archive, and the tree before the fix (354571d). Both modes fail that tree on CHANGELOG.md:110:61 and SKILL.md:345:67, the two lines the job reported, and pass on main.
  • drift-check fails when the catalog's newest v6 image moves VALE_STYLES_REF. The MAINTENANCE.md register names the pin.

Why not the catalog image

I measured it and left it out. ci-tools:v6.4.1 is amd64 only and 281 MB compressed, so a machine on another architecture emulates it at about 2.5 seconds a run against 0.1 seconds for a local vale, and it needs a running podman machine. Its vale is 3.20.0. A local 3.24.0 with the same styles and config reports the same errors and one extra warning.

Validation

  • just ci passes with vale 3.24.0 (mode=parity) and with vale off PATH (mode=FALLBACK).
  • vale-check.sh and its self-test pass in debian:bookworm-slim, the static job's image, with no vale.
  • bash skills/gitlab-simulation/gce/vale-check.sh <dir> on an export of 354571d exits 1 in both modes, and on main exits 0.
  • just drift-check passes, and fails when the pin is changed.

Claude Code wrote this change, and we ran the checks above on a laptop.

Merge request reports

Loading
Loading