Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/autopilot-org-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ jobs:

cd "${GITHUB_WORKSPACE}"
rm -rf "${tmp}"
done
8 changes: 8 additions & 0 deletions memory/examples/20260710_installer-bash-loop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Installer Bash loop termination

Issue Description: The scheduled Autopilot Org Installer failed before processing repositories with `syntax error: unexpected end of file`.
State: The workflow opened a Bash `for repo` loop without a matching `done`.
Action: Added the missing `done` and a workflow validation check that runs `bash -n` on the embedded installer script.
Result: The installer script now parses before GitHub Actions executes it.
Diff Patch: Updated the installer workflow and `tests/validate_workflows.py`.
Rationale: Workflow YAML validation alone cannot detect syntax errors inside multiline Bash blocks.
9 changes: 9 additions & 0 deletions tests/validate_workflows.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path
import subprocess

import yaml

Expand All @@ -13,6 +14,14 @@ def main() -> None:
yaml.safe_load(stream)
print(f"OK: {workflow}")

with Path(".github/workflows/autopilot-org-installer.yml").open(encoding="utf-8") as stream:
installer = yaml.safe_load(stream)
script = installer["jobs"]["installer"]["steps"][1]["run"]
result = subprocess.run(["bash", "-n"], input=script, text=True, capture_output=True)
if result.returncode:
raise SystemExit(f"Installer Bash syntax error: {result.stderr.strip()}")
print("OK: autopilot-org-installer Bash syntax")

print(f"Validated {len(workflows)} workflow files")


Expand Down