Skip to content

fix(ci): preserve exact Harness E2E candidate stack - #721

Merged
ytallo merged 1 commit into
mainfrom
fix/harness-e2e-profile-digest
Aug 6, 2026
Merged

fix(ci): preserve exact Harness E2E candidate stack#721
ytallo merged 1 commit into
mainfrom
fix/harness-e2e-profile-digest

Conversation

@ytallo

@ytallo ytallo commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

What changed

  • validate the Harness E2E preview against its canonical profile digest while retaining the catalog SHA check as a fallback
  • keep auxiliary E2E workers on latest instead of applying the candidate channel to unrelated workers
  • install exact candidate dependencies before the released Harness worker
  • pass the profile digest through the deployed E2E workflow contract

Why

Version bump commits move main after a release preview without changing the selected E2E profile. The previous full-SHA comparison rejected those safe commits. After that was bypassed for diagnosis, the deployed stack applied next to auxiliary workers, selecting an outdated database release and requesting tags that do not exist for fp and provider workers.

The candidate identity remains the exact stack_versions map. Stable support workers no longer depend on candidate-channel availability.

Validation

  • Harness E2E profile digest regression checks
  • python3 -m compileall for the profile resolver and tests
  • bash -n harness/tests/e2e/run-deployed-ci.sh
  • exact dependency-first ordering assertion
  • git diff --check

Summary by CodeRabbit

  • Bug Fixes

    • Improved scenario validation to detect when the selected profile has changed, preventing stale preview runs.
    • Catalog updates that do not alter the selected profile no longer unnecessarily block releases.
  • CI/CD Improvements

    • Deployment workflows now support profile version tracking for more reliable scenario execution.
    • Auxiliary end-to-end workers consistently use the stable release channel, while explicitly selected candidate versions are installed in the correct order.

@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 1:18am
workers-tech-spec Ready Ready Preview Aug 6, 2026 1:18am

Request Review

@ytallo ytallo added the no-ticket PR deliberately has no Linear ticket (bump/typo/CI-only) label Aug 6, 2026
@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 PR adds canonical profile-digest validation to Harness E2E workflows. It also changes deployed E2E worker installation to use the stable support channel and dependency-first exact-version ordering.

Changes

Profile validation

Layer / File(s) Summary
Profile digest resolution and tests
.github/scripts/harness_e2e_profiles.py, .github/scripts/tests/test_harness_e2e_profiles.py
resolve_profile validates an expected profile digest and rejects changed profiles. Tests cover changed profiles and unchanged profiles across catalog SHA updates.
Workflow profile-digest wiring
.github/workflows/_harness-e2e.yml, .github/workflows/harness-e2e-deployed.yml
The workflows accept profile_digest and pass it to scenario resolution with the catalog SHA.

Deployed worker installation

Layer / File(s) Summary
Worker channel and installation ordering
harness/tests/e2e/run-deployed-ci.sh
Support workers use latest. Exact stack candidates install in dependency-first order, with the released worker installed last.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Workflow
  participant ProfileResolver
  participant Catalog
  Workflow->>ProfileResolver: Provide expected catalog SHA and profile digest
  ProfileResolver->>Catalog: Resolve scenario profile
  Catalog-->>ProfileResolver: Return canonical digest and catalog SHA
  ProfileResolver-->>Workflow: Accept profile or reject changed profile
Loading

Possibly related PRs

Poem

A rabbit checks the profile’s thread,
And finds the changed digest red.
Support hops on latest bright,
Exact workers queue just right,
The released one lands last instead.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary CI change: preserving the exact Harness E2E candidate stack.
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 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ 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/harness-e2e-profile-digest

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.

@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.

🧹 Nitpick comments (1)
.github/scripts/tests/test_harness_e2e_profiles.py (1)

60-79: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover the catalog-SHA fallback path.

The call always supplies expected_profile_digest. It does not exercise the not expected_profile_digest fallback branch. Add a case with a changed catalog SHA and no profile digest.

Proposed test
+def test_rejects_catalog_changes_without_profile_digest():
+    catalog = load_profile_catalog()
+    with pytest.raises(ValueError, match="catalog moved"):
+        resolve_profile(
+            catalog,
+            available=list(catalog.ids),
+            profile="release",
+            requested=[],
+            catalog_sha="b" * 40,
+            expected_catalog_sha="a" * 40,
+        )
🤖 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/scripts/tests/test_harness_e2e_profiles.py around lines 60 - 79,
Extend test_rejects_unknown_scenario_and_changed_profile to call resolve_profile
with a changed expected_catalog_sha and without expected_profile_digest,
asserting the profile-changed ValueError. Keep the existing digest-mismatch case
intact and ensure the new case exercises the catalog-SHA fallback branch.
🤖 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.

Nitpick comments:
In @.github/scripts/tests/test_harness_e2e_profiles.py:
- Around line 60-79: Extend test_rejects_unknown_scenario_and_changed_profile to
call resolve_profile with a changed expected_catalog_sha and without
expected_profile_digest, asserting the profile-changed ValueError. Keep the
existing digest-mismatch case intact and ensure the new case exercises the
catalog-SHA fallback branch.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 971e7027-32d2-47e5-9fa4-188760ddee7a

📥 Commits

Reviewing files that changed from the base of the PR and between d4d962e and d241221.

📒 Files selected for processing (5)
  • .github/scripts/harness_e2e_profiles.py
  • .github/scripts/tests/test_harness_e2e_profiles.py
  • .github/workflows/_harness-e2e.yml
  • .github/workflows/harness-e2e-deployed.yml
  • harness/tests/e2e/run-deployed-ci.sh

@ytallo
ytallo merged commit bc32093 into main Aug 6, 2026
18 of 20 checks passed
@ytallo
ytallo deleted the fix/harness-e2e-profile-digest branch August 6, 2026 01:23
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