Repository navigation
Require ordered sequences for bulk relation traversal - #394
Merged
Merged
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
The source-breaking change spans multiple interpreters and Scala versions, and the reported test matrix remains independently unverified.
No open issues 🎉
What changed in this PR
Restricts bulk relation traversal to immutable sequences so composition preserves order, duplicates, and group boundaries.
Changes:
- Propagates
Seq/SeqOpsbounds through both proof models and interpreter APIs. - Adds regression tests for positional behavior and compile-time rejection of sets.
- Documents the source-breaking migration and interpreter obligations.
| File | Description |
|---|---|
| zquery/src/main/scala/decrel/reify/zquery.scala | Restricts interpreter collection bounds. |
| zquery/src/main/scala-3/decrel/reify/zquerySyntax.scala | Updates Scala 3 bulk syntax bounds. |
| zquery/src/main/scala-2.13/decrel/reify/zquerySyntax.scala | Updates Scala 2.13 bulk syntax bounds. |
| ziotest/src/main/scala/decrel/ziotest/gen.scala | Adapts generator traversal to sequences. |
| scalacheck/src/main/scala/decrel/scalacheck/gen.scala | Adapts generator traversal to sequences. |
| mdoc/docs/guide/README.md | Links the collection contract guide. |
| mdoc/docs/guide/bulk-collections.md | Explains collection laws and migration. |
| kyo-batch/src/main/scala/decrel/reify/kyoBatch.scala | Restricts batch interpreter collections. |
| fetch/src/main/scala/decrel/reify/fetch.scala | Updates interpreter and bulk syntax bounds. |
| core/src/test/scala/decrel/reify/monofunctor/CollectionContractSpec.scala | Tests monofunctor collection contracts. |
| core/src/test/scala/decrel/reify/CommonErrorSpec.scala | Migrates the custom test interpreter. |
| core/src/test/scala/decrel/reify/bifunctor/CollectionContractSpec.scala | Tests bifunctor collection contracts. |
| core/src/main/scala/decrel/reify/monofunctor/reifiedRelation.scala | Enforces and documents sequence traversal. |
| core/src/main/scala/decrel/reify/monofunctor/proof.scala | Restricts many-valued proof collections. |
| core/src/main/scala/decrel/reify/bifunctor/reifiedRelation.scala | Enforces and documents sequence traversal. |
| core/src/main/scala/decrel/reify/bifunctor/proof.scala | Restricts many-valued proof collections. |
Review effort: Balanced
yoohaemin
force-pushed
the
fix/ordered-bulk-collections
branch
from
November 2, 2026 12:48
302fea0 to
68623a3
Compare
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.
Bulk composition reconstructs optional positions and many-valued groups by position. Arbitrary Iterables can discard equal outputs (for example Set.map), invalidating those assumptions. Require immutable Seq/SeqOps collections throughout both proof models and interpreter bulk APIs.
This is a source-breaking restriction: custom applyMultiple overrides must adopt the new bounds, and callers must convert sets or arrays to List/Vector. The new bulk-collection guide documents finiteness, order, duplicate preservation, and one result per input; finiteness and custom-interpreter compliance remain caller/implementer obligations.
New tests in both models cover empty groups, duplicate outputs, optional positions, and compile-time rejection of sets. Validation: full
sbt testmatrix across all modules, then the new contract tests viacore/test,core3/test,coreJS/test,coreJS3/test;fmtand diff checks passed.Merge coordination: this API restriction overlaps #393, #396, and #398. Rebase it after those changes, preserving the corrected generator CC parameter, typed zip implementation, and Fetch validation. Their combined tree has passed the full test matrix, documentation compilation, and workflow checks locally.