Skip to content

feat(runner-policy): review the retirement-aligned drift-check contract - #111

Merged
kyle-sexton merged 1 commit into
mainfrom
fix/drift-check-contract-pin
Jul 15, 2026
Merged

feat(runner-policy): review the retirement-aligned drift-check contract#111
kyle-sexton merged 1 commit into
mainfrom
fix/drift-check-contract-pin

Conversation

@kyle-sexton

Copy link
Copy Markdown
Contributor

Why

melodic-software/github-iac#112 bumps its pulumi-version-drift-check.yml pin to ci-workflows 15aefd8 (the commit whose deploy-guard contract matches post-retirement Pulumi OIDC trust — melodic-software/ci-workflows#96). The runner-policy engine allowlists reusable-workflow contracts by exact path@SHA, so the consumer lane rejects the new pin until it is reviewed here (Codex confirmed this on github-iac#112; the Runner policy check fails there today).

What

  • policy.json: add the pulumi-version-drift-check.yml@15aefd8 contract (identical shape: hosted-only, fixedRunsOn: ubuntu-24.04)
  • runner-policy.test.mjs: assert the new reviewed reference alongside the existing one (same staged-set pattern the selector allowlist already uses)

Cleanup contract

The @99ac2f8 drift-check entry stays only until github-iac#112 merges; a follow-up removes it the same day — no lingering legacy references.

Verification

  • node --test components/runner-policy/runner-policy.test.mjs: 101 pass / 0 fail

🤖 Generated with Claude Code

https://claude.ai/code/session_01JLfjHY8PY6ozhgZPiuHKik

github-iac must bump its pulumi-version-drift-check pin to the
ci-workflows commit whose deploy guard matches the post-retirement
Pulumi OIDC trust; the exact-reference allowlist needs that pin
reviewed before the consumer CI lane will accept it. The prior pin
stays reviewed until the consumer bump lands, then it is removed.

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

claude Bot commented Jul 14, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 6s —— View job


PR Review

  • Gather context (CLAUDE.md, PR diff, changed files)
  • Review policy.json changes
  • Review runner-policy.test.mjs changes
  • Post findings

Overall: LGTM — clean, minimal, well-tested.

policy.json

The new entry at policy.json#L95–100 is correctly shaped and correctly positioned:

"melodic-software/ci-workflows/.github/workflows/pulumi-version-drift-check.yml@15aefd8799e8a8b5ffdfcc183dcbfcbf58044481": {
  "routing": "hosted-only",
  "allowedInputs": [],
  "allowedSecrets": {},
  "fixedRunsOn": ["ubuntu-24.04"]
}
  • Shape matches the existing @99ac2f8 entry exactly — correct for a drift-check workflow that takes no inputs and no secrets.
  • Security posture is tight: hosted-only routing, empty secrets, pinned to ubuntu-24.04. No regression from the previous contract.
  • Placement follows the pattern of other dual-SHA entries (e.g., zizmor.yml, semantic-pr.yml), keeping the old @99ac2f8 pin alive for the rollout window.
  • The old entry's presence until github-iac#112 merges is intentional and documented — no action needed here.

runner-policy.test.mjs

The additions at runner-policy.test.mjs#L24–25 and #L1018–1023 are correct:

  • RETIREMENT_ALIGNED_GUARD_SHA (15aefd8799e8a8b5ffdfcc183dcbfcbf58044481) matches the policy.json key exactly.
  • The deepEqual assertion verifies all four contract fields — routing, inputs, secrets, runner — mirroring the existing PULUMI_DRIFT_REUSABLE_REFERENCE assertion directly above it. This is the right pattern.
  • Constants defined at module scope, consistent with PRODUCTION_SHA, FAIL_CLOSED_SEMANTIC_PR_SHA, etc.

No issues found. The change is additive-only, follows established conventions, and the test suite is kept in sync.

@kyle-sexton
kyle-sexton merged commit bc52fba into main Jul 15, 2026
36 checks passed
@kyle-sexton
kyle-sexton deleted the fix/drift-check-contract-pin branch July 15, 2026 00:05
kyle-sexton added a commit that referenced this pull request Jul 15, 2026
## Why

Completes the staged rollout from #111: melodic-software/github-iac#112
merged with the drift-check pin at the reviewed `15aefd8` reference, so
the prior `@99ac2f8` contract entry has zero consumers (verified via
org-wide code search). The allowlist carries no superseded references.

## What

- `policy.json`: superseded `pulumi-version-drift-check.yml@99ac2f8`
contract removed
- `runner-policy.test.mjs`: single drift-check reference asserted;
transitional constant names collapsed

## Verification

- `node --test components/runner-policy/runner-policy.test.mjs`: 112
pass / 0 fail

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01JLfjHY8PY6ozhgZPiuHKik

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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