Add apply preflight gate

This commit is contained in:
jwinterm
2026-07-06 12:29:08 -04:00
parent a921f158c3
commit fbfddbf2bf
9 changed files with 272 additions and 30 deletions
+3 -2
View File
@@ -113,8 +113,9 @@ render-only environment while making daemon ownership decisions explicit.
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. With `--write-artifacts`, it also prints planned copies from reviewed artifacts
into managed state and planned supervisor start/reload actions. Blocked steps stop the
command before any live apply path can touch services.
into managed state and planned supervisor start/reload actions. The command emits an
`AMPG_APPLY_PREFLIGHT` verdict across activation, state-copy, and supervisor rows.
Blocked preflight items 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
+3 -3
View File
@@ -49,9 +49,9 @@ python3 tools/docs_check.py
## Public/private boundary
Public docs include reusable contracts, generated references, and concise operator-facing
guidance. Private docs are ignored under `docs/private/` and are the place for strategy,
internal discussion, deployment inventory, working notes, tracking, timelines, and any
real host-specific material.
guidance. Private docs are ignored under `docs/private/` and are the place for
non-public planning, deployment inventory, working notes, and real host-specific
material.
Public docs can include example domains, ports, and fake keys. Real daemon keys,
production paths with secrets, private host inventory, and internal planning notes belong
+6 -4
View File
@@ -84,10 +84,12 @@ 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, then prints the planned
copies from those reviewed artifacts into `gateway.state_dir` and the supervisor services
that would be registered or started. It still does not install or reload services.
and post-apply health checks. It also prints `AMPG_APPLY_PREFLIGHT` plus blocked or
review preflight items across activation, managed-state copies, and supervisor actions.
It exits nonzero when the preflight status is blocked. `--write-artifacts` writes
reviewable config snippets to the configured plan root, then prints the planned copies
from those reviewed artifacts into `gateway.state_dir` and the supervisor services that
would be registered or started. It still does not install or reload services.
`--protocol` scopes operational commands to selected enabled protocols. A clearnet
`adopt` failure will block a full activation run, but it will not block
+1 -2
View File
@@ -3,8 +3,7 @@
> Status: draft | Updated 2026-07-06 | Applies to: AMPG route exposure policy
Interaction capabilities define what AMPG may expose for dynamic applications. They are
public, generic rules. Project strategy, target names, and implementation notes belong in
`docs/private/`.
public, generic rules. Non-public project notes belong in `docs/private/`.
## Generated Policy
+4 -3
View File
@@ -40,6 +40,7 @@ Current managed defaults:
AMPG must never delete sensitive contract paths without an explicit destructive command.
`apply --dry-run --write-artifacts` prints `AMPG_APPLY_STATE_COPY` rows that show which
reviewed artifacts would be copied into managed state and `AMPG_APPLY_SUPERVISOR` rows
for the services that would be registered or started. Live apply should perform those
reviewed copies, start daemons, capture public addresses, and then run published health
checks.
for the services that would be registered or started. The accompanying
`AMPG_APPLY_PREFLIGHT` verdict includes those rows so live apply can refuse mutation when
state or supervisor inputs still need review. Live apply should perform reviewed copies,
start daemons, capture public addresses, and then run published health checks.