Skip to content

fix(ci): validate promotion run identity - #723

Merged
ytallo merged 1 commit into
mainfrom
fix/promotion-release-workflow-identity
Aug 6, 2026
Merged

fix(ci): validate promotion run identity#723
ytallo merged 1 commit into
mainfrom
fix/promotion-release-workflow-identity

Conversation

@ytallo

@ytallo ytallo commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • identify Release and deployed Harness E2E runs by their exact workflow paths
  • stop treating the GitHub API name field as a stable workflow identity
  • accept the actual workflow path shape returned by the Actions REST API

Root cause

GitHub returns the configured run-name in the run API name field and returns workflow paths without an @ref suffix. Promotion required the static workflow name and suffixed paths, so a valid Release run failed before candidate evidence could be checked.

Impact

Promotions can revalidate current Release and Harness E2E runs while still rejecting runs from any other workflow.

Validation

  • parsed promote-worker.yml as YAML
  • evaluated the new Release predicate against run 31059953912
  • evaluated the new Harness E2E predicate against run 31063151060
  • git diff --check

Summary by CodeRabbit

  • Bug Fixes
    • Improved release validation by accurately identifying the intended workflows.
    • Added stricter checks to confirm workflow dispatches complete successfully before validation passes.
    • Support validation evidence from both standard release and repair workflows.

@ytallo ytallo added the no-ticket PR deliberately has no Linear ticket (bump/typo/CI-only) label Aug 6, 2026
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workers Ready Ready Preview Aug 6, 2026 2:20am
workers-tech-spec Ready Ready Preview Aug 6, 2026 2:20am

Request Review

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 54 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The promotion workflow now identifies release runs by exact workflow paths. It accepts evidence from standard and repair-worker release workflows. Harness E2E validation requires a completed workflow-dispatch run with a successful conclusion.

Changes

Release validation

Layer / File(s) Summary
Exact workflow evidence checks
.github/workflows/promote-worker.yml
Release-run validation uses exact workflow paths. Candidate evidence supports the standard and repair-worker release workflows. Harness E2E validation requires completed successful workflow dispatch.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A rabbit checked each workflow path,
No fuzzy names could cross its path.
Dispatch complete, conclusion bright,
Release evidence matched just right.
Hop, hop—promotion takes flight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: fixing CI validation of promotion run identity.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/promotion-release-workflow-identity

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ytallo
ytallo merged commit 5b0ffa9 into main Aug 6, 2026
17 of 19 checks passed
@ytallo
ytallo deleted the fix/promotion-release-workflow-identity branch August 6, 2026 02:23

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/promote-worker.yml:
- Around line 201-203: Update the release-run and evidence-run validation checks
in the workflow to require both status == "completed" and conclusion ==
"success", in addition to the existing release.yml path checks. Ensure failed,
cancelled, in-progress, and queued runs are rejected before artifact validation,
while preserving any explicitly documented repair-exception behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7923e534-540e-46e1-8e2a-0ccbf2f96b50

📥 Commits

Reviewing files that changed from the base of the PR and between 0f4a51b and 09027cd.

📒 Files selected for processing (1)
  • .github/workflows/promote-worker.yml

