Repository navigation
Conversation
…codex/communityai-raw-ingress-proof
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.
The v1 Factory admission callback sees only a Pydantic-normalized request, so the host cannot compare the real Flow SDK body's 299 raw bytes with what CommunityAI received. This stacked draft adds an opt-in v2 receiver profile that gives the host bounded, receiver-observed ASGI body bytes and SHA-256, method and route, selected headers, and an independent normalized-body digest. It requires a host-issued transport capability and an explicit v2 admission bound to that observation before HTTP bearer authentication. The v1 path remains available.
An outer ASGI gate limits every v2 POST to 32,768 body bytes before FastAPI parses JSON, rejects a declared excess without reading a body frame, stops at the first excess chunk, and replays accepted bytes exactly. Route validation accepts a canonical direct path or a canonical path under an ASCII mount root, and requires the exact raw_path bytes; an absent or encoded raw path is denied before host callbacks. The observation continues to report the application route /v1/chat/completions. Offline tests retain a held dispatch claim; this PR does not enable physical send or deployment.
This is a receiver observation seam, not an authenticated Original or receiver receipt. ASGI headers are post-proxy observations, not the independently captured ten SDK-final headers. A host still needs to authenticate the Original issuer, sender and credential generation; verify transport channel plus deployed receiver identity, build and generation; compare sender and receiver projections under an explicit proxy policy; and supply fresh authority, a durable one-attempt claim, and a separately authenticated post-POST receipt. The edge must globally limit ASGI frame/request size and duration because one oversized frame can exist transiently before the in-app gate rejects it. FACTORY's separate held v3 candidate commits the same 307-byte Python-normalized body; its pre-POST projection and synthetic post-POST receipt shape do not establish the authenticated join.
At exact head e8f8528, hosted Black/isort and Ubuntu/macOS run-tests passed. A direct ASGI harness also passed direct and mounted requests and denied missing raw_path; Python compilation and diff checks passed. Linux and Windows package jobs failed only at Build and smoke unsigned public-alpha bundle because the inherited signed model catalog has expired; prior runtime, protocol, and installed-desktop self-test steps passed. The previous head passed 47 focused tests locally. No issuer, deployed receiver, provider, or network qualification is claimed.