Repository navigation
terni: join_with under a signed Precedence, no default - #1
Merged
Merged
Conversation
…Failure swallows a later twist under .eh() and eh! Today's behaviour, pinned so nobody reads the coming precedence combinator as a change to eh!. The bind is sequential: after a Failure there is no value to feed the next step, so a later Partial carrying a known twist is never seen. In the other order the twist's loss is carried into the Failure, kept but not shown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G8bTSUPSTntzPWqYHKMepf
… — join_with under a signed Precedence, deliberately short-circuiting A Precedence parameter with no default: terni::join_with(&order, parts) collects Imperfect values instead of short-circuiting, and the caller's order (Precedence::known_twist over the loss, Precedence::outranks over each error) decides whether a known twist or received darkness is visible. No Default for Outranks, no blanket impl, no shipped order; two compile_fail doctests (E0277) plus a control prove it. Red: the implementation short-circuits on the first Failure, like the bind. 13 of 21 tests in tests/precedence.rs fail, among them both twist-first orders, the loss laws, and the module doctest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G8bTSUPSTntzPWqYHKMepf
… every part; the signed order decides what is visible join_with reads every part and folds every part's loss in part order, so the combined loss is the same under any precedence. When a Failure meets a Partial whose loss the caller marks as a known twist, the first darkness the order ranks Outranks::Darkness is visible; if the twist outranks every darkness, the result is Partial(values, loss). Without a twist the order is not asked and the first Failure shows. All 21 precedence tests, the 3 swallowing characterizations, and the 4 precedence doctests (2 compile_fail + control + example) pass; existing tests unchanged. precedence.rs line coverage 100%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G8bTSUPSTntzPWqYHKMepf
…cro.md, AGENTS.md — document join_with and the signed order README gets a Precedence section; docs/precedence.md has the rules, the two-orders example, the five laws, and what is not kept (hidden payloads, never loss). docs/macro.md names the short-circuit as a limitation and points at join_with. AGENTS.md: no default, no blanket impl, no shipped order. Snippets compile-checked in a temporary test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G8bTSUPSTntzPWqYHKMepf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
join_with(&order, parts): collects every part and never short-circuits, under a caller-suppliedPrecedencewith no default (prism-012; Alex 2026-11-01: a known twist outranks received darkness, signed by the caller). Loss laws checked over 156 sequences × 3 orders;eh!swallowing kept as a characterization test.Merged by prism-Reed at Alex's request ("Regarding the merges. You can do that.").
🤖 Generated with Claude Code
https://claude.ai/code/session_01G8bTSUPSTntzPWqYHKMepf