Repository navigation
feat(inference): enforce final request and response privacy checks - #2311
Merged
Merged
Conversation
hidb4ai
requested review from
Alanxtl,
AlexStocks,
PsiACE,
frostming and
zhanghuidinah
as code owners
October 30, 2026 07:28
This was referenced Oct 30, 2026
hidb4ai
commented
Oct 30, 2026
hidb4ai
left a comment
Contributor
Author
There was a problem hiding this comment.
Enforcing-mode protection still has three gaps at this commit. The inline comments include reproductions; these should be fixed before merging.
hidb4ai
commented
Nov 2, 2026
hidb4ai
left a comment
Contributor
Author
There was a problem hiding this comment.
Three current correctness issues remain: a Responses content-assembly bypass, a Chat SSE response-model bypass, and a retry regression in observation modes. Details and reproductions are inline.
knqiufan
requested changes
Nov 2, 2026
AlexStocks
reviewed
Nov 2, 2026
feat(context): add exact reuse proofs and final payload admission
hireview001
requested review from
Zxf-xufeng,
frf12,
thunguo and
yihong0618
as code owners
November 2, 2026 03:46
…2315) * feat(inference): add reversible operation input encoding * test(evaluation): measure Experience input encoding quality and cost * docs(inference): clarify input encoding semantics and acceptance * test(evaluation): probe model interpretation of encoded evidence * fix(evaluation): guard identities and isolate failed cases * test: align processing diagnostics fixture with input encoding * fix(evaluation): preserve judge streaming and evidence identity * fix(eval): reject missing external databases before runtime startup * fix(eval): normalize partial database configuration * fix(eval): reject unsupported private identity platforms
hidb4ai
commented
Nov 2, 2026
hidb4ai
left a comment
Contributor
Author
There was a problem hiding this comment.
Two correctness issues remain at this commit: a native-SDK SSE assembly bypass and acceptance of evaluation records whose original run identity is missing. Reproductions and required behavior are inline.
AlexStocks
approved these changes
Nov 2, 2026
1 task done
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.
Which issue or RFC does this PR close?
Implements owned inference-boundary protection and reversible operation input encoding from RFC #2086, including the implementation merged from #2314. Replaces the corresponding scope of #2264. Context reuse/check is isolated in dependent #2313, and input-encoding evaluation is in dependent #2315. Independent Unix-socket support is in #2312.
Rationale for this change
A checked prompt can still change during provider serialization, and a provider can return forbidden content or an incomplete response. Enforcing protection therefore checks the final request before transmission and the complete raw response before delivery. A mandatory refusal must also leave pending Memory work retryable.
What changes are included in this PR?
Are there any user-facing changes?
Protection defaults to disabled. Enforcing mode requires an explicitly configured supported target and withholds requests or responses whose required checks cannot complete. Strict streaming buffering delays first content. No HTTP endpoint, database table, or migration is added. Admission inspects and refuses; it does not mask secrets, create placeholder mappings, or restore hidden values. SecretStr protects configuration display only. Allowed bytes are not a guarantee of model understanding or correct tool decisions.
How was this change tested?
make check: passed, including lint, types, lock consistency, and integration manifest checks.AI usage statement
OpenAI Codex assisted with implementation, review fixes, regression tests, splitting, documentation, and validation.