feat(orchestrator): slice 3 — real Docker launch broker #357
Open
didericis-claude
wants to merge 2 commits from
orchestrator-slice3 into orchestrator-slice2
pull from: orchestrator-slice3
merge into: didericis:orchestrator-slice2
didericis:main
didericis:orchestrator-registration
didericis:orchestrator-lifecycle
didericis:orchestrator-supervise-writers
didericis:orchestrator-supervise-multitenant
didericis:orchestrator-gitgate-multitenant
didericis:orchestrator-rename-gateway
didericis:orchestrator-slice8
didericis:orchestrator-slice7
didericis:orchestrator-slice6
didericis:prd-orchestrator
didericis:orchestrator-slice5
didericis:orchestrator-slice4
didericis:orchestrator-slice2
didericis:ci-kvm-runner
didericis:post-build-image-smoke-test
didericis:firecracker-backend
didericis:issue-330-cached-images
didericis:forge-native-integration
didericis:prd-smolmachines-linux
didericis:claude-forward-host-credentials
didericis:fold-orchestrator-subpackage
didericis:prd-egress-control-plane
didericis:manifest-break-import-cycle
didericis:dlp-supervise-quality-fixes
didericis:table-drive-dlp-tests
didericis:fix-integration-test-failures
didericis:fix/macos-container-relative-dockerfile
didericis:prd-0054-install-script
didericis:commit-bottle-state
didericis:pr-211
didericis:move-codex-auth-to-contrib
didericis:feat/pipelock-skip-scan-extensions
didericis:prd-0049-named-labelled-agents
didericis:harden-git-gate-shell-rendering
Labels
Clear labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Low
4
The priority is low
Priority
Medium
3
The priority is medium
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: didericis/bot-bottle#357
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "orchestrator-slice3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Slice 3 of PRD 0070, stacked on #356 (branched off
orchestrator-slice2). The first concreteLaunchBroker, proving the orchestrator → backend seam on the cheapest backend.docker_broker.py—DockerBrokerruns a container on a verified launch (docker run --detach --name <bottle> --label ... <image_ref>) and removes it on teardown (docker rm --force, idempotent on an already-absent container). The argv is built only from the request's static ids/flags, so nothing free-form reachesdocker; provenance + schema verification are inherited fromLaunchBroker.submit.__main__.pygains--broker {stub,docker}so the harness can drive real containers.Scope: launches a single container from
image_ref— that's the seam. The full agent + sidecar bundle (networks, mounts, the consolidated sidecar) is a later slice.Tests: unit (docker mocked) — argv from static fields only, launch/teardown call the right commands, missing-image + docker-failure raise, teardown idempotent on missing, forged token never touches docker; integration (gated on a reachable daemon via
skip_unless_docker) — launch creates a real container, teardown removes it. Full suite green (only pre-existing/bin/sleeperrors); integration verified locally against real docker.Merge order: #352 → #356 → this.
🤖 Generated with Claude Code
The first concrete LaunchBroker, proving the orchestrator -> backend seam on the cheapest backend (the sidecar bundle is already containers): * orchestrator/docker_broker.py — DockerBroker runs a container on a verified launch (`docker run --detach --name <bottle> --label ... <image_ref>`) and removes it on teardown (`docker rm --force`, idempotent on an already-absent container). The argv is built only from the request's static ids/flags, so nothing free-form reaches docker; provenance/schema verification is inherited from LaunchBroker.submit. * __main__.py gains `--broker {stub,docker}` so the harness can drive real containers. Slice 3 launches a single container from image_ref (the seam); the full agent + sidecar bundle is a later slice. Tests: unit (docker mocked) — argv from static fields, launch/teardown call the right commands, missing-image and docker-failure raise, teardown idempotent on missing, forged token never touches docker; integration (gated on a reachable daemon) — launch creates a real container, teardown removes it. Full suite green (only pre-existing /bin/sleep errors); integration verified locally against real docker. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WBMWTEtQdJ4W5UrWuLHCck@didericis-claude Looks good. Move onto the next slice.
✅ CI fully green on
44e611d— lint (pylint 9.83/10 + pyright-strict), unit, integration, coverage all pass.The earlier red was a single pyright-strict error: the integration-test helper used
**kw: str, which let astrreachLaunchRequest.slot: int | None. Fixed by passing explicitLaunchRequests (44e611d). pylint was already passing — the items it lists are all pre-existing warnings in other files, well above the 8.0 gate.Slice 3 is ready for review. Stack merge order: #352 → #356 → #357.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.