feat(codemode): label self-hosted compiled binaries as native in eval runtime badges - #1199
feat(codemode): label self-hosted compiled binaries as native in eval runtime badges#1199code-yeongyu wants to merge 3 commits into
Conversation
ultrabrain review (round 3) — VERDICT: APPROVEReviewer: ultrabrain category (quotio-openai/gpt-5.6-sol:xhigh), 3 review epochs, two REQUEST_CHANGES rounds fixed and re-verified. The round-2 delta closes the remaining production blocker. Verification performed: detector + blast-radius tests 13 passed; senpi-codemode suite 651 passed; runtime/render regression tests 41 passed; root tsc, Biome, dependency/lock/changelog gates all green; independent compiled-Bun smoke confirms embedded URLs classify compiled, marker-infix disk paths do not, sidecar URL alone stays Non-blocking notes: none. |
1 similar comment
ultrabrain review (round 3) — VERDICT: APPROVEReviewer: ultrabrain category (quotio-openai/gpt-5.6-sol:xhigh), 3 review epochs, two REQUEST_CHANGES rounds fixed and re-verified. The round-2 delta closes the remaining production blocker. Verification performed: detector + blast-radius tests 13 passed; senpi-codemode suite 651 passed; runtime/render regression tests 41 passed; root tsc, Biome, dependency/lock/changelog gates all green; independent compiled-Bun smoke confirms embedded URLs classify compiled, marker-infix disk paths do not, sidecar URL alone stays Non-blocking notes: none. |
… runtime badges When a compiled standalone bun binary hosts the in-process JS kernel itself (an omo/pi native build), the eval header badge now reads 'native <ver>, <binary path>' instead of 'bun'. Detection mirrors the bunfs/~BUN/%7EBUN module-url markers used by coding-agent config; stock bun, node, and the eval prompt host line are unchanged.
…tion
Compiled binaries load codemode from the physical sidecar, so its module url carries no bunfs marker; the coding-agent binary loader now publishes Symbol.for('@earendil-works/pi-coding-agent:compiled-binary-host') before resolveBinaryFactory and codemode trusts that signal first. Module-url matching is anchored to the exact virtual-filesystem shapes so stock bun disk paths containing a marker segment never misclassify.
…stem url shapes isBunBinary previously matched marker substrings anywhere, so a stock bun run from a disk path containing /~BUN/%7EBUN classified as a compiled binary and could publish the compiled-host signal, mislabeling the eval js badge as native. Adds detector regressions for each marker-infix disk path.
fbc20a6 to
bfaa8fd
Compare
Summary
When a compiled standalone binary hosts the eval JS kernel itself (an omo/pi native build, e.g.
omob), the eval header runtime badge now readsnativeinstead ofbun:eval js (bun 1.4.0, ~/.omo/binary-runtime/5.0.0-.../omo)eval js (native 1.4.0, ~/.omo/binary-runtime/5.0.0-.../omo)The in-process JS kernel always runs on
process.execPath; under a compiled binary that path IS the application binary, so labeling itbunwas misleading. Detection mirrors the existing precedent inpackages/coding-agent/src/config.ts: the module url of a compiled bun binary carries$bunfs/~BUN/%7EBUNvirtual-filesystem markers. No Bun-only APIs (package invariant), injectable signals for tests.Deliberately unchanged:
bun <ver>, <path>and node runs keepnode <ver>, <path>bun <ver>— the model needs the engine capability surface, not the install identity (jsRuntimeLabelnow passesnativeSelf: falseexplicitly)Changes
src/extension/runtime-info.ts:isNativeSelfRuntime(signals)+jsRuntimeInfo(..., nativeSelf)third param (defaults to detection); doc commentsQA evidence (real surface)
Compiled a standalone probe binary with
bun build --compileimporting the realruntime-info.ts+runtime-label.ts:Stock bun control run of the same script (bun 1.4.0):
packages/senpi-codemodevitest suite green; rootnpm run checkgreen (transcripts captured)expected 'native', received 'bun';false ≠ truemarker matrix) before implementationSummary by cubic
Labels the eval header runtime badge
nativewhen a compiled standalone binary hosts the JS kernel itself, instead of the misleadingbun.Symbol.for("@earendil-works/pi-coding-agent:compiled-binary-host")signal published by the coding-agent binary loader, with anchored$bunfs/~BUNmodule-url shapes as fallback; the host signal is needed because sidecar extensions load from disk and carry no marker.isBunBinarydetection inpackages/coding-agentis now anchored to the exact virtual-filesystem URL shapes so a stockbun runfrom a disk path containing a marker segment no longer misclassifies as compiled.Written for commit bfaa8fd. Summary will update on new commits.