Skip to content

feat(truapi-server): payload-blind wire-debug tap, sinks, and the codegen decode surface - #295

Open
decrypto21 wants to merge 1 commit into
mainfrom
nidish/debug-host-port
Open

feat(truapi-server): payload-blind wire-debug tap, sinks, and the codegen decode surface#295
decrypto21 wants to merge 1 commit into
mainfrom
nidish/debug-host-port

Conversation

@decrypto21

@decrypto21 decrypto21 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Adds the producer side of the wire debugger: a DebugSink trait in the Rust host core (truapi-server) with taps at the two frame choke points, a loopback WebSocket sink for native hosts, and the codegen surface a debugger decodes against — the wire table plus TRUAPI_WIRE_SCHEMA_HASH over every frame id and its method leg.

The tap is payload-blind: DebugEvent::Frame carries the raw Vec<u8> and the inbound tap runs before decode, so a corrupt frame is still observed. Outbound delivers to the product first, then taps. With no sink installed it is one relaxed atomic load. Every emit is wrapped in catch_unwind, and the mutexes on the frame and dispatch paths recover from poisoning, because a sink may be out-of-repo.

Nothing consumes the frames yet. The WASM host installs a sink when the JS side passes a debugEmit callback; no caller in this stack passes one until the web host dial-out, so the tap is present but unsupplied.

@decrypto21 decrypto21 changed the title feat(truapi): wire observe seam, wire debugger, and headless mock/forward debug host feat(truapi): wire observability - observe seam, wire debugger, debug host, and relay Jul 25, 2026
@decrypto21
decrypto21 force-pushed the nidish/debug-host-port branch from f752ca3 to 70c230f Compare July 25, 2026 06:30
@decrypto21
decrypto21 requested a review from TarikGul July 25, 2026 06:40
@decrypto21
decrypto21 force-pushed the nidish/debug-host-port branch 2 times, most recently from 6869ac4 to 0ac06b0 Compare July 25, 2026 09:42
@decrypto21
decrypto21 marked this pull request as ready for review July 25, 2026 09:43
@decrypto21
decrypto21 requested a review from a team July 25, 2026 09:43
Comment thread js/packages/truapi/README.md Outdated
Comment thread playground/src/components/WireTracePanel.tsx Outdated
Comment thread js/packages/truapi-debugger/src/wire-debugger.ts Outdated
Comment thread js/packages/truapi/src/sandbox.ts Outdated
Comment thread js/packages/truapi/package.json
@decrypto21
decrypto21 force-pushed the nidish/debug-host-port branch from 0ac06b0 to 65ac1ff Compare July 28, 2026 09:03
@decrypto21 decrypto21 changed the title feat(truapi): wire observability - observe seam, wire debugger, debug host, and relay feat(truapi-server): host-side wire debug tap and debugger Jul 28, 2026
@decrypto21
decrypto21 force-pushed the nidish/debug-host-port branch 3 times, most recently from 9ef0a44 to 6a6060f Compare July 28, 2026 20:04
@decrypto21
decrypto21 requested a review from Imod7 July 28, 2026 20:07
@decrypto21
decrypto21 force-pushed the nidish/debug-host-port branch from 6a6060f to 79d24d4 Compare August 2, 2026 19:51
Comment thread js/packages/truapi-debugger/src/server.ts Outdated
Comment thread js/packages/truapi/README.md Outdated
Comment thread js/packages/truapi-debugger/src/ingest.ts Outdated
Comment thread rust/crates/truapi-server/src/native_debug.rs
Comment thread js/packages/truapi-debugger/src/server.ts Outdated
Comment thread js/packages/truapi-debugger/src/wire-debugger.ts Outdated
Comment thread js/packages/truapi-debugger/src/ingest.ts Outdated
Comment thread rust/crates/truapi-server/src/host_core.rs
Comment thread js/packages/truapi-debugger/src/server.ts Outdated
Comment thread js/packages/truapi-debugger/src/server.ts Outdated
@decrypto21 decrypto21 changed the title feat(truapi-server): host-side wire debug tap and debugger feat(truapi-server): host-side wire debug tap and dev-only debugger Aug 5, 2026
@decrypto21 decrypto21 changed the title feat(truapi-server): host-side wire debug tap and dev-only debugger feat(truapi-server): host-side wire debug tap and debugger Aug 5, 2026
@decrypto21
decrypto21 requested a review from Imod7 August 5, 2026 11:33
@decrypto21
decrypto21 force-pushed the nidish/debug-host-port branch from 9498dbb to 6835784 Compare August 5, 2026 11:35
@decrypto21
decrypto21 force-pushed the nidish/debug-host-port branch 2 times, most recently from 409cd07 to b5fe5e7 Compare August 24, 2026 07:26
@decrypto21
decrypto21 force-pushed the nidish/debug-host-port branch 4 times, most recently from 9aa85e4 to f95621c Compare August 28, 2026 06:44
@decrypto21 decrypto21 changed the title feat(truapi-server): host-side wire debug tap and debugger feat(truapi-server): payload-blind wire-debug tap, sinks, and the codegen decode surface Aug 28, 2026
@decrypto21
decrypto21 force-pushed the nidish/debug-host-port branch from 715bfec to af7b25a Compare August 31, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants