Skip to content

Asynchrony: K-CUT-LOSS survives, transport becomes directional (I3a) - #35

Merged
hyperpolymath merged 3 commits into
mainfrom
claude/kcut-ladder-i0-b5zcm8
Oct 19, 2026
Merged

hyperpolymath merged 3 commits into
mainfrom
claude/kcut-ladder-i0-b5zcm8

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Ladder increment I3a: asynchrony. The first commit is the pre-registration (docs/pre-registration-addendum-2026-10-19.adoc). It fixes the model, the accounting, the reading of the 2026-10-12 falsifier, and claims Y-1 to Y-8 with their falsifiers, before any proof. The second commit is the proofs. All eight claims came out as pre-registered.

The headline: K-CUT-LOSS survives asynchrony unchanged, and the transport half of K-CUT-WARRANT becomes directional.

  • The receiver of a message knows it was sent.
  • Its sender does not know it was received, at any world where the receiver has done nothing since. In the synchronous frame the same proposition is a theorem.
  • A reply restores the sender's knowledge.

That is the falsifier pre-registered on 2026-10-12, confirmed.

Type of change

  • 🐛 Bug fix
  • ✨ New feature
  • 🕳️ Soundness fix
  • 📖 Documentation
  • 🔧 Build / CI / tooling
  • ♻️ Refactor
  • 🔒 Security
  • 🧪 Tests only

What is proved

Row Claim Where
Y-1 Synchronous cuts are exactly the asynchronous cuts with nothing in flight (embed/complete are inverse on them), and projection, consistency, causality and the restricted grade agree there Async.agda
Y-2 Asynchronous K-CUT-LOSS: grade↾ₐ p G κ ≡ lgrade (aview p G κ) for every causal cut consistent for p. The sender pays at send, the receiver at receipt. Parametric, discharged at Loss/MaxPlus/HWM, from the same two laws as K-1 Async.agda, Instances.agda; scripts/minimal-laws.sh now also checks Async.agda
Y-3 Delivering a message or selection in flight changes only its receiver's local cut Async.agda
Y-4 In the asynchronous frame, LOSS ⇒ WARRANT (a SoundWarrant in epistemic-types' interface) and knowledge of the own frontier survive AsyncKnowledge.agda
Y-5 The receiver of a protocol's first message knows it was delivered, hence sent AsyncKnowledge.agda
Y-6 Its sender does not know it was received while the receiver has done nothing since. The synchronous frame proves the opposite AsyncKnowledge.agda, Instances.agda, tests/reject/SenderKnowsReceipt.agda
Y-7 Both bounds (W-4, W-5) survive against the sent-so-far grade, the completion's; discharged as W-6 AsyncBound.agda, Instances.agda
Y-8 In 0 → 1 : a . 1 → 0 : b, a received reply gives the sender knowledge of receipt; a reply in flight does not (any algebra, any grades) Instances.agda

PROOF-STATUS gains the "Asynchrony" section and a short "What Y-6 says about the keystone". README, EXPLAINME, ARCHITECTURE and the changelog no longer list asynchrony as open. Each now says what remains: the position-indexed form of Y-5/Y-6, the general form of Y-8 (message chains), queues as data, and asynchrony with recursion.

How has this been verified?

All of the following were re-run on this branch after it was rebuilt on main at 08f8f00.

  • scripts/check.sh, locally in Agda 2.6.4.3 with agda-stdlib 2.1-4 (the gate's pins): it passes for the core, the echo-additive instance and 5 expected rejections. The new rejection fails at its invalid line with ⊤ !=< Delivered (AWorld.acut w').
  • scripts/minimal-laws.sh passes for KCut.agda and now for Async.agda.
  • --safe --without-K; no postulates under src/ or tests/; no matching on equalities of abstract grades.
  • node scripts/check-repository.mjs passes. The ledger binding was checked to catch a broken Y-row citation.
  • All 27 tests pass, and the 25 locally runnable estate gates pass.

Checklist

  • Commits are signed (SSH, verified by GitHub)
  • Local checks pass
  • SPDX headers on the new files (code MPL-2.0, prose CC-BY-SA-4.0)
  • Docs do not overstate. The scope limits are in the ledger ("Not claimed" under Asynchrony) and in the addendum.
  • No soundness hole: --safe --without-K, no postulates, every cited definition carries its -- Ledger Y-n. line

Notes for reviewers

  • The falsifier's reading. The 2026-10-12 addendum named sender-knows as the falsifier. Read literally, the T-2 fixtures are "a party knows its own frontier", and that cannot break. The pre-registration fixes the reading before any proof: the sender knows the message was received.
  • The accounting is a choice, stated up front. The sender pays at send, the receiver at receipt, and the bounds use the sent-so-far grade. A received-so-far grade is not a prefix of the global type and is not defined.
  • Causality. Quiet reads the receiver's local cut, which at a choice it is outside of shows only the left branch. Worlds also require plain merge for every party, which makes the branches agree. The module comment says so.
  • Branch. Restarted from main after CI: the lock is accepted at job setup again (required checks, Scorecard) #34 merged. Two commits, pre-registration first; please keep them separate (rebase or merge commit) so the order stays on record.

Generated by Claude Code

Summary by CodeRabbit

  • New Features
    • Added support for reasoning about messages and choices that are in flight, alongside delivered interactions.
    • Established asynchronous results for resource accounting and bounds, including how senders and receivers can know whether a message was sent or received.
    • Demonstrated that a delivered reply can give a sender knowledge of receipt in a two-message protocol; a reply still in flight is not sufficient.
  • Documentation
    • Updated the architecture, proof-status, and reference documents with these results and the remaining limitations, including recursion and full merge.
  • Tests
    • Expanded certification checks to cover the asynchronous proofs.

Fixes, before any proof, the asynchronous model (cuts whose messages and
selections are delivered or in flight; the receiver of a message in
flight does nothing later), the accounting (the sender pays at send, the
receiver at receipt; bounds use the sent-so-far grade of the completion),
and the reading of the 2026-10-12 falsifier: the sender of a message
knows it was received synchronously, and is predicted not to know it
asynchronously until a reply arrives.

Eight claims, Y-1 to Y-8, each with its falsifier. The proofs follow in
a later commit and are recorded against these statements in
PROOF-STATUS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MF5GeeBBDF6sUzr6pZTjWV
Ladder increment I3a, against the claims pre-registered in the previous
commit (docs/pre-registration-addendum-2026-10-19.adoc). All eight came
out as pre-registered.

Async.agda: cuts whose messages and selections are delivered or in
flight; the receiver of anything in flight does nothing later (Causal).
Synchronous cuts are exactly the cuts with nothing in flight, and every
notion agrees on them (Y-1). K-CUT-LOSS holds with the sender paying at
send and the receiver at receipt, from the same two laws as K-1;
scripts/minimal-laws.sh now certifies that too (Y-2). Delivering a
message in flight changes only its receiver's local cut (Y-3).

AsyncKnowledge.agda: the Kripke frame over asynchronous worlds.
LOSS => WARRANT and knowledge of the own frontier survive (Y-4). The
receiver of a protocol's first message knows it was sent (Y-5). Its
sender does not know it was received at any world where the receiver
has done nothing since, although the same proposition is a theorem in
the synchronous frame (Y-6): the pre-registered falsifier, confirmed.

AsyncBound.agda: both bounds survive against the sent-so-far grade, the
completion's (Y-7).

Instances.agda: discharges at Loss, MaxPlus and HWM; a concrete witness;
in 0 -> 1 . 1 -> 0, a received reply gives the sender knowledge of
receipt, and a reply still in flight does not (Y-8).
tests/reject/SenderKnowsReceipt.agda: the claim is refused.

PROOF-STATUS gains the "Asynchrony" section and "What Y-6 says about the
keystone"; README, EXPLAINME, ARCHITECTURE and the changelog no longer
list asynchrony as open, and say what remains.

scripts/check.sh passes (core, echo-additive instance, 5 expected
rejections), scripts/minimal-laws.sh passes for KCut and Async, the
documentation guard and 27 tests pass, and the 25 locally runnable estate
gates pass. --safe --without-K, no postulates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MF5GeeBBDF6sUzr6pZTjWV
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: hyperpolymath/choreographic-types/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 18d98837-e818-4b49-9f55-1b2b43802e8b
📥 Commits

Reviewing files that changed from the base of the PR and between 08f8f00 and b35c46c.

📒 Files selected for processing: 15
  • ARCHITECTURE.adoc
  • EXPLAINME.adoc
  • PROOF-STATUS.adoc
  • README.adoc
  • docs/CHANGELOG-entry.adoc
  • docs/README-keystone-section.adoc
  • docs/pre-registration-addendum-2026-10-19.adoc
  • scripts/minimal-laws.sh
  • src/Choreographic/All.agda
  • src/Choreographic/Async.agda
  • src/Choreographic/AsyncBound.agda
  • src/Choreographic/AsyncKnowledge.agda
  • src/Choreographic/Instances.agda
  • src/Choreographic/Transport.agda
  • tests/reject/SenderKnowsReceipt.agda
+--------------------------------------------------------------+
| Good things come to those who commit early and review often. |
+--------------------------------------------------------------+
  \
   \     /)/)
        ( '')
        /  |
      o(___)
  • 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

Comment @coderabbitai help to get the list of available commands.

@hyperpolymath
hyperpolymath marked this pull request as ready for review October 19, 2026 16:27
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T16:34:53.591357Z b35c46c New commits
ℹ️ 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 chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4ace0af985

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.adoc Outdated
Codex review on #35: README, keystone section, EXPLAINME, ARCHITECTURE and
the changelog stated 'receipt is unknown until a reply arrives' as a general
result. The proofs cover the protocol's first message while its receiver has
done nothing since (Y-6) and the two-message protocol (Y-8). The wording now
says so and names the open forms.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MF5GeeBBDF6sUzr6pZTjWV
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit d853618 into main Oct 19, 2026
20 of 21 checks passed
@hyperpolymath
hyperpolymath deleted the claude/kcut-ladder-i0-b5zcm8 branch October 19, 2026 16:48
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