2.7 KiB
M1 Local Contract Smoke
The M1 local smoke is a fast contract check for the current HWLAB MVP runtime. It runs only on the local machine, uses short-lived localhost processes, and does not deploy or call the frozen DEV endpoint.
Run it from the repository root:
node scripts/m1-contract-smoke.mjs
The equivalent npm entry point is:
npm run m1:smoke
What It Checks
- Starts
hwlab-cloud-apion127.0.0.1with an ephemeral port and checks/health,/live,GET /v1, andPOST /rpc. - Verifies the cloud-api runtime returns degraded
system.healthwhen DB persistence is not connected, describes the REST and JSON-RPC adapter surface, registers a gateway/box/capability, and records an acceptedhardware.operation.requestin process-local memory. - Starts
hwlab-gateway-simu,hwlab-box-simu, andhwlab-patch-panelon ephemeral localhost ports. - Checks simulator health and status payloads, confirms cross-device
propagation is
patch-panel-only, writes a local box port value, and routes a signal through the patch panel fixture. - Parses
fixtures/mvp/runtime.jsonthrough the CLI dry-run path and verifies the dry-run output names the MVP route, closed loops, evidence fixture, and the no-DEV/PROD-change disclaimer.
Boundary
This smoke is not the future DEV e2e acceptance test. It intentionally does not:
- deploy to DEV or PROD;
- call
http://74.48.78.17:6667; - run browser e2e;
- read secrets, tokens, kubeconfig, tunnel credentials, or deploy manifests;
- validate real gateway, router, frp, edge proxy, agent, worker, or hardware behavior;
- replace the L5 deploy manifest work.
The check is scoped to local M1 contract readiness: existing cloud-api, patch-panel, simulator, and CLI dry-run runtime paths can be started or parsed and still agree on the frozen service IDs, DEV environment, JSON-RPC surface, DB degradation contract, and patch-panel-only topology assumptions.
Follow-On DEV e2e
A later real DEV e2e should run against the deployed DEV route, exercise the actual cloud-web/cloud-api, gateway/router/tunnel path, hardware trusted closed loop, agent automation closed loop, evidence persistence, and cleanup behavior. That later test should produce deployment/evidence artifacts and must remain separate from this local smoke harness.
L2 Runtime Smoke
The L2 simulator runtime has a separate local check:
npm run l2:smoke
It starts two hwlab-gateway-simu and two hwlab-box-simu processes on
ephemeral localhost ports. It proves simulator identity, AI/AO/DI/DO/FREQ
state operations, gateway register/heartbeat/capability/invoke forwarding,
error codes, audit/evidence shapes, and the patch-panel-only propagation
boundary. It does not call DEV or PROD.