-
Notifications
You must be signed in to change notification settings - Fork 532
fix(cli): make doctor runtime-origin aware for OPENCODEX_BUN_PATH guidance (#848) #898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,7 @@ | |
| * dashboard drain-and-restart confirm UX — never request bodies or IDs. | ||
| */ | ||
| import { selectEagerPath } from "../../lib/bun-stream-caps"; | ||
| import { durableBunRuntime } from "../../lib/bun-runtime"; | ||
| import { getActiveTurnCount, isDraining } from "../lifecycle"; | ||
| import { getActiveMemoryWatchdog, observedMemoryCounter } from "../memory-watchdog"; | ||
| import { responseStateMetrics } from "../../responses/state"; | ||
|
|
@@ -79,6 +80,9 @@ export async function handleSystemRoutes(ctx: ManagementContext): Promise<Respon | |
| bunVersion: Bun.version, | ||
| bunRevision: Bun.revision, | ||
| platform: process.platform, | ||
| // Scalar enum only, never the runtime path: lets diagnostics tell a | ||
| // bundled runtime from an OPENCODEX_BUN_PATH override (#848). | ||
| runtime: { source: durableBunRuntime().source }, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a user follows the documented service workflow—sets AGENTS.md reference: docs-site/AGENTS.md:L7-L10 Useful? React with 👍 / 👎. |
||
| uptimeSeconds: process.uptime(), | ||
| rss: usage.rss, | ||
| heapUsed: usage.heapUsed, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 50376
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 39901
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 50376
🏁 Script executed:
Repository: lidge-jun/opencodex
Length of output: 11308
Preserve and validate the
BunRuntimeSourcecontract.src/lib/bun-runtime.ts:23-26,55-60emits"bundled","override", or"process".src/cli/doctor.ts:527,585widens this value tostringand accepts unknown strings.formatServiceMemoryLineshandles only"override"at lines 633 and 666-670. Therefore"process"and unknown values omit the source label and show bundled-runtime guidance."process"usesprocess.execPathwhen the bundled Bun binary is unavailable, so it is not necessarily bundled.Export and reuse a
BunRuntimeSourceunion. Validate the response before storing it. Handle"bundled","override","process", and absent or invalid values separately. Add regression tests for all three valid values and invalid input. Update the five Windows-memory pages if"process"becomes user-visible.🤖 Prompt for AI Agents
Source: Path instructions