Repository navigation
feat(ipc): implement framing, scopes, auth and wire limits (CTX-0068) - #108
Merged
Merged
Conversation
Refs: OQ-018, CTX-0068
This was referenced Nov 3, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #107
Implements IPC framing and scopes (OQ-018) per CTX-0068.
Summary
crates/bitty-ipc/src/scope.rs: 13 scopes (terminal/view/config/plugin/process/debug), RFC grammar validation, ScopeSet cli/mcp defaults,authorize_methodserver-side, ConsentLedger per-client/per-scope ledgered 64 cap, no bundled admin,terminal:inspectdoes not imply input/manage.crates/bitty-ipc/src/auth.rs: SO_PEERCRED paradigm headlessverify_peer_uid/verify_unix_endpoint(0700/0600 owner checks) + Windows pipe ACL stub + ChildToken/Store short-lived PTY-fd tokens 60s TTL bounded 64, no env leak, replay fail-closed, deterministicnow_ms.crates/bitty-ipc/src/wire.rs: v1 envelope (WIRE_VERSION=1,MAX_ID_BYTES=64,MAX_METHOD_BYTES=128,MAX_JSON_DEPTH=32, no ambient auth/scope, chunk 256 KiB RC-10), version/depth/chunk/id/method validation,forbid(unsafe).crates/bitty-ipc/src/limits.rs: RC-9 defaults (100 req/s burst 200, 1 MiB payload, 16 conn shed-newest) +RateLimiterheadless, bounded deterministic (rate_limiter_burst_and_window,rc9_defaults_match_rfc).crates/bitty-ipc/src/channel.rs/error.rs/lib.rs: tightened re-exports, error variants for scope/auth/wire/limits, lib exposure + docs, bounded 256 KiB framing preserved (frame.rsMAX_FRAME_BYTES=262144, Framer 512 KiB, incremental decode).Testing & gates
cargo fmt --allPASSjust check0 issues (fmt-check 0, clippy -D warnings 0, test workspace 93 bitty-ipc + 808 workspace pass, actionlint 0, markdownlint 0/29)cargo test --workspace --all-targets --lockedPASScargo check --target x86_64-pc-windows-gnuPASSact -nDRYRUN PASS (Quality gates + CodeQL rust/actions)forbid(unsafe_code)enforced, deterministic, no I/O, no wall-clockFollow-up
Review PASS with low-severity follow-up about
limits.rsburst vs sustained (document as follow-up, not blocking) — tracked separately per instruction.Refs: OQ-018, CTX-0068
CarryCtx: CTX-0068