PRD: reprovision on gateway startup #517
Open
didericis-claude
wants to merge 3 commits from
prd-gateway-reprovision-on-bringup into main
pull from: prd-gateway-reprovision-on-bringup
merge into: didericis:main
didericis:main
didericis:fix/quality-cleanup-consolidated
didericis:feat/macos-install-test-harness
didericis:prd-0081-reconcile-1-ca
didericis:fix/shared-storage-permissions
didericis:fix/authoritative-cleanup-identities
didericis:fix/bounded-heavy-operations
didericis:fix/cleanup-execution-integrity
didericis:fix/gateway-output-pump-shutdown
didericis:fix/gateway-request-boundaries
didericis:fix/authoritative-cleanup-revalidation
didericis:refactor/egress-policy-pipeline
didericis:refactor/orchestrator-fastapi
didericis:refactor/supervisor-mcp-dispatch
didericis:chore/misc-quality-cleanup
didericis:prd-forge-subroles
didericis:host-control-server-2-secret
didericis:host-control-server-3-list-live
didericis:host-control-server-1-transport
didericis:prd-new-host-control-server
didericis:fix/gitgate-persist-512
didericis:fix/firecracker-gateway-ca-persist-510
didericis:didericis/disable-agit-refs
didericis:didericis/prd-audit-event-schema
didericis:fix/pr-495-audit-contract
didericis:prd-egress-control-plane
didericis:prd-macos-container-ci-runner
didericis:refactor/control-plane-auth-provisioning-476
didericis:fix/db-off-data-plane-469
didericis:feat/encrypted-egress-secrets
didericis:spike/rootless-docker-macos
didericis:fix/ci-coverage-artifact-paths
didericis:claude-forward-host-credentials-rebased
didericis:fix-gateway-gitleaks-arch
didericis:fix/websocket-response-dlp-multitenant
didericis:orchestrator-agent-compose
didericis:orchestrator-gateway-ca
didericis:orchestrator-consolidated-launch
didericis:orchestrator-gateway-provision
didericis:orchestrator-gateway-network
didericis:orchestrator-client
didericis:orchestrator-gateway-net
didericis:orchestrator-gitgate-provision
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:orchestrator-slice2
didericis:firecracker-backend
didericis:forge-native-integration
didericis:prd-smolmachines-linux
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
Status/Needs Triage
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
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
Awaiting initial classification
No Label
Milestone
No items
No Milestone
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: didericis/bot-bottle#517
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 "prd-gateway-reprovision-on-bringup"
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?
Implements PRD 0081 (reconcile running bottles against a freshly-booted gateway instead of persisting gateway state on volumes). Supersedes the abandoned persistent-volume PRs #511 / #513.
In this PR so far
docs/prds/0081-*.md— the design.OrchestratorCore.update_agent_secret+registry.store_agent_secret(per-key upsert) +POST /bottles/<id>/secret(cli-only) +client.update_agent_secret— update ONE egress token in place, the single-secret counterpart ofreprovision_from_secret's restore-all. This is the reusable primitive extracted from the 2026-07-26 hotfix; unit-tested across service/store/server/client.Still to come on this branch (see #516)
connect_to_orchestrator.Refs #516. Addresses the root problems in #510 and #512 (closed by the reconcile once it lands).
🤖 Generated with Claude Code
eb8ac7f011tof9d0e15f13@@ -0,0 +57,4 @@- The docker / macOS backends. This lands the reconcile for Firecracker (thebackend that boots a fresh gateway rootfs each time); docker keeps its existinghost-bind-mounted CA until the same seam is extended there (follow-up). Theunification target is *per-service*, not *per-backend*.No, target is for both. And it should be enforced on the base abc class for the backend/there should be something like a
attach_bottled_agents_to_gatewaymethod on the backend that reprovisions all the bottled agents.Re: the docker/macOS non-goal (review comment on
docs/prds/0081-...md) — agreed, made it target all backends, enforced on the ABC.Updated in
4434752d:attach_bottled_agents_to_gateway()as an@abc.abstractmethodonBottleBackend(backend/base.py). Reconciling running bottles is a backend responsibility (only the backend can enumerate its agents and reach them — firecracker over SSH, docker/macOS overexec/cp), so every backend must implement it — cross-backend by construction, no per-backend follow-up. It reprovisions all registered bottles' CA + git-gate + egress tokens.attach_bottled_agents_to_gatewaypushes the CA to running agents, itshost_gateway_ca_dirbind-mount is redundant — leaning toward dropping it so docker rotates like firecracker (one behaviour across backends).The firecracker specifics (hook install, per-agent CA push, git-gate re-init, token reprovision) are now written as that backend's implementation of the abstract method.
Yes, make it consistent across backends.
PRD 0081: reprovision gateway-dependent state on gateway bring-upto PRD: reprovision on gateway startupView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.