Commit Graph
6 Commits
Author SHA1 Message Date
ex_tianzy 2e1d88b3fa feat(deploy): add guarded active broker permission profile updates 2026-11-06 10:15:23 +08:00
ex_tianzy ce965aaf58 fix(deploy): tolerate absent Docker health state during router recovery
Containers without a configured HEALTHCHECK omit State.Health. Direct map
field access in the new inspect template made recovery prechecks fail on
longconn/edge before the router path could be repaired. Use a guarded map
index and report health=none without weakening image/config/key checks.

Distinguish service lookup errors from inspect/template failures instead of
misreporting every query failure as no unique container. Identify the
container-inspect stage in safe command errors.

Add regressions for absent health state through state and the full partial
router repair, plus accurate inspect failure classification. Validation:
265 passed, 3 skipped (no real PostgreSQL), 30 existing warnings; tool tests
52 passed. Python 3.7 syntax and staged diff checks pass.
No remote keys/configuration or containers were changed; rerun the existing
repair-router plan after updating, do not prepare or activate again.
2026-11-04 16:33:35 +08:00
ex_tianzy 8a94d60155 fix(deploy): repair missing router public-key path after partial activation
Live evidence showed a healthy candidate connector and a restarting router:
legacy router environment omitted HN_CONNECTOR_PUBLIC_KEY, so the new routing
verifier tried runtime/pki/connector.pub instead of the existing /trust mount.

Resolve the public key from the existing read-only trust bind, set its path
in new overlays, and actually load it during isolated runtime checks. Add
repair-router for a known healthy candidate connector: preserve credential
keys and live configuration, back up overlay/plan, add only the router path,
update integrity metadata, probe, and recreate router alone with --no-deps.
Retries do not regenerate keys or overwrite repair backups.

Add read-only state including stopped/restarting containers and fixed startup
error classes, including stderr, without printing raw logs or credentials.
Identify command stage/exit code and activation progress. Permit rollback
of known stopped candidate targets and old overlays without requiring the
new router key; unknown images still fail closed.

Validation: full suite 262 passed, 3 skipped (real PostgreSQL unavailable),
30 existing warnings; final tooling suite 50 passed after the added CLI
rollback regression. Python 3.7 syntax and staged diff checks pass.
No live repair was executed by this agent; operator must run repair-router
and verify health and the real client handshake on ECS.
2026-11-04 16:27:47 +08:00
ex_tianzy 2657146334 fix(deploy): preserve legacy environment and diagnose prepared plans safely
The old initializer defaults HN_ENVIRONMENT to development, while migration
validation required the literal production and combined database/platform
prerequisites into one opaque error. Preserve supported environment identity
namespaces without editing the live .env; still require PostgreSQL and fixed
HTTPS/WSS endpoints for every existing-server migration. Match supported
boolean spellings and report failing field names without credential values.

Add read-only diagnose for an existing prepared plan so an earlier failed
prepare can be reviewed without deleting or regenerating its keyring. Move
future prerequisite validation before private directory/key generation.

Validation: 253 passed, 3 skipped (real PostgreSQL unavailable), 30 existing
warnings; 40 deployment-tool tests including 11 new compatibility/redaction
cases. Python 3.7 syntax and staged diff checks pass. Actual ECS diagnosis
must still confirm the current failing field; no live config or key changed.
2026-11-04 13:59:22 +08:00
ex_tianzy d3ce0099b7 fix(deploy): include legacy longconn profile during migration checks
The exported live-deployment baseline declares longconn under a Compose
profile. Default profile filtering can omit the already-running receiver
and make preflight report an unexpected service set.

Explicitly select only the known longconn profile for config and targeted
migration commands. Preserve strict service-set validation and report only
missing/extra service names, never resolved environment or secrets. Up still
targets connector/router with --no-deps, without starting another receiver.

Add regressions for profiled service omission and safe mismatch diagnostics.
Validation: 242 passed, 3 skipped (no real PostgreSQL), 30 existing dependency
warnings. Tool-specific coverage: 29 passed. Python 3.7 syntax and diff pass.
Actual ECS preflight must be rerun to verify its current service set; no
remote configuration, key material or running containers were changed.
2026-11-04 12:27:49 +08:00
ex_tianzy da1b4230b9 feat(deploy): add guarded existing-ECS broker migration tooling
Discover the current Compose project and all override files from container
labels. Add read-only preflight plus prepare/check/build/activate/rollback
commands without editing the running .env, CA, database volumes or unrelated
services. Preserve heterogeneous application image identities for rollback.

Prepare a private keyring, independent router credential, pinned source
snapshot and additive connector/router overlay. Refuse key overwrite and
configuration/image drift. Build offline from the exact existing ARM64
runtime, smoke import and validate role settings through stdin-only inputs.
Require explicit v2 client readiness before activation and recreate only
connector/router with --no-deps. Document actual backup/image evidence,
current client limitation and token-lifecycle rollback boundaries.

Validation: 239 passed, 3 skipped (real PostgreSQL absent), 30 existing
dependency deprecation warnings. Add 26 mocked Docker policy tests; host
script parses as Python 3.7, CLI help/docs/diff checks pass. Docker policy
mocks are not actual Compose or ARM64 build validation.

No remote files, keys, credentials, containers or live configuration were
changed. Stage 5 operational acceptance remains pending actual ECS build,
real databases/platform, v2 client, key recovery and controlled rollout.
2026-11-04 12:18:43 +08:00