Skip to content

ci: cache the pinned actionlint and shellcheck archives - #3659

Merged
Quick104 merged 3 commits into
Silo-Server:mainfrom
blurbery:ci/cache-workflow-tool-archives
Nov 9, 2026
Merged

Quick104 merged 3 commits into
Silo-Server:mainfrom
blurbery:ci/cache-workflow-tool-archives

Conversation

@blurbery

@blurbery blurbery commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none

Since about 08:50 UTC on 8 November, every CI run has failed in Repository checks, whatever the change. That job starts by downloading actionlint and ShellCheck from GitHub release assets, and GitHub has been answering those downloads with 504s while the rest of Actions works. curl --retry 3 gives up after a few seconds, so the job fails, and CI result fails with it. Which archive fails has moved around: ShellCheck first, then actionlint.

This change keeps the two archives in the Actions cache, so a run only downloads them on a cache miss.

Approach

A new actions/cache step, pinned to the same v6.1.0 SHA the workflow already uses, restores workflow-tool-archives under a key built from both tool versions and checksums. The install step downloads an archive only if it isn't already there, then checks both archives against the same pinned SHA-256s as before and extracts the binaries. A cached archive gets the same checksum check as a fresh download, and the cache only saves after a job succeeds.

The repo-checks job keeps both tool versions and checksums in job-level env, and the cache key, download URLs, checksum lines and ShellCheck extract path all read from them, so changing a version or checksum also changes the key. The prune job only touches go-* caches, so it leaves this one alone.

Because ci.yml calls this workflow at @main, this PR's own run uses the current main copy and can fail on the same 504s. The cache fills after the first successful run on main once downloads work again, and every later run reads from it.

I also looked at falling back to a second download source. PyPI's shellcheck-py wheel bundles a byte-identical 0.11.0 binary, but actionlint-py only ships a source package that downloads from GitHub too, so that would cover just one of the two tools.

Validation

  • actionlint (1.7.12, repo config): clean.
  • python3 .github/actions/ci-tools/test_select_jobs.py: 49 tests passed, including the action pin gate.
  • Ran the install step's script locally with the cache folder seeded and curl stubbed to fail: it verified both archives, extracted both tools and made no network calls. Appending junk to a cached archive made the checksum fail and the step exit 1.
  • Review follow-up (8424125, which moves the pinned values into env): a cold run with real downloads and a warm run with curl stubbed to fail both passed outside Actions; actionlint, make verify-actionlint verify-shellcheck and test_select_jobs.py pass.
  • Not run: a cold run end to end, because the actionlint download kept returning 504 while I tested.

Evidence

Evidence: none, no user-visible change

Risks

None identified. If the cache is empty or evicted, the step falls back to today's behaviour.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code (Claude desktop app)
  • Tool(s): Claude Code
  • Model(s): claude-opus-5-5
  • Involvement: AI-assisted. AI-assisted with Claude Opus. I directed the task and designed the work.
  • Adversarial review: n/a

Note

Cache pinned Actionlint and ShellCheck archives in CI

Adds an actions/cache step to the repo-checks job in trusted-linux-ci.yml. The cache key includes the pinned Actionlint and ShellCheck versions and SHA-256 checksums.

  • The install step now checks the archive directory first and only downloads a tool archive when it is missing. Each archive is verified against its job-level checksum before extraction.
  • Behavioral Change: CI runs no longer download these tools on every run; the cache key changes when a pinned version or checksum changes.

Macroscope summarized 8424125.

@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The repo-checks job now declares pinned actionlint and ShellCheck versions and checksums. It caches their release archives, verifies each archive, and extracts the tools.

Changes: Tool Archive Caching

Layer / File(s) Summary
Configure and install tools
.github/workflows/trusted-linux-ci.yml
The job declares tool versions and checksums. It reuses cached archives or downloads missing ones, verifies their checksums, and extracts the tools.

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

Change: Other

Suggested reviewers: darthshadow, quick104

Merge Risk: Minimal · up to 84241

Archive caching retains checksum verification; no merge-blocking risk is established.

Security architecture risk: Low · up to 84241

Cached and downloaded tool archives must pass the existing checksum checks before extraction. No broader workflow permissions or runner access were added. Remaining uncertainty concerns cache publication and recovery after interrupted or concurrent runs, rather than an identified integrity bypass.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The directly changed execution surface is the repository-check job on a hosted runner. Cache reuse introduces persistence across provisioning runs, but the reviewed change does not expand declared token permissions or move execution onto private runners.

Trust Boundaries and Controls

  • inferred — For the two tool archives, restored cache contents and downloaded release bytes cross the same checksum gate before tool extraction. Modifying either archive without matching its configured digest causes installation to fail rather than accepting that archive as the pinned tool.

