@@ -32,6 +32,31 @@ grep -Fq 'Microsoft `!ml` tolerance' "$ROOT/README.md" || \
3232grep -Fq ' Policy identifier: `cbm-vt-candidate-selection-v1`' " $ROOT /SECURITY.md" || \
3333 fail " SECURITY.md must name the versioned candidate-selection policy"
3434
35+ # Every marker publish-vt-evidence.sh validates must be one the gate actually
36+ # writes. These drifted silently: the results format went to v2 while the
37+ # publisher still demanded v1, and nothing caught it because the publisher had
38+ # no caller for a while. Restoring the caller failed a real release at the very
39+ # last step, after the full test matrix, both builds, smoke and soak had passed.
40+ python3 - " $ROOT " << 'MARKERS ' || fail "evidence markers disagree between writer and publisher"
41+ import pathlib, re, sys
42+ root = pathlib.Path(sys.argv[1])
43+ publisher = (root / "scripts/ci/publish-vt-evidence.sh").read_text(encoding="utf-8")
44+ writers = "\n".join(
45+ (root / name).read_text(encoding="utf-8")
46+ for name in ("scripts/ci/check-virustotal.sh", "scripts/ci/append-vt-notes.sh")
47+ )
48+ expected = re.findall(r"^publish_copy\s+\S+\s+(\S+)", publisher, re.M)
49+ if not expected:
50+ print("no publish_copy markers found - has the publisher been restructured?", file=sys.stderr)
51+ raise SystemExit(1)
52+ missing = [m for m in expected if m not in writers]
53+ if missing:
54+ for m in missing:
55+ print(f"publisher expects marker never written by the gate: {m}", file=sys.stderr)
56+ raise SystemExit(1)
57+ print(f"OK: all {len(expected)} published evidence markers match what the gate writes")
58+ MARKERS
59+
3560# Tripwire for the REVERTED endpoint-verification mechanism specifically. The
3661# current `!ml` tolerance is a policy branch inside this gate, not a callout to
3762# an external verification service, and must never become one.
0 commit comments