Skip to content

feat(sensitive): require separate validated model output policy - #84

Draft
seonghobae wants to merge 6 commits into
feat/sensitive-model-context-isolationfrom
feat/sensitive-model-output-policy
Draft

feat(sensitive): require separate validated model output policy#84
seonghobae wants to merge 6 commits into
feat/sensitive-model-context-isolationfrom
feat/sensitive-model-output-policy

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Partial implementation of #10, stacked on PR #81.

Buyer/security gap

Issue #10 requires sensitive-model output to be validated and retained under a policy separate from invocation admission. PR #81 fails closed when a trusted broker detects unrelated conversation history, but an authorized invocation still must not imply that arbitrary returned output is accepted or retained.

Dependency

This Draft is stacked on unchanged exact PR #81 head 0ec604deb1c0293008560e0fcd4af7ccb65d93ad and must remain Draft while that prerequisite and its sensitive-data stack remain active.

TDD / RCA sequence

  1. Exact test-only head 32af45f2525f17fa1dbae50f59e4641999a50695 established the intended production-boundary RED. CI run 31486146752, Rust contracts job 93761899904, passed repository contracts and formatting, then failed at the locked workspace check because ModelOutputDecision, ModelOutputRequest, ModelOutputScope, ModelOutputValidation, and evaluate_model_output did not exist.
  2. Production head 99165350c13c9920c052e845815ee4e32af3ecf1 added the deterministic separate output-policy boundary. Rust contracts succeeded, but Production coverage in run 31487250765, job 93765361123, correctly failed exact branch coverage at 611/612.
  3. Exact coverage artifact 9099636441 localized the only uncovered branch to the punctuation-only case in output_policy_identifier_is_valid: the predicate requiring at least one ASCII alphanumeric byte had never taken its false branch while the surrounding syntax predicate remained otherwise valid.
  4. Head 902ecc5d69f637774b39c6628d041c08a263c52d added the realistic --- malformed-policy regression, restoring exact production coverage and full Rust-contract GREEN in CI run 31487701456.
  5. Current exact head 62f69cadbe0b4011fec67f9e482b04c4cacf181b adds only the truthful Unreleased changelog entry. Fresh exact-head CI run 31487969844 is GREEN: Rust contracts job 93767614892 and Production coverage job 93767614791 both completed successfully, including repository contracts, formatting, locked workspace/all-target check, tests, strict Clippy, rustdoc, and exact owned production function/line/region/branch coverage.

Implemented contract

The branch now requires:

  • a distinct model-output decision that is not inferred from invocation authorization;
  • exact reviewed output-schema and output-retention-policy identifiers;
  • bounded 1–128 byte ASCII policy identifiers containing at least one alphanumeric byte;
  • malformed request or trusted scope metadata to fail closed;
  • exact schema and retention-policy equality before validation state is considered;
  • trusted Rejected validation never to become authorized; and
  • policy mismatch to remain a distinct failure even when the supplied validation result is rejected.

No formal reviews are currently returned for this exact head. No predecessor-head check, review, mergeability result, or synthetic status is transferred to the current head.

Truth boundary

This is deterministic metadata policy only. It does not inspect model-output bytes, execute schema validation, authenticate or invoke a provider, persist output, enforce a real retention/deletion system, authorize model invocation, disclose protected values, choose fallback routes, attest validator identity, or complete issue #10. A trusted validator and retention owner must supply the facts consumed by this policy primitive.

Keep Draft while #81 and the prerequisite sensitive-data stack remain active; fresh exact-head/live-base acceptance is required again after any dependency movement.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 893ecec7-9176-447a-8053-3b881962ddf3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant