fix: remove /usr/bin/sg conflict and serialize coder build after base #21

Merged
brad merged 1 commit from fix/ast-grep-build-order into main 2026-02-17 18:29:19 -08:00
Owner

Two fixes for the CI failures:

1. ast-grep /usr/bin/sg conflict

Debian ships /usr/bin/sg as part of shadow-utils ("run as group" command). npm tries to install ast-grep's sg binary to /usr/bin/sg and hits EEXIST. Fix: rm -f /usr/bin/sg before the npm install — the shadow-utils binary is irrelevant in a container.

2. build-coder running before base

Both workflows were triggered by the same push, running in parallel (or coder first, race condition). Switched build-coder.yml from a push/paths trigger to workflow_run — it now only fires after Build Sandbox Image completes. Added a conclusion == success guard so a failed base won't kick off a coder build.

Closes #18

Two fixes for the CI failures: ## 1. ast-grep `/usr/bin/sg` conflict Debian ships `/usr/bin/sg` as part of shadow-utils ("run as group" command). npm tries to install ast-grep's `sg` binary to `/usr/bin/sg` and hits `EEXIST`. Fix: `rm -f /usr/bin/sg` before the npm install — the shadow-utils binary is irrelevant in a container. ## 2. build-coder running before base Both workflows were triggered by the same push, running in parallel (or coder first, race condition). Switched `build-coder.yml` from a `push/paths` trigger to `workflow_run` — it now only fires after `Build Sandbox Image` completes. Added a `conclusion == success` guard so a failed base won't kick off a coder build. Closes #18
Two issues:

1. ast-grep install fails because /usr/bin/sg already exists — it's
   Debian's shadow-utils 'run as group' binary. Remove it before npm
   install so ast-grep's sg binary lands cleanly.

2. build-coder ran in parallel with (and before) the base build.
   Switch from push/paths trigger to workflow_run so it only fires
   after 'Build Sandbox Image' completes successfully. Guard with
   conclusion check so a failed base won't trigger a useless coder build.
brad merged commit 88d1d1e72d into main 2026-02-17 18:29:19 -08:00
brad deleted branch fix/ast-grep-build-order 2026-02-17 18:29:20 -08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
commune/sandbox!21
No description provided.