Skip to content

fix: sync functional tests openshell version with shared pin - #2535

Merged
ralphbean merged 4 commits into
mainfrom
fix/openshell-version-sync
Jun 23, 2026
Merged

fix: sync functional tests openshell version with shared pin#2535
ralphbean merged 4 commits into
mainfrom
fix/openshell-version-sync

Conversation

@ralphbean

Copy link
Copy Markdown
Member

Summary

  • The functional-tests workflow hardcoded openshell 0.0.38 while the rest of the repo pins 0.0.63 via .github/scripts/openshell-version.sh. Sources the shared script instead.
  • Adds an early version-mismatch guard in eval/run-functional.sh so drift is caught regardless of how tests are invoked (CI or locally).
  • Uses ${OPENSHELL_SHA} for the supervisor image tag instead of a hardcoded SHA.

Spotted in #2534.

Test plan

  • Functional tests workflow picks up 0.0.63 from the shared script
  • eval/run-functional.sh fails fast if an old openshell is installed locally

🤖 Generated with Claude Code

The functional-tests workflow hardcoded openshell 0.0.38 while the
rest of the repo pins 0.0.63 via .github/scripts/openshell-version.sh.

Source the shared script instead of hardcoding the version, and add an
early version-mismatch check in eval/run-functional.sh so any drift is
caught regardless of how the tests are invoked.

Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Ralph Bean <rbean@redhat.com>
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix functional tests to use shared OpenShell version pin
🐞 Bug fix ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

Description

• Source the shared OpenShell version pin in the functional-tests GitHub workflow.
• Tag the OpenShell supervisor image using the pinned OPENSHELL_SHA.
• Fail fast in the local functional runner when the installed OpenShell version drifts.
Diagram

