Skip to content

D-QRY-2: active / static lists and membership history as mask programs - #20

Merged
AdaWorldAPI merged 3 commits into
mainfrom
ccr-1d749cc5-q8s5qs
Oct 10, 2026
Merged

AdaWorldAPI merged 3 commits into
mainfrom
ccr-1d749cc5-q8s5qs

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

hubspo-query::list implements HubSpot lists (H-ADR-5). Each operation returns a Quack filter over planes the caller names, and mask-risc runs it like any other query. No row ids are materialised and no Rust loop walks the population.

  • Active lists: refresh(predicate, prev, changed) = (prev ∧ ¬changed) ∨ (predicate ∧ changed). The predicate is re-read only where records changed. Deletes need no special case, because the compiled predicate already carries live.
  • Static lists: add, remove, and members, which applies live on every read.
  • Membership history: added / removed between two stored versions of a list.

The invariant this relies on: ordinals are never reused. Records are appended and the base is never rewritten (P-SPARSE-1). A store that reused ordinals would first have to clear a deleted record's bit in every static list. This is written on add() and on the board.

Storing the list masks themselves (which plane, which Lance version) lands with D-STO-1.

Evidence

tests/list_oracle.rs:

  • Active list: 40 rounds of updates, inserts and deletes. After each round the refreshed list equals a full recomputation and a plain loop, and added / removed equal plain set differences. More than 100 records join and more than 100 leave over the run.
  • Static list: equals a plain set through adds, removes and deletes.
  • Refresh scope: stored bits outside the changed rows are kept. The fixture makes more than 1,000 of them disagree with the predicate on purpose. Without this test, a refresh that re-read every row would pass every answer-based check.

Disable runs, each with an asserted patch anchor:

disable tests that went red
refresh keeps stale bits 2
refresh re-reads every row 1 (the refresh-scope test)
members without live 1
added computes removed 1
remove keeps rows 1

A live gate inside add stayed green when disabled, so I removed it: members already applies live.

Workspace fmt, clippy --all-targets --no-deps -D warnings and test are green. The branch was rebased on main after #19 merged. No other HubSPO-rs PR is open.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PPcakjk7ioQsnasmNDtc5z


Generated by Claude Code

list::refresh re-evaluates an active list's predicate only where records
changed: (prev ∧ ¬changed) ∨ (predicate ∧ changed). Deletes need no
special case, the compiled predicate carries live. Static lists: add,
remove, members (∧ live). History: added / removed between two stored
versions. Every operation is a Quack filter over planes, run by mask-risc.

Tests: 40 rounds of updates, inserts and deletes keep the refreshed list
equal to a full recomputation and a plain loop; a static list equals a
plain set; refresh keeps stored bits outside the changed rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPcakjk7ioQsnasmNDtc5z
The disable run showed it changed nothing: members() conjoins live on
every read. It would matter only for reused ordinals, which the store
rules out; the invariant is now written on add().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPcakjk7ioQsnasmNDtc5z
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPcakjk7ioQsnasmNDtc5z
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 10, 2026 16:35
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@AdaWorldAPI
AdaWorldAPI merged commit 9fbc561 into main Oct 10, 2026
1 check passed
AdaWorldAPI pushed a commit that referenced this pull request Oct 10, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPcakjk7ioQsnasmNDtc5z
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