Resilience and Maintainability Implications

  • inferred — An existing corrupt archive is rejected rather than automatically downloaded again. If such an archive is persisted by the external cache mechanism, repeated restores can keep failing under that key. Whether failed, interrupted, or concurrent jobs can publish this state was not established from the available implementation evidence.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "ci: cache the pinned actionlint and shellcheck archives" matches the main change. The workflow now restores the pinned actionlint and ShellCheck archives from an Actions cache and skips dow…
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.
Description check Passed The description matches the changeset. It explains that the repo-checks job downloads actionlint and ShellCheck from GitHub release assets, and that this change caches those archives in Actions. It al…
Full details: Title check

Explanation

The title "ci: cache the pinned actionlint and shellcheck archives" matches the main change. The workflow now restores the pinned actionlint and ShellCheck archives from an Actions cache and skips downloads when they are present. The title is short, specific, and uses a conventional commit prefix.

Full details: Description check

Explanation

The description matches the changeset. It explains that the repo-checks job downloads actionlint and ShellCheck from GitHub release assets, and that this change caches those archives in Actions. It also covers the new actions/cache step, the job-level env values that feed the cache key and checksums, the download-on-miss behavior, and the validation performed. This aligns with the summary of changes to trusted-linux-ci.yml.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cc8b6aee-7dd1-48f2-92d3-d21709f8e604
Commits

Reviewing files that changed from the base of the PR and between f69e14a and 8424125.

Files selected for processing: 1

  • .github/workflows/trusted-linux-ci.yml

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Nov 8, 2026
@silo-kody

silo-kody Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 4 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime
  • Preserve durable media identity and share identity-evidence precedence
  • Bound decoder throughput trades and share direct-play eligibility

@silo-triage silo-triage Bot added bug Something isn't working priority: P2 Limited scope, workaround exists, or polish labels Nov 8, 2026
@blurbery blurbery closed this Nov 8, 2026
@blurbery
blurbery deleted the ci/cache-workflow-tool-archives branch November 8, 2026 22:19
@blurbery
blurbery restored the ci/cache-workflow-tool-archives branch November 8, 2026 22:19
@blurbery blurbery reopened this Nov 8, 2026

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Claude Code (claude-opus-5-5)

The cache does what the description says. I ran the install step outside Actions: a cold run downloads and verifies both tools, a warm run with curl stubbed to fail makes no network calls, and a cached archive that doesn't match its checksum fails the step. A second review (Codex, gpt-6.1-sol) checked cache scoping, partial downloads, the prune job and the action-pin gate and found nothing to fix. One low-severity finding is inline.

Comment thread .github/workflows/trusted-linux-ci.yml Resolved
The cache key repeated the tool versions apart from the download URLs and
checksums. A bump that missed the key would restore the old archive and fail
its checksum on every run, and the bump PR's own CI could not show it because
ci.yml runs this workflow from main. Keep both versions and checksums in
job-level env and build the key, URLs, checksums and extract path from them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@silo-kody

silo-kody Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 4 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime
  • Preserve durable media identity and share identity-evidence precedence
  • Bound decoder throughput trades and share direct-play eligibility

@Quick104

Quick104 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

🤖 Claude Code (claude-opus-5-5)

Review summary

Reviewed head: 8424125 (my fix on top of bc98249).

Addressed

  • Low: the cache key repeated the tool versions apart from the URLs and checksums, so a bump that missed the key would have failed every run after it merged. Fixed in 8424125: both versions and both checksums now live in job-level env, and the key, URLs, checksum lines and extract path read from them.

Verification

  • I ran the install step outside Actions. A cold run downloads and verifies actionlint 1.7.12 and ShellCheck 0.11.0. A warm run with curl stubbed to fail passes without fetching anything. A cached archive that doesn't match its checksum fails the step.
  • actionlint is clean, make verify-actionlint verify-shellcheck passes, and .github/actions/ci-tools/test_select_jobs.py passes, including the action-pin gate.
  • Second review: Codex (gpt-6.1-sol), one round on bc98249, read-only. No findings. It checked cache scope across PR and main refs (no pull_request_target caller), that failed or partial downloads are never saved, that exact-key hits never overwrite an entry, that the prune job only matches its go-* prefixes, and that repo-checks always runs on hosted runners. It agreed with the key finding and suggested adding the checksums to the key, which the fix does.
  • No new tests. The PR adds no test, and a workflow step has no test to fail on the base.

Left for maintainers

  • This PR's checks don't exercise the change. ci.yml runs trusted-linux-ci.yml from @main, so the new cache step first runs on main after merge. The first main run fills the cache; check that Repository checks passes there.

Validated features: none affected. Only the CI workflow changes; no product behavior or validation case is reachable.

User manual: unaffected (CI only). Apple/Android parity: not applicable.

Fit: 9/10 · Readiness: 8/10 — conditional (assuming CI is green)

Fit: it fixes a real CI outage with the Actions cache the workflow already uses, adds no new tooling, and keeps checksum verification on every archive. Readiness: the code is small and checked, but the changed workflow can't run before merge, so the only proof so far is the step run outside Actions. The first main run after merge is the remaining check.

@Quick104
Quick104 merged commit f6507d3 into Silo-Server:main Nov 9, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: P2 Limited scope, workaround exists, or polish size/S 0–49 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants