Files
agency-agents/.github/workflows/check-tools.yml
T
hotragn ec4ff9fed4 fix(install): one failing tool no longer stops the tools after it
A sequential install called install_tool bare under set -e, so the first
tool that returned 1 exited the whole script. With copilot, cursor, qwen,
codex and hermes detected and no integrations/cursor:

  [1/5] copilot   [OK]
  [2/5] cursor    [ERR] integrations/cursor missing. Run convert.sh first.
  (exit 1)

qwen, codex and hermes were never attempted, and nothing said so. The same
happens for any ensure_converted failure or an OpenClaw registration error.

Each tool now runs in a subshell with errexit on. It is not
`install_tool "$t" || failed+=(...)`: bash ignores errexit for everything on
the left of ||, subshells included, so a failing cp inside a tool would carry
on as if it had worked. Instead the parent turns errexit off for that one
command, and the subshell turns it back on for itself.

A failed tool is recorded and the loop moves on. The done box reads
"Installed 2 of 3 tool(s)" instead of "Done!", and the run ends with
"Failed: cursor — see the [ERR] line under each above" and exit 1. A clean
install is unchanged. Nothing in install_* sets globals the parent reads
afterwards, and the SKIPPED_LOG cleanup trap does not fire in a ( )
subshell, so running tools in a subshell loses nothing.

Parallel mode is untouched; its log replay on failure is item 1 of #917.

test-install-continue-after-failure.sh builds a fixture repo with
gemini-cli and qwen output and no cursor output, installs all three, and
checks that qwen still installs, cursor's error is shown, the summary names
cursor, and the exit is non-zero. It also checks that a clean run still
exits 0. It fails on main at "qwen ... was never installed" and runs in
check-tools.yml.
2026-09-30 04:49:05 -04:00

62 lines
2.3 KiB
YAML

name: Check Tools Consistency
# Runs on every PR (no path filter on purpose): a new or renamed tool must trip
# this check even when nobody touched tools.json or the install/convert scripts.
on:
pull_request:
push:
branches: [main]
jobs:
check-tools:
name: tools.json is the single source of truth
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate tool set
run: |
chmod +x scripts/check-tools.sh
./scripts/check-tools.sh
- name: Validate generated Hermes plugin
run: python3 scripts/check-hermes-plugin.py
- name: Validate converted YAML frontmatter
run: bash scripts/test-convert-frontmatter.sh
- name: Reject colliding agent slugs before conversion
run: bash scripts/test-convert-slug-collisions.sh
- name: Refuse symlinked conversion output directories
run: bash scripts/test-convert-symlink-output.sh
- name: Validate converted outputs (round-trip, strict parse, counts, drift)
# Drift is advisory on pull requests (agent PRs always move their own manifest line;
# maintainers regenerate at landing) and enforced on pushes to main.
run: bash scripts/test-convert-outputs.sh ${{ github.event_name == 'pull_request' && '--drift=advisory' || '' }}
- name: Validate agent selection (install.sh --agent / --agents-file)
run: bash scripts/test-agent-selection.sh
- name: Protect unrelated Hermes destinations
run: bash scripts/test-install-hermes-destination.sh
- name: Reject partial installs after conversion failure
run: bash scripts/test-install-conversion-failure.sh
- name: Validate shared destinations for detected tools
run: bash scripts/test-install-all-path-collision.sh
- name: Validate complete selected installs
run: bash scripts/test-install-selection-completeness.sh
- name: Surface parallel conversion failures and clean temp output
run: bash scripts/test-convert-parallel-failure.sh
- name: Reject unclosed agent frontmatter
run: bash scripts/test-frontmatter-closing.sh
- name: Keep installing after one tool fails, then exit non-zero
run: bash scripts/test-install-continue-after-failure.sh