feat(orchestrator): slice 2 — launch lifecycle + signed launch-broker #356
Open
didericis-claude
wants to merge 1 commits from
orchestrator-slice2 into prd-orchestrator
pull from: orchestrator-slice2
merge into: didericis:prd-orchestrator
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-slice3
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#356
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-slice2"
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 2 of PRD 0070, stacked on #352 (branched off
prd-orchestrator). Still a backend-neutral dev-harness — no real launch yet.broker.py— the launch-broker contract.LaunchRequestis structured (static ids/flags only: bottle id, pool slot, content-addressedimage_ref; never a path/argv) and signed as a compact HS256 JWT so the broker verifies provenance before acting — a compromised co-located component can't forge a launch without the shared secret.verify_requestis fail-closed. Stdlib only. Ships aStubBrokerfor the harness.service.py— theOrchestrator: owns the registry, brokers the lifecycle.launch_bottlemints + signs + brokers, rolling the registry entry back if the launch fails (no orphans);teardown_bottlebrokers teardown then deregisters.control_plane.py—POST /bottleslaunches,DELETEtears down (both via the Orchestrator + broker);dispatch/server take anOrchestrator.Tests: sign/verify round-trip, tamper / wrong-secret / malformed / off-schema rejection, StubBroker fail-closed; Orchestrator launch→registry→attribute, teardown, rollback-on-failure. Full suite green (only the pre-existing
/bin/sleeperrors); harness does launch → attribute → teardown over HTTP.Merge #352 first (this targets that branch). Slice 3 = the real Docker broker.
🤖 Generated with Claude Code
Second slice of PRD 0070, still a backend-neutral dev-harness: * orchestrator/broker.py — the launch-broker contract. A LaunchRequest is structured (static ids/flags only — bottle id, pool slot, a content-addressed image_ref; never a path/argv) and signed as a compact HS256 JWT so the broker verifies PROVENANCE before acting: a compromised co-located component can't forge a launch without the shared secret. verify_request is fail-closed (bad sig / malformed / off-schema -> raise). Stdlib only (no runtime deps). Ships a StubBroker that records verified requests for the harness/tests. * orchestrator/service.py — the Orchestrator: owns the registry and brokers the lifecycle. launch_bottle mints the bottle + sends a signed launch, rolling the registry entry back if the launch fails (no orphans); teardown_bottle brokers teardown then deregisters; attribute delegates. * control_plane.py — POST /bottles now launches, DELETE tears down (both go through the Orchestrator + broker). dispatch/server take an Orchestrator. * __main__.py wires an ephemeral secret + StubBroker for the harness. Tests: broker sign/verify round-trip, tamper/wrong-secret/malformed/off-schema rejection, StubBroker fail-closed; Orchestrator launch->registry->attribute, teardown, rollback-on-broker-failure; control-plane updated for launch/teardown. Full suite green (only the pre-existing /bin/sleep errors); harness does launch -> attribute -> teardown over HTTP. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WBMWTEtQdJ4W5UrWuLHCckView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.