Repository navigation
🤖 tests: runner library for the bug-bash sandbox, with the first image digest - #5875
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is PR 2 of 4 for the approved B1 plan (#5714). It adds the runner library of the bug-bash sandbox, plus
image.jsonwith the first published digest. The library has no entry point, so nothing can run a job yet. PR 3 adds staging, the mount checks, the app log and the launch command.Background
#5818 added the image workflow, and a manual publish ran on
main: run 37759827317 (workflow_dispatch,main,752a624e15). This PR records that digest in a reviewed file. That is the "a person opens the digest PR" step of the plan. It also adds the code that uses the digest.Implementation
tests/bugbash/sandbox/image.jsonpins the published image. I copied every value from tool output, not by hand:publishedFromis the run's head SHA.make bugbash-sandbox-keyon this branch.tests/bugbash/sandbox/runner.tshas two parts.readImageLock()validatesimage.json.Sessiondoes the work:build.sh --key) withimage.json. A mismatch refuses as a stale image, before any docker command. Next it finds the local daemon. If the image is missing, it pulls onlyname@digest. Then it checks that the image labelorg.xum.bugbash.inputsequals the key. An emptydocker imageslist with exit 0 means "absent". Any query failure refuses, so a failure is never read as "absent". The runner never builds.docker context inspect, every docker command gets onlyPATH,DOCKER_HOSTand an empty privateDOCKER_CONFIG.AbortSignalfrom its SIGINT and SIGTERM handlers. Then running children get SIGTERM, and SIGKILL after 5 s. Job commands started after that refuse withStopped.unknown: …, never success, when it cannot read the container state. It removes the private client folder. It never removes an image.Validation
docker:27-dindwith no client config and no images,docker pull ghcr.io/coder/xum-bugbash-sandbox@sha256:61adf1a543f2b1cc1373506556eefad52176aabd5bb1e491927eef82bde8fa73exited 0 in 30,228 ms and gave 1,425,818,783 bytes. An anonymousimagetools inspect(emptyDOCKER_CONFIG) gave the same digest, so the package is public.runner.test.ts"a stale inputs key refuses before any docker command".runner.test.tsruns the realbuild.shin throwaway git repos with a fakedocker. It covers:Stoppedafter SIGKILL, new commands refuse, and cleanup still removes the job container with the full filter;unknownwhenpsfails, and that returns the same promise on a second call.make static-checkpasses.bun test ./tests/bugbashpasses (55 tests).Size: 3 files, +454 lines with tests.
Risks
Low. This PR adds test tooling only, and nothing calls the library yet. No file under
src/changes. The #5815 host pause stays.Refs #5714
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$111.52