Skip to content

docs(run): document running workflows locally and add run --explain - #324

Merged
jdx merged 2 commits into
run/6-containersfrom
run/7-docs
Oct 30, 2026
Merged

jdx merged 2 commits into
run/6-containersfrom
run/7-docs

Conversation

@jdx

@jdx jdx commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Documents jactionlint run on the site and adds jactionlint run --explain for every reason a job is skipped or something is refused. Last PR of the stack.

$ jactionlint run ci
  [step 2] writing outside the workspace is denied
    sh: cannot create .../work/../outside: Permission denied
  [step 2] failure (exit status 1)
    hint: the sandbox only lets a step write to its workspace copy ... (jactionlint run --explain sandbox-denied)
$ jactionlint run --explain sandbox-denied      # what is open, what is closed, which flag opens it
$ jactionlint run --explain list                # the 13 explanations
$ jactionlint run --version
jactionlint run, runner behavior version 1 (the Actions behavior of October 2026)
  • docs/run.md (new page, in the sidebar): plan view, running, expressions, actions and reusable workflows, containers, parallel and dry runs, the cache, restricting the network, isolation per OS, a "Differences from GitHub" table, and the explanations. The README and docs/cli.md point to it. mise run docs:build (VitePress build plus the anchor and link verification) passes with the new page.
  • --explain ID for: sandbox-unavailable, sandbox-denied, runs-on-other-os, unpinned-action, unpinned-image, container-option-refused, no-container-engine, container-mount-invisible, dynamic-matrix, github-env-refused, set-env-disabled, secret-unset, net-proxy-refused, windows. Messages end with (jactionlint run --explain ID); a test checks that every pointer in the source has an explanation.
  • Corpus test: every workflow of this repository goes through --list, --list --json and --dry-run in go test (in CI on Linux, macOS and Windows). That is what found a panic of --dry-run on a step with if:, fixed in the containers PR of this stack (fix(run): give a dry run the context…).
  • The release notes come from the conventional commit titles of the stack through the existing release-please and communique flow; nothing to configure there.
What is verified in the stack, and what is not

Verified on Linux 7.2 (Landlock ABI 10): the sandbox escape suite, all golden transcripts, the cache against real @actions/cache 3.3.0 / 4.0.5 / 6.3.0 (up to a 140 MiB archive), real GitHub-hosted actions (actions/cache, jdx/mise-action with a cache hit on the second run, JavaScript actions with a downloaded Node.js, composite actions, reusable workflows), --net=proxy in the kernel, services with a health check on a real Docker engine, the docs build.

