Skip to content

fix(45,49): make the red gates report what they found, then fix what they found - #53

Merged
hyperpolymath merged 2 commits into
mainfrom
arena/01a0d9bb-launch-scaffolder
Sep 25, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
arena/01a0d9bb-launch-scaffolder

Conversation

@arena-ai-coding-agent

@arena-ai-coding-agent arena-ai-coding-agent Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Part 1 — make the red gates on main report what they found (#45)

#52 landed with both of its gates red and each saying only Process completed with exit code 1. Two causes:

  • GitHub invokes bash with -eo pipefail, so the commands these gates exist to
    watch fail (cargo fmt --check, cargo test, diff) killed their own step
    before its error handling ran. Every step now opens with set +e, handles its
    status, and ends in an explicit exit.
  • The detail only reached the run log. A shared annotate helper re-emits the
    head of the failing output as a check annotation: the rustfmt diff, the
    failures: section, the fixture-currency diff, the shellcheck findings.

That is what made the rest of this PR measurable instead of guesswork.

Part 2 — what the annotations then showed

cargo fmt (#45 AC2). The issue read the pre-existing drift as rustfmt
wanting the app_license insert collapsed to one line. The annotation says the
opposite: the arguments exceed fn_call_width (60), so rustfmt wants the
five-line form — the code on main was already clean and the collapse in #52
introduced the drift. Reverted, with the reason recorded in the commit.

shellcheck (#49). SC2034, SC2001, SC2155, all three fixed in
templates/launcher.sh.tera — not in the fixtures — and the currency-locked
fixture re-minted. It is now clean at every severity, not only warning and
above. APP_PORT was answered by deciding which of the two is true: the port
now has one spelling (composed from APP_PORT when the config gives no URL; no
APP_PORT at all when it does), pinned by
the_port_has_exactly_one_spelling_in_the_generated_script, with a mint-time
warning for a config whose URL and port contradict each other.

Evidence

Closes #49. Remaining from the six: #48 (world-writable /tmp defaults), #41
(REQUIRED_KEYS vs the deed's :required-fields), #42 (.deed descriptor
design), #40 (verification write-up).

#52 landed with both of its gates red on main, and each said only "Process
completed with exit code 1". Two causes:

* GitHub invokes bash with `-eo pipefail`. The commands these gates exist to
  watch fail — `cargo fmt --check` on a dirty tree, `cargo test` with a failing
  test, `diff` on a drifted fixture — so errexit killed the step before its own
  error handling ran. Every step now opens with `set +e`, handles its status
  explicitly, and ends in an explicit `exit`.
* The detail only ever reached the run log. A shared `annotate` helper now
  re-emits the head of the failing output as a check annotation: the rustfmt
  diff, the `failures:` section of a test run, the fixture-currency diff, the
  shellcheck findings. A gate whose failure you cannot read is a gate you fix by
  guessing.

The toolchain step also gains `components: clippy, rustfmt`; without rustfmt the
drift diagnostic had nothing to run.

This is the diagnostic half only — it does not fix whatever rustfmt and the
suite are reporting. It makes them legible so the next commit can.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 266f29bb-3f67-4740-a26f-114b444d575b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

…he fixture

SC2034, SC2001 and SC2155 were reported against the committed fixture, but the
fixture is a faithful record of what `mint` writes, so all three are properties
of `templates/launcher.sh.tera` and reached every launcher in the estate. Fixed
at the source; the fixture was then re-minted, and is now clean at EVERY
shellcheck severity, not only at warning and above.

SC2034 — `APP_PORT` unused. Answered by deciding which of the two is true
rather than by disabling the lint, because the lint was pointing at a real
duplicate: `URL` hardcoded the port on the line above and `APP_PORT` restated
it, so a config carrying both could put two different ports in one script and
nothing would notice. The port now has ONE spelling. No explicit
`[runtime].url` → `APP_PORT` is emitted and `URL` is composed from it, so they
cannot disagree. Explicit URL → the URL is the whole answer and `APP_PORT` is
not emitted at all. `the_port_has_exactly_one_spelling_in_the_generated_script`
pins both arms, and `render` now warns at mint time when a config sets a URL and
a port that contradict each other — the disagreement the duplicate used to hide.

SC2001 — `echo "$body" | sed 's/^/  /'` becomes
`printf '  %s\n' "${body//$'\n'/$'\n  '}"`: the same two-space indent on every
line including empty ones, with no subprocess per call. Fixed rather than
carrying an inline justification.

SC2155 — `local script_path="$(cd … && pwd)/$(basename …)"` takes its exit
status from `local`, so a failed `cd` was swallowed and the next line copied the
script to `$LAUNCHER_TARGET` from a path assembled out of nothing. Declared and
assigned separately, with the failure now reported. Of the three this is the one
that masked a real error.

Also reverts the previous commit's `app_license` collapse. #45 AC2 read the
pre-existing `cargo fmt --check` drift as rustfmt wanting that call on one line;
measured against the CI annotation it wants the opposite — the arguments exceed
`fn_call_width` (60), so the five-line form on main was already clean and the
collapse introduced the drift. The gate's own diagnostic is what settled it.

Non-vacuity, unsolicited: the shellcheck gate added in #52 caught SC2034 and
SC2155 in a launcher minted during the run BEFORE this commit existed, which is
the evidence #49 AC4 asks for — it fails at the point a template regression is
introduced, not at the point someone remembers to lint.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@arena-ai-coding-agent
arena-ai-coding-agent Bot marked this pull request as ready for review September 25, 2026 19:07
@arena-ai-coding-agent arena-ai-coding-agent Bot changed the title ci(45): make the red gates on main report what they found fix(45,49): make the red gates report what they found, then fix what they found Sep 25, 2026
@hyperpolymath
hyperpolymath merged commit 29cbc3b into main Sep 25, 2026
24 of 25 checks passed
@hyperpolymath
hyperpolymath deleted the arena/01a0d9bb-launch-scaffolder branch September 25, 2026 19:55
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.

templates/launcher.sh.tera: three Shellcheck findings reach every minted launcher

1 participant