Commit 1e4fa2c
fix(ci): make finishingbot/seambot/rhodibot workflows actually green (#47)
## Problem
The three bot workflows were re-enabled against `gitbot-fleet` in #42,
but they were **still red on every run** for two reasons that have
nothing to do with the bots themselves (verified from run logs
`25977596773`/`777`/`771`):
1. **Step ordering.** `Swatinem/rust-cache` ran *before* the
`gitbot-fleet` clone, with `workspaces:` pointing at a path that did not
exist yet. rust-cache errored (`The cwd: …/bots/<bot> does not exist!`),
the cache never worked, and for **seambot** it left
`$RUNNER_TEMP/gitbot-fleet` present so the subsequent `git clone` died
with `destination path … already exists and is not an empty directory`
(**exit 128**).
2. **Exit-code capture under `set -e`.** `bin … > results.txt 2>&1; echo
$? > exit-code.txt` runs under `bash -e`. A non-zero bot exit — which is
the *intended gating signal* — aborts the step before the exit-code file
is written. The non-`continue-on-error` "Display results" step then
hard-fails on the missing file, so the job goes red even though the gate
logic was supposed to handle it.
## Fix (all three workflows)
- Clone `gitbot-fleet` **before** the cache step; `rm -rf` the target
dir first for idempotency.
- Capture the exit code without aborting, then re-exit with it:
```bash
rc=0
"$BIN" … > <bot>-results.txt 2>&1 || rc=$?
echo "$rc" > <bot>-exit-code.txt
exit "$rc"
```
This preserves the step's `failure` outcome so the `Fail on
…findings/violations` gate still fires on real issues, while the job is
green only when the bot is genuinely clean.
- Hardened the `Display results` `cat` against a missing file.
## Verification
CLI invocations checked against `gitbot-fleet` @ pinned ref `2e0ea3ca`
(which **is** gitbot-fleet#150's commit, so `rhodibot check` exists):
| bot | invocation | clap definition @ ref |
|---|---|---|
| finishingbot | `finishing-bot --path <ws> audit` | global `--path`
(default `.`) + `Audit` subcommand ✓ |
| seambot | `seambot check` | global `--path` (default `.`) + `Check`
subcommand ✓ |
| rhodibot | `rhodibot check --owner … --repo …` | `Check { owner, repo,
format }` (added in #150) ✓ |
All three YAML files validated with `yaml.safe_load`.
Closes #39
Closes #40
Closes #41
Refs #37 (parent — the three sub-issues complete it)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5b7d226 commit 1e4fa2c
3 files changed
Lines changed: 56 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
37 | 36 | | |
38 | 37 | | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| |||
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
55 | 65 | | |
56 | | - | |
57 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
58 | 69 | | |
59 | 70 | | |
60 | 71 | | |
| |||
65 | 76 | | |
66 | 77 | | |
67 | 78 | | |
68 | | - | |
| 79 | + | |
69 | 80 | | |
70 | 81 | | |
71 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
38 | 37 | | |
39 | 38 | | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
59 | 69 | | |
60 | 70 | | |
61 | 71 | | |
62 | | - | |
63 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
64 | 75 | | |
65 | 76 | | |
66 | 77 | | |
| |||
71 | 82 | | |
72 | 83 | | |
73 | 84 | | |
74 | | - | |
| 85 | + | |
75 | 86 | | |
76 | 87 | | |
77 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
| 49 | + | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
| |||
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
68 | 76 | | |
69 | | - | |
70 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
71 | 80 | | |
72 | 81 | | |
73 | 82 | | |
| |||
78 | 87 | | |
79 | 88 | | |
80 | 89 | | |
81 | | - | |
| 90 | + | |
82 | 91 | | |
83 | 92 | | |
84 | 93 | | |
| |||
0 commit comments