Repository navigation
feat(redact): RedactWith, per-call exact credentials (contract 1.16) #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
abac519
6702cd7
eba4927
0e2a722
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,6 +50,24 @@ pub struct RedactRequest { | |
| /// Redaction surface. | ||
| pub mode: RedactMode, | ||
| } | ||
| /// `RedactWithRequest` payload (contract 1.16): a [`RedactRequest`] plus exact | ||
| /// credentials that apply to this call only. | ||
| /// | ||
| /// The extra literals supplement, never replace, the initialization registry: | ||
| /// one trusted host serving many tenants redacts each tenant's own credential | ||
| /// without a process-wide reinitialization. They are bounded like the init | ||
| /// registry (at most 128 literals of 4..=4096 bytes, 16384 bytes in all) and | ||
| /// never echoed; `Debug` shows only [`crate::Secret`]'s redacted form. | ||
| #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] | ||
| #[serde(deny_unknown_fields)] | ||
| pub struct RedactWithRequest { | ||
| /// Sensitive input. | ||
| pub text: String, | ||
| /// Redaction surface. | ||
| pub mode: RedactMode, | ||
| /// Exact credentials for this call. | ||
| pub secrets: Vec<crate::Secret>, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
At this new field, AGENTS.md reference: AGENTS.md:L160-L163 Useful? React with 👍 / 👎. |
||
| } | ||
| /// `RedactResponse` payload. | ||
| #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] | ||
| #[serde(deny_unknown_fields)] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This introduces contract 1.16 and its security-sensitive per-call credential semantics directly in implementation/module documentation, but a repository-wide search finds no
RedactWithbehavior indocs/specs/ordocs/plans/. Add the accepted behavior and constraints to a spec, then link an implementation-ordered plan, so this contract change follows the repository's required design sequence and has a durable source for its confidentiality, isolation, and limit invariants.AGENTS.md reference: AGENTS.md:L164-L166
Useful? React with 👍 / 👎.