Plan managed state artifact copies

This commit is contained in:
jwinterm
2026-07-06 11:49:36 -04:00
parent b268e93634
commit 3063e61676
9 changed files with 223 additions and 9 deletions
+3 -1
View File
@@ -112,7 +112,9 @@ render-only environment while making daemon ownership decisions explicit.
`ampg apply --dry-run` turns daemon status and generated config artifacts into an ordered
activation sequence. Each enabled protocol gets output, artifact, daemon, and health
steps, plus an address step when AMPG must capture or confirm a generated transport
identity. Blocked steps stop the command before any live apply path can touch services.
identity. With `--write-artifacts`, it also prints planned copies from reviewed artifacts
into managed state. Blocked steps stop the command before any live apply path can touch
services.
The dry-run command is intentionally stricter than `doctor`: missing generated output is
blocked during activation, because AMPG must not point a transport at an unbuilt output
+2 -1
View File
@@ -85,7 +85,8 @@ Missing output blocks the plan, while placeholder transport addresses are review
`apply --dry-run` prints the activation sequence for each enabled protocol: generated
output readiness, config artifacts to review, daemon action, address capture or reuse,
and post-apply health checks. It exits nonzero when any step is blocked. `--write-artifacts`
writes reviewable config snippets to the configured plan root but still does not install
writes reviewable config snippets to the configured plan root, then prints the planned
copies from those reviewed artifacts into `gateway.state_dir`. It still does not install
or reload services.
`--protocol` scopes operational commands to selected enabled protocols. A clearnet
+4 -2
View File
@@ -38,5 +38,7 @@ Current managed defaults:
## Safety
AMPG must never delete sensitive contract paths without an explicit destructive command.
Live apply should copy reviewed config artifacts into their contract `daemon-config`
paths, start daemons, capture public addresses, and then run published health checks.
`apply --dry-run --write-artifacts` prints `AMPG_APPLY_STATE_COPY` rows that show which
reviewed artifacts would be copied into managed state. Live apply should perform those
reviewed copies, start daemons, capture public addresses, and then run published health
checks.