fix(ci): make finishingbot/seambot/rhodibot workflows actually green#47
Merged
Merged
Conversation
The bots were re-enabled against gitbot-fleet in #42, but the workflows still fail on every run for two structural reasons unrelated to the bots: 1. Step order. `Swatinem/rust-cache` ran *before* the gitbot-fleet clone, with `workspaces:` pointing at a path that did not yet exist. rust-cache errored ("cwd ... does not exist") and, for seambot, left `$RUNNER_TEMP/gitbot-fleet` present so the subsequent `git clone` died with `destination path ... already exists` (exit 128). Fix: clone first, then cache; `rm -rf` the dir before cloning. 2. Exit-code capture. `bin ... > results.txt 2>&1; echo $? > code.txt` runs under `bash -e`; a non-zero bot exit (the *intended* gating signal) aborts the step before the exit-code file is written, so the non-continue-on-error "Display results" step then hard-fails on a missing file. Fix: `rc=0; bin ... || rc=$?; echo "$rc" > code.txt; exit "$rc"` — records the code, preserves the failure outcome so the "Fail on …findings/violations" gate still fires, and the job goes green only when the bot is genuinely clean. Display `cat` hardened. Binary invocations verified against gitbot-fleet @ pinned ref 2e0ea3ca (incl. gitbot-fleet#150's `rhodibot check` CLI): finishing-bot `--path <ws> audit`, `seambot check`, `rhodibot check --owner --repo` all match the clap definitions at that ref. Closes #39 Closes #40 Closes #41 Refs #37 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🔍 Hypatia Security ScanFindings: 17 issues detected
View findings[
{
"reason": "Issue in quality.yml",
"type": "missing_workflow",
"file": "quality.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in security-policy.yml",
"type": "missing_workflow",
"file": "security-policy.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
"type": "unpinned_action",
"file": "governance.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/ubicity/ubicity/benchmarks/mapper.bench.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/ubicity/ubicity/benchmarks/io.bench.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/ubicity/ubicity/benchmarks/validation.bench.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/ubicity/ubicity/tests/mapper.test.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/ubicity/ubicity/tests/core.test.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/ubicity/ubicity/tests/privacy.test.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/ubicity/ubicity/tests/export.test.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The three bot workflows were re-enabled against
gitbot-fleetin #42, but they were still red on every run for two reasons that have nothing to do with the bots themselves (verified from run logs25977596773/777/771):Step ordering.
Swatinem/rust-cacheran before thegitbot-fleetclone, withworkspaces: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-fleetpresent so the subsequentgit clonedied withdestination path … already exists and is not an empty directory(exit 128).Exit-code capture under
set -e.bin … > results.txt 2>&1; echo $? > exit-code.txtruns underbash -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)
gitbot-fleetbefore the cache step;rm -rfthe target dir first for idempotency.failureoutcome so theFail on …findings/violationsgate still fires on real issues, while the job is green only when the bot is genuinely clean.Display resultscatagainst a missing file.Verification
CLI invocations checked against
gitbot-fleet@ pinned ref2e0ea3ca(which is gitbot-fleet#150's commit, sorhodibot checkexists):finishing-bot --path <ws> audit--path(default.) +Auditsubcommand ✓seambot check--path(default.) +Checksubcommand ✓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