feat(sensitive): bind model disclosure to exact route policy - #75
Draft
seonghobae wants to merge 18 commits into
Draft
feat(sensitive): bind model disclosure to exact route policy#75seonghobae wants to merge 18 commits into
seonghobae wants to merge 18 commits into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Aug 11, 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.
Partial implementation of #10, stacked on PR #69.
Buyer/security gap
Issue #10 requires AI-involved sensitive-data policy to bind selected provider/model/region plus retention and export behavior instead of treating possession of model credentials or an internal network location as disclosure authority. The sensitive-handle stack already provides exact authority/audience/lifecycle primitives; this Draft supplies a reusable deterministic route-admission prerequisite without creating a raw-value broker.
Dependency
This Draft is stacked on unchanged exact PR #69 head
de79d85e6be5131036db119efab767f0eb76a816and must remain Draft while #69/#68/#55/#53/#46 are active.Implemented scope
Exact current head is
286f92aae9e298ab7dff1fd81c7850aabd5692ce.The branch adds
ModelRouteRequest/ModelRouteScope/ModelRouteDecision/evaluate_model_routeand now binds the complete existingSensitiveDataAuthoritytuple to exact bounded:Existing
new(...)callers default export policy tono-export; a caller that needs a separately governed export choice useswith_export_policy(...). Both request-side and scope-side identifiers are bounded 1–128 byte ASCII policy tokens with at least one alphanumeric character. Malformed request policy, malformed trusted scope, authority mismatch, or any route-dimension mismatch fails closed. Matching route metadata remains explicitly separate from protected-value disclosure and from actual export execution.TDD / RCA sequence
90bde2dba675be10abb34a5c2a8bf03bb34abcdfestablished the intended missing-capability RED in CI run31474208345, Rust contracts job93724057066: repository contracts and rustfmt passed, thencargo check --locked --workspace --all-targetsfailed with E0599 because export-policy APIs did not exist.88b1fd46b6d2e83411682f97aa17de95aca90789made the export regressions GREEN, but strict Clippy correctly rejected the two new eight-argument constructors (clippy::too_many_arguments). That was treated as a product API design defect rather than bypassed with an allow attribute or weaker gate.e0527ffe5e461db778f0eb7ac37d7e3b81e1a7c5replaced the oversized constructors with the bounded builder-stylewith_export_policyselector while retaining a fail-safeno-exportcompatibility default.a07e3eb33489e0ed26fdc2c381ae587edc41c503updated the realistic export regressions to exercise that API, and current head286f92aae9e298ab7dff1fd81c7850aabd5692ceadds the truthful Unreleased changelog entry.Exact-current evidence
For exact head
286f92aae9e298ab7dff1fd81c7850aabd5692ceagainst unchanged exact stack basede79d85e6be5131036db119efab767f0eb76a816:31474904239: success;93726313815: success, including repository contracts, canonical formatting, locked workspace/all-target check, full tests, strict Clippy, and rustdoc;93726313914: success, including exact owned production function/line/region/branch enforcement;No predecessor-head check or review is transferred to the current head.
Truth boundary
This lane does not authenticate a provider, invoke a model, inspect or attest a real provider region, authorize raw-field disclosure, execute an export, bind a prompt/token budget, validate model output, persist policy, choose fallback providers, or claim the complete trusted broker/orchestrator. It is only the deterministic sensitive-data route-policy prerequisite for those later trusted boundaries.