Comment on lines +201 to +203
# GitHub exposes `run-name` through the API's `name` field, so the
# workflow file path is the stable identity for a Release run.
jq -e '.path == ".github/workflows/release.yml"' release-run.json >/dev/null || {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C 12 \
  'status|conclusion|release_run_id|evidence_run_id' \
  .github/workflows/promote-worker.yml \
  .github/scripts/release_candidate.py

Repository: iii-hq/workers

Length of output: 23610


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Release run and evidence run validation sections =="
sed -n '190,330p' .github/workflows/promote-worker.yml

echo
echo "== release_candidate.py relevant sections =="
sed -n '1,190p' .github/scripts/release_candidate.py

echo
echo "== release.yml workflow dispatch/branch info candidates =="
sed -n '1,140p' .github/workflows/release.yml || true
sed -n '140,260p' .github/workflows/release.yml || true

Repository: iii-hq/workers

Length of output: 24848


🏁 Script executed:

#!/bin/bash
set -euo pipefail

script="$(fd -a 'promote-worker.yml|release_candidate.py|release.yml' .github | grep 'promote-worker.yml\|release_candidate.py\|release.yml' | sort)"
python3 - <<'PY'
import json, pathlib, re

workflow = pathlib.Path(".github/workflows/promote-worker.yml").read_text()
checks = re.finditer(r"jq -e '(.*?)' [A-Za-z_-]+\.json >/dev/null", workflow, re.S)
print("release_run path-only check in promote-worker.yml:", ".github/workflows/p**romote-worker.yml" if any('RELEASE_RUN_ID' in str(workflow[max(0, m.start()-300):m.end()+300])) else False)
for m in checks:
    text = m.group(1).replace("\\n", "\n").replace("\\'", "'")
    if '.path == ".github/workflows/release.yml"' in text or 'Path to release candidate' in text:
        print(f"FOUND at char {m.start()}; contains status/conclusion? status={'.status' in text}; conclusion={'.conclusion' in text}")
        print(text.replace("\\n", "\n"))

# Extract candidate evidence JSON payloads from release_candidate.py to show that build has no run status inputs.
print("\n--- release_candidate.py build evidence fields ---")
script = pathlib.Path(".github/scripts/release_candidate.py").read_text()
m = re.search(r"def build_evidence\(args: argparse\.Namespace\) -> dict:\n(.*?)\n    return \{\n        \"schema_version\".*?\n    \}", script, re.S)
print(m.group(0) if m else "not found")
print("contains run status/conclusion fields:", bool(re.search(r"(^|\s)(status|conclusion)[:\s]", m.group(0) or "")))
PY

Repository: iii-hq/workers

Length of output: 260


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== jq gates around release-run.json and evidence-run.json =="
rg -n "release-run\.json|evidence-run\.json|Path to release candidate|jq -e" .github/workflows/promote-worker.yml
rg -n "status|conclusion" .github/workflows/promote-worker.yml .github/scripts/release_candidate.py

echo
echo "== release_candidate evidence build fields =="
python3 - <<'PY'
from pathlib import Path
import re
script = Path(".github/scripts/release_candidate.py").read_text()
m = re.search(r"def build_evidence\(args: argparse\.Namespace\) -> dict:.*?return \{(.*?)\n    \}", script, re.S)
print(m.group(0) if m else "not found")
if m:
    body = m.group(0)
    print("contains run status/conclusion fields:", bool(re.search(r"(^|\s)(status|conclusion)=\s", body)))
PY

echo
echo "== release.yml result gating =="
rg -n "needs\\..*\\.result|failure\\(|cancelled\\(|promotable|dry_run|interface_smoke|setup.outputs|github.event" .github/workflows/release.yml

Repository: iii-hq/workers

Length of output: 10926


Reject failed or incomplete Release run evidence.

Lines 201-203 and 223-224 only match workflow paths. A failed, cancelled, in_progress, or queued RELEASE_RUN_ID or EVIDENCE_RUN_ID can still have an active/downloadable GitHub artifact; that artifact can be read by release_candidate.py validate, where any candidate_ready: true / promotable: true payload is accepted so long as its internal gate results are success.

Require status == "completed" and conclusion == "success" for both release-run checks, unless this is explicitly intended as a repair exception.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/promote-worker.yml around lines 201 - 203, Update the
release-run and evidence-run validation checks in the workflow to require both
status == "completed" and conclusion == "success", in addition to the existing
release.yml path checks. Ensure failed, cancelled, in-progress, and queued runs
are rejected before artifact validation, while preserving any explicitly
documented repair-exception behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-ticket PR deliberately has no Linear ticket (bump/typo/CI-only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant