Skip to content

feat: track shipping runtime pins in the drift check - #127

Merged
kyle-sexton merged 5 commits into
mainfrom
chore/remove-canary-apparatus
Jul 16, 2026
Merged

feat: track shipping runtime pins in the drift check#127
kyle-sexton merged 5 commits into
mainfrom
chore/remove-canary-apparatus

Conversation

@kyle-sexton

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #125, addressing its Codex review finding: the removed canary-runtime drift block was incidentally the only watch on runtime pins that still ship. The daily drift check now watches those pins directly:

  • Reads the canonical pins from the tree: root global.json (.NET SDK), markdown action's node-version default, ruff action's python-version default.
  • Fails closed if any family's pins diverge across the tree (biome/tsc node defaults; pyright/check-jsonschema python defaults; dotnet-build/dotnet-format/dependabot-lock-regen fallback SDK pins vs global.json).
  • Compares each agreed pin against the upstream first-party release index within its reviewed major/minor line (same latest_dotnet_sdk/latest_node_runtime/latest_python_runtime lookups the canary block used).
  • Absorb-procedure guidance updated to say runtime bumps update every matching default in lockstep.

No linked issue.

Related

Verification

  • node --test .github/scripts/*.test.cjs: 191/191 locally.
  • actionlint: clean.
  • Consistency logic dry-run against the current tree: all families agree (dotnet 10.0.302, node 24.18.0, python 3.14).

🤖 Generated with Claude Code

https://claude.ai/code/session_01TPPLWAtX5BWyEmghrKkYYF

kyle-sexton and others added 4 commits July 16, 2026 17:22
The org's CI-runner release process now installs releases one host at a
time under real production traffic with a cheap lock-revert rollback
(melodic-software/provisioning#145), so the isolated canary acceptance
contract and the production HA-proof rollout gate have no callers.

- Delete the local-runner-canary and production-ha-proof reusable
  workflows, their runtime/test/generator scripts, the canary-only
  hosted/self-hosted parity check, and the templates/ci-runner-canary
  seed (the repository's only template).
- Delete the immutable-workflow-pins fetcher and test: template
  workflows were its only subject, so it has nothing left to pin.
- tool-version-drift-check: drop the canary-runtime drift block and its
  now-unused runtime-lookup helpers; the pinned runtimes existed only
  for the canary parity contract.
- Reword dotnet action fallback comments to track only the root
  global.json, and replace ambiguous generic-"canary" wording in the
  OSV guidance with explicit consumer verification runs.

BREAKING CHANGE: the local-runner-canary.yml and production-ha-proof.yml
reusable workflows no longer exist; their only sanctioned caller
(melodic-software/ci-runner-canary) is being decommissioned.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TPPLWAtX5BWyEmghrKkYYF
The removed canary-runtime drift block was incidentally the only watch
on runtime pins that still ship: composite-action node-version and
python-version input defaults, the root global.json SDK, and the dotnet
actions' fallback pins. Watch those directly instead — require each
family's pins to agree across the tree, then compare the agreed pin
against the upstream first-party release index within its reviewed
line.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TPPLWAtX5BWyEmghrKkYYF
…pparatus

# Conflicts:
#	.github/workflows/tool-version-drift-check.yml
@claude

claude Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review in progress

  • Gather context
  • Read changed file
  • Review for correctness, security, and guideline alignment
  • Post findings

View job run

@claude

claude Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review complete

  • Gather context
  • Understand the request
  • Read changed files
  • Review for correctness, security, and guideline alignment
  • Post findings

This is a clean, well-structured follow-up. The fail-closed consistency check (diverging sibling pins → hard error before upstream comparison) is exactly the right design; it prevents the drift check from silently picking a stale or incorrect baseline. The test bump from 3→6 curl_small_json calls correctly accounts for the three new runtime fetch functions. One minor correctness issue and two low-priority observations below.

Findings

1. Unescaped dots in grep regex pattern — minor correctness

Line 217:

if ! grep -q "dotnet-version: ${dotnet_current}$" "$file"; then

grep interprets the pattern as a BRE, so . in dotnet_current (e.g. 10.0.302) matches any character — dotnet-version: 10X0Y302 would be a (contrived) false positive. The trailing $ end-of-line anchor is useful to prevent prefix matches, so -F alone isn't a straight swap. The cleanest fix is to escape the dots before interpolating:

if ! grep -q "dotnet-version: ${dotnet_current//./\\.}$" "$file"; then

In practice version strings won't trigger this, but it's a latent correctness gap that's cheap to close. Fix this →


2. latest_node_runtime silently skips pre-LTS majors — low priority

Lines 174–181: the jq filter is select(.lts != false and ...). Node 24 entered LTS in October 2025 so this is correct today. But if the canonical pin is ever advanced to a newly-released major before it enters LTS (typically the 6-month window before the October cut), [...] | last would produce null, jq -er would exit non-zero, || latest='' would fire, and the check would silently emit a warning and skip instead of flagging drift. The degradation is graceful (no false alarm, no broken run) but invisible. A comment noting this behaviour — and suggesting the operator should expect the warning during that window — would make the intent explicit.


3. Push trigger doesn't include runtime action files — low priority / likely intentional

The new runtime consistency check reads markdown/action.yml, ruff/action.yml, biome/action.yml, tsc/action.yml, pyright/action.yml, check-jsonschema/action.yml, dotnet-build/action.yml, dotnet-format/action.yml, and dependabot-lock-regen.yml. None of these appear in the push: paths: trigger. A pin bump that touches only those files would catch drift at the next daily run rather than on push. If that's intentional (keeping the push trigger scoped to the workflow's own integrity files), it's fine — the daily schedule is the primary cadence anyway. Just noting it in case the intent was broader push coverage.


Summary

The core logic is correct and the design choices are sound. Finding #1 is the only concrete correctness gap (unescaped regex metacharacters); findings #2 and #3 are informational. No security concerns — new code does not expand credential scope, does not reach for privileged context, and the three new curl_small_json calls are all read-only fetches to first-party release indexes over HTTPS.

View job run

@kyle-sexton
kyle-sexton merged commit 9566c81 into main Jul 16, 2026
35 of 36 checks passed
@kyle-sexton
kyle-sexton deleted the chore/remove-canary-apparatus branch July 16, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant