Skip to content

Commit 0b6441a

Browse files
committed
chore(governance): clear 12 trusted-base false-positive escape hatches
The estate's check-trusted-base.sh (standards#203) flagged 12 markers on main since #112 (2026-05-28) — all 12 are detector-pattern false positives, structurally identical to the believe_me FP audit recorded in docs/PROOF-NEEDS.md §"believe_me audit (2026-05-18)" (21 hits, zero real escapes). Resolution: * 10 Rust hits across 4 files are pattern-detector tables. Each holds a `Vec<DangerousPattern>` (or equivalent) that *enumerates* the very `unsafePerformIO` / `unsafeCoerce` / `Obj.magic` strings the scanner is hunting. The scanner's naive substring grep can't tell "uses the pattern" from "names the pattern in a detector table". Added a new `.trusted-base-ignore` (whole-path exemption, format mirrors the scanner's documented spec) covering the four files: - src/rust/verification/axiom_tracker.rs - crates/echidna-core-spark/src/axiom_tracker.rs - src/rust/corpus/agda.rs - src/rust/corpus/idris2.rs * 2 Agda postulates are real well-justified axioms: - `funext` (function extensionality) in proofs/agda/Basic.agda - `Conflicts` (abstract parameter) in proofs/agda/SoundnessPreservation.agda Both already had INTENTIONAL AXIOM / INTENTIONAL PARAMETER prose documentation, but outside the script's 5-line preceding-marker window. Added an `-- AXIOM:` / `-- TRUSTED:` magic-word line immediately before each `postulate` so the scanner sees it. Effect: `governance / Trusted-base reduction policy` should now report [OK] (12 markers exempted via .trusted-base-ignore + inline magic), up from the 12/12 undocumented failure on main. Refs: #92 (broader baseline failures, this PR addresses the trusted-base slice only).
1 parent 802e8c8 commit 0b6441a

3 files changed

Lines changed: 39 additions & 0 deletions

File tree

.trusted-base-ignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# .trusted-base-ignore — whole-path exemptions for the trusted-base scanner
2+
# (hyperpolymath/standards check-trusted-base.sh).
3+
#
4+
# Format: each non-comment, non-blank line is a path-fragment substring that
5+
# exempts every marker whose file path contains the fragment.
6+
#
7+
# Use sparingly. Per-site `TRUSTED:`/`AXIOM:` comments remain the preferred
8+
# mechanism for one-off documented escapes; this file is for whole-path
9+
# exemptions where the file's *entire purpose* is to talk about the patterns
10+
# the scanner detects (so every occurrence is a string literal, not a use).
11+
12+
# ─────────────────────────────────────────────────────────────────────────────
13+
# Pattern-detector tables (NOT uses of the patterns themselves)
14+
# ─────────────────────────────────────────────────────────────────────────────
15+
# Each of the files below holds a `Vec<DangerousPattern>` (or equivalent)
16+
# that enumerates the very `unsafePerformIO`/`unsafeCoerce`/`believe_me`
17+
# string literals the scanner is hunting for. The scanner's naive
18+
# substring grep cannot distinguish "uses the pattern" from "names the
19+
# pattern in a detector table", so every entry shows up as a false
20+
# positive. Same FP class as the `\bbelieve_me\b` Idris2 audit recorded
21+
# in docs/PROOF-NEEDS.md §"believe_me audit (2026-05-18)".
22+
#
23+
# These files are the *implementation* of the trust-pipeline's
24+
# axiom-tracker — they're proof infrastructure, not proof escapes.
25+
src/rust/verification/axiom_tracker.rs
26+
crates/echidna-core-spark/src/axiom_tracker.rs
27+
28+
# ─────────────────────────────────────────────────────────────────────────────
29+
# Hazard-classification helpers in the corpus extractor (NOT uses)
30+
# ─────────────────────────────────────────────────────────────────────────────
31+
# `corpus/agda.rs::collect_hazards` and `corpus/idris2.rs::collect_hazards`
32+
# each run a single-line `if text.contains("unsafePerformIO" / "unsafeCoerce"
33+
# / "Obj.magic")` to flag corpus entries that *contain* those patterns.
34+
# Same FP class — the substring is a hazard sentinel, not an escape hatch.
35+
src/rust/corpus/agda.rs
36+
src/rust/corpus/idris2.rs

proofs/agda/Basic.agda

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ module CurryUncurryLaws where
174174
-- major proof assistants (Coq's Functional Extensionality, Lean's
175175
-- funext, HoTT axiom). It does NOT compromise soundness.
176176
-- See: HoTT Book, Section 2.9; nLab "function extensionality"
177+
-- AXIOM: funext (see justification above; recognised by check-trusted-base.sh)
177178
postulate
178179
funext : {A B : Set} {f g : A B}
179180
((x : A) f x ≡ g x)

proofs/agda/SoundnessPreservation.agda

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ record Proof : Set where
4848
-- In practice ECHIDNA computes this via the danger-level tracker
4949
-- (verification/axioms.rs): two axiom sets conflict when one contains
5050
-- an axiom that the other marks Reject.
51+
-- TRUSTED: Conflicts is an abstract parameter (see above), not an unsound
52+
-- escape — the caller discharges it with a concrete proof.
5153
postulate
5254
Conflicts : List Axiom List Axiom Set
5355
-- ^ INTENTIONAL PARAMETER — "Conflicts" is domain knowledge about

0 commit comments

Comments
 (0)