Not verified: macOS beyond what the macOS CI job shows (the first Seatbelt profile, deny-default, made bash abort on a real runner; it now starts from allow-default, see the sandbox PR); Windows (steps are refused by design); Landlock ABIs below 10; a job container running steps against a real engine (the engine available here cannot see this machine's files; a fake engine covers the command lines and the flow); podman; Swatinem/rust-cache hits (its key needs a rustup default that the sandboxed home does not have on this machine); zstd cache archives.

AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: claude-code_2-1-309_agent.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 47a7b83c-c60b-451a-b2d1-d8080b9c7d21
Commits

Reviewing files that changed from the base of the PR and between 82f2fd6 and 7a26b49.

Files selected for processing: 17
  • README.md
  • docs/cli.md
  • docs/run.md
  • internal/runner/action.go
  • internal/runner/cli.go
  • internal/runner/containers.go
  • internal/runner/containers_test.go
  • internal/runner/explain.go
  • internal/runner/explain_test.go
  • internal/runner/job.go
  • internal/runner/jobcontainer.go
  • internal/runner/list.go
  • internal/runner/run.go
  • internal/runner/step.go
  • internal/runner/testdata/list/ci.golden
  • internal/runner/testdata/run/commands.golden
  • internal/runner/testdata/run/sandbox_linux.golden
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

jdx and others added 2 commits October 30, 2026 23:23
…ior version

jactionlint run --explain ID tells why a job was skipped or something was refused (the messages
end with a pointer to the explanation), and --version prints the behavior version of the runner.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The page covers the plan view, running, expressions, actions, containers, parallel and dry runs,
the cache, the network modes, isolation and the differences from GitHub; the README and the
command line page point at it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jdx
jdx added this pull request to stack #318 October 30, 2026 23:48
@jdx
jdx merged commit ad5f1f1 into main Oct 30, 2026
14 of 23 checks passed
@jdx
jdx deleted the run/7-docs branch October 30, 2026 23:51
jdx added a commit to jdx/jouet that referenced this pull request Oct 31, 2026
Agents find out whether CI passes by pushing a commit and waiting, then
push fix after fix at the same failing job. `jouet ci run` runs the job
on this machine first, through `jactionlint run` (jdx/jactionlint#324).
That needs no container engine: each job runs in a copy of the checkout,
in the OS sandbox, with a throwaway home and no secrets.

```console
$ jouet ci run CI --check "Unit tests" --log-lines 3
FAIL jactionlint run .github/workflows/ci.yml -j test  1 pass, 1 fail  (4s)

FAIL Unit tests
  [step 2] "run the suite"  exit status 3
    error: assertion failed at src/a.rs:3
    line 1
    line 2
    ... 95 lines skipped
    line 98
    line 99
    line 100
full log: ~/.local/state/jouet/logs/ci-run-1793405018-1166474.log
```

What jouet adds on top of `jactionlint run`:
- **GitHub's names.** `WORKFLOW` can be a workflow's `name:`. `--check
NAME` takes a check name as GitHub and `wait ci` show it (a matrix cell,
a job's `name:`, or `caller / job`) and runs the job behind it. A name
that matches nothing lists the jobs; one that matches jobs in several
workflows asks for the workflow.
- **Output sized for an agent.** The report has one line for the run,
then each failed step, cut to its last `--log-lines` lines plus earlier
error-looking lines, the same way as `wait ci`. Under each step comes
jactionlint's hint, then the skipped jobs and why (what this run can't
vouch for), then warnings such as a secret that was not given. The whole
transcript goes to a log. `continue-on-error` failures don't count, and
when a composite action fails, the step inside it that failed is the one
shown.
- **jouet's exit codes:** 1 when a job failed, 3 when no workflow or job
matches, 4 when jactionlint is missing, has no `run`, or couldn't start
the run.
- **`--json`** with jobs, failed steps and their excerpts, and the
`--explain` IDs. In the reported command, `--secret` values show as
`***`.

When jactionlint is installed, `wait ci`, `wait run` and `pr land` now
end each failed Actions job with the command that runs it here, and add
it to the JSON as `local`:

```console
FAIL unit  step "cargo nextest"  required
  https://github.com/jdx/demo/actions/runs/900/job/123456
  full log: ~/.local/state/jouet/logs/jdx-demo-job-123456.log
  locally: jouet ci run test --check unit
```

`agent-help` gets a `ci` entry and lists jactionlint among the installed
companions. The docs get a new page, `docs/commands/ci.md`, a note in
`wait.md`, and the generated CLI reference and man page.

The skill's line-cap test now budgets its fixed text (17 lines)
separately from one bullet per command family. With `search`, `read` and
`ci`, the skill had reached 31 lines against a flat cap of 30.

**Stacked on #47.** The grouped overview keeps this one command family
from pushing agent-help past its cap.

<details>
<summary>How it was tested</summary>

- Ran against a jactionlint built from main (ad5f1f16) on a demo
repository. That covered a passing job, a failing step with 100 lines of
output, a job skipped for macOS, a lookup by workflow `name:` and by job
`name:`, `--json`, `--secret` masking, an unknown workflow, and no
jactionlint on PATH.
- The parser's unit tests run on jactionlint's own golden transcripts
(`failure`, `sandbox_linux`, `basic`, `commands`), copied into
`src/ci/fixtures`, plus a hand-written one with a composite action,
timings, ANSI colours and a run warning.
- `test/ci.bats` uses a fake jactionlint that records its arguments.
`tests/wait_github.rs` checks the `locally:` line appears only when
jactionlint is on PATH.
- `cargo clippy --workspace --all-targets --all-features -- -D
warnings`, `cargo test --workspace --all-targets`, all 151 bats tests,
`mise run render` (no diff) and `mise run docs:build` pass.

One gap: jactionlint's `--list --json` cells carry no display name. A
check named by a job's `name:` is therefore looked up again in the text
plan, which shows `name: …` for each cell. A `display` field in the JSON
is read when present, so a jactionlint that adds one makes that second
call unnecessary.
</details>

*AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5-5;
version: claude-code_2-1-309_agent.*

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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