Skip to content

fix(ci): mythos-auto plumbing — slug ordering, unzip install#164

Merged
avrabe merged 1 commit into
mainfrom
fix/mythos-auto-plumbing
May 18, 2026
Merged

fix(ci): mythos-auto plumbing — slug ordering, unzip install#164
avrabe merged 1 commit into
mainfrom
fix/mythos-auto-plumbing

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 18, 2026

Summary

Three plumbing fixes for mythos-auto.yml, all surfaced by PR #163's first end-to-end run. None of these affect Mythos discover semantics — they all live in the workflow scaffolding around the action.

What broke on PR #163

14:32:12 Error: Unable to locate executable file: unzip. Please verify either the file path exists...
14:32:12 /var/lib/runners/runner5/_work/_temp/.../d9f8a6f8.sh: line 3: bun: command not found
14:32:12 ##[error]Process completed with exit code 127.
14:32:14 ##[error]No files were found with the provided path: mythos-out/.json. No artifacts will be uploaded.

Three discrete bugs cascaded:

# Bug Effect
1 unzip missing on rust-cpu runners oven-sh/setup-bun fails → claude-code-action's bun-based entrypoints exit 127
2 Slug step had no if: always() and ran AFTER discover When discover failed, slug was skipped; steps.slug.outputs.slug empty
3 Empty slug interpolated silently into mythos-out/.json path upload-artifact failed; no per-file result; aggregate ran on missing data

Fixes

Fix What it does
Move slug step BEFORE discover Slug is now always set regardless of discover outcome. No if: always() needed — slug + discover share the same precondition.
New Install unzip (required by setup-bun) step Best-effort apt install, continue-on-error: true. Mirrors the action's own subprocess-isolation install pattern. Non-Debian runners log a warning and proceed.
Read SLUG from env in save-step, fail loudly on empty Pulls slug out of ${{ }} interpolation into env var SLUG. Explicit [ -z "$SLUG" ] check writes a ::error:: log instead of silently producing mythos-out/.json.
Guard upload-artifact with steps.slug.outputs.slug != '' Even if save-step somehow runs with empty slug, upload-artifact won't try to use it as a name.

The placeholder-FINDING fallback that surfaced these issues (writes "discover step failed before emitting structured output" when RESULT_JSON is empty) is intentional and stays — it's what makes the gate block on workflow failures rather than silently passing.

Test plan

  • CI green
  • Mythos auto-runner fires end-to-end on this PR (touches .github/workflows/mythos-auto.yml — not a Tier-5 file, so the auto-runner's detect job will set any=false and the scan job will skip cleanly). To exercise the matrix path end-to-end we need the next Tier-5 PR.
  • Watch for: any new "::error::" logs from the SLUG-empty guard

Sequencing

This is PR #164 in the post-v0.8.1 cycle:

🤖 Generated with Claude Code

PR #163 was the first end-to-end test of mythos-auto.yml (added in
#162). It surfaced three plumbing issues:

1. The action's `oven-sh/setup-bun` step requires `unzip`, which is
   not installed by default on the rust-cpu runners. Without it the
   action's bun-based post-step entrypoints exit 127, and the whole
   scan-step exits failure before emitting structured output.

2. The `Slugify file path for artifact name` step sat AFTER the
   discover step with no `if: always()`. When discover failed, the
   slug step was skipped, leaving `steps.slug.outputs.slug` empty.
   Downstream `if: always()` steps then wrote
   `mythos-out/.json` (no slug) and `upload-artifact` complained
   "No files were found with the provided path: mythos-out/.json".

3. The `Save structured output as artifact` step embedded
   `${{ steps.slug.outputs.slug }}` in the run-block via direct
   interpolation. Silently substituting an empty slug into a file
   path is a footgun even if the slug step had run — better to read
   slug from an env var and fail loudly on empty.

Fixes:

- Slugify step moves BEFORE the discover step, so it always runs
  (no `if: always()` needed because both detect+slug are the
  precondition for everything below).
- New `Install unzip (required by setup-bun)` step, best-effort
  apt install mirroring the action's own subprocess-isolation
  install pattern. `continue-on-error: true` so non-Debian runners
  don't break the workflow.
- `Save structured output as artifact` reads slug from env (`SLUG`)
  rather than `${{ }}` interpolation; explicitly errors out if SLUG
  is empty rather than silently writing to a malformed path.
- `upload-artifact` step gains an extra `steps.slug.outputs.slug
  != ''` guard so it never tries to upload with an empty name.

The placeholder-FINDING fallback (the part that surfaced these
issues by writing "discover step failed before emitting structured
output" into the aggregate comment) is intentional and stays — it
guarantees the gate blocks on workflow failure rather than silently
passing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

LS-N verification gate

⚠️ 16/19 verified — 3 missing regression tests

count
Passed (≥1 test, all green) 16
Failed (≥1 test failure) 0
Missing (no ls_*_NN_* test found) 3

Approved loss-scenarios.yaml entries are expected to have a
regression test named ls_<letter>_<num>_* (e.g. LS-A-11
ls_a_11_*). The gate runs each prefix via cargo test --lib --no-fail-fast and aggregates pass/fail/missing.

Failed LS entries

(none)

Missing regression tests
  • LS-CP-4
  • LS-A-8
  • LS-A-9

Updated automatically by tools/post_verification_comment.py.
Source of truth: safety/stpa/loss-scenarios.yaml.

@avrabe avrabe merged commit 5ae7e8d into main May 18, 2026
14 checks passed
@avrabe avrabe deleted the fix/mythos-auto-plumbing branch May 18, 2026 16:29
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