Skip to content

Fix: Follow-up review findings from #1172 (Linux release smoke test) #1286

Closed

Description

@Alan-Cha

Feature Description

#1172 (merged) added the Linux release smoke test for #957. A thorough review round landed
after merge — too late to act on before merging — surfacing several real correctness gaps
in the upgrade-testing logic, plus one structural issue in how the workflow checks out code.
Tracking them here for a follow-up PR, same pattern as #1106 after #1076/#1080.

Proposed Solution

  • Checkout pins to the release's own commit, not today's test script. The workflow
    checks out github.event.workflow_run.head_sha — the release's commit — but
    scripts/release_smoke_test_linux.sh didn't exist yet at v0.8.0/v0.8.1 (confirmed
    via the GitHub API: 404 at both commits). Re-running an old release's workflow fails
    before the test even starts, for a reason unrelated to anything the test logic itself
    handles. Fix: stop pinning the checkout ref; run today's copy of the test script
    regardless of which release triggered the run — the actual release assets and
    install.sh are fetched over the network either way, so the local checkout doesn't
    need to match.
  • gh release list --limit 20 caps the candidate pool before filtering. Once 20+
    stable releases exist, re-testing an old one can find zero candidates "older than TAG"
    even though earlier releases exist, silently skipping the upgrade leg while still
    reporting success. Needs pagination or a much higher limit.
  • Date-based "older than TAG" breaks across maintenance branches. release-0.6 and
    release-0.7 both exist; a patch tagged later on an older line (e.g. v0.7.1 tagged
    after v0.8.1) would resolve its "older" release to something with a higher version
    number — an unlabeled downgrade. Needs version-order comparison (sort -V) instead of
    pure chronological order, or an explicit skip when TAG isn't on the newest release
    line.
  • Uninstall never verifies the process actually stopped. All three current checks
    (printed "Removed", unit file gone, config unchanged) can pass even if the underlying
    systemctl --user disable --now failed — removeService only logs that failure and
    deletes the unit file regardless. Add a direct systemctl --user is-active check.
  • main-latest's installer isn't pinned to the same commit as the binaries. Only the
    expected version string is pinned via the triggering SHA; the installer script itself
    is fetched from raw.githubusercontent.com/.../main/..., cached up to 5 minutes. A
    commit that changes both the installer and the binaries together (as the rename PR did)
    has a narrow window to be tested with a mismatched pairing. Fetch the installer from a
    SHA-pinned URL instead.
  • Uninstall call site still hardcodes agentop, inconsistent with dropping
    detect_cli — relevant again once the checkout-ref fix makes old-release paths
    reachable.
  • Doc cleanup: the plan doc still describes detect_cli as the fix after it was removed;
    a couple of my own code comments overclaim the exact failure mode in ways reviewers
    caught (e.g. claims a case "stops being reachable" when it's actually permanently
    reachable, and misdescribes which error message a failure produces); workflow comment
    capitalization ("Release Binaries" vs the real "Release binaries") should match
    everywhere, not just in the trigger itself.

Additional Context

All findings came from a single post-merge review round on #1172 by huang195 and clawgenti
(CodeRabbit also independently flagged the --limit 20 issue). Part of the Cortex v0.9.0
release hardening; downstream of #957, which is already closed.

Activity

  1. added a commit that references this issue on Oct 6, 2026
    2887f8a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions