8000 feat(values): set values #{...} (#316, PR 1 of 3) by adityamukho · Pull Request #741 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

feat(values): set values #{...} (#316, PR 1 of 3) - #741

Merged
adityamukho merged 6 commits into
v3from
feat/316-set-values
Oct 24, 2026
Merged

adityamukho merged 6 commits into
v3from
feat/316-set-values

Conversation

@adityamukho
Copy link
8000 Copy Markdown
Collaborator

PR 1 of 3 for #316 (spec docs/superpowers/specs/2026-10-24-set-values-design.md, merged as #732; plan docs/superpowers/plans/2026-10-24-316-set-values.md, in this PR).

Set values end to end; the predicates (PR 2) and collect-set (PR 3) follow.

  • Value::Set(ValueSet); Value is now #[non_exhaustive]. ValueSet dedups by Value's Ord: -0.0 = 0.0 with -0.0 kept, one NaN, keyword ≠ ref. A nested set is API-021.
  • #{...} literals in the parser and in tests/grammar/grammar.pest (set_lit, in edn_value and expr_arg; elements are scalar literals only), docs/GRAMMAR.md regenerated, grammar corpus fixtures, verifier token #{ (filler counts updated). PRS-119 (nested), PRS-120 (non-scalar element), PRS-121 (unclosed).
  • Format v8: value tag 0x08 after Ref. The element encoding (each element's key encoding, sorted) is inline up to 64 bytes, else a value page through the long-value path. DICT long values are now read and deduplicated as bytes, so a set record under a string's hash is skipped, not an error. verify knows set keys and records.
  • Pending encoding, WAL size check (set_bytes_bound, id-free upper bound; WAL-003), engine cells/join keys, planner constants, REPL #{...} and BrowserDb JSON arrays.

Found and fixed while testing: #{0.0} and #{-0.0} are equal sets but different key bytes. A committed set constant or value join now probes both zero signs (KeyTest::AnyOf, zero_signs).

Deviations from the plan / spec:

  • Error codes: PRS-121 is the unclosed set. collect-set's codes move to the next free ones in PR 3.
  • The grammar restricts set elements to scalar literals, so PRS-119/PRS-120 inputs are grammar syntax errors and need no SEMANTIC verifier entries.
  • No Kani harness for sets: set_elements over two integers used 100 GB and failed at the 10-minute timeout (noted in keys/verification.rs). The existing 12 harnesses pass (1.1 GB). The keys unit tests cover set encodings.
  • No golden-corpus entry: the corpus is v7 files, which hold no sets.

Tests: 1,734 passing / 13 ignored (1,752 / 14 with test-hooks), all green on both. New: tests/set_values_test.rs, unit tests in types, keys, dict, index, parser, aggregate, repl, browser. The model-based test now generates sets. Clippy is clean natively (all features) and on both wasm targets.

Refs #316

🤖 Generated with Claude Code

https://claude.ai/code/session_01TcpoiFyFeQQQELL872LfQF

adityamukho and others added 4 commits October 24, 2026 09:40
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TcpoiFyFeQQQELL872LfQF
Value::Set(ValueSet), #{...} literals in the parser and the pest grammar,
v8 key tag 0x08 (inline up to 64 bytes, else a value page), pending
encoding, WAL size check, engine cells and joins, REPL and JSON output.
API-021, PRS-119, PRS-120, PRS-121.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TcpoiFyFeQQQELL872LfQF
Set constants with a zero element probe both zero signs, committed or
pending, and in value joins. Kani: a set_elements harness used 100 GB and
did not finish, so the keys unit tests cover set encodings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TcpoiFyFeQQQELL872LfQF
…r kinds (#316)

Found by review: the checkpoint's staged long values were deduplicated by
bytes with one kind per record, so the second of the two got the first's
key form. The record is still shared; each reference keeps its kind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TcpoiFyFeQQQELL872LfQF
@codecov
codecov Bot commented Oct 24, 2026 •
Copy link
Copy Markdown

adityamukho and others added 2 commits October 24, 2026 13:57
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TcpoiFyFeQQQELL872LfQF
Resolve error codes (API-021 beside #181's API-022–024) and test counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TcpoiFyFeQQQELL872LfQF
@adityamukho
adityamukho merged commit 0632b1e into v3 Oct 24, 2026
19 of 20 checks passed
@adityamukho
adityamukho deleted the feat/316-set-values branch October 24, 2026 09:08
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.

1 participant

0