Own the CT 125 host in a separate, approval-gated release #103

Merged
john merged 1 commit from feat/host-pipeline into main 2026-11-24 10:48:05 +00:00
Owner

Adds a separate, approval-gated host release for Corn's guest (kratos CT 125). This is step B of the Proxmox migration: Corn owns its container instead of Arch's shared proxmox stack. The Compose workload release (corn_deploy) is unchanged.

  • deploy/host/: OpenTofu root with one resource, the CT 125 container, adopted by import and protected by prevent_destroy. Its attributes match Arch's current declaration exactly, so adoption should be import-only with no changes.
  • native_release.py follows Arch's service-release contract: plan, native approval, apply exactly the approved digest, then require a converged plan. It never runs unattended.
  • policy.py permits only an import of kratos/125 or in-place updates. It refuses create, delete or replace, and any change of node, CTID, MAC, bridge, IP, privilege, mounts or devices.
  • pipelines.json declares corn_host_release (plan_tofu@v1, apply_tofu@v1) with no secrets. host-release.yml is a manual dispatch from protected main that requires green test and host checks.
  • CI adds the offline host job (pinned tofu fmt and validate); the test task also runs the host tests.

Order: this merges first and is inert. Arch then registers the pipeline (tenant corn-host/prod, a Proxmox allowlist with CT 125 only) and drops CT 125 from its own stack. The first release imports CT 125, and both sides must then plan zero changes.

Adds a separate, approval-gated **host** release for Corn's guest (kratos CT 125). This is step B of the Proxmox migration: Corn owns its container instead of Arch's shared proxmox stack. The Compose workload release (`corn_deploy`) is unchanged. - `deploy/host/`: OpenTofu root with one resource, the CT 125 container, adopted by `import` and protected by `prevent_destroy`. Its attributes match Arch's current declaration exactly, so adoption should be import-only with no changes. - `native_release.py` follows Arch's service-release contract: plan, native approval, apply exactly the approved digest, then require a converged plan. It never runs unattended. - `policy.py` permits only an import of `kratos/125` or in-place updates. It refuses create, delete or replace, and any change of node, CTID, MAC, bridge, IP, privilege, mounts or devices. - `pipelines.json` declares `corn_host_release` (`plan_tofu@v1`, `apply_tofu@v1`) with no secrets. `host-release.yml` is a manual dispatch from protected main that requires green `test` and `host` checks. - CI adds the offline `host` job (pinned `tofu fmt` and `validate`); the `test` task also runs the host tests. **Order:** this merges first and is inert. Arch then registers the pipeline (tenant `corn-host/prod`, a Proxmox allowlist with CT 125 only) and drops CT 125 from its own stack. The first release imports CT 125, and both sides must then plan zero changes.
Own the CT 125 host in a separate, approval-gated release
All checks were successful
Corn CI / release-check-1 (pull_request) Successful in 3s
Corn CI / release-check (pull_request) Successful in 0s
Corn CI / host (pull_request) Successful in 18s
Security / scan (pull_request) Successful in 22s
Security / security (pull_request) Successful in 0s
Corn CI / test (pull_request) Successful in 3m53s
Corn CI / release (pull_request) Has been skipped
Review / change impact (pull_request_target) Successful in 4m39s
1c39c8098a
deploy/host is a new OpenTofu root for Corn's guest (kratos CT 125): the
container only, adopted by import from Arch, with prevent_destroy. The
Compose workload stays with corn_deploy.

- native_release.py follows Arch's service-release contract (plan, native
  approval, apply of exactly the approved digest, converge check). It never
  runs unattended and passes the Proxmox token only to plan/apply.
- policy.py allows only Corn's container: import of kratos/125 or in-place
  updates; refuses create, delete, replace, and any change of node, CTID,
  MAC, bridge, IP, privilege, mounts or devices.
- pipelines.json declares corn_host_release (plan_tofu, apply_tofu), no
  secrets. host-release.yml submits it manually from protected main after
  green test and host checks. CI adds an offline tofu fmt/validate job and
  runs the host tests.

Nothing is released until Arch registers the pipeline.

Change review · 2a87fb8949f9 → 1c39c8098a8b

Call paths changed by this PR

Caller → changed symbol → callee. Each edge labels the line in the caller. One detected entry path (up to 3 hops) is included when found. Static evidence, not a runtime stack trace.

After