graph TD
  wf["functional-tests.yml"] --> vs["openshell-version.sh"] --> cli["OpenShell CLI"]
  wf --> img["Supervisor image tag"]
  rf["run-functional.sh"] --> vs --> chk{"Version matches pin?"}
  chk -- "yes" --> h["Functional harness"]
  chk -- "no" --> err["Exit with error"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Extract full OpenShell setup into a reusable composite action/script
  • ➕ Eliminates duplication beyond just the version pin (install, gateway start, env wiring).
  • ➕ Makes future workflow consumers consistent by construction.
  • ➖ More moving parts and review surface than this targeted fix.
  • ➖ Requires designing inputs/outputs and updating multiple call sites.
2. Add a dedicated CI drift-check job (version/SHA consistency)
  • ➕ Catches mismatches without relying on the functional run path.
  • ➕ Can be extended to validate image tags, gateway binary, etc.
  • ➖ Additional CI job to maintain.
  • ➖ Doesn’t improve local developer feedback unless mirrored in scripts.

Recommendation: The PR’s approach (sourcing a single pinned version script in both CI and the local runner, plus a fail-fast guard) is the best minimal change: it fixes the immediate drift and prevents recurrence in the highest-friction path (local runs). Consider a follow-up to extract the full OpenShell setup into a shared composite action/script if duplication continues to grow.

Files changed (2) +16 / -6

Bug fix (1) +14 / -0
run-functional.shAdd early OpenShell version mismatch guard +14/-0

Add early OpenShell version mismatch guard

• Adds a preflight check that requires openshell to be installed and verifies its version matches the repo-pinned OPENSHELL_VERSION from .github/scripts/openshell-version.sh. Exits with a clear error message before running the functional harness when drift is detected.

eval/run-functional.sh

Other (1) +2 / -6
functional-tests.ymlSource shared OpenShell pin and use pinned supervisor image SHA +2/-6

Source shared OpenShell pin and use pinned supervisor image SHA

• Replaces the hardcoded OpenShell version with sourcing the shared .github/scripts/openshell-version.sh. Updates the supervisor image reference to use ${OPENSHELL_SHA} instead of a hardcoded digest, keeping CI aligned with the repository pin.

.github/workflows/functional-tests.yml

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

Site preview

Preview: https://3fdb8a3b-site.fullsend-ai.workers.dev

Commit: f300b6bdcec870704e774488d32b08d625c603a3

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

@fullsend-ai-review

fullsend-ai-review Bot commented Jun 22, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 9:15 PM UTC · Completed 9:25 PM UTC
Commit: de1c02e · View workflow run →

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review

fullsend-ai-review Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review

Findings

Medium

  • [protected-path] .github/workflows/functional-tests.yml — This file is under the .github/ protected path. The PR links to ci(functional-tests): use pull_request_target for fork PR support #2534 (as the origin of the observation) and the description explains the rationale for syncing the hardcoded openshell version with the shared pin script. Human approval is required for protected-path changes regardless of context.

  • [claimed-vs-actual-scope] .github/workflows/functional-tests.yml — PR body claims "Uses ${OPENSHELL_SHA} for the supervisor image tag instead of a hardcoded SHA," but the diff deletes the OPENSHELL_SUPERVISOR_IMAGE export entirely (along with the entire gateway start step) rather than replacing it with ${OPENSHELL_SHA}. The PR description is inaccurate on this point.

  • [commit-prefix-mismatch] .github/workflows/functional-tests.yml — PR title uses fix: prefix, which per COMMITS.md is reserved for "Bug fix visible to users" and appears in release notes under Bug Fixes. COMMITS.md explicitly states: "Upgrading a dependency or vendored tool version → chore" and "When in doubt, prefer refactor or chore over feat or fix." Syncing CI version pins is infrastructure maintenance — the correct prefix is chore(ci): or ci:.

Low

  • [incomplete-duplication-removal] .github/workflows/functional-tests.yml — The diff removes the TODO comment that identified duplication between functional-tests.yml and action.yml. The PR resolves version pin and CLI install duplication, and removes gateway download/start (which was never in action.yml). Podman setup (Install Podman, Configure rootless Podman, Start Podman API) remains duplicated. Removing the TODO is slightly premature but the remaining duplication is lower-risk boilerplate.
Previous run

Review

Findings

Medium

  • [protected-path] .github/workflows/functional-tests.yml — This file is under the .github/ protected path. The PR links to ci(functional-tests): use pull_request_target for fork PR support #2534 (as the origin of the observation) and the description explains the rationale for syncing the hardcoded openshell version with the shared pin script. Human approval is required for protected-path changes regardless of context.

  • [claimed-vs-actual-scope] .github/workflows/functional-tests.yml:121 — PR body claims "Uses ${OPENSHELL_SHA} for the supervisor image tag instead of a hardcoded SHA," but the diff deletes the OPENSHELL_SUPERVISOR_IMAGE export entirely rather than replacing it with ${OPENSHELL_SHA}. The gateway will fall back to its built-in default supervisor image. This aligns with action.yml behavior (which also does not set OPENSHELL_SUPERVISOR_IMAGE), so the functional effect is correct, but the PR description is inaccurate.

  • [incomplete-duplication-removal] .github/workflows/functional-tests.yml:64 — The diff removes the TODO comment that called out duplication between functional-tests.yml and action.yml (version, CLI, gateway, Podman, gateway start). Only the version pin duplication is addressed by sourcing openshell-version.sh. The remaining duplicated steps (CLI install, gateway download, Podman setup, gateway start) are still duplicated. Removing the TODO suggests the problem is fully resolved when it is not.

Low

  • [naming-consistency] .github/workflows/functional-tests.yml:64 — The workflow step name "Set OpenShell version" does not reflect that the sourced script also sets OPENSHELL_SHA via GITHUB_ENV. Consider updating to "Set OpenShell version and SHA."

  • [edge-case] eval/run-functional.sh:55 — The version extraction openshell --version | awk '{print $NF}' assumes the last whitespace-delimited field is the version string. If the output format were to include additional tokens, $NF would return the wrong value. Risk is theoretical — standard Python CLI tools output toolname X.Y.Z where $NF works correctly.

Previous run (2)

Review

Findings

Medium

  • [protected-path] .github/workflows/functional-tests.yml — This file is under the .github/ protected path. The PR links to ci(functional-tests): use pull_request_target for fork PR support #2534 and the description explains the rationale (syncing hardcoded openshell version with the shared pin script). Human approval is required for protected-path changes regardless of context.

Low

  • [edge-case] eval/run-functional.sh:55 — The version extraction openshell --version | awk '{print $NF}' assumes the last whitespace-delimited field is the version string. If the output format were to include additional tokens (e.g., build metadata), $NF would return the wrong value. Risk is theoretical — standard Python CLI tools output toolname X.Y.Z where $NF works correctly.

  • [error-handling-gap] eval/run-functional.sh:53 — The source of openshell-version.sh is not guarded by a file-existence check. The script's set -euo pipefail ensures it exits on failure, but unlike the other pre-flight checks in this file, there is no user-friendly error message directing the user to the fix.

  • [implementation-detail] .github/workflows/functional-tests.yml:64 — The workflow step name "Set OpenShell version" is slightly misleading since the sourced script also sets OPENSHELL_SHA. Consider updating to "Set OpenShell version and SHA."


Labels: PR modifies CI workflow files (.github/workflows/) and eval scripts

@fullsend-ai-review fullsend-ai-review 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.

See the review comment for full details.

Comment thread eval/run-functional.sh

# Fail fast if openshell version doesn't match the repo pin
if command -v openshell >/dev/null 2>&1; then
source "${REPO_ROOT}/.github/scripts/openshell-version.sh"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] edge-case

