This repository was archived by the owner on Oct 1, 2026. It is now read-only.
[CTX-0082] fix(protocol): establish one strict live request and protocol owner (#138) - #148
Merged
Merged
Conversation
…-closed continuation (#138) - DEV-006: replace permissive decodeResponse with a closed exact-record decoder (single JSONL line, key allowlist, exclusive result/error, validated ErrorCategory, bounded code/message/details, duplicate-key rejection via shared src/json-guard.ts). - DEV-007: live requests fail closed before any socket write when a logical request exceeds one 256 KiB frame; oversized sends stay unavailable until the core continuation contract lands. - DEV-001: hermetic subprocess loopback test for bin/bitty-devtools.ts (inspect dials once; --help and malformed args never dial).
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Priority: P1 | Area: DevTools live client and protocol | Labels: P1,fix,area:devtools | Milestone: v0.1.0 | RFC: OQ-004 | Task: CTX-0082
Closes #138
Scope
DEV-001, DEV-002, DEV-006, DEV-007, DEV-008, DEV-013, DEV-021. DEV-001/002/008/013/021 were already delivered by #144 (d16e244); this PR closes the remaining DEV-006 and DEV-007 and supplies the owed DEV-001 activation evidence.
Changes
DEV-006 — one closed response decoder (
src/protocol.ts)nullJSON rejected without an uncaughtTypeError.resultxorerror.ErrorCategoryvalidated against the closed union; stringcodeandmessagebounded (message truncated to 512).idmust be a nonnegative safe integer; fatal UTF-8 stays at the wire boundary.JSON.parsevia sharedsrc/json-guard.ts(also adopted by the campaign ctl-envelope validator).error.detailsbounded to 4 KiB (rejected, never echoed) per the DevTools RFC.DEV-007 — fail closed instead of fragmenting
IpcTransport.encodeSingleLiveRequestthrowsFrameTooLargebefore any socket write when a logical live request exceeds one 256 KiB frame. Oversized live sends remain explicitly unavailable until the corebittyinbound continuation contract lands (recorded as risk PX-0560; server half is a cross-repository follow-up).DEV-001 — hermetic activation evidence
bin/bitty-devtools.tsover a loopback Unix socket: inspect dials exactly once;--helpand malformed args never dial.Verification
just checkgreen: prettier + markdownlint clean,tsc --noEmitclean,bun test693 pass / 0 fail, Rust 90 + 20 pass.Non-claims
No wire-level continuation is implemented; live trace/control remain unavailable by design. No server-side change is made in this repository.