Bunyip CI
Use the operator-installed wrapper as the only entry point. The wrapper owns
the kernel flock; never acquire a second lock or infer availability from a
note, timestamp, PID, port, process name, or lock-file existence.
Shared-host affordances
- A durable interruptible staging service may remain healthy while the heavy
lock is free. Its container, listener, and health endpoint do not mean act or
another heavy workload is running.
- The wrapper acquires the shared flock before stopping staging, then restores
staging during cleanup before releasing the flock. Loud preemption and
restoration messages are expected.
- Perf uses the same flock for each atomic leg and releases it between legs.
CI waits for a running leg; it never kills one. Do not dispatch a second
workload or invent another lock.
- Only successful
flock acquisition establishes exclusive use. Durable
services and retained caches or artifacts are outside that ownership signal.
For focused red/green work, pass the repository command as an argument vector:
run-tests.sh focused -- uv run grimoire test run path/to/test.py::test_name
The focused lane supplies the prepared image and PostgreSQL. Do not replace a
focused run with an entire regular lane; run the regular lane once after the
focused test is restored.
Submit and await completion
- Launch the wrapper once from the checkout being tested in a background
terminal that emits a completion event. Keep that terminal attached to the
wrapper; do not detach the wrapper into an unobservable shell process. Retain
every monitor handle until the wrapper exits. Yield the agent turn only when
the runtime guarantees that its completion event survives the yield.
- Treat
waiting for the bunyip heavy-work queue as queued, not stalled. Do
not submit a duplicate.
- Do not poll processes, logs, note files, or the lock while the run is active.
Await only the attached monitor, using its longest supported wait. If it
yields without an exit status, wait again on the same handle. Wrapper state
transitions such as queued, started, staging preemption, and restoration are
authoritative and may be reported once. Individual test output is non-final:
do not interpret, summarize, quote, or narrate it unless the user explicitly
asks for progress. An empty wait is not a state change and needs no update.
- Consider the lane finished only when the attached wrapper exits. A test
summary is not completion: artifact handling, container cleanup, and
interrupted staging restoration happen afterward.
- After notification, read the terminal result once and record the lane,
revision, artifact directory, start/end times, wrapper exit status, and its
final
PASS or FAIL line. On an interrupted run, also verify the wrapper
completed its cleanup/restoration path before reporting done.
Diagnose failure
Do not rerun first. Preserve the initial failure and classify it from evidence:
- Read the first failing step and the final job summary from the captured
output.
- Inspect the printed artifact directory and the lane's retained test log.
Report exact failing tests, counts, and artifact paths.
- If tests passed but artifact upload failed, report an artifact-service
failure rather than a test failure.
- If a container vanished or exited abruptly, inspect its exit/OOM state and
the host kernel OOM record before calling it a test failure.
- If many unrelated tests fail on one missing host capability or path, prove
that common cause with one focused reproduction. Do not label the failures
flaky or patch individual tests.
- After failure, confirm run-scoped containers, networks, and listeners are
gone and any preempted staging service is healthy. Preserve declared caches
and evidence artifacts.
Rerun only after identifying a falsifiable cause or applying a relevant fix.
Use the smallest focused lane that proves the fix, then rerun the originally
failed lane when required for acceptance.
Report
Return the lane and exact revision, wrapper exit status, elapsed time, test
counts, first/root failure, artifact location, cache result, cleanup result,
and staging restoration result. Distinguish observed facts from inference.
1---2name: bunyip-ci3description: Run, wait for, diagnose, and report PromptGrimoire CI lanes submitted to the shared bunyip wrapper. Use for bunyip act, nightly, browser, NiceGUI, quality, image-build, or other heavy-lane work where an agent must track completion, inspect failures, verify cleanup, or hand back exact evidence.4---56# Bunyip CI78Use the operator-installed wrapper as the only entry point. The wrapper owns9the kernel `flock`; never acquire a second lock or infer availability from a10note, timestamp, PID, port, process name, or lock-file existence.1112## Shared-host affordances1314- A durable interruptible staging service may remain healthy while the heavy15 lock is free. Its container, listener, and health endpoint do not mean act or16 another heavy workload is running.17- The wrapper acquires the shared flock before stopping staging, then restores18 staging during cleanup before releasing the flock. Loud preemption and19 restoration messages are expected.20- Perf uses the same flock for each atomic leg and releases it between legs.21 CI waits for a running leg; it never kills one. Do not dispatch a second22 workload or invent another lock.23- Only successful `flock` acquisition establishes exclusive use. Durable24 services and retained caches or artifacts are outside that ownership signal.2526For focused red/green work, pass the repository command as an argument vector:2728```bash29run-tests.sh focused -- uv run grimoire test run path/to/test.py::test_name30```3132The focused lane supplies the prepared image and PostgreSQL. Do not replace a33focused run with an entire regular lane; run the regular lane once after the34focused test is restored.3536## Submit and await completion37381. Launch the wrapper once from the checkout being tested in a background39 terminal that emits a completion event. Keep that terminal attached to the40 wrapper; do not detach the wrapper into an unobservable shell process. Retain41 every monitor handle until the wrapper exits. Yield the agent turn only when42 the runtime guarantees that its completion event survives the yield.432. Treat `waiting for the bunyip heavy-work queue` as queued, not stalled. Do44 not submit a duplicate.453. Do not poll processes, logs, note files, or the lock while the run is active.46 Await only the attached monitor, using its longest supported wait. If it47 yields without an exit status, wait again on the same handle. Wrapper state48 transitions such as queued, started, staging preemption, and restoration are49 authoritative and may be reported once. Individual test output is non-final:50 do not interpret, summarize, quote, or narrate it unless the user explicitly51 asks for progress. An empty wait is not a state change and needs no update.524. Consider the lane finished only when the attached wrapper exits. A test53 summary is not completion: artifact handling, container cleanup, and54 interrupted staging restoration happen afterward.555. After notification, read the terminal result once and record the lane,56 revision, artifact directory, start/end times, wrapper exit status, and its57 final `PASS` or `FAIL` line. On an interrupted run, also verify the wrapper58 completed its cleanup/restoration path before reporting done.5960## Diagnose failure6162Do not rerun first. Preserve the initial failure and classify it from evidence:63641. Read the first failing step and the final job summary from the captured65 output.662. Inspect the printed artifact directory and the lane's retained test log.67 Report exact failing tests, counts, and artifact paths.683. If tests passed but artifact upload failed, report an artifact-service69 failure rather than a test failure.704. If a container vanished or exited abruptly, inspect its exit/OOM state and71 the host kernel OOM record before calling it a test failure.725. If many unrelated tests fail on one missing host capability or path, prove73 that common cause with one focused reproduction. Do not label the failures74 flaky or patch individual tests.756. After failure, confirm run-scoped containers, networks, and listeners are76 gone and any preempted staging service is healthy. Preserve declared caches77 and evidence artifacts.7879Rerun only after identifying a falsifiable cause or applying a relevant fix.80Use the smallest focused lane that proves the fix, then rerun the originally81failed lane when required for acceptance.8283## Report8485Return the lane and exact revision, wrapper exit status, elapsed time, test86counts, first/root failure, artifact location, cache result, cleanup result,87and staging restoration result. Distinguish observed facts from inference.