Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions crates/registry-notary-core/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1378,6 +1378,7 @@ pub struct EvidenceFormat {
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Split cross-area changes before merging

This commit changes crate runtime/client validation, a docs-site tutorial, and release conformance materials together, which crosses three owning areas in one review unit. That makes it harder to apply the different verification gates and security-review notes for adopter evidence versus Notary model behavior; split the crate, docs, and release changes into scoped changes before merging.

AGENTS.md reference: AGENTS.md:L77-L78

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add the required DCO sign-off

This commit message has no Signed-off-by: trailer, but the repository requires every commit to carry a DCO sign-off. As-is, the change can be blocked by the DCO gate even if the code is correct, so recreate the commit with git commit -s or otherwise add the sign-off before merging.

AGENTS.md reference: AGENTS.md:L70-L70

Useful? React with 👍 / 👎.

pub struct ClaimResultView {
pub evaluation_id: String,
pub claim_id: String,
Expand All @@ -1398,6 +1399,7 @@ pub struct ClaimResultView {
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct TargetRefView {
#[serde(rename = "type", default, skip_serializing_if = "String::is_empty")]
pub entity_type: String,
Expand All @@ -1409,6 +1411,7 @@ pub struct TargetRefView {
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct EvidenceEntityRef {
#[serde(rename = "type")]
pub entity_type: String,
Expand All @@ -1435,6 +1438,7 @@ pub const PROVENANCE_GENERATED_BY_CLAIM_EVALUATION: &str = "claim_evaluation";
/// Requester-side identity (client, actor, subject) is deliberately absent;
/// those live in restricted audit, never on the public wire.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct ClaimProvenance {
pub schema_version: String,
pub generated_by: ProvenanceGeneratedBy,
Expand Down Expand Up @@ -1481,6 +1485,7 @@ impl ClaimProvenance {
/// `policy_id` here names the *evaluation* policy under which the result was
/// produced.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct ProvenanceGeneratedBy {
#[serde(rename = "type")]
pub entry_type: String,
Expand Down Expand Up @@ -1512,6 +1517,7 @@ pub struct ProvenanceGeneratedBy {
/// The consumed side of a claim provenance record: how many Relay consultations
/// contributed to the claim.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct ProvenanceUsed {
pub relay_consultation_count: usize,
}
Expand Down
14 changes: 14 additions & 0 deletions crates/registry-notary-server/src/openapi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2155,6 +2155,11 @@ fn claim_result_view_schema() -> Value {
},
"satisfied": { "type": ["boolean", "null"] },
"disclosure": { "type": "string" },
"redacted_fields": {
"type": "array",
"items": { "type": "string" },
"description": "Claim or top-level field names redacted from the public result. Omitted when no redaction was applied."
},
"format": { "type": "string" },
"issued_at": { "type": "string", "format": "date-time" },
"expires_at": { "type": ["string", "null"], "format": "date-time" },
Expand Down Expand Up @@ -4049,6 +4054,15 @@ mod tests {
doc["components"]["schemas"]["BatchClaimResultView"]["properties"]["value"]["type"],
json!(["object", "array", "string", "number", "integer", "boolean", "null"])
);
assert_eq!(
doc["components"]["schemas"]["ClaimResultView"]["properties"]["redacted_fields"]
["items"]["type"],
json!("string")
);
assert!(!doc["components"]["schemas"]["ClaimResultView"]["required"]
.as_array()
.expect("required claim-result fields are an array")
.contains(&json!("redacted_fields")));

let evaluate_request = &doc["components"]["schemas"]["EvaluateRequest"]["properties"];
assert!(evaluate_request.get("subject").is_none());
Expand Down
1 change: 1 addition & 0 deletions crates/registryctl/src/project_authoring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use registry_relay::source_plan::{
use serde::{Deserialize, Serialize};
use serde_json::{json, Map, Value};
use sha2::{Digest, Sha256};
use time::{format_description::well_known::Rfc3339, OffsetDateTime};

static PROJECT_STARTERS: include_dir::Dir<'_> =
include_dir::include_dir!("$CARGO_MANIFEST_DIR/assets/project-starters");
Expand Down
Loading
Loading