The version extraction openshell --version | awk '{print $NF}' assumes the last whitespace-delimited field is the version string. If the output format were to include additional tokens, $NF would return the wrong value. Risk is theoretical — standard Python CLI tools output toolname X.Y.Z where $NF works correctly.

Comment thread eval/run-functional.sh
exit 1
fi

# Fail fast if openshell version doesn't match the repo pin

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] error-handling-gap

The source of openshell-version.sh is not guarded by a file-existence check. The script's set -euo pipefail ensures it exits on failure, but unlike the other pre-flight checks in this file, there is no user-friendly error message.

Suggested fix: Add a guard before sourcing: if [[ ! -f "${REPO_ROOT}/.github/scripts/openshell-version.sh" ]]; then echo "ERROR: ..."; exit 1; fi

Comment thread .github/workflows/functional-tests.yml Outdated
# gateway start) is duplicated from action.yml. Extract into a
# shared script (e.g. .github/scripts/setup-openshell.sh) so the
# version and config stay in sync across both places.
- name: Set OpenShell version

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] implementation-detail

The workflow step name 'Set OpenShell version' is slightly misleading since the sourced script also sets OPENSHELL_SHA. Consider updating to 'Set OpenShell version and SHA'.

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment component/ci CI pipelines and checks labels Jun 22, 2026
action.yml doesn't set OPENSHELL_SUPERVISOR_IMAGE — it lets the gateway
use its built-in default. The functional tests had an old hardcoded SHA
that doesn't correspond to the openshell release SHA. Remove the
override so the 0.0.63 gateway uses its own default supervisor image.

Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Ralph Bean <rbean@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Jun 22, 2026

Copy link
Copy Markdown

🤖 Finished Review · ❌ Failure · Started 9:34 PM UTC · Completed 9:45 PM UTC
Commit: 4a92735 · View workflow run →

The functional tests manually downloaded the gateway binary, started it
in the background, and registered it with the CLI — an approach that
worked with 0.0.38 but broke with 0.0.63 (gateway port 8080 never came
up).

Replace the manual setup with the same pattern action.yml uses:
- Write gateway.env config
- Install via the shared install-openshell.sh script
- Let openshell manage its own gateway

