Skip to content

feat(recovery): EchoPartialSection + EchoFibreIntersection; wire EchoTruncation (squeakwell R3/R8/R9/R12/R13) - #370

Open
hyperpolymath wants to merge 2 commits into
mainfrom
claude/gracious-darwin-vkgj6l
Open

hyperpolymath wants to merge 2 commits into
mainfrom
claude/gracious-darwin-vkgj6l

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

The Agda source of truth for the repaired recovery invariants of hyperpolymath/squeakwell (database recovery through cross-modal constraint propagation on VeriSimDB; route plan rungs R3, R8, R9, R12, R13). Rocq recheck: verisimdb formal/Recovery.v (verisimdb#350). Lean side: tropical-types Resource/HubCeiling.lean (tropical-types#67). This also lands the "join-semilattice of partial sections" abstraction that verisimdb's CROSS-REPO-MAP.adoc flagged as the missing echo-types companion to Octad.v R1–R3.

What lands

  • EchoPartialSection.agda (Tier 1: Echo + stdlib). Partial sections (m : M) → Maybe (V m) of a modality bundle — the octad is an instance. Information order (⊑-refl, ⊑-trans). Resolve-parametric merge with the pointwise R1–R3 twins of Octad.v (merge-comm / merge-assoc / merge-idem: implications from resolve, not CRDT laws). Guarded fill as the left-biased merge against an oracle proposal: fill-guarded, fill-inflationary, and the counter-model FillNotMonotone.fill-not-monotone (two modalities). Restriction to an observed mask and its Echo fibre: restrict-echo, restrict-fibre-agree (a candidate in Echo (restrict T) obs reproduces obs on every observed modality — the fragment-granularity observation-fidelity shape), restrict-blind. Every law is pointwise; no funext.
  • EchoFibreIntersection.agda (Tier 2: Echo + EchoFiberCount). fibre-intersection-iso : Echo < f , g > (y , z) ↔ Narrow f g y z (K-free, refl round-trips). Forgetting or adding a constraint keeps the witness (forget-*-witness, narrow-fin-step-to/from + witness lemmas; the Fin n step is deliberately not a _↔_, since the function-side round trip would need funext). narrow-shrinks: on a finite domain with decidable equality, FiberSize-fin < f , g > (y , z) ≤ FiberSize-fin f y (via dec-×, lock-step with the count's recursion).
  • EchoTruncation.agda wired. Until now compiled only through its corollaries; now in All.agda and pinned (isProp, echo-witnesses-distinct, preimages⇒distinct-echoes, echo-not-prop). With FiberSize-fin≡0⇒no-echo / no-echo⇒FiberSize-fin≡0 it is the review-queue completeness kernel (R13 theory half).

Not claimed: inhabitation of the narrowed fibre; "covering masks ⇒ subsingleton" (needs extensionality over opaque identifiers — dropped in the route plan); termination of the recovery round (Rocq-only, needs the finite octad: iter_9_fixpoint in Recovery.v).

Docs

echo-kernel-note.adoc classification row ("Derived — recovery ladder (2026-11-09)"); MAP.adoc Direction "Database recovery — squeakwell / VeriSimDB bridge [REAL]"; cross-repo-bridge-status.adoc Tracks row + revision entry; CHANGELOG.adoc Added entry.

Verification (this environment, CI-pinned toolchain via scripts/setup-agda.sh)

Agda 2.7.0.1 (checksum-pinned), agda-stdlib 8326c7475af1fa456ca04a0203c168d5d7ff842b, absolute-zero f486c29903434589117fa0662c6f29b0f17d1d5f:

agda --no-libraries -i $AGDA_STDLIB -i $ABSOLUTE_ZERO_AGDA --safe --without-K --cubical-compatible -i proofs/agda proofs/agda/All.agda    # exit 0
agda --no-libraries -i $AGDA_STDLIB -i $ABSOLUTE_ZERO_AGDA --safe --without-K --cubical-compatible -i proofs/agda proofs/agda/Smoke.agda  # exit 0
sh scripts/kernel-guard.sh                                                                                                               # PASS

Warnings are UnsupportedIndexedMatch only (the class the existing suite already emits). Zero postulates, no escape pragmas.


Generated by Claude Code

…Truncation (squeakwell R3/R8/R9/R12/R13)

The Agda source of truth for the repaired recovery invariants of
hyperpolymath/squeakwell (database recovery through cross-modal
constraint propagation on VeriSimDB), rechecked in Rocq as verisimdb
formal/Recovery.v (verisimdb#350) with the Lean side in tropical-types
Resource/HubCeiling.lean (tropical-types#67).

- EchoPartialSection.agda (Tier 1: Echo + stdlib). Partial sections
  (m : M) → Maybe (V m) of a modality bundle — the octad as an instance;
  the information order (refl, trans); the resolve-parametric merge
  with the pointwise R1–R3 twins of Octad.v (merge-comm / merge-assoc /
  merge-idem, implications from resolve, not CRDT laws); guarded fill
  as the left-biased merge against an oracle proposal — never
  overwrites (fill-guarded), inflationary (fill-inflationary), and NOT
  monotone (FillNotMonotone.fill-not-monotone, two-modality
  counter-model); restriction to an observed mask and its Echo fibre
  (restrict-echo, restrict-fibre-agree, restrict-blind — the
  fragment-granularity observation-fidelity shape). Funext-free: every
  law is pointwise.
- EchoFibreIntersection.agda (Tier 2: Echo + EchoFiberCount). Binary
  narrowing is the fibre of the pairing (fibre-intersection-iso, a
  K-free _↔_ with refl round-trips); forgetting or adding a constraint
  keeps the witness (forget-*-witness, narrow-fin-step-to/from and
  their witness lemmas); on a finite domain the honest count never
  grows when an observation is added (narrow-shrinks, via dec-× and
  lock-step recursion with FiberSize-fin). Not claimed: inhabitation,
  or "covering masks ⇒ subsingleton" (needs extensionality).
- EchoTruncation.agda, until now compiled only through its example
  corollaries, is wired into All.agda and pinned (isProp,
  echo-witnesses-distinct, preimages⇒distinct-echoes, echo-not-prop) —
  with the FiberSize-fin ≡ 0 ⇔ ¬Echo pair it is the review-queue
  completeness kernel.

Docs: echo-kernel-note classification row, MAP Direction "Database
recovery — squeakwell / VeriSimDB bridge", bridge-status Tracks row and
revision entry, CHANGELOG Added entry.

Verified here with the CI-pinned toolchain (Agda 2.7.0.1, agda-stdlib
8326c74, absolute-zero f486c29): both new modules, All.agda and
Smoke.agda exit 0 under --safe --without-K --cubical-compatible
(warnings: UnsupportedIndexedMatch only, as the existing suite emits);
zero postulates; scripts/kernel-guard.sh PASS.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDizuhJtQDcxHxM2wj8
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 360412c1-4ba9-42d9-8aab-8a2e937f4044
Commits

Reviewing files that changed from the base of the PR and between 9abd8a5 and 9abcbdb.

Files selected for processing: 8

  • CHANGELOG.adoc
  • docs/bridges/cross-repo-bridge-status.adoc
  • docs/echo-types/MAP.adoc
  • docs/echo-types/echo-kernel-note.adoc
  • proofs/agda/All.agda
  • proofs/agda/EchoFibreIntersection.agda
  • proofs/agda/EchoPartialSection.agda
  • proofs/agda/Smoke.agda
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T15:49:52.004933Z
We couldn’t complete this review. Comment @codex review to try again.
ec18ac5 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@hyperpolymath
hyperpolymath enabled auto-merge (squash) November 9, 2026 23:19

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants