Merge pull request #142 from pikasTech/fix/gate-diagnostics-contract

fix: add Cloud Web gate route contract
This commit is contained in:
Lyon
2026-05-22 20:31:15 +08:00
committed by GitHub
8 changed files with 61 additions and 9 deletions
+5 -2
View File
@@ -32,6 +32,7 @@ diagnostics under secondary routes:
| --- | --- | --- | --- |
| `/` | Cloud Workbench default. Shows agent conversation, trace, selected resource context, hardware/evidence side panel, and command input. | Yes | Same-origin `/v1`, read-only `/json-rpc`, source/gate report, blocked report. |
| `/workbench` | Explicit alias for the default workbench. | Yes, alias | Same as `/`. |
| `/gate` | Internal static alias for the read-only gate diagnostics view. | No | Same as `/diagnostics/gate`; source/gate report and same-origin read-only diagnostics only. |
| `/diagnostics` | Secondary diagnostics hub that links to status and gate views. | No | Same-origin `/v1` and report fixtures only. |
| `/diagnostics/status` | Read-only DEV status: edge, router, API, web, DB readiness, agent service health, and artifact identity. | No | Same-origin `/v1/status` or equivalent read-only status endpoint. |
| `/diagnostics/gate` | Read-only gate and M3 diagnostics inherited from `#59`: topology, route, health, blockers, and evidence summary. | No | Gate report and blocked report; read-only `/json-rpc` only when already defined. |
@@ -42,6 +43,8 @@ diagnostics under secondary routes:
The route relationship is:
- `/` and `/workbench` are the primary product surface.
- `/gate` is a short internal alias for the same hidden gate view as
`/diagnostics/gate`; it must not become the default route.
- `diagnostics/status` and `diagnostics/gate` are auxiliary views for
troubleshooting and acceptance review.
- Agent, hardware resources, and trusted records are first-class workbench
@@ -151,9 +154,9 @@ Acceptance for the frontend design and later implementation is:
| Area | Acceptance |
| --- | --- |
| Default page | `http://74.48.78.17:16666/` opens the Cloud Workbench, not the Gate/M3 Diagnostics dashboard. |
| Default page | `http://74.48.78.17:16666/` opens the Cloud Workbench, not the Gate/M3 Diagnostics dashboard; its first screen does not show Gate, `BLOCKED`, `M0-M5`, or acceptance-review copy. |
| API status | `http://74.48.78.17:16667` remains the DEV API/edge/status boundary; browser code uses same-origin `/v1` for workbench data and only read-only `/json-rpc` methods for diagnostics/hardware status. |
| Routes | `/`, `/workbench`, `/diagnostics`, `/diagnostics/status`, `/diagnostics/gate`, Agent, hardware resources, and trusted records are represented in navigation or route aliases. |
| Routes | `/`, `/workbench`, `/gate`, `/diagnostics`, `/diagnostics/status`, `/diagnostics/gate`, Agent, hardware resources, and trusted records are represented in navigation or route aliases. |
| Layout | Left activity rail/resource tree, center agent conversation/trace, right hardware/evidence side panel, and bottom command/input area are present on the default workbench. |
| Labels | `SOURCE`, `LOCAL`, `DRY-RUN`, `DEV-LIVE`, and `BLOCKED` labels are visible where evidence state is shown and follow the rules above. |
| Read-only boundary | Hardware resources and diagnostics are read-only. Live controls are disabled with blocker reasons. |
+10
View File
@@ -8,7 +8,12 @@ Cloud Workbench is the default user-facing frontend at
## Default Route
- `/` must show the Cloud Workbench, not Gate, status, help, or diagnostics.
- The default first screen must not show Gate, `BLOCKED`, `M0-M5`, or
acceptance-review copy. Those terms may remain in hidden/internal views.
- Gate and diagnostics are secondary routes or right-panel support views.
- `/gate` and `/diagnostics/gate` are internal diagnostic aliases served by the
same Cloud Web app router. They may carry Gate, blocker, and M0-M5 evidence
because they are not the default homepage.
- `http://74.48.78.17:16667/` remains the API/edge boundary.
- Browser data sources are same-origin `/v1`, read-only `/json-rpc`, source
reports, gate reports, and blocked reports.
@@ -63,6 +68,11 @@ node web/hwlab-cloud-web/scripts/build.mjs
node scripts/dev-cloud-workbench-smoke.mjs --static
```
The static smoke checks both sides of the route contract: `/` remains the
user-facing workbench, while `/gate` and `/diagnostics/gate` remain available
for internal diagnostics. This PR-class check is intentionally source-only and
does not deploy, restart services, or run browser e2e.
Live checks against `http://74.48.78.17:16666/` are read-only and must report
blocked/skip instead of false green when the browser or network path is not
available.