utils/.github/workflows
Krzysztof kuhy Rudnicki 2a2f18ca56 Add the shared dependency-freshness gate
"Are we on the newest version?" was not mechanically answerable across these
repos: constraint styles had drifted per-ecosystem and a caret range is
"newest-compatible" by definition, which gives a checker nothing to compare.
This gate makes it answerable and then enforces the answer.

Checks two things at once -- that every dependency carries an exact pin, and
that the pin equals its registry's latest STABLE release -- across pub.dev,
PyPI, npm, crates.io, the Go proxy, kuhyx/utils git tags, and the Flutter /
Node / Python toolchains.

Three deliberate design points:

* Pre-releases are rejected per-ecosystem, because every ecosystem leaks them
  differently and each leak fails GREEN. npm lets a maintainer point
  `dist-tags.latest` at an rc; crates.io's `max_version` includes them; PyPI's
  legacy `info.version` includes yanked releases. Unit-tested with fixtures,
  since an end-to-end run cannot surface a wrong "up to date".

* Offline, the gate serves an expired cache entry and PASSES with a DEGRADED
  banner (exit 3 only under --strict, which is CI). `--no-verify` is banned
  here, so a hook that hard-failed offline would leave no way to commit at all.

* The allowlist has two entry classes. `blocked_by: transitive:<pkg>@<ver>` is
  a predicate that clears itself when upstream moves and must NOT carry a
  date; everything else is discretionary and requires `expires`, capped at 90
  days. Exact pins plus latest-everywhere is provably unsatisfiable when a
  dependency internally constrains a shared transitive, and expiring the
  predicate class on a calendar would turn the gate red for a reason no commit
  could fix. An entry with nothing left to excuse is itself an error.

One hook id, one shim, one shared implementation -- always delegating, so it
cannot fork the way the 250-line cap forked into four ids, two of which were
independent reimplementations.

256 tests, 100% branch coverage on every module of the gate. Also adds the
workflow that runs them, which incidentally gives md_naming's 71 tests their
first CI run.

Not yet installed in any repo: a repo that gets the gate before its deps are
bumped is instantly and permanently red, so the gate and the upgrade land
together, per repo.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CRykabMwPgDzFHcARoqpaK
2026-08-28 13:00:35 +02:00
..
crdt-sync-dart-tests.yml crdt_sync_dart: latest stable + exact pins, 100% coverage, CI for both crdt_sync packages 2026-08-28 12:32:24 +02:00
crdt-sync-flutter-tests.yml crdt_sync_dart: latest stable + exact pins, 100% coverage, CI for both crdt_sync packages 2026-08-28 12:32:24 +02:00
crdt-sync-precommit.yml Root scaffold: README, LICENSE, per-subdirectory CI for utils monorepo 2026-07-10 13:02:20 +02:00
crdt-sync-tests.yml Root scaffold: README, LICENSE, per-subdirectory CI for utils monorepo 2026-07-10 13:02:20 +02:00
design-system-tests.yml Wire design_system into CI, and drop EmptyState's speculative action slot 2026-08-14 23:08:59 +02:00
file-length.yml CI: fail the build on any file over 250 lines 2026-08-22 15:43:22 +02:00
gatelock-precommit.yml Let the gatelock workflows trigger on their own files 2026-08-03 18:36:47 +02:00
gatelock-tests.yml Let the gatelock workflows trigger on their own files 2026-08-03 18:36:47 +02:00
github-device-auth-tests.yml github_device_auth: extract the GitHub device flow from four apps 2026-08-15 15:57:19 +02:00
md-naming.yml Add the shared markdown-naming gate and migrate utils' own docs 2026-08-24 15:53:12 +02:00
palette-drift.yml unified-design-system: check one palette across all four token sources 2026-08-15 15:27:17 +02:00
shared-gates-tests.yml Add the shared dependency-freshness gate 2026-08-28 13:00:35 +02:00
sync-settings-ui-tests.yml Add sync_settings_ui: shared Firebase-only sync settings screen 2026-08-12 23:10:17 +02:00
ts-core-tests.yml ts_core: a framework-free TypeScript utility package 2026-08-15 15:42:41 +02:00
web-ui-tests.yml web_ui: add the CI + pre-commit gate, and make pnpm lint actually run 2026-08-15 15:08:18 +02:00