GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mcpx: Bun runtime fidelity for captureFrames FunctionName and console formatting (stdout purity constraint) · Issue #8350 · developing-today/code

mcpx: Bun runtime fidelity for captureFrames FunctionName and console formatting (stdout purity constraint) #8350

New issue
Copy link
New issue
Copy link
Closed
Closed
mcpx: Bun runtime fidelity for captureFrames FunctionName and console formatting (stdout purity constraint)#8350
Copy link
Assignees
dezren39
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workepic/mcpx-platformReprioritization program epic (2026-11-12)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)status:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
Milestone
mcpx platform program

Description

@dezren39
dezren39
opened on Nov 10, 2026
Issue body actions

Problem

mcpx's emitted runtime shim (pkgs/mcpx/internal/codegen/emit.go) has a Bun fidelity gap, surfaced by stranded PR #7145 (closed 2026-11-10 under task 14681 rather than merged):

  1. captureFrames: under Bun, CallSite.getFunctionName() can return nothing for frames that Node/Deno name; current main only tries getFunctionName (emit.go). PR fix(mcpx): handle missing FunctionName in Bun CallSite and match console strings to runtime #7145 tried getMethodName / getFunction / getTypeName fallbacks.
  2. captureConsole: runtime-native formatting differs under Bun; console strings should match the runtime's own formatting.

Hard constraint (why PR #7145 was not merged)

Stdout is the script's result stream. Any Bun console handling must keep diagnostics on the structured record path — PR #7145's approach of invoking the original console methods for info/debug/dir/table writes diagnostics to stdout, corrupting results (Codex P1 on PR #7145, comment 4505048960, verified with Bun 1.2.14). Its test changes also weakened TestCaptureFramesIsAvailableToScripts to accept an empty top function name under Bun instead of fixing the naming.

Acceptance

  • captureFrames names the caller under Bun without weakening the existing e2e assertion, or a documented, narrowly-scoped Bun exception with evidence.
  • Console records under Bun match runtime formatting while diagnostics never reach stdout.
  • pkgs/mcpx e2e tests pass for the Bun runtime path.

Refs: PR #7145 (closed, diff preserved), task 14681, batch issue #7297.

Activity

  1. dezren39
    added
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    on Nov 10, 2026
  2. developing-today commented on Nov 10, 2026

    @developing-today
    developing-todayBot
    on Nov 10, 2026 – with developing.today
    Contributor
    More actions

    CODE-2489

  3. dezren39
    added
    epic/mcpx-platformReprioritization program epic (2026-11-12)
    on Nov 12, 2026
  4. dezren39
    added this to the mcpx platform program milestone on Nov 12, 2026
  5. github-actions
    assigned
    dezren39
    on Nov 12, 2026
  6. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    on Nov 17, 2026
  7. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    🤖 Agent note · triaged

    • Agent: queue worker (repo-worker-code), lane any-h
    • Session / ID: task 18641
    • Found via: queue claim
    • Verdict: real and current. Labels decided: kind/bug, priority/normal, effort/m, task/small-fix (the routed packet's kind; added this triage — app/mcpx, epic/mcpx-platform already present).
    • Fresh evidence (2026-11-17): on current main, pkgs/mcpx/internal/codegen/emit.go's captureFrames still only tries CallSite.getFunctionName() (:928, :960) — no getMethodName/getFunction/getTypeName fallback — so the Bun naming gap is live, and captureConsole (:1180) has no Bun formatting parity work.
    • Routing: enqueued as task 20128 (small_fix, repo-health-code-pilot) with the issue's hard constraint baked into the packet as an exclusion: stdout is the result stream, diagnostics stay on the structured emitRecord path, the original console methods are never invoked for info/debug/dir/table (the Codex P1 that closed PR fix(mcpx): handle missing FunctionName in Bun CallSite and match console strings to runtime #7145, comment 4505048960), and TestCaptureFramesIsAvailableToScripts must pass unweakened. PR fix(mcpx): handle missing FunctionName in Bun CallSite and match console strings to runtime #7145's preserved diff is the starting reference for the frame-naming chain only.
    • Acceptance for the follow-on: Bun e2e green at full assertion strength; a diagnostics-emitting script under Bun leaves stdout as a clean result stream.
  8. developing-today
    added
    status:in-review
    on Nov 17, 2026
  9. dezren39
    added a commit that references this issue on Nov 17, 2026

    Merge pull request #11238 from developing-today/queue/20128-8350-mcpx…

    2539312
  10. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done — task 20128 fixed and merged in PR #11238

    • Agent: queue worker (repo-worker-code), lane any-a
    • PR: fix(mcpx): Bun fidelity for captureFrames naming and console formatting (#8350) #11238 — MERGED, merge commit 2539312
    • Root causes (reproduced fresh on Bun 1.4.2 before fixing): (1) Bun's V8 CallSite shim returns a single collapsed, unnamed frame for stacks its default stack string names correctly — the getMethodName/getFunction getters PR fix(mcpx): handle missing FunctionName in Bun CallSite and match console strings to runtime #7145 chained are equally empty there; (2) captureConsole took the Deno inspect branch under Bun because Bun exposes a Deno compatibility global, so console records rendered in Deno's format, not Bun's.
    • Fix (emit.go only): frame naming tries getFunctionName → getMethodName → getFunction()?.name in captureFrames and errorFrames; under Bun, a nameless CallSite result falls back to parsing the runtime's default stack string; captureConsole now checks Bun.inspect before Deno and renders at { depth: 2 }, byte-identical to native Bun console output (including the [Object ...] collapse). Stdout purity untouched — diagnostics stay on the structured emitRecord path; no original console method is invoked (the Codex P1 that closed PR fix(mcpx): handle missing FunctionName in Bun CallSite and match console strings to runtime #7145).
    • Documented Bun exception (per this issue's acceptance): JavaScriptCore inlines trivial wrapper functions; an inlined frame exists in no stack representation on any runtime (probes recorded in the PR). TestCaptureFramesIsAvailableToScripts is not weakened — its one-liner assertion stays on the default runtime — and the new TestBunCaptureFramesAndConsoleMatchTheRuntime e2e covers the Bun path at full assertion strength with a non-inlinable caller.
    • Verification: new Bun e2e PASS; go test -count=1 ./internal/codegen/ ok; go vet + gofmt clean; manual Bun smokes matched native output. The e2e package's mcpx testing: guard tests that close a whole bug class #1971 leaked-daemon sweep fails on the (heavily loaded) worker laptop even on pristine main — reproduced on main, environmental; the tests themselves pass.
  11. dezren39
    closed this as completedon Nov 17, 2026
  12. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workepic/mcpx-platformReprioritization program epic (2026-11-12)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)status:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    • mcpx platform programNo due date

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.