feat(workbench): read-only host discovery page over the install doctor (#105 stage 4) - #285
Merged
Conversation
🦋 Changeset detectedLatest commit: a8e78e4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Sep 2, 2026
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stage 4 of #105 per the G6 gate in #107 (read-only discovery approved; #101 mutation never enters the Workbench): a Hosts Workbench page surfacing the #236/#243 read-only install doctor — host presence (binaries/versions), installed-bundle inventory, drift vs the current build, and runtime endpoint health.
Architecture
HostDiscoveryService(src/dev/playground/host-discovery-service.ts) callsrunDoctorfromsrc/install/doctor.tsin-process — never shells to the CLI. Production wiring feeds the doctorfrom: <root>/distplus the prepared build's source revision through aprepared()callback, so drift findings are bound to the build they were computed against. Single-flight coalescing, zero result caching past settlement.src/contracts/discovery.ts; the service's per-field mapping pins it to the doctor types at compile time.GET /api/discovery(host-discovery-routes.ts) is GET-only, session-authorized like every sibling route, no query params, named 16 MiB budget. New diagnosticsAB8215–AB8218registered indocs/diagnostics.md.src/discovery/— strict zod client (own decoder,AB8234), pure presentation model, dedicated browser-state atoms module (third sanctioned module, added todocs/effect-conventions.md; no stream atoms), desktop 1440×900 page.Honest states (absent ≠ error)
Absent binary → neutral "Not installed" (e2e asserts the badge class is neutral and no
role="alert"exists). Unknown inventory → "Unknown — host owns its registry". No valid build → info, not error. win32/endpoint skips honest. Diagnostics render severity + recovery as text.G6 compliance
Zero mutation affordances. The only controls are navigation and "Re-run discovery" (user-initiated, read-only re-probe). Repair guidance appears only as diagnostic recovery text.
Stale → repair
The report carries the manifest digest it was generated against; the page compares it to the live
routes.sourceRevisionand shows a stale banner after a rebuild, repaired by explicit re-run — proven in e2e via a real watched-source rebuild.Test plan (all local, on this base)
pnpm lint— 0 errors / 0 warnings (977 files)pnpm typecheck— all three projectspnpm test:unit+pnpm test:route-unit— full pools green (2500+ tests)host-discovery-dev-server,discovery.e2e(populated + honest-absent + stale→repair legs, zero page errors),discovery-atoms-disposal, plus regressionslifecycles.e2e,overview.e2e,runtime-playground.e2e, and both prior atom-disposal suites — no failuresagent-bundlepatchStage 5 (user-initiated live MCP probing with consent + redaction) remains the final #105 stage.