Skip to content

[CTX-0068] Implement IPC framing, scopes, auth and wire limits (OQ-018) #107

Closed

Description

@Xuepoo

Implement bounded IPC framing and scopes per OQ-018 / CTX-0068.

Scope

  • Bounded 256 KiB framing (frame.rs MAX_FRAME_BYTES=262144, Framer 512 KiB, incremental decode, shed-newest) already seeded; expose via wire envelope v1 (WIRE_VERSION=1) with MAX_ID_BYTES=64, MAX_METHOD_BYTES=128, MAX_JSON_DEPTH=32, 256 KiB chunk RC-10, no ambient auth/scope.
  • Scopes (scope.rs): 13 scopes (terminal/view/config/plugin/process/debug), RFC grammar validation, ScopeSet cli/mcp defaults, authorize_method server-side, ConsentLedger per-client/per-scope ledgered 64 cap, no bundled admin scope.
  • Auth (auth.rs): SO_PEERCRED headless verify_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.
  • Wire (wire.rs): v1 envelope, version/depth/chunk/id/method validation, ambient rejection, deterministic now_ms, forbid(unsafe).
  • Limits (limits.rs): RC-9 defaults 100 req/s burst 200 / 1 MiB payload / 16 conns shed-newest + RateLimiter headless; channel/error/lib tightened to expose new modules.
  • Gates: cargo fmt, just check 0 issues, cargo test workspace PASS (93 bitty-ipc), act -n DRYRUN PASS, forbid(unsafe), deterministic.

Refs: OQ-018, CTX-0068

CarryCtx: CTX-0068

Activity

  1. added this to the v0.0.1 milestone on Aug 29, 2026
  2. added
    area:ipc
    P0
    on Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0area:ipcfeat

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions