SilverSight/docs/reviews/BREAKGLASS_FUSION_REVIEW_SPEC.md
allaun 1794299a6c chore(quality): native_decide migration, docs, and phi pipeline cleanup
Systematic native_decide → dec_trivial/rfl migration across all Lean modules
to comply with AGENTS.md rule 5 (no native_decide unless only option):
- CoreFormalism: BraidEigensolid, BraidField, ChentsovFinite, HachimojiBase,
  HachimojiBridging, HachimojiCodec, HachimojiLUT, HachimojiManifoldAxiom,
  Q16_16Numerics
- BindingSite: BindingSiteCodec, BindingSiteEntropy, BindingSiteHachimoji
- SilverSight: ProductSchema, ProductWireFormat, PolyFactorIdentity, Schema, WireFormat
- PVGS_DQ_Bridge: all three files (native_decide->dec_trivial)
- UniversalEncoding/ChiralitySpace

Additional changes:
- gemma4_mcp.py: upgraded to two-tier routing (local Gemma4 + FreeLLMAPI proxy)
- ChentsovFinite: added traceability map and Chentsov (1972) citation
- HachimojiBase: renamed Σ→Sig, Π→Pi to avoid non-ASCII issues
- Import path fixes for Mathlib 4.30.0-rc2 compatibility
- Doc updates: PURE_FORMULAS, SOS_CERTIFICATE, fundamental math derivations
- Build log: 2026-06-26 session findings
- BRKGLASS_NR_BRACKET_PROPOSAL: updated to REAL-DATA VALIDATED status
- New docs: FOUNDATIONAL_GUIDANCE, PURE_EQUATION_MAP, CHENTSOV_FINITE_MATH,
  BREAKGLASS_FUSION_REVIEW_SPEC, COLD_REVIEWER_FORMULA
- New python: phi pipeline (equation_dna_encoder, ast_parse, charclass,
  consistency, embed, output), nr_bracket_validation with receipt

Build: lake build SilverSightRRC — passes on all committed modules.
  Excluded: HachimojiN8Bridge, HachimojiCharClass (missing
  CoreFormalism.HachimojiManifoldAxiom olean — WIP)
2026-06-27 01:56:54 -05:00

4.5 KiB
Raw Blame History

Breakglass Fusion — Review Specification v1.0

What it is. A fast-track review protocol for code generated by the fusion LLM panel (jet-bundle-weighted multi-model synthesis). The "breakglass" override is reserved for outputs where:

  • the Cold Reviewer Protocol (Arithmetic Gate + Structural Gate) provides complete coverage of the mathematical claims, and
  • the generated Lean code passes all three gates below.

Gate A — Arithmetic Gate (pre-merge, automated)

Run: norm_num / dec_trivial on every discrete invariant.

ID Check Tool
A₁ phi ^ 2 - phi - 1 = 0 norm_num + ring
A₂ 9984/65536 - 1/7 = 17/1792 norm_num
A₃ Nat.fib 7 = 13, Nat.fib 8 = 21 dec_trivial
A₄ ∀ a b c d : Fin 8, 2^a+2^b = 2^c+2^d ⇒ ... dec_trivial

Fail condition: Any norm_num or dec_trivial error. Reject without further review.

Pass condition: All four lean compile with 0 errors, 0 sorries.


Gate B — Structural Gate (pre-merge, automated + human scan)

B1 — Red-flag scan. The file must be grepped for these patterns and the results must be empty or explicitly annotated with a red-flag warning.

Red flag grep pattern Disposition
J² = -I J.*\^2.*=.*-I|almost.complex Must be absent or annotated ⚠ RED FLAG AVOIDED
Δ₇ is Kähler Delta.*K[aä]hler|simplex.*K[aä]hler Must be absent or annotated ⚠ RED FLAG AVOIDED
dim(TL₇) = 13 TL.*7.*13|TL.*dim.*13 Must be absent or annotated ⚠ RED FLAG AVOIDED
Float in compute ofFloat (outside parsing boundary) Must be absent

Pass condition: No un-annotated match.

B2 — Sorry inventory. Every sorry must be in a Layer3_GeometricConjectures section or tagged with a TODO(lean-port:*) marker. Zero sorries in Layers 12.

Pass condition: grep -n sorry lists only Layer-3 or TODO(lean-port)-tagged blocks.


Gate C — Build Gate (pre-merge, automated)

C1 — Full workspace build.

lake build SilverSight

Pass condition: 0 errors, 0 warnings for sorry in Layers 12 (Layer-3 sorry warnings are permitted and counted).

C2 — Module-level build.

lake build SilverSight.UnifiedCovariant

Pass condition: 0 errors.

C3 — Staged diff review.

git diff --stat HEAD

Check that only the intended files are touched. No collateral changes (whitespace, reordering, deleted imports outside the diff scope).


Breakglass Conditions

When the override may be invoked. All three of:

  1. The fusion output's mathematical content is fully covered by the Cold Reviewer Protocol (discrete invariants I₁I₄; red flags D₁D₃).
  2. The code change involves only Layer-1 / Layer-2 material (discrete arithmetic, algebraic extensions, Q16_16 bounds, or elementary real analysis with tendsto_pow_atTop_nhds_zero_of_lt_one and squeeze).
  3. The change is backward-compatible: existing definitions are deprecated (@[deprecated]), never removed without a deprecation cycle.

When the override is forbidden. Any of:

  1. The change touches Layer 3 (continuous geometry, Kähler, Cartan, holonomy) — those must go through the standard (non-breakglass) review process.
  2. The change introduces a new sorry in Layer 1 or Layer 2.
  3. The change adds a new import that is not already in the SilverSight lake manifest.
  4. The change modifies the Cold Reviewer Protocol itself (I₁I₄, D₁D₃).

Artifacts produced

Every breakglass merge produces:

  1. The merged Lean file.
  2. A one-line entry in BREAKGLASS_LOG.md (file created if absent) with format:
    YYYY-MM-DD | <module> | <summary> | <reviewer> | Gates: <A|B|C> all pass
    
  3. An updated CONJECTURE_UPGRADE_ROADMAP.md entry if the merge resolves a previously open upgrade item.

Example log entry

2026-06-26 | UnifiedCovariant.lean | eigensolid_convergence hypothesis → theorem | breakglass | Gates: A B C all pass

Appendix: Gate checklist template for a reviewer

GATE A (Arithmetic)
  [ ] I₁: norm_num on golden_identity
  [ ] I₂: norm_num on spectral_gap_positive
  [ ] I₃: decide on fibonacci_dims
  [ ] I₄: decide on sidon_unique

GATE B (Structural)
  [ ] B1: grep for red flags — 0 un-annotated matches
  [ ] B2: grep for sorry — Layer-1/2 count = 0

GATE C (Build)
  [ ] C1: lake build SilverSight — 0 errors
  [ ] C2: diff affects only intended files