Skip to content
Open
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ Every community PR that lands in main is credited here — that's a project rule
- [@davekopecek](https://github.com/davekopecek) (Dave Kopecek) — committed the design-reference fixture so the design-token guard runs on every machine (#30)
- [@snapsynapse](https://github.com/snapsynapse) (Sam Rogers) — graceful shutdown on SIGINT/SIGTERM with worker-tree cleanup and finished state, plus the 14-test end-to-end CLI regression suite (#4)
- [@mlava](https://github.com/mlava) (Mark Lavercombe) — named setup failures across every diagnostic surface (#37) and `run --baseline`, the no-workers check preflight (#38)
- [@jeffhamons](https://github.com/jeffhamons) (Jeff Hamons) — a private OpenCode session store per worker, ending the `database is locked` deaths that made concurrent cheap-tier workers look like model failures (#79), and fix-swarm staging scoped to owned files instead of sweeping worktree debris (#80)

Contributions are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) for the philosophy and what gets a PR merged fast. The short version: small and scoped, rebased on current main, every claim backed by an executed test. Authorship is always preserved — where a maintainer pushes a mechanical fix to your branch, you remain the commit author.

Expand Down
24 changes: 21 additions & 3 deletions templates/fix-swarm/checks/fix-swarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,27 @@ def main() -> int:
)
)

add_result = run_git(["add", "-A"])
if add_result.returncode != 0:
failures.append(fail("git_add_failed", output_tail(add_result.stdout)))
if "*" in owned_files:
add_result = run_git(["add", "-A"])
if add_result.returncode != 0:
failures.append(fail("git_add_failed", output_tail(add_result.stdout)))
else:
# Stage tracked-file modifications (so out-of-lane edits to existing
# files still get caught by the owned-files check below) plus any
# new files under the owned paths. Deliberately does NOT `add -A`:
# worker/check subprocesses can leave untracked debris in the
# worktree (e.g. a sandboxed pytest run falling back to cwd for its
# basetemp) that has nothing to do with the agent's actual diff.
add_u_result = run_git(["add", "-u"])
if add_u_result.returncode != 0:
failures.append(fail("git_add_failed", output_tail(add_u_result.stdout)))
# Only pass owned paths that actually exist: `git add -- <path>` hard-fails
# ("did not match any files") for a declared-but-untouched owned path.
existing_owned = [item for item in owned_files if Path(item).exists()]
if existing_owned:
add_owned_result = run_git(["add", "--"] + existing_owned)
if add_owned_result.returncode != 0:
failures.append(fail("git_add_failed", output_tail(add_owned_result.stdout)))

if not args.summary.is_absolute() and args.summary.exists():
run_git(["reset", "--quiet", "--", str(args.summary)])
Expand Down