Add fixture-based health plans

This commit is contained in:
jwinterm
2026-07-06 06:02:58 -04:00
parent 1641f2009d
commit c52e700b6f
7 changed files with 409 additions and 0 deletions
+10
View File
@@ -132,6 +132,16 @@ Tor and I2P HTTP publishing include the transport daemon and the loopback web-se
layer in the install plan, because the hidden service or tunnel must have a local HTTP
target.
## Health plan
`ampg health-plan` turns fixture manifests into post-start verification checks. Published
mode targets real transport URLs. Preview mode rewrites checks to loopback HTTP preview
endpoints so local generated output can be verified before live daemons exist.
Missing generated output blocks health checks. Placeholder transport addresses are
reported for review, because the operator must capture the real onion, I2P destination,
or other transport identity before published checks are exact.
## Interaction boundary
v1 is static-first, but the architecture reserves a path for interactive applications.
+5
View File
@@ -41,6 +41,7 @@ python3 -m ampg --config gateway.toml status
python3 -m ampg --config gateway.toml doctor
python3 -m ampg --config gateway.toml install-plan --profile mobile-i2p
python3 -m ampg --config gateway.toml install-plan --profile mobile-i2p --write-artifacts
python3 -m ampg --config gateway.toml health-plan --profile mobile-i2p
python3 -m ampg --config gateway.toml apply --dry-run
python3 -m ampg --config gateway.toml apply --dry-run --profile mobile-i2p
python3 -m ampg --config gateway.toml apply --dry-run --protocol i2p
@@ -65,6 +66,10 @@ files under the configured `plan_root`, grouped by site, protocol, and platform.
Tor/I2P HTTP publishing, AMPG writes both transport-daemon artifacts and loopback nginx
artifacts.
`health-plan` prints fixture-based checks to run after services start. Published checks
target real transport URLs; preview checks target local loopback preview endpoints.
Missing output blocks the plan, while placeholder transport addresses are review items.
`apply --dry-run` prints the activation sequence for each enabled protocol: generated
output readiness, config artifacts to review, daemon action, and post-apply health
checks. It exits nonzero when any step is blocked. `--write-artifacts` writes reviewable
+5
View File
@@ -33,6 +33,8 @@ or deployment notes.
python3 -m ampg --config examples/wownero.gateway.toml build
python3 -m ampg --config examples/wownero.gateway.toml manifest
python3 -m ampg --config examples/wownero.gateway.toml preview manifest
python3 -m ampg --config examples/wownero.gateway.toml health-plan
python3 -m ampg --config examples/wownero.gateway.toml health-plan --mode preview
```
`build` emits the manifest after writing protocol outputs. `manifest` rewrites only the
@@ -49,6 +51,9 @@ They preserve the intended published URL and transport checks under each fixture
`published` metadata. Use preview manifests to verify generated output with AMPB before
real Tor, I2P, Gemini, or other transport daemons are installed or adopted.
`health-plan` consumes the same fixture contract. Published mode prints checks for real
transport URLs. Preview mode prints loopback checks against generated preview URLs.
## Address Status
Some transports may not have final public addresses when a fixture is generated. In those