Replace the audit record with chained audit events

Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
This commit is contained in:
2026-09-19 00:22:25 -07:00
parent cb5ecad4da
commit c6395b16f4
6 changed files with 270 additions and 71 deletions
+4 -2
View File
@@ -89,10 +89,12 @@ fn envelopes_reject_unknown_keys_at_every_depth() {
#[test]
fn audit_records_reject_unknown_keys_at_every_depth() {
for (i, line) in fixture("records/audit.jsonl").lines().enumerate() {
// The record and its decision: two objects.
// The record and its event: two objects. Decision and approval events also hold an
// outcome object.
let want = if line.contains("\"outcome\"") { 3 } else { 2 };
assert_eq!(
check::<AuditRecord>(&format!("audit.jsonl:{}", i + 1), line),
2
want
);
}
}