- Shell 60.9%
- Nix 20.8%
- Python 18.3%
Add activation script that preconfigures pi (coding agent) with the same provider and model as forge code: - Extracts the ZAI API key from forge credentials and writes it to ~/.pi/agent/auth.json - Sets default provider to 'zai', default model to 'glm-5.1', and default thinking level to 'high' in ~/.pi/agent/settings.json This mirrors the existing forge code preconfiguration so pi works out of the box on VM startup without manual login or model selection. |
||
|---|---|---|
| .forgejo/workflows | ||
| forgejo | ||
| reproduce | ||
| runner | ||
| vm | ||
| .gitignore | ||
| README.md | ||
| run-vm.sh | ||
runner-not-picking-up-jobs
Minimal reproduction for a Forgejo runner bug where the runner stops picking up new jobs after completing the first host-mode job.
Related issue: forgejo/runner#911 — Zombie processes with host runner
The Bug
When using the host executor (labels like deploy:host), the runner picks up the first job
after startup, but never picks up subsequent jobs. The runner process stays alive and shows as
online in the Forgejo UI. Restarting the runner container fixes it — until the next job runs.
Likely cause: the runner process runs as PID 1 inside its container and doesn't reap zombie child processes after host-mode jobs complete. Zombie processes accumulate and eventually exhaust the process table, blocking new job spawns.
Tested workaround: init: true in docker-compose.yml (adds Docker's built-in tini init system
as PID 1, which reaps zombies). Status: unconfirmed — this reproduction exists to verify it.
How to reproduce
1. Start Forgejo
cd forgejo
docker compose up -d
Open http://localhost:3000 and complete initial setup:
- Create an admin user
- Go to Site Administration → Actions → enable Actions
2. Create the repository
In Forgejo UI, create a new repo named runner-not-picking-up-jobs (any owner).
Push this repo's code to it:
git remote add local ssh://git@localhost/<owner>/runner-not-picking-up-jobs.git
git push -u local main
3. Set up runners
cd runner
export CI_SECRET=$(openssl rand -hex 20)
export DEPLOY_SECRET=$(openssl rand -hex 20)
export FORGEJO_CONTAINER=forgejo-forgejo-1 # adjust if needed
FORGEJO_URL=http://localhost:3000 bash setup.sh
4. Trigger the workflow
Go to the repo → Actions → test.yml → Run workflow (workflow_dispatch).
Expected: both job-1 and job-2 complete successfully.
Bug behaviour: job-1 completes, job-2 waits forever with
"Waiting for a runner with the following labels: docker-deploy".
5. Test the workaround
To reproduce without the init: true workaround:
- Edit
runner/docker-compose.yml, removeinit: truefromrunner-deploy - Restart:
docker compose up -d --build - Trigger the workflow again — the bug should now appear
To confirm the fix:
- Re-add
init: true - Restart and trigger again — both jobs should complete