feat(runtime): add Runtime 12 single-public-port embedded stack - #786
Merged
Merged
Conversation
Add the stateless CPAMP Ingress, unified Embedded Compose topology, and checksum-pinned CPA Runtime image. Bootstrap isolated Runtime transport and data state, keep Supervisor as PID 1 without auto-start, and enforce the topology with classifier coverage and Docker smoke CI.
Assert generation stability, recovery disarm, and persisted secret/config state across Runtime restart and container recreate. Reject host networking, privileged services, and Docker socket mounts across the Embedded Compose stack.
19 tasks
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
Runtime 12 adds a stateless Go Ingress and one Embedded Compose stack whose only default host mapping is CPAMP
:18317. It packages checksum-pinned CPA v7.3.3 behind the existing Runtime Supervisor while preserving typed lifecycle, readiness, recovery, process, secret, storage, and failure-domain boundaries.The implementation is limited to Runtime 12 deployment wiring. It does not add Runtime 13 Manager mutation/reconcile, boot auto-start, dynamic
controlBasePath, Full Web/Public API v2, updater, or native packaging.Scope
Changes
cpamp-ingressexecutable/image with a centralized transitionalControlMatcher: current proven Manager paths route to Manager and everything else routes directly to Gateway. Replacing that matcher with one effectivecontrolBasePathmatcher does not change proxy or Compose topology.${CPAMP_PUBLIC_PORT:-18317}:18317; Manager18317, Gateway8317, and Supervisor9081remain internal.0600; Runtime has write access, Manager has read-only access for the Runtime 13 adapter seam, and Ingress receives no secret or data volume./healthzownership: Ingress has no/healthzspecial case and this PR does not establish a public CPAMP/healthzcontract. CPA/healthzremains the Supervisor's loopback readiness probe at127.0.0.1:8317; public Data Plane smoke uses/v1/models. Unknown paths continue through the generic Gateway fallback, including any current Gateway path, without assigning long-term public ownership to/healthz.Historical Asset Review
Reviewed
feat/integrated-cpa-runtimeonly for package/network mechanics, architecture mapping, checksum fail-closed behavior, and image engineering history. This implementation rejects the historical Manager-owned runtime/model proxy, multiple public ports, dynamic updater, shared Manager state, and Docker-socket design. No material historical code was copied, so no additional attribution is required.User Impact
The v2 Embedded Docker topology now has one public endpoint on port
18317for both transitional Manager routes and Gateway/model traffic. This is foundation wiring for independent acceptance; Runtime 13 reconciliation and the final user installation/configuration flow remain intentionally absent.Compatibility / Runtime Notes
docker-compose.manager.ymlremains valid and was revalidated. Transitional/,/management.html,/health,/status,/setup,/usage-service/*, and/v0/management/*routing is compatibility evidence only.docker-compose.ymldefines the new Embedded stack; native packages are unchanged. CPA child working directory is/runtime/gateway.Ingress :18317; internalManager :18317,Gateway :8317,Supervisor :9081.linux/amd64SHA2567af8c99cd08eee3ccc81d1596e8a31785674d3de6bd7ec61416d59493dd8fc01;linux/arm64uses officialaarch64SHA2565f320e3fae52af00f07b78201311e9d096b36e759441d948de48a10f49e71883.Data / Security Notes
The Runtime transport token is generated from
/dev/urandom, validated at a minimum of 32 bytes, atomically installed, persisted across restart/recreate, and fails closed if an explicit CI token conflicts with the existing source. The Compose validator rejects host networking, privileged services, and Docker socket mounts across every service. The token is separate from Manager/data,data.key, the Supervisor journal, Gateway state, CPA Management Key, and provider credentials.Volumes remain narrowly owned:
cpamp-manager-data:/data;cpamp-runtime-data:/runtimewith/runtime/supervisorand/runtime/gateway; andcpamp-runtime-transport-secret:/run/cpamp/runtime-secretwritable by Runtime and read-only to Manager. Ingress mounts no volume or secret.Risk / Rollback
Risk level: Medium
Rollback notes: revert the two Runtime 12 commits to remove the new root Compose stack, Ingress, Runtime packaging, acceptance guards, and CI wiring. No database migration or user data rewrite is performed. Existing Manager-only Compose remains independent.
Verification
Commands / evidence:
The Docker registry briefly returned
invalid character 'H' looking for beginning of valuewhile resolving base-image metadata. Pulling the same pinned architecture base images and rerunning the unchanged build succeeded; all final builds and smoke checks passed.Screenshots / Recordings
N/A — backend, proxy, packaging, architecture, and CI changes only; no visible UI implementation is included.
Docs
Docs decision: ADR-0001 records the durable Runtime architecture facts. The 1.x user docs are not updated because Runtime 12 deliberately lacks Runtime 13 desired-state reconciliation and must not be advertised as the final installation flow.
Related
N/A