This matches the changes made in PR #2315 when openshell was bumped
from 0.0.54 to 0.0.63.

Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Ralph Bean <rbean@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Jun 22, 2026

Copy link
Copy Markdown

🤖 Review · ⚠️ Cancelled · Started 10:50 PM UTC · Ended 10:52 PM UTC
Commit: 4e21a60 · View workflow run →

Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Ralph Bean <rbean@redhat.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Jun 22, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 10:56 PM UTC · Completed 11:07 PM UTC
Commit: f300b6b · View workflow run →

@fullsend-ai-review fullsend-ai-review 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.

See the review comment for full details.

run: echo "OPENSHELL_VERSION=0.0.38" >> "${GITHUB_ENV}"

- name: Install OpenShell CLI
- name: Configure OpenShell gateway

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] incomplete-duplication-removal

The diff removes the TODO comment that identified duplication between functional-tests.yml and action.yml. The PR resolves version pin and CLI install duplication, but Podman setup remains duplicated. Removing the TODO is slightly premature.

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment and removed requires-manual-review Review requires human judgment labels Jun 22, 2026
@ralphbean
ralphbean added this pull request to the merge queue Jun 23, 2026
Merged via the queue into main with commit 468dce4 Jun 23, 2026
17 checks passed
@ralphbean
ralphbean deleted the fix/openshell-version-sync branch June 23, 2026 09:30
@fullsend-ai-retro

fullsend-ai-retro Bot commented Jun 23, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 9:35 AM UTC · Completed 9:42 AM UTC
Commit: f300b6b · View workflow run →

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #2535 — sync functional tests openshell version

Verdict: Workflow performed well. No new proposals — all improvement areas are covered by existing open issues.

Timeline

  1. 2026-06-22 21:12 — ralphbean opened PR to sync functional test openshell version with shared pin (spotted in ci(functional-tests): use pull_request_target for fork PR support #2534)
  2. 21:12–22:52 — 4 commits iterated from a simple version-pin fix to full alignment of functional test setup with action.yml (+19/−50, 2 files)
  3. Review bot ran 4 times: success → 422 failure → cancellation (superseded) → success
  4. 2026-06-23 09:20 — Human reviewer (rh-hemartin) approved cleanly
  5. 09:30 — PR merged

Review quality assessment

The review bot performed well on this PR:

  • Good catches: Flagged an inaccurate PR description (claimed ${OPENSHELL_SHA} replacement but diff actually deletes the export) and a commit prefix mismatch (fix: vs chore(ci): per COMMITS.md).
  • Reasonable low-severity findings: 4 inline comments on edge-case handling, error guards, step naming, and incomplete duplication removal — all valid observations appropriately rated as low severity.
  • No false positives that would waste reviewer time.

Inefficiencies identified (all covered by existing issues)

Issue Existing coverage
422 failure on review submission — Run 2 failed because an inline comment targeted a line outside the diff hunk, causing a GitHub API 422 #1067 (post-review: handle 422 on inline comment submission gracefully)
Multiple review runs on rapid commits — 4 review runs for 4 commits within 2 hours; 1 failed, 1 cancelled, only 2 produced useful output #1418, #1014, and ~10 other open issues on deduplication/debouncing
Commit prefix enforcementfix: prefix flagged but not escalated #2105 (escalate prefix mismatches to changes_requested)
PR description accuracy — Mismatch flagged but only as info-level #2280 (escalate description-vs-diff discrepancies above info severity)

The concurrency group cancellation worked correctly (run 3 was properly superseded by run 4 within seconds). The existing issue backlog for review deduplication is extensive, suggesting this is a known and actively tracked area.

ifireball pushed a commit to ifireball/fullsend that referenced this pull request Jun 24, 2026
…rsion-sync

fix: sync functional tests openshell version with shared pin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/ci CI pipelines and checks requires-manual-review Review requires human judgment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants