Merge pull request 'docs(governance): RATIFY ADR-0241/0242 → Accepted + memo-slice closure + core_ha Path-B correction' (#43) from feat/adr-0241-0242-followup-batch into main
Some checks failed
lane-shas / verify pinned lane SHAs (push) Successful in 23m40s
full-pytest / fast pytest (-m "not quarantine and not slow" -n 2) (push) Has been cancelled

Reviewed-on: #43
This commit is contained in:
Joshua Matthew-Catudio Shay 2026-07-15 23:07:11 +00:00
commit 212ba7582d
10 changed files with 414 additions and 17 deletions

View file

@ -27,6 +27,12 @@ import numpy as np
from algebra.backend import versor_condition
from algebra.cl41 import N_COMPONENTS
from core.physics.wave_manifold import WaveManifold
# SANCTIONED SEAM (W1 Finding #4): the one physics→teaching import — boundary
# vocabulary only (SPECULATIVE/COHERENT standing), no teaching logic crosses.
# Extraction to a shared kernel is deferred until a second physics module
# needs the vocabulary (32 consumers repo-wide; not a LOW-batch relocation).
# NOTE: core/epistemic_state.py holds a DIFFERENT concept (turn-level
# EpistemicState) — do not merge the two.
from teaching.epistemic import EpistemicStatus
from vault.store import VaultStore, _parse_entry_status, _status_admits

View file

@ -1,6 +1,6 @@
# ADR-0241: Wave-Field Driven Hyperbolic Atlas and Resonant Algebraic Cognition
**Status**: Proposed — **implementation complete (P0P10)**; ready for Joshua acceptance review (do not self-Accept). Optional P11 Rust deferred. Checklist: `docs/audit/adr_0241_cohesion_acceptance_checklist.md`.
**Status**: **Accepted** — ratified by Joshua Shay 2026-07-15 (explicit "Ratify" ruling on the D10 acceptance packet, `docs/audit/adr-0241-0242-acceptance-packet-2026-07-15.md`; §2 deviations accepted as recommended, incl. P7 demote-with-proof and the T1/T2 serve-boundary reconciliation). Implementation P0P10 + chiral sign-gate (PR #41). Optional P11 Rust (D9) deferred. Checklist: `docs/audit/adr_0241_cohesion_acceptance_checklist.md`.
**Date**: 2026-07-13
**Deciders**: Joshua Shay + multi-model R&D
**Traceability**: Issue #14, parent #10

View file

@ -1,6 +1,6 @@
# ADR-0242: Deterministic Fibonacci Operators and Evidence-Gated Optimization
**Status**: Proposed — V1 cert + V3 packing + V2 research helpers + V4 word schedule + V5 quarantine + sensorium feed landed; ready for Joshua review (do not self-accept).
**Status**: **Accepted** — ratified by Joshua Shay 2026-07-15 (explicit "Ratify" ruling on the D10 acceptance packet, `docs/audit/adr-0241-0242-acceptance-packet-2026-07-15.md`; memo fidelity slice closed §7, no new defects). V1 cert + V3 packing + V2 research helpers + V4 word schedule + sensorium feed landed; V5 anyons NOT built (claim-quarantined per the packet); V2 production promotion stays benchmark-gated per §3.2.
**Date**: 2026-07-13 (Drive authority); in-repo expansion 2026-07-15
**Deciders**: Joshua Shay + multi-model R&D
**Traceability**: Drive ADR-0242 (`15_NECCPy-tEWGfYi_BNqawm8GytUTMkz1DsOqGVMXhI`), PR #37/#38, cohesion plan

View file

@ -76,3 +76,28 @@ Keeping `core_ha` as a pointwise store would reintroduce thaw decay and non-comm
- Cohesion master plan: `docs/analysis/core_cohesion_master_plan.md`
- Fidelity ledger wave section: `docs/research/third-door-blueprint-fidelity.md`
- Regression: existing Third-Door ADR-0238/0239/0240 tests remain green under subsumption
---
## 7. Implementation-status correction (2026-07-15, post-ruling — appended, original text above unmodified)
Two claims in this memo are corrected against the landed implementation (adversarial audit
`docs/research/adr-0241-0242-adversarial-and-fidelity-findings.md`; decision dossier
`docs/analysis/crdt-vs-bitexact-determinism-decision-2026-07.md`, merged PR #42):
1. **Delta-CRDT sync (§1/§2/§3 tombstone row).** Python `core/sync/` is a journal/object-store —
it carries **no** CRDT merge semantics. The commutative/associative/idempotent semilattice DOES
exist, but in the Rust vault (`core-rs/src/vault.rs` `SemilatticeDelta`, ADR-0180 §2.2) and the
audio ingest lane (`tests/test_audio_crdt_merge.py`), not the general state layer.
**Actual exact-recall determinism mechanism today: bit-exact array codec
(`core/array_codec.py`) + single-writer `VaultStore` (Shape B+).** Ruling (PR #42): this is
sufficient for the single-writer one-continuous-life telos; general Delta-CRDT rollout is
deferred behind an explicit **multi-writer/multi-agent gate** (trigger: shared-vault
concurrency becomes a baseline requirement).
2. **`ClosureViolationException` (§5.1).** No exception of that name exists. The fail-closed
behavior it specifies is implemented by the versor gates (`versor_condition` ≥ 1e-6 →
`ValueError` at rotor closure) and typed errors (`WaveSpectralLeakageError`,
`ChiralOrientationError`). Equivalent semantics, different names — recorded as an honest
naming deviation, not a gap. (§5.2's sign-preservation safeguard, previously readout-only,
is now enforced by `core/physics/chiral_gate.py`, merged PR #41.)

View file

@ -1,7 +1,7 @@
# ADR-0241 / ADR-0242 — D10 Acceptance Packet for Joshua
**Date:** 2026-07-15 · **Prepared by:** Claude session (orchestration + adversarial verification) — **prepare-only; nothing here self-Accepts.**
**State under review:** `main @ 54228d45` (PR #36#40 merged) + PR #41 pending (chiral sign-gate).
**State under review:** `main @ ccc42c18` (PR #36#42 merged — includes the chiral sign-gate, this packet, and the CRDT decision dossier).
**Companion documents:**
- `docs/audit/adr_0241_cohesion_acceptance_checklist.md` — the P12 checklist itself
- `docs/research/third-door-blueprint-fidelity.md` §12 — behavioral acceptance table (every 🟢 row names a failable pin)
@ -38,15 +38,45 @@
## 4. Capability additions since the checklist was written
- **Chiral orientation sign-gate** (`sgn(Q)=const`, ADR-0241 §2.4C / core_ha §5.2 mirror-inversion safeguard) — the audit's one missing enforcement, built TDD, **PR #41 pending**: fail-closed `ChiralOrientationError` on materially re-emerging flips; signed charge wired in `goldtether_residual` with residual values pinned byte-identical; vacuous (inert) on today's even serve fields.
- **Chiral orientation sign-gate** (`sgn(Q)=const`, ADR-0241 §2.4C / core_ha §5.2 mirror-inversion safeguard) — the audit's one missing enforcement, built TDD, **MERGED (PR #41, `717aca9b`)**: fail-closed `ChiralOrientationError` on materially re-emerging flips; signed charge wired in `goldtether_residual` with residual values pinned byte-identical; vacuous (inert) on today's even serve fields. **The state under Accept therefore already enforces the topological safety invariant** — no sequencing caveat remains.
## 5. Known open items (explicitly NOT completion blockers)
1. **ADR-0242 R&D memo** ("deterministic-fibonacci-operators-and-evidence-gated-optimization") has no local export — its blueprint-fidelity slice is partial (implementation verified against its own contract + committed ADR).
2. **CRDT-vs-bit-exact determinism**core_ha memo claims Delta-CRDT in `core/sync/`; actual mechanism is bit-exact codec + single-writer VaultStore. Needs a decision (build CRDT for multi-writer, or correct the doc).
1. **ADR-0242 R&D memo** ~~no local export~~ **RESOLVED, see §7 addendum**: memo retrieved in full, fidelity slice closed with no new defects; committed copy at `docs/research/ADR-0242-deterministic-fibonacci-operators-and-evidence-gated-optimization.md`.
2. **CRDT-vs-bit-exact determinism****RESOLVED by decision dossier** (`docs/analysis/crdt-vs-bitexact-determinism-decision-2026-07.md`, **PR #42 merged `ccc42c18`**): Python `core/sync/` is object-store only, but real Delta-CRDT semilattice machinery exists in `core-rs/src/vault.rs` (and `test_audio_crdt_merge.py` exercises genuine CRDT properties). Ruling recommended and adopted: single-writer bit-exact serves the one-continuous-life telos today; CRDT rollout deferred behind an explicit multi-writer/multi-agent gate. Presented here for ratification alongside the §2 deviations.
3. W5 backlog: Rust f64 GP parity (D9), real sensorium compilers, V2 energy promotion (benchmark-gated), progressive continuous field.
4. GitHub Actions mirror CI — billing-locked; validation is local-first + Forgejo Act per the AGENTS.md protocol (merged in #40).
## 6. Requested action
Rule on §2 deviations (recommendations inline) and, if satisfied, flip **ADR-0241 and ADR-0242 → Accepted**. PR #41 (chiral gate) can be folded into the Accept or ruled separately.
Rule on §2 deviations (recommendations inline) and, if satisfied, flip **ADR-0241 and ADR-0242 → Accepted**. The chiral sign-gate (PR #41) and the CRDT determinism ruling (PR #42) are already merged — the state under Accept enforces the safety invariant and carries the adopted determinism doctrine; no sequencing caveats remain.
---
## 7. Addendum (same day, post-merge) — ADR-0242 memo fidelity slice CLOSED
§5 item 1 is resolved: the "deterministic-fibonacci-operators-and-evidence-gated-optimization" memo was retrieved in full (Drive connector; committed copy now at `docs/research/ADR-0242-deterministic-fibonacci-operators-and-evidence-gated-optimization.md`). Audit against the implementation: **no new defects — the implementation is stronger than the memo's own reference code** on four counts:
| Memo | Implementation | Direction |
|---|---|---|
| Prose demands a "content-addressed, cryptographic" certificate; the memo's own dataclass **omits** the digest field | `cert_id` sha256 present, dual-run byte-stable | impl > spec code |
| Reference unimodality check counts extrema (would **pass a pure local maximum**) | shape check (decrease-to-min-then-increase) fails it | impl > spec code |
| No nonfinite / bounds-violation guards; code non-executable as written (`np.argsort` without numpy import) | fail-closed on nonfinite, bounds, budget, eval error | impl > spec code |
| `minimizer` = bracket midpoint always | best sampled point when inside the final bracket (deviation documented at the code comment) | impl > spec, noise-robust |
Sovereignty invariant (§6 of the memo) verified: Fibonacci operators never touch truth status / safety / identity / promotion (T2 quarantine + proposal-only κ). The five-vector staging matches the memo's phase gating exactly, including anyons (Phase 5 pre-research, not built — consistent with the corrected ledger row).
**Carry items (staged, non-blocking):** (a) §5-P1 "certificate written to execution telemetry" seam not verified; (b) §5-P2 cross-band (F₅F₇) DiscoveryCandidate persistence gate not built; (c) impl accepts `evaluation_budget ≥ 2` where the memo floor is 3 — kept deliberately (n=2 is mathematically valid and the impl validates harder elsewhere), noted for the ruling.
---
## 8. RULING RECORD
**RATIFIED — Joshua Shay, 2026-07-15** (explicit "Ratify", given in-session after review of this packet including the §7 addendum and the two review fixes: chiral gate merged-state confirmation and the CRDT dossier linkage).
Effects:
- **ADR-0241 → Accepted** (status flipped in `docs/adr/ADR-0241-…md`).
- **ADR-0242 → Accepted** (status flipped in `docs/adr/ADR-0242-atlas-packing-and-fibonacci.md`).
- §2 deviations accepted as recommended: P7 demote-with-proof (accept-as-honest, #19 precedent); T1/T2 serve-boundary reconciliation ratified; sensorium staging, progressive integrals, and float32-honest recall acknowledged as-is.
- CRDT determinism ruling (PR #42) ratified: single-writer bit-exact now; CRDT behind an explicit multi-writer gate.
- §7 carry items and §5 W5 backlog remain tracked post-Accept work, not conditions.

View file

@ -1,6 +1,6 @@
# ADR-0241 / ADR-0242 Cohesion Acceptance Checklist
**Status:** Implementation packages P0P10 green; human **Accepted** flip is Joshua review.
**Status:** **ACCEPTED** — ratified by Joshua Shay 2026-07-15; ruling record in `docs/audit/adr-0241-0242-acceptance-packet-2026-07-15.md` §8. (Was: P0P10 green awaiting review.)
**Plan authority:** session plan P0P12 (`feat/adr-0241-0242-implementation` lineage).
**This document:** maps cohesion success criteria to **tests**, not prose alone.

View file

@ -280,4 +280,16 @@ You are resuming CORE ADR-0241/0242 work. Plan A (cohesion P0P12) and Plan B
---
*Archived from session work on 2026-07-15. Plans A/B copied from session plan artifacts; status tables updated to match branch tip and CI reality at archive time.*
## 12. LIVING UPDATE — 2026-07-15 evening (supersedes §11)
The §11 brief is stale. Current truth:
- **#38 MERGED** (`9e1455b9`, lane-shas green at `26abdbe7`; debug env-dump reverted at `4853a55c`).
- **#40 MERGED** (`54228d45`): W1 adversarial pass (executed) — chiral P8 + Fibonacci V1 confirmed solid; **live A-04 transitive serve breach found & fixed** (core/physics barrel → lazy Tier-2 exports + process-level guard test); **T1/T2 serve-boundary reconciliation ruled** (wave_manifold = sanctioned serve substrate; 7 research modules stay off-serving); 4-blueprint integration plan; these plan archives (W2); CLI smoke↔CI parity (175 tests); **local-first CI protocol in AGENTS.md** (GitHub Actions billing-locked — do not chase).
- **#41 MERGED** (`717aca9b`): chiral orientation sign-gate (sgn(Q)=const fail-closed, ADR-0241 §2.4C / core_ha §5.2 — the audit's one missing safeguard) + **D10 acceptance packet** (`docs/audit/adr-0241-0242-acceptance-packet-2026-07-15.md`) + anyon ledger honesty fix.
- **#42 OPEN**: CRDT-vs-bit-exact determinism decision dossier (Gemini) — recommends bit-exact single-writer now, CRDT behind a multi-writer gate; found real Delta-CRDT machinery in `core-rs/src/vault.rs`.
- **ADR-0242 R&D memo slice CLOSED**: read via the Drive connector; no new defects — implementation is stronger than the memo's own reference code. Carry items: cert-telemetry seam (§5-P1) and F₅F₇ cross-band DiscoveryCandidate gate (§5-P2) unbuilt (staged, non-blocking); impl allows budget≥2 vs memo's ≥3 (kept — stronger validation elsewhere).
- **RATIFIED (same day):** Joshua Shay ruled "Ratify" on the packet — **ADR-0241 and ADR-0242 → Accepted** (ruling record: packet §8; both ADR status headers flipped). #42 CRDT ruling ratified in the same stroke.
- **Remaining (post-Accept)**: W5 backlog (D9 Rust parity, sensorium compilers, V2 energy benchmark, progressive field); §7 carry items (cert-telemetry seam, F₅F₇ cross-band gate); parallel lanes W2 (full-suite reds) / W3 (xdist polluters) briefed in `tmp/`.
*Archived from session work on 2026-07-15. Plans A/B copied from session plan artifacts; §12 added post-merge; earlier status tables reflect archive-time reality.*

View file

@ -0,0 +1,323 @@
# ADR-0242: Deterministic Fibonacci Operators and Evidence-Gated Optimization
> Committed authority copy. Retrieved verbatim 2026-07-15 from the R&D Google Doc
> (`doc_id 15_NECCPy-tEWGfYi_BNqawm8GytUTMkz1DsOqGVMXhI`, pointer:
> `docs/research/ADR-0242-deterministic-fibonacci-operators-and-evidence-gated-optimization.md.gdoc`),
> formatting normalized from the Docs export. The Drive document remains the
> editable source; this copy exists so fidelity audits can cite in-repo text.
> Fidelity audit: `docs/audit/adr-0241-0242-acceptance-packet-2026-07-15.md` §7.
**Status**: Proposed (acceptance path: benchmark evidence + Joshua review)
**Date**: 2026-07-13
**Deciders**: Joshua Shay + multi-model R&D
**Traceability**: Notion R&D (Fibonacci and Golden Ratio Dynamics)
**Related**: ADR-0238, ADR-0239, ADR-0240, ADR-0241, core/physics/goldtether.py, core/physics/surprise.py, core/physics/energy.py
**Canonical path**: docs/adr/
## 1. Context and Problem Statement
The introduction of continuous wave-field representations (ADR-0241) in the Continuous Orthogonal Resonance Engine (CORE) establishes a unified, coordinate-free geometric substrate. As we refine the physical layers of CORE, we encounter several optimization, scheduling, and multi-scale allocation challenges:
- **Optimization of Unimodal Scalars**: Bounded parameters such as the GoldTether valence-scaling factor (κ) or the Conformal Procrustes alignment angle (θ) require fast, exact, and reproducible bracketing.
- **Hierarchical Temporal Horizons**: Modeling decay, salience, and consolidation requires a deterministic temporal basis to segregate transient noise from long-horizon semantic structures.
- **Mode Centroid Allocation**: Registering new standing-wave modes in WaveManifold requires a low-discrepancy, incrementally extensible spacing algorithm to prevent spectral mode collision without global repacking.
- **Observability Scheduling**: Periodic background checks risk phase-locking with external batching cycles, requiring quasi-periodic, non-harmonic scheduling.
In natural and mathematical systems, Fibonacci recurrences (F_n = F_{n-1} + F_{n-2}) and Golden Ratio (φ) limits govern optimal packings, anyon fusion, and optimal search. However, CORE's **Third Door** philosophy explicitly rejects the dogmatic adoption of "sacred geometry" or aesthetic doctrines. Any mathematical operator must "earn its place" through a measurable, isolated, and falsifiable advantage, and its results must be bound by strict evidence-gated promotion.
## 2. Decision and Reframed Thesis
We establish the **CORE Fibonacci Evidence Discipline**:
**Fibonacci structure is implemented only where CORE requires a deterministic, reconstructible, multi-scale allocation, search, or selection mechanism — not because φ is inherently privileged, but because a Fibonacci recurrence can be evaluated empirically against competing schedules, packings, or optimizers under CORE's rigorous evidence gating.**
We define **five targeted vectors** of Fibonacci integration, structured from near-term engineering deliverables to long-horizon theoretical research, each isolated behind clean programmatic boundaries and cryptographic validation gates:
```
[CORE Evidence Discipline]
|
+-----------------+------------+------------+-----------------+
| | | |
v v v v
[Vector 1] [Vector 2] [Vector 3] [Vector 4/5]
Fibonacci Search Temporal Basis Anchor Alloc Word Choreography
(Optimization) (Decay Study) (Mode Packing) (Quasi-Periodic)
Certificate E_n(t) = E_n*exp(-t/tau) Low-discrep W_n+1 = W_n · W_n-1
```
## 3. The Five Fibonacci Vectors
### 3.1 Vector 1: Bounded Fibonacci-Section Search (Immediate Opportunity)
We implement Fibonacci-section search as a highly constrained, pure, and deterministic scalar optimizer.
For a known, fixed evaluation budget N, Fibonacci search provides the mathematically optimal final bracket width among comparison-based methods under unimodality assumptions. It is superior to golden-section search because it leverages a precomputed Fibonacci schedule to minimize interval length exactly at step N, reusing one function evaluation per step.
#### CORE-Native Certificate Gating
To prevent unreviewed parameters from altering cognitive behavior, the optimizer does *not* return a raw scalar. It outputs a content-addressed, cryptographic **FibonacciSearchCertificate** (or a typed **OptimizationFailure**). This certificate serves as an immutable audit trail of the search trajectory and must be verified before the minimizer can be promoted to drive any active parameter (e.g., GoldTether valence-scaling κ).
### 3.2 Vector 2: Multi-Scale Temporal Basis (Most Native Research Path)
The Field Energy Operator (ADR-0006) simulates thermodynamic cooling of active states. Rather than hard-coding decay constants, we treat the Fibonacci sequence as a candidate **temporal basis family**.
Each active field component carries a deterministic vector of decayed energies across a finite, reconstructible spectrum of horizons:
E_n(t) = E_n(t_0) · exp((t t_0) / (F_n · τ_0))
where F_n ∈ {1, 2, 3, 5, 8, 13, 21, …} provides the temporal scales.
- F_1·τ_0: Immediate sensory perturbations.
- F_3·τ_0: Working reasoning context.
- F_5·τ_0: Active session structures.
- F_8·τ_0: Long-horizon biography holonomies.
**The Comparative Hypothesis**: We will benchmark this Fibonacci basis against standard dyadic (τ_n = 2^n·τ_0), logarithmic, and hand-tuned bases. The Fibonacci basis is promoted to the production pipeline (e.g., inside core/physics/energy.py) if and only if it separates transient sensory noise from persistent semantic signals with measurably higher fidelity under identical replay workloads.
### 3.3 Vector 3: Golden-Angle Mode Allocator (Anchor Allocation)
When registering a new standing-wave mode ψ_k in the Hyperbolic Atlas, the manifold must assign a spatial centroid anchor X_k that minimizes phase overlap and collision.
We define a pure **AnchorAllocator** strategy interface. One candidate strategy is a **Golden-Angle Hyperbolic Spiral** over the Poincaré disk model, which generates a low-discrepancy, incrementally extensible spatial distribution without requiring global repacking.
The final anchor layout is never stored as a mutable, opaque coordinate table. It is dynamically regenerated from the allocator's identity and the ordinal sequence, preserving the **reconstruction-over-storage** doctrine:
Layout(n) = AnchorAllocator(n, version="golden_angle_v1")
The golden-angle allocator will be benchmarked against deterministic low-discrepancy sequences, measuring minimum pairwise geodesic separation, recall ambiguity, and insertion cost before adoption.
### 3.4 Vector 4: Fibonacci-Word Operator Choreography (Observability Scheduling)
To reduce phase-locking and harmonic resonance between periodic background checks and input batching cycles, we introduce a quasi-periodic, non-harmonic scheduling operator.
We recursively generate **Fibonacci words** from two safe, existing action classes:
- **Action A**: Low-cost local measurements (e.g., local energy/surprise updates).
- **Action B**: High-cost cross-band evaluations (e.g., biography holonomy or sealed-holdout checks).
W_0 = B, W_1 = A, W_{n+1} = W_n W_{n1}
For n=4, this yields: A → B → A → A → B → A → B → A → A → B …
This non-periodic, deterministic sequence belongs strictly outside the cognitive truth path. It is used to schedule background measurements, telemetry traces, and sealed-holdout sampling. This prevents cyclic artifacts of the scheduler from corrupting the continuous field dynamics.
### 3.5 Vector 5: Topological Compositional Holonomy (Long-Horizon anyon Theory)
We open an isolated research branch (algebra/topological_reasoning/) to study whether non-commuting semantic composition paths produce stable, topologically protected holonomies under bounded perturbation.
This track will explore if the category data of **Fibonacci anyons** (including its fusion spaces, F-symbols, and R-symbols) can be represented within Cl(4,1) CGA. This remains a pre-research theory program. It must never enter the production pipeline or affect active reasoning until its mathematical representation and stability under floating-point perturbations are fully proven.
## 4. Implementation Specification (Vector 1: Fibonacci Search)
> Note (audit, 2026-07-15): the memo's reference implementation below is
> preserved as-written for the record. The landed implementation
> (`core/physics/fibonacci_search.py`) deliberately deviates in the
> impl-stronger direction — see the acceptance-packet §7 table (cert_id
> digest added; shape-based unimodality check; nonfinite/bounds fail-closed;
> best-sample minimizer). The reference code below is non-executable as
> written (uses `np.argsort` without importing numpy).
To guarantee exactness and absolute reproducibility, we define the strict, frozen Python interface for the unimodal objective, the search certificate, and the deterministic Fibonacci-section search algorithm.
```python
# core/physics/fibonacci_search.py (memo reference sketch — see note above)
from __future__ import annotations
from dataclasses import dataclass
from typing import Callable, Union
@dataclass(frozen=True, slots=True)
class BoundedUnimodalObjective:
"""Represents a bounded, unimodal scalar objective to be optimized."""
lower: float
upper: float
evaluation_budget: int
objective_id: str
objective_version: str
@dataclass(frozen=True, slots=True)
class FibonacciSearchCertificate:
"""The cryptographically verifiable, replayable optimization result."""
minimizer: float
final_interval: tuple[float, float]
evaluations: int
ordered_points: tuple[float, ...]
ordered_values: tuple[float, ...]
objective_id: str
objective_version: str
@dataclass(frozen=True, slots=True)
class OptimizationFailure:
"""Typed failure response indicating why the optimization could not converge."""
reason: str
final_interval: tuple[float, float]
evaluations: int
objective_id: str
objective_version: str
def _precompute_fibonacci(n: int) -> list[int]:
"""Generates the first n Fibonacci numbers."""
fib = [1, 1]
for i in range(2, n + 2):
fib.append(fib[-1] + fib[-2])
return fib
def fibonacci_section_search(
objective: BoundedUnimodalObjective,
func: Callable[[float], float]
) -> Union[FibonacciSearchCertificate, OptimizationFailure]:
"""
Executes a metric-orthogonal Fibonacci search on a unimodal objective.
Admit only a typed OptimizationFailure or FibonacciSearchCertificate;
never silently accept a candidate minimizer.
"""
a = float(objective.lower)
b = float(objective.upper)
n = objective.evaluation_budget
if n < 3:
return OptimizationFailure(
reason="budget_too_low_for_unimodal_search",
final_interval=(a, b),
evaluations=0,
objective_id=objective.objective_id,
objective_version=objective.objective_version,
)
fib = _precompute_fibonacci(n)
L = b - a
# Pre-calculated evaluation points
x1 = a + (fib[n] / fib[n + 2]) * L
x2 = b - (fib[n] / fib[n + 2]) * L
points: list[float] = [x1, x2]
try:
f1 = float(func(x1))
f2 = float(func(x2))
except Exception as e:
return OptimizationFailure(
reason=f"evaluation_error_at_initial_points: {str(e)}",
final_interval=(a, b),
evaluations=0,
objective_id=objective.objective_id,
objective_version=objective.objective_version,
)
values: list[float] = [f1, f2]
evals_count = 2
for k in range(1, n - 1):
L_next = b - a
if f1 < f2:
b = x2
x2 = x1
f2 = f1
x1 = a + (fib[n - k + 1] / fib[n - k + 2]) * L_next
try:
f1 = float(func(x1))
except Exception as e:
return OptimizationFailure(
reason=f"evaluation_error_at_step_{k}: {str(e)}",
final_interval=(a, b),
evaluations=evals_count,
objective_id=objective.objective_id,
objective_version=objective.objective_version,
)
points.append(x1)
values.append(f1)
else:
a = x1
x1 = x2
f1 = f2
x2 = b - (fib[n - k + 1] / fib[n - k + 2]) * L_next
try:
f2 = float(func(x2))
except Exception as e:
return OptimizationFailure(
reason=f"evaluation_error_at_step_{k}: {str(e)}",
final_interval=(a, b),
evaluations=evals_count,
objective_id=objective.objective_id,
objective_version=objective.objective_version,
)
points.append(x2)
values.append(f2)
evals_count += 1
minimizer = (a + b) / 2.0
# Strictly verify the unimodality assumption on the gathered trace.
# To be unimodal, values must decrease to a minimum and then increase.
# If the empirical trace contains multiple local extrema, the certificate
# fails validation.
sorted_indices = np.argsort(points)
sorted_vals = [values[i] for i in sorted_indices]
extrema_count = 0
for i in range(1, len(sorted_vals) - 1):
prev_diff = sorted_vals[i] - sorted_vals[i - 1]
next_diff = sorted_vals[i + 1] - sorted_vals[i]
if prev_diff < 0 and next_diff > 0:
extrema_count += 1 # Local minimum
elif prev_diff > 0 and next_diff < 0:
extrema_count += 1 # Local maximum
if extrema_count > 1:
return OptimizationFailure(
reason="unimodality_violation_multiple_extrema_detected",
final_interval=(a, b),
evaluations=evals_count,
objective_id=objective.objective_id,
objective_version=objective.objective_version,
)
return FibonacciSearchCertificate(
minimizer=float(minimizer),
final_interval=(float(a), float(b)),
evaluations=evals_count,
ordered_points=tuple(points),
ordered_values=tuple(values),
objective_id=objective.objective_id,
objective_version=objective.objective_version,
)
```
## 5. R&D Integration and Priority Order
To enforce strict, non-doctrinal evidence gating, the five vectors will be integrated sequentially based on their readiness and safety risk:
1. **Phase 1: Isolated Fibonacci-Section Search (Production-Ready)**
- **Integration Seam**: Bounded valence-scaling factor (κ) in core/physics/goldtether.py.
- **Gating**: The returned FibonacciSearchCertificate is written to the execution telemetry. If the certificate fails (e.g. unimodality_violation), the system defaults to the safe, pre-calculated baseline kappa = 1.0 and logs an OptimizationFailure warning.
2. **Phase 2: Multi-Scale Temporal Basis Study (Research Prototype)**
- **Integration Seam**: The Field Energy Operator (core/physics/energy.py) and the non-resonant surprise accumulator (core/physics/surprise.py).
- **Gating**: Emits a DiscoveryCandidate in the contemplation loop *only* when the surprise signal persists across multiple Fibonacci-scaled temporal bands (F_5 to F_7), preventing transient noise from triggering ungrounded updates.
3. **Phase 3: Golden-Angle Mode Allocator (Sandbox Scaffold)**
- **Integration Seam**: Centroid placement inside the WaveManifold memory registry (core/physics/wave_manifold.py).
- **Gating**: Active only when the standing-wave registry's coordinate and interference operators are fully verified in the main Rust branch.
4. **Phase 4: Fibonacci-Word Observability Scheduler (Telemetry Seam)**
- **Integration Seam**: Background telemetry traces and sealed-holdout sampling.
- **Gating**: Operates strictly outside the cognitive truth path; cannot modify any state variables.
5. **Phase 5: Topological Braid Category Study (Pre-Research)**
- **Integration Seam**: Isolated algebra/topological_reasoning/ branch.
- **Gating**: Blocked from any FFI or CPython compilation path until algebraic and numerical stability proofs under floating-point perturbations are finalized.
## 6. Architectural Sovereignty Invariant
This ADR establishes the absolute sovereignty of CORE's core logical layers over any mathematical scheduling or optimization:
**Fibonacci operators may optimize the parameters of search, determine the scale of observation, or schedule background checks; they must NEVER dictate the truth status of a proposition, alter safety policies, change CORE's identity, or authorize autonomous promotion.**
Active reasoning, memory vaulting, and supervised transition gating remain strictly governed by CORE's even versor closure invariants, sharded CRDT-delta exactness, and human-gated review boundaries.
## 7. References
1. docs/adr/ADR-0238-GoldTether-Modulated-Supervised-Autonomy.md — GoldTether and supervised blend.
2. docs/adr/ADR-0239-Conformal-Procrustes-Surprise-Dual-Operator.md — Conformal Procrustes and surprise.
3. docs/adr/ADR-0240-Analogical-Transfer-Validation-Harness-Biography-Holonomy.md — Biography holonomy and validation.
4. docs/adr/ADR-0241-wave-field-driven-hyperbolic-atlas-and-resonant-cognition.md — Continuous wave-field framework.

View file

@ -10,7 +10,7 @@
| ADR-0241 wave-field hyperbolic atlas + resonant cognition | ✅ full | audited deep |
| core_ha unification & deprecation plan | ✅ full | audited |
| fibonacci_applications_in_core_substrate | ✅ full | audited |
| ADR-0242 deterministic-fibonacci-operators + evidence-gated-optimization | **no local export** | **BLOCKED — needs export**; cert impl verified against its own contract |
| ADR-0242 deterministic-fibonacci-operators + evidence-gated-optimization | ✅ full (read 2026-07-15 via Drive connector; committed copy at `docs/research/ADR-0242-deterministic-fibonacci-operators-and-evidence-gated-optimization.md`) | **slice CLOSED** — no new defects; see acceptance-packet addendum |
---
@ -53,7 +53,7 @@ The recurring pattern across all four docs: the blueprints were written when the
| Missing invariant | Current state | Build |
|---|---|---|
| **Chiral SIGN-preservation gate** (ADR-0241 §2.4C + core_ha §5.2: `sgn(∫⟨ψIψ̃⟩₀)=const`, mirror-inversion protection) | ✅ **BUILT** (`feat/chiral-sign-preservation-gate`, stacked on PR #40): `core/physics/chiral_gate.py``ChiralOrientationGate` latches `sgn(Q)` on the first non-vacuous reading, fails closed (`ChiralOrientationError`) on a materially re-emerging flip; wired at the enforcement point (`goldtether_residual` now feeds the *signed* charge to the gate; residual keeps magnitude semantics byte-identical). Even serve fields stay vacuous → inert on today's serve path (no #19 revival). Pins: `tests/test_chiral_orientation_gate.py` (7). | — (was: latch initial sign + fail closed on flip; wire signed charge) |
| **CRDT delta-sync semilattice** (core_ha §2/§3 tombstone → "commutative/associative/idempotent Delta-CRDT in `core/sync/`") | `core/sync/` is a journal/object-store (no `merge`/idempotent/semilattice semantics found). Determinism today = bit-exact `array_codec` + single-writer `VaultStore` (Shape B+), **not** multi-writer CRDT merge. | Decide: either build the CRDT (needed for genuine multi-agent/multi-writer "one continuous life") **or** correct the doc to state determinism is single-writer bit-exact. Don't leave the claim floating. |
| **CRDT delta-sync semilattice** (core_ha §2/§3 tombstone → "commutative/associative/idempotent Delta-CRDT in `core/sync/`") | **RESOLVED by decision dossier** (`docs/analysis/crdt-vs-bitexact-determinism-decision-2026-07.md`, PR #42 merged `ccc42c18`): Python `core/sync/` is object-store only, but real Delta-CRDT semilattice machinery exists in `core-rs/src/vault.rs`, and `test_audio_crdt_merge.py` exercises genuine CRDT properties in that sub-domain. Ruling: single-writer bit-exact (`array_codec` + VaultStore) serves the one-continuous-life telos today; **CRDT rollout deferred behind an explicit multi-writer/multi-agent gate**. | — (Joshua ratification rides the acceptance packet) |
### ⛔ SCRAP / DO-NOT-BUILD — correctly rejected over-claims
| Blueprint clause | Disposition |

View file

@ -268,12 +268,13 @@ PY
## 12. Wave-field substrate (ADR-0241) — 🟢 local + cohesion packages P0P10
> **Status (2026-07-15, P12 honesty pass):** Local operators **and** entity
> cohesion packages P0P10 are **GREEN** (I-01…I-05 suite, Trace A/B seams,
> packing, Fibonacci, polar honesty, chiral, ρ algebra). Human **Accepted**
> flip is Joshua review only — see
> `docs/audit/adr_0241_cohesion_acceptance_checklist.md`. Still open by design:
> sensorium feed into ρ, optional P11 Rust/MLX, serve remains quarantined.
> **Status (2026-07-15, RATIFIED):** ADR-0241 and ADR-0242 are **Accepted**
> (Joshua Shay ruling; record in
> `docs/audit/adr-0241-0242-acceptance-packet-2026-07-15.md` §8). Local
> operators, cohesion packages P0P10, and the chiral sign-gate (PR #41) are
> GREEN. Still open by design: sensorium real compilers, optional P11
> Rust/MLX (D9), V2 energy promotion (benchmark-gated); Tier-2 research
> substrate remains off-serving (T1/T2 boundary ratified).
### Spec (ADR-0241) — contract
- Continuous multivector wave-field \(\psi \in Cl(4,1)\) (32-coeff) under Cartan/Procrustes, Surprise, GoldTether, Biography.