Skip to content

COR-11: stop claiming :find returns a set on this Client-API site - #44

Merged
thiagooak merged 1 commit into
mainfrom
worktree-agent-a79539d8ec1bc3a61
Sep 21, 2026
Merged

thiagooak merged 1 commit into
mainfrom
worktree-agent-a79539d8ec1bc3a61

Conversation

@thiagooak

Copy link
Copy Markdown
Owner

Summary

  • This site runs Datomic Local through the Client API, which returns a vector with duplicate rows removed, not a set. Verified: a relation find's result class is PersistentVector.
  • Cardinality-many's "returns a set of tuples" claim is now "removes duplicate rows"; find-specs.edn's "order within the set" (describing this site's own vector output) is now "order among the rows"; both leave "set" reserved for the Peer API discussion, which already correctly distinguishes it.
  • Aggregations' "Datomic builds a set from the :find variables" is accurate as a description of the pre-aggregation mechanism, so it's left as-is, with "(plus :with variables)" added since :with variables are also part of that set.

Verification

  • Ran the exact dual-type query from cardinality-many.edn through app.core/run-q: result class is PersistentVector, 67 entries, all distinct — confirms "duplicate rows are removed" is accurate.
  • Ran the aggregations sum/:with example: sum jumps from 3070 to 9696 with :with ?e, confirming the pre-aggregation collapsing behavior the chapter describes.
  • clojure -X:test: 32 tests, 493 assertions, 0 failures.

Closes #27

🤖 Generated with Claude Code

This site runs Datomic Local via the Client API, which returns a
vector with duplicates removed, not a set (verified: relation finds
return PersistentVector). "Set" is only accurate for the Peer API,
which find-specs.edn already covers separately. Also notes that
Datomic's pre-aggregation set includes :with variables, not just
:find variables.

Closes #27

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@thiagooak
thiagooak merged commit 71bddfe into main Sep 21, 2026
2 checks passed
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.

COR-11: "Set" vs "vector": inconsistent for a Client-API site

1 participant