Skip to content

verify-action-build: fix RESULT panel cause on binary-download failure#747

Open
potiuk wants to merge 1 commit intomainfrom
fix-verify-result-message-binary-download
Open

verify-action-build: fix RESULT panel cause on binary-download failure#747
potiuk wants to merge 1 commit intomainfrom
fix-verify-result-message-binary-download

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented Apr 19, 2026

Summary

Observed on PR #724's verify run: the summary table correctly showed JS build verification: ✓ compiled JS matches rebuild and Binary download verification: ✗ 1 unverified download(s) — but the RESULT panel still said "Differences detected between published and rebuilt JS", which was not the cause of failure.

Root cause

In verify_single_action, the failure branch chose its message based on is_js_action first and hardcoded the JS-mismatch string for every JS action. Since #743, the binary-download check runs for every action type (including JS actions), so overall_passed = all_match and not binary_download_failures can go false via the second term alone — but the RESULT text would still blame JS.

Fix

Dispatch on the actual failure condition:

  • all_match == False → JS-mismatch message (with or without the lock-file-retry variant).
  • Otherwise, binary_download_failures → binary-download message.
  • Fallback → generic "verification failed".

Test plan

Related

When a JS action rebuilds cleanly but fails only the binary-download
verification check, the RESULT panel incorrectly reported "Differences
detected between published and rebuilt JS" because the failure branch
selected its message on `is_js_action` rather than the actual cause.

Reorder the branches to dispatch on the real failure condition:
all_match=False → JS-mismatch message; otherwise binary download
failures → binary-download message. Observed on PR #724 (posit-dev/
setup-air): JS row was ✓ pass, Binary row was ✗ fail, yet the RESULT
panel still referenced a JS mismatch.

Adds regression tests for both paths (JS action with unverified
download; JS action with actual JS mismatch).

Generated-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@potiuk
Copy link
Copy Markdown
Member Author

potiuk commented Apr 19, 2026

Verified end-to-end on posit-dev/setup-air@cf390573ff4fe0f198f35df3a642b1409328d859 (the ref bumped by PR #724) using this branch:

Verification Summary
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Check                          ┃ Status ┃ Detail                        ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ Action type detection          │   ℹ    │ node24                        │
│ Binary download verification   │   ✗    │ 1 unverified download(s)      │
│ JS build verification          │   ✓    │ compiled JS matches rebuild   │
│ Approved versions              │   ℹ    │ 1 version(s) on file          │
│ Source diff vs approved        │   ℹ    │ compared against 63e80dedb6d2 │
└────────────────────────────────┴────────┴───────────────────────────────┘

╭─────────────────────────────────── RESULT ───────────────────────────────────╮
│ node24 action — 1 unverified binary download(s) detected (no                 │
│ checksum/signature check in file)                                            │
╰──────────────────────────────────────────────────────────────────────────────╯
Exit code: 1

The RESULT panel now correctly attributes the failure to the binary-download check (tc.downloadTool in src/download/download-version.ts) instead of misleadingly saying "Differences detected between published and rebuilt JS" as in the original PR #724 run. Exit code 1 as expected.

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