flowchart LR
    n0["command - added"]
    n1["main - added"]
    n2["release - added"]
    n3["release._locals_.plan - added"]
    n4["diagnostics - added"]
    n5["module scope"]
    n6["require - added"]
    n7["identity"]
    n8["one"]
    n9["review"]
    n5 -->|L133| n1
    n0 -->|L38| n4
    n1 -->|L128| n2
    n2 -->|L86| n0
    n3 -->|L96| n0
    n7 -->|L37| n6
    n8 -->|L28| n6
    n9 -->|L49| n6

Changed symbols:

  • added command — deploy/host/native_release.py:29
  • added diagnostics — deploy/host/native_release.py:42
  • added release — deploy/host/native_release.py:63
  • added release._locals_.plan — deploy/host/native_release.py:94
  • added main — deploy/host/native_release.py:118
  • added require — deploy/host/policy.py:22
    Bounded view: 31 more changed symbols and 0 neighbour references omitted.
Overall architecture after this change

Source: 1c39c8098a8b · code-review 0.1.0-dev.1.

Generated from resolved static calls between reviewed code areas. Numbers are call sites, not request counts.
Framework registration, dynamic dispatch, and unresolved calls are not shown. This is not a deployment map.
Showing 6 of 6 inter-area edges. Edit the reviewed source instead of this generated page.

flowchart LR
    n1["Console"]
    n2["Identity"]
    n3["NSW integrations"]
    n4["Persistence"]
    n5["REST handlers"]
    n6["Server composition"]
    n7["Shared contracts"]
    n8["Shopping"]
    n4 -->|"9"| n2
    n6 -->|"5"| n5
    n6 -->|"2"| n7
    n1 -->|"1"| n3
    n1 -->|"1"| n8
    n6 -->|"1"| n2

This diagram is for the linked commit. It refreshes after required checks pass for a new head.

<!-- john/release:architecture-review:v1 --> # Change review · `2a87fb8949f9` → [`1c39c8098a8b`](https://code.yawn.dev/john/corn/commit/1c39c8098a8b8f5e6bf17933514872caa806cf5d) ## Call paths changed by this PR Caller → changed symbol → callee. Each edge labels the line in the caller. One detected entry path (up to 3 hops) is included when found. Static evidence, not a runtime stack trace. ### After ```mermaid flowchart LR n0["command - added"] n1["main - added"] n2["release - added"] n3["release._locals_.plan - added"] n4["diagnostics - added"] n5["module scope"] n6["require - added"] n7["identity"] n8["one"] n9["review"] n5 -->|L133| n1 n0 -->|L38| n4 n1 -->|L128| n2 n2 -->|L86| n0 n3 -->|L96| n0 n7 -->|L37| n6 n8 -->|L28| n6 n9 -->|L49| n6 ``` Changed symbols: - **added** `command` — `deploy/host/native_release.py:29` - **added** `diagnostics` — `deploy/host/native_release.py:42` - **added** `release` — `deploy/host/native_release.py:63` - **added** `release._locals_.plan` — `deploy/host/native_release.py:94` - **added** `main` — `deploy/host/native_release.py:118` - **added** `require` — `deploy/host/policy.py:22` Bounded view: 31 more changed symbols and 0 neighbour references omitted. <details><summary>Overall architecture after this change</summary> Source: [1c39c8098a8b](https://code.yawn.dev/john/corn/commit/1c39c8098a8b8f5e6bf17933514872caa806cf5d) · `code-review 0.1.0-dev.1`. Generated from resolved static calls between reviewed code areas. Numbers are call sites, not request counts. Framework registration, dynamic dispatch, and unresolved calls are not shown. This is not a deployment map. Showing 6 of 6 inter-area edges. Edit the reviewed source instead of this generated page. ```mermaid flowchart LR n1["Console"] n2["Identity"] n3["NSW integrations"] n4["Persistence"] n5["REST handlers"] n6["Server composition"] n7["Shared contracts"] n8["Shopping"] n4 -->|"9"| n2 n6 -->|"5"| n5 n6 -->|"2"| n7 n1 -->|"1"| n3 n1 -->|"1"| n8 n6 -->|"1"| n2 ``` </details> This diagram is for the linked commit. It refreshes after required checks pass for a new head.
john merged commit 0b641e67bd into main 2026-11-24 10:48:05 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
john/corn!103
No description provided.