Host commander merge after read-only review. PR #160 is CLEAN/MERGEABLE, limited to M1 SOURCE/LOCAL contract smoke/docs, and does not reintroduce #157 Code Agent readiness/UI/health behavior. Runner validations reported: npm run m1:smoke, node scripts/code-agent-chat-smoke.mjs, node scripts/validate-contract.mjs, node --check scripts/m1-contract-smoke.mjs, and git diff --check.
3.2 KiB
M1 SOURCE/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. It is SOURCE/LOCAL evidence only, not DEV-LIVE evidence.
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. - Checks
hwlab-agent-mgrlocal health and sample manager lifecycle JSON (health,create,status,cleanup) in a temporary state directory. - 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:16667; - 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 the local M1 contract boundary: existing cloud-api, patch-panel, simulator, agent-mgr, Code Agent chat schema, and CLI dry-run runtime paths can be started or parsed and still agree on the frozen service IDs, DEV environment, JSON-RPC/REST surface, DB degradation contract, local manager lifecycle shape, and patch-panel-only topology assumptions.
The Code Agent chat check intentionally exercises only SOURCE/LOCAL contract shape. User workbench backend routing may be present in the codebase, but a real assistant reply and provider-backed completion must be validated by separate DEV-LIVE work.
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.