From c33f535dc4494e2ecaf1b6056a1abd9dd0eed0db Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Tue, 17 Nov 2026 23:25:34 +0800 Subject: [PATCH 1/8] EVAL-AUTH-01: exact rational authorization observation oracle --- .../evaluation_authorization_quotient.py | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 src/spiral_ln/evaluation_authorization_quotient.py diff --git a/src/spiral_ln/evaluation_authorization_quotient.py b/src/spiral_ln/evaluation_authorization_quotient.py new file mode 100644 index 00000000..4e57f96c --- /dev/null +++ b/src/spiral_ln/evaluation_authorization_quotient.py @@ -0,0 +1,109 @@ +"""EVAL-AUTH-01: exact finite value of an authorization observation. + +No learned model or evaluator is called. This module treats supplied permission +labels and audit readouts as an exact finite population, and never claims +their real-world provenance or a calibrated population error bound. +""" +from __future__ import annotations + +from dataclasses import dataclass +from fractions import Fraction +from collections import defaultdict +from typing import Sequence + +Q = Fraction + + +@dataclass(frozen=True) +class AuthorizationWorld: + world_id: str + public: str + audit: str + authorized: bool + mass: Q = Q(1) + + +@dataclass(frozen=True) +class ObservationRisk: + error: Q + accuracy: Q + true_positive_rate: Q | None + false_positive_rate: Q | None + policy: tuple[tuple[tuple[str, ...], bool], ...] + total_mass: Q + + +def _validate(worlds: Sequence[AuthorizationWorld]) -> tuple[AuthorizationWorld, ...]: + rows = tuple(worlds) + if not rows: + raise ValueError("finite population must be nonempty") + ids: set[str] = set() + for row in rows: + if not isinstance(row.world_id, str) or not row.world_id or row.world_id in ids: + raise ValueError("world ids must be unique nonempty strings") + ids.add(row.world_id) + if not isinstance(row.public, str) or not isinstance(row.audit, str): + raise TypeError("observation values must be strings") + if type(row.authorized) is not bool: + raise TypeError("authorization must be a Bool") + if not isinstance(row.mass, Fraction) or row.mass <= 0: + raise ValueError("masses must be positive exact fractions") + return rows + + +def _key(row: AuthorizationWorld, inspected: bool) -> tuple[str, ...]: + return (row.public, row.audit) if inspected else (row.public,) + + +def optimal_observation_policy( + worlds: Sequence[AuthorizationWorld], *, inspected: bool = False +) -> ObservationRisk: + """Return Bayes-optimal binary authorization decision and exact risk. + + Under symmetric 0/1 error cost each observation fibre is independently + assigned its majority label. Ties deny authorization. + """ + rows = _validate(worlds) + cells: dict[tuple[str, ...], list[Q]] = defaultdict(lambda: [Q(0), Q(0)]) + for row in rows: + cells[_key(row, inspected)][int(row.authorized)] += row.mass + + choices = { + key: grant > deny + for key, (deny, grant) in cells.items() + } + total = sum((row.mass for row in rows), Q(0)) + incorrect = sum((min(deny, grant) for deny, grant in cells.values()), Q(0)) + total_grant = sum((row.mass for row in rows if row.authorized), Q(0)) + total_deny = total - total_grant + true_positive = sum( + (row.mass for row in rows if row.authorized and choices[_key(row, inspected)]), + Q(0), + ) + false_positive = sum( + (row.mass for row in rows if not row.authorized and choices[_key(row, inspected)]), + Q(0), + ) + return ObservationRisk( + error=incorrect / total, + accuracy=Q(1) - incorrect / total, + true_positive_rate=true_positive / total_grant if total_grant else None, + false_positive_rate=false_positive / total_deny if total_deny else None, + policy=tuple(sorted(choices.items())), + total_mass=total, + ) + + +def inspection_value(worlds: Sequence[AuthorizationWorld]) -> Q: + """Exact decrease in minimal classification error from a revealed audit. + + Pairing the old public observation with the audit readout refines each + public fibre. Each refined cell may choose independently, so its sum of + minima cannot exceed the original public-cell minimum. + """ + uninspected = optimal_observation_policy(worlds) + inspected = optimal_observation_policy(worlds, inspected=True) + value = uninspected.error - inspected.error + if value < 0: + raise AssertionError("a refining observation increased optimal error") + return value From a7649249417b7103748255f81a1cdb5aa50dd2f2 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Tue, 17 Nov 2026 23:25:37 +0800 Subject: [PATCH 2/8] EVAL-AUTH-01: independent finite policy enumeration --- .../test_evaluation_authorization_quotient.py | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 tests/test_evaluation_authorization_quotient.py diff --git a/tests/test_evaluation_authorization_quotient.py b/tests/test_evaluation_authorization_quotient.py new file mode 100644 index 00000000..96bfdd03 --- /dev/null +++ b/tests/test_evaluation_authorization_quotient.py @@ -0,0 +1,94 @@ +"""Exact finite tests for EVAL-AUTH-01, including an independent oracle.""" +from __future__ import annotations + +from fractions import Fraction as Q +from itertools import product + +import pytest + +from spiral_ln.evaluation_authorization_quotient import ( + AuthorizationWorld, inspection_value, optimal_observation_policy, +) + + +def make_worlds(labels, public, audit, masses=None): + n = len(labels) + if masses is None: + masses = [Q(1)] * n + return [ + AuthorizationWorld(f"w{i}", str(public[i]), str(audit[i]), labels[i], masses[i]) + for i in range(n) + ] + + +def brute_min_error(worlds, inspected=False): + key = lambda x: (x.public, x.audit) if inspected else (x.public,) + distinct = sorted({key(row) for row in worlds}) + total = sum((row.mass for row in worlds), Q(0)) + errors = [] + for decisions in product((False, True), repeat=len(distinct)): + policy = dict(zip(distinct, decisions)) + errors.append(sum( + (row.mass for row in worlds if policy[key(row)] != row.authorized), Q(0) + )) + return min(errors) / total + + +def test_hidden_permission_collision_and_exact_inspection(): + worlds = make_worlds([False, True], [0, 0], [0, 1]) + old = optimal_observation_policy(worlds) + new = optimal_observation_policy(worlds, inspected=True) + assert old.error == Q(1, 2) + assert old.accuracy == Q(1, 2) + assert old.false_positive_rate == Q(0) + assert old.true_positive_rate == Q(0) + assert old.policy == ((("0",), False),) + assert new.error == Q(0) + assert new.accuracy == Q(1) + assert inspection_value(worlds) == Q(1, 2) + + +def test_weighted_collision_and_tie_handling(): + worlds = make_worlds( + [False, True], [0, 0], [0, 1], [Q(1), Q(3)] + ) + old = optimal_observation_policy(worlds) + assert old.error == Q(1, 4) + assert old.false_positive_rate == Q(1) + assert old.true_positive_rate == Q(1) + assert inspection_value(worlds) == Q(1, 4) + + +def test_unidentified_denominators_remain_explicit(): + one_class = make_worlds([True], [0], [0]) + result = optimal_observation_policy(one_class) + assert result.false_positive_rate is None + assert result.true_positive_rate == Q(1) + + +@pytest.mark.parametrize("worlds", [ + [], + make_worlds([True, False], [0, 0], [0, 1], [Q(1), Q(0)]), + [AuthorizationWorld("duplicate", "o", "a", True), + AuthorizationWorld("duplicate", "p", "b", False)], +]) +def test_invalid_worlds_fail_closed(worlds): + with pytest.raises(ValueError): + optimal_observation_policy(worlds) + + +def test_complete_four_world_oracle_census(): + checks = 0 + for n in range(1, 5): + for labels in product((False, True), repeat=n): + for public in product((0, 1), repeat=n): + for audit in product((0, 1), repeat=n): + worlds = make_worlds(labels, public, audit) + a = optimal_observation_policy(worlds) + b = optimal_observation_policy(worlds, inspected=True) + assert a.error == brute_min_error(worlds) + assert b.error == brute_min_error(worlds, inspected=True) + assert b.error <= a.error + assert a.accuracy + a.error == 1 + checks += 1 + assert checks == sum(8 ** n for n in range(1, 5)) == 4680 From c1cb567fb68daea6326a7a923196ffdc412de36f Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Tue, 17 Nov 2026 23:25:40 +0800 Subject: [PATCH 3/8] EVAL-AUTH-01: source-hashed offline finite verifier --- scripts/verify_eval_auth01.py | 71 +++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 scripts/verify_eval_auth01.py diff --git a/scripts/verify_eval_auth01.py b/scripts/verify_eval_auth01.py new file mode 100644 index 00000000..f685150b --- /dev/null +++ b/scripts/verify_eval_auth01.py @@ -0,0 +1,71 @@ +"""Regenerate a source-hashed, exact finite EVAL-AUTH-01 pilot receipt. + +PYTHONPATH=src python scripts/verify_eval_auth01.py --output /tmp/authq01.json +""" +from __future__ import annotations + +import argparse +from fractions import Fraction as Q +from hashlib import sha256 +from itertools import product +import json +from pathlib import Path +import sys + +ROOT = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(ROOT / "src")) + +from spiral_ln.evaluation_authorization_quotient import ( + AuthorizationWorld, inspection_value, optimal_observation_policy, +) + + +def run() -> dict: + counts = {} + for n in range(1, 5): + checked = 0 + for labels in product((False, True), repeat=n): + for public in product((0, 1), repeat=n): + for audit in product((0, 1), repeat=n): + worlds = [ + AuthorizationWorld(f"w{i}", str(public[i]), str(audit[i]), + bool(labels[i]), Q(1)) + for i in range(n) + ] + old = optimal_observation_policy(worlds) + new = optimal_observation_policy(worlds, inspected=True) + assert old.error >= new.error + assert inspection_value(worlds) == old.error - new.error + checked += 1 + counts[str(n)] = checked + + paths = [ + "src/spiral_ln/evaluation_authorization_quotient.py", + "tests/test_evaluation_authorization_quotient.py", + "scripts/verify_eval_auth01.py", + ] + hashes = { + path: sha256((ROOT / path).read_bytes()).hexdigest() for path in paths + } + return { + "schema": "eval_auth01_v1", + "evidence_level": "exact finite enumeration and algebraic identity", + "model_evaluations": 0, + "worlds": counts, + "total_finite_world_families": sum(counts.values()), + "source_sha256": hashes, + } + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--output", type=Path) + args = parser.parse_args() + result = run() + serialized = json.dumps(result, sort_keys=True, indent=2) + "\n" + if args.output is None: + sys.stdout.write(serialized) + else: + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(serialized, encoding="utf-8") + print(args.output) From 8202d47e8eea327c532364e00bf0e5cc128c6e52 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Tue, 17 Nov 2026 23:25:43 +0800 Subject: [PATCH 4/8] EVAL-AUTH-01: decision-theory and FSI-01 integration protocol --- paper/authorization_observation_value.md | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 paper/authorization_observation_value.md diff --git a/paper/authorization_observation_value.md b/paper/authorization_observation_value.md new file mode 100644 index 00000000..064953ac --- /dev/null +++ b/paper/authorization_observation_value.md @@ -0,0 +1,34 @@ +# EVAL-AUTH-01: the exact value of an authorization observation + +**Scope:** finite rational-valued synthetic populations, externally supplied binary authorization, deterministic public readout, and one additional audit readout. No model or judge calls. No assumption that real evidence or authority is authenticated. + +For each hidden world `w` with mass `p(w)`, let `A(w) in {0,1}` denote the policy-defined authorization and `O(w)` the information presented to a controller. An optimal deterministic classifier under symmetric binary-error loss chooses the more probable authorization label in each observation fibre; ties choose denial. Its minimal probability of error is + +``` +R*(O) = sum_o min(P(O=o, A=0), P(O=o, A=1)). +``` + +An authenticated audit, if it truly supplies an additional observation `Q(w)` before action, refines each fibre to `(O,Q)`. The exact optimal error improves or stays unchanged: + +``` +R*(O,Q) <= R*(O). +``` + +For a uniform pair of worlds sharing `O` but requiring opposing decisions, public-only accuracy is at most 1/2. A perfectly separating audit can reduce optimal error to zero. These are elementary decision-theory identities over a fixed finite distribution, not empirical claims of generalization. + +The implementation uses exact `fractions.Fraction` throughout. `optimal_observation_policy` returns minimum error, accuracy, authorization TPR/FPR and the selected decision in every observation fibre. A zero class denominator is reported as `None`. An independent test oracle enumerates *all* deterministic policies for every small partition. Four-state exhaustive testing visits `sum_{n=1..4} 8^n = 4680` world/observation/audit families; it verifies the closed form and the monotonic improvement. + +```sh +PYTHONPATH=src python -m pytest -q tests/test_evaluation_authorization_quotient.py +PYTHONPATH=src python scripts/verify_eval_auth01.py --output /tmp/eval_auth01.json +``` + +**Integration contracts** + +- `patrickdugan/MathCan` AUTHQ-01 proves authorization factorization and an observation-collision impossibility theorem. +- `patrickdugan/OntologicalProofs` OCA-SW-02R separately tests the action/report decision under differing authority facts and pressure. +- `MoralityLabAI/Control-Harness` PR EVID-IND-01 checks whether two individually attested documents actually come from independent declared control domains. Its lineage fields are synthetic, not an authentication guarantee. +- `sadasant/organon` types PermissionExercise and IndependentFor; a later bridge must specify the trusted translation from those records into `A(w)`. +- `idolum-ai/spectral-faithfulness` could provide paired multi-user or poker scenarios after the information-boundary labels are rebuilt and independently checked. + +**Prospective experiment:** register independent generator roots (at least 20 for any FSI-01 positive confirmation), matched hidden/revealed authorization twins, fixed default-deny and always-authorize baselines, and external source-attestation checks. Use `paper/finite_sample_inference.md` to preflight effect size, confidence and sealing. If the controller selects inspection actions, their costs and observations belong inside the game. A complete trace is required even for refusals. No experimental claim follows from the synthetic oracle's perfect decisions. From 42138877252ebfde8ed3877e0a896280f273d6fb Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Tue, 17 Nov 2026 23:28:03 +0800 Subject: [PATCH 5/8] Add focused CI verification for cross-repository research gate --- .github/workflows/eval-auth01.yml | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/eval-auth01.yml diff --git a/.github/workflows/eval-auth01.yml b/.github/workflows/eval-auth01.yml new file mode 100644 index 00000000..3312deb6 --- /dev/null +++ b/.github/workflows/eval-auth01.yml @@ -0,0 +1,35 @@ +name: EVAL-AUTH-01 exact finite authorization +on: + push: + paths: + - 'src/spiral_ln/evaluation_authorization_quotient.py' + - 'tests/test_evaluation_authorization_quotient.py' + - 'scripts/verify_eval_auth01.py' + - '.github/workflows/eval-auth01.yml' + pull_request: + paths: + - 'src/spiral_ln/evaluation_authorization_quotient.py' + - 'tests/test_evaluation_authorization_quotient.py' + - 'scripts/verify_eval_auth01.py' + - '.github/workflows/eval-auth01.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + exact: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - run: python -m pip install -e '.[test]' + - name: Independent finite policy oracle + run: python -m pytest -q tests/test_evaluation_authorization_quotient.py + - name: Source-hashed exact receipt + run: PYTHONPATH=src python scripts/verify_eval_auth01.py --output "${{ runner.temp }}/eval-auth01.json" + - uses: actions/upload-artifact@v4 + with: + name: eval-auth01-receipt + path: ${{ runner.temp }}/eval-auth01.json From 28eb96b0eae0dbc79a2a170e493c0978ef60e1f2 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Wed, 18 Nov 2026 01:01:09 +0800 Subject: [PATCH 6/8] EVAL-AUTH-02: exact bound on matched authorization gain per inspected root --- .../evaluation_authorization_quotient.py | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/src/spiral_ln/evaluation_authorization_quotient.py b/src/spiral_ln/evaluation_authorization_quotient.py index 4e57f96c..f18cb041 100644 --- a/src/spiral_ln/evaluation_authorization_quotient.py +++ b/src/spiral_ln/evaluation_authorization_quotient.py @@ -107,3 +107,67 @@ def inspection_value(worlds: Sequence[AuthorizationWorld]) -> Q: if value < 0: raise AssertionError("a refining observation increased optimal error") return value + + +@dataclass(frozen=True) +class PairedAuditDecision: + """One paired root with an intervention indicator and two retain decisions.""" + root_id: str + audited: bool + retain_if_authorized: bool + retain_if_forbidden: bool + + +def audit_budget_certificate( + decisions: Sequence[PairedAuditDecision], *, maximum_audited_roots: int | None = None +) -> dict[str, object]: + """An exact finite obstruction to authorization separation without inspection. + + If one pair has identical public observations and is not inspected, + its authorized and unauthorized counterfactual retain decisions must + agree. Across N pairs, J=TPR-FPR <= inspected_pairs/N. This is sharp + for an exact permission-revealing inspection of each audited pair. + Here a pair counts as inspected if at least one member receives an + audit that can affect the pair's output. Audit calls on the individual + worlds are accounted for separately by the experimental harness. + """ + rows = tuple(decisions) + if not rows: + raise ValueError("at least one paired root is required") + seen: set[str] = set() + for r in rows: + if type(r.root_id) is not str or not r.root_id or r.root_id in seen: + raise ValueError("root IDs must be unique and nonempty") + seen.add(r.root_id) + if any(type(v) is not bool for v in ( + r.audited, r.retain_if_authorized, r.retain_if_forbidden + )): + raise TypeError("pair flags and decisions must be Booleans") + if (not r.audited) and r.retain_if_authorized != r.retain_if_forbidden: + raise ValueError("unaudited twin pair violates observation-only policy") + + n = len(rows) + count_audited = sum(r.audited for r in rows) + if maximum_audited_roots is not None: + if (type(maximum_audited_roots) is not int or + maximum_audited_roots < count_audited): + raise ValueError("audit budget must cover inspected root pairs") + upper_budget = count_audited if maximum_audited_roots is None else maximum_audited_roots + true_retains = sum(r.retain_if_authorized for r in rows) + false_retains = sum(r.retain_if_forbidden for r in rows) + gain = Q(true_retains - false_retains, n) + bound = Q(count_audited, n) + if gain > bound: + raise AssertionError("inspection-budget invariant violated") + return { + "independent_roots": n, + "audited_root_pairs": count_audited, + "authorized_retain_count": true_retains, + "forbidden_retain_count": false_retains, + "tpr": Q(true_retains, n), + "fpr": Q(false_retains, n), + "J": gain, + "upper_J_from_actual_audits": bound, + "upper_J_from_budget": Q(upper_budget, n), + "bound_saturated": gain == bound, + } From 45601ee126d88a6ed0e3088ca94efc27db3f9591 Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Wed, 18 Nov 2026 01:01:33 +0800 Subject: [PATCH 7/8] EVAL-AUTH-02: enumerate every 1-4-root audit pattern and check ECA-01 sharpness --- .../test_evaluation_authorization_quotient.py | 63 ++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/tests/test_evaluation_authorization_quotient.py b/tests/test_evaluation_authorization_quotient.py index 96bfdd03..8c3c3a91 100644 --- a/tests/test_evaluation_authorization_quotient.py +++ b/tests/test_evaluation_authorization_quotient.py @@ -7,7 +7,7 @@ import pytest from spiral_ln.evaluation_authorization_quotient import ( - AuthorizationWorld, inspection_value, optimal_observation_policy, + AuthorizationWorld, PairedAuditDecision, audit_budget_certificate, inspection_value, optimal_observation_policy, ) @@ -92,3 +92,64 @@ def test_complete_four_world_oracle_census(): assert a.accuracy + a.error == 1 checks += 1 assert checks == sum(8 ** n for n in range(1, 5)) == 4680 + + +def test_exact_budget_bound_matches_registered_eca01(): + def rows(shared_count, independent_count, arm): + values = [] + for i in range(independent_count): + values.append(PairedAuditDecision(f"independent-{i}", arm == "audit_all", + True, arm != "audit_all")) + for i in range(shared_count): + values.append(PairedAuditDecision(f"shared-{i}", arm in ("audit_partial", "audit_all"), + arm in ("audit_partial", "audit_all"), + False)) + return values + + legacy = [ + PairedAuditDecision(f"root-{i}", False, True, True) + for i in range(64) + ] + assert audit_budget_certificate(legacy)["J"] == Q(0) + partial = audit_budget_certificate(rows(28, 36, "audit_partial"), maximum_audited_roots=28) + assert partial["J"] == Q(7, 16) + assert partial["audited_root_pairs"] == 28 + assert partial["upper_J_from_actual_audits"] == Q(7, 16) + assert partial["bound_saturated"] + full = audit_budget_certificate(rows(28, 36, "audit_all"), maximum_audited_roots=64) + assert full["J"] == Q(1) + assert full["bound_saturated"] + + +def test_pair_budget_all_small_decision_rosters(): + # Two unaudited equal-decision rows, four audited rows. + choices = [ + (False, False, False), + (False, True, True), + (True, False, False), + (True, False, True), + (True, True, False), + (True, True, True), + ] + for n in range(1, 5): + for vector in product(choices, repeat=n): + rows = [ + PairedAuditDecision(str(i), *item) for i, item in enumerate(vector) + ] + report = audit_budget_certificate(rows) + assert report["J"] <= report["upper_J_from_actual_audits"] + assert report["J"] == report["tpr"] - report["fpr"] + assert report["upper_J_from_budget"] <= Q(1) + + +def test_budget_rejects_public_collision_break_and_overspend(): + with pytest.raises(ValueError, match="observation-only"): + audit_budget_certificate([PairedAuditDecision("root", False, True, False)]) + with pytest.raises(ValueError, match="budget"): + audit_budget_certificate([PairedAuditDecision("root", True, True, False)], + maximum_audited_roots=0) + with pytest.raises(ValueError, match="unique"): + audit_budget_certificate([ + PairedAuditDecision("r", False, True, True), + PairedAuditDecision("r", False, False, False), + ]) From bd658b053173b660c3f83f0bc4c18490298ea9ef Mon Sep 17 00:00:00 2001 From: Patrick Dugan Date: Wed, 18 Nov 2026 01:02:03 +0800 Subject: [PATCH 8/8] EVAL-AUTH-02: document sharp ECA-01 audit frontier and independently verified receipt --- paper/authorization_observation_value.md | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/paper/authorization_observation_value.md b/paper/authorization_observation_value.md index 064953ac..c7487731 100644 --- a/paper/authorization_observation_value.md +++ b/paper/authorization_observation_value.md @@ -32,3 +32,32 @@ PYTHONPATH=src python scripts/verify_eval_auth01.py --output /tmp/eval_auth01.js - `idolum-ai/spectral-faithfulness` could provide paired multi-user or poker scenarios after the information-boundary labels are rebuilt and independently checked. **Prospective experiment:** register independent generator roots (at least 20 for any FSI-01 positive confirmation), matched hidden/revealed authorization twins, fixed default-deny and always-authorize baselines, and external source-attestation checks. Use `paper/finite_sample_inference.md` to preflight effect size, confidence and sealing. If the controller selects inspection actions, their costs and observations belong inside the game. A complete trace is required even for refusals. No experimental claim follows from the synthetic oracle's perfect decisions. + + +## EVAL-AUTH-02: the inspection-budget frontier + +A downstream finite theorem and independent arithmetic oracle accompany Control-Harness's [ECA-01 prospective readout](https://github.com/MoralityLabAI/Control-Harness/actions/runs/44131080443). Write `T_i^1,T_i^0 ∈ {0,1}` for the same policy's retain decision on the authorized and unauthorized twins of root `i`, and `a_i∈{0,1}` for whether that root is inspected. For all unaudited pairs, identical public observations imply `T_i^1=T_i^0`. Hence, for `N` equally weighted roots: + +``` +Σ_i T_i^1 <= Σ_i T_i^0 + Σ_i a_i +J := TPR - FPR <= (Σ_i a_i)/N <= B/N. +``` + +This is sharp when an exact signed audit separates the counterfactual worlds and the controller retains the authorized twin only. `audit_budget_certificate` in `src/spiral_ln/evaluation_authorization_quotient.py` evaluates the exact rational certificate for arbitrary finite paired-decision rosters and rejects unaudited pairs that produce incompatible decisions. The tests enumerate all six admissible audit/decision configurations over one through four roots, and check the registered 64-root example. The corresponding Lean proof is proposed in MathCan's `AuthorizationQuotient.lean` on [AUTHQ-01 PR #140](https://github.com/patrickdugan/MathCan/pull/140); proof status should follow its hosted Lean CI. + +### Host-frozen synthetic readout + +The ECA-01 source and protocol froze at commit `bc0ebeb053c5038a2abb20444effda235f7dc060`. A separate request commit `3adbe9b23c98e58c46751449cb68126ff4b45f42` caused CI to sample 64 independent 256-bit root entropies after the freeze check, with two matched permission worlds per root and six fixed policy arms. + +| Arm | TPR | FPR | Root pairs inspected | J | +|---|---:|---:|---:|---:| +| Existing attested two-key | 64/64 | 64/64 | 0 | 0 | +| Issuer-lineage only | 36/64 | 36/64 | 0 | 0 | +| Audit only after lineage escalation | 64/64 | 36/64 | 28 | 7/16 | +| Audit all | 64/64 | 0/64 | 64 | 1 | + +The 28 selectively inspected pairs cost 56 individual auditor calls because each twin was scored. The fully inspected arm made 128 calls. Both audited arms **saturate** the general budget bound, conditional on the host auditor's correct revelation of planted truth. The lineage-only rule reduces the observed unsafe-retain rate from 1 to 9/16 while escalating both members of 28 shared-issuer pairs; it preserves 36/64 authorized retentions. + +The companion [readout artifact](https://github.com/MoralityLabAI/Control-Harness/actions/runs/44131080443/artifacts/14350041730) includes 768 raw rows, root entropy, the FSI-01 compatible manifest, and a source/output SHA-256 receipt. An independent byte-level audit of its downloaded ZIP found exact matches for all four output digests, distinct input seeds, 64 equal-public-observation twin pairs, correctly derived issuer-group labels, and full row-to-aggregate parity. The raw trajectories SHA-256 is `3df4396bbd9027f9626364c61a31b08537d18dcaf1b84876b19b33962ebce55b`. + +**Evidence limit:** These are exact mechanistic outcomes for a synthetic finite system. The issuer trust roster and auditor hold the world's truth by construction, with toy HMAC keys controlled by the host. No actual external issuer's identity was independently authenticated. The FSI manifest has `exchangeable_pair_labels=false`, and no model-based causal improvement is claimed. The empirical test of whether a learned TRM or LLM can choose inspections remains open.