fix(artifacts): preserve checksum facets without losing readable members

This commit is contained in:
morluto
2026-10-08 23:35:02 +08:00
parent ae44e01c04
commit 938d7adf70
9 changed files with 236 additions and 59 deletions
+23 -1
View File
@@ -398,7 +398,29 @@
"calculated_sha256": {
"anyOf": [{ "type": "string" }, { "type": "null" }]
},
"unpacked": { "type": "boolean" }
"unpacked": { "type": "boolean" },
"checksum_mismatches": {
"type": "array",
"items": {
"type": "object",
"properties": {
"representation": {
"type": "string",
"enum": ["stored", "decoded"]
},
"algorithm": { "type": "string" },
"declared": { "type": "string" },
"observed": { "type": "string" }
},
"required": [
"representation",
"algorithm",
"declared",
"observed"
],
"additionalProperties": false
}
}
},
"required": [
"logical_path",
+6
View File
@@ -260,6 +260,12 @@ Artifact integrity fails closed by default. A request can explicitly select
`integrity_policy=record-and-continue` when the investigation needs verified
siblings to continue after a mismatch.
Strict member failures include `details.checksum_mismatches` for conflicting
stored or decoded checksums, preserving each algorithm and declared/observed
value. An unsupported checksum algorithm leaves that verification facet unknown;
readable member bytes are still hashed and can be extracted, with the declared
algorithm and value retained in limitations.
Contradictory bytes are quarantined from nested expansion and recorded with
declared and observed hashes, trust, provenance, path, and unpacked state.
Verified siblings continue. Comparisons classify the result as a contradiction