fix(readiness): resolve container engine for legacy-cluster gateway inspection #11067
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 385 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.356
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #11067"
general
weight: 0.35
politerealism
Outcome
Before:
observeManagedGateway()'s legacy-cluster check hardcoded"docker"for its three container-inspect calls, regardless of the active runtime provider. On a Podman-selected host with no Docker installed, every call failed withENOENT, surfacing as an opaquegateway.reuse.ready/gateway.version.compatible/gateway.port.uncontestedreadiness failure. After: the container engine bound to the active provider'sgateway-inspectionoperation is resolved and used instead, so the check runs againstpodmanwhen Podman is selected.Reason
This is the root cause behind #10984: native Podman onboarding (activated by #9923) fails at the gateway readiness step because this specific check never became runtime-aware. The registry needed to fix it already exists — PR #9923 built
runtime-provider/registry.ts'sgateway-inspectionoperation and registered it for bothdocker.tsandpodman.ts—gateway-production.tsjust wasn't using it for these three calls.Related issues
Fixes #10984
Changes
src/lib/readiness/gateway-production.ts: addedresolveGatewayInspectionEngineId(), which resolves the current runtime provider bundle and asks it for thegateway-inspectionengine identity ("docker"or"podman").inspectLegacyCluster()now takes this resolved engine id and uses it for its threeinspectcalls instead of the literal"docker". Fails closed (skips the check entirely) when no engine oropenshellbinary can be resolved, rather than guessing a binary. AddedcontainerEngineIdas an injectable option oncreateProductionGatewayReadinessDependencies, matching the existingisLegacyClusterBound/gatewayNameinjection pattern. ExportedinspectLegacyClusterfor direct unit testing, matching this file's existing convention (classifyManagedGatewayPortConflict,gatewayProcessIdentityMatchesTrustedBinary, etc. are already exported the same way).src/lib/readiness/gateway-production.test.ts: two new tests — one proving a Podman-selected engine reaches an active legacy-cluster result viapodman inspect(notdocker), one proving a null engine id skips inspection entirely with zero subprocess calls.Verification
npx vitest run src/lib/readiness/gateway-production.test.ts src/lib/readiness/gateway.test.ts— 68 passed (66 existing + 2 new)npm run typecheck:cli— cleannpm run test:changed— 161 passed, no regressions<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Bug Fixes
Improved production gateway readiness checks for environments using Podman or other configured container runtimes.
Legacy cluster inspection now uses the active container engine to verify container state, port bindings, and image details.
Skips legacy inspection when no container runtime is configured, avoiding incorrect Docker-based checks.
* Explicitly disabling container-engine inspection now prevents fallback checks through other runtimes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->