From 1e2c8482069daa76926b298d60afd9555de06695 Mon Sep 17 00:00:00 2001 From: Giovanni Giovanni Date: Sun, 19 Jul 2026 20:08:16 -0400 Subject: [PATCH] R1-GOV impl (afi-gateway): token-free evidence-writer guard The no-canonical-evidence-writer guard's ban-list named the superseded evidence majors afi.scored-signal-evidence.v1/.v2 as literals. Assemble those two from fragments at runtime (Mission R1 D-R1-11) so this guard's own source carries no discarded literal; the current .v3 id and all non-R1 store/vault tokens stay literal, and the guard still proves the gateway names no canonical-evidence contract of any version. Enforcement preserved; 56 tests pass. Authorized by R1-GOV D-R1-11. Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/guardrails/no-canonical-evidence-writer.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/guardrails/no-canonical-evidence-writer.test.ts b/tests/guardrails/no-canonical-evidence-writer.test.ts index 35fa26b..60815eb 100644 --- a/tests/guardrails/no-canonical-evidence-writer.test.ts +++ b/tests/guardrails/no-canonical-evidence-writer.test.ts @@ -46,8 +46,11 @@ const BANNED_TOKENS = [ "MongoScoredSignalEvidenceStore", "IScoredSignalEvidenceStore", "ScoredSignalEvidenceRecord", - "afi.scored-signal-evidence.v1", - "afi.scored-signal-evidence.v2", + // Superseded evidence-contract majors — assembled from fragments so this + // guard's own source carries no discarded literal (Mission R1 D-R1-11); the + // gateway must still name no canonical-evidence contract of any version. + ["afi.scored-signal-evidence", ".v", "1"].join(""), + ["afi.scored-signal-evidence", ".v", "2"].join(""), "afi.scored-signal-evidence.v3", "afi.provider-invocation-proof.v1", "afi.aiml-invocation-proof.v1",