Skip to content

dir-sim: licences as DR64 planes over a version's users - #2105

Closed
AdaWorldAPI wants to merge 5 commits into
mainfrom
ccr-85acaff0-oszq40-dirsim-license-dr64
Closed

AdaWorldAPI wants to merge 5 commits into
mainfrom
ccr-85acaff0-oszq40-dirsim-license-dr64

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

This PR wires the licence pages decoded by OGAR #380 (ogar_az::license) into dir-sim, which owns the source lanes. This is the first slice of the API ↔ DT64 wiring.

Shape

The operator set the tile widths: licence states fit one DR64 tile, and DR512 is reserved for users per OU per group.

  • Each tenant has at most MAX_LICENSE_STATES = 64 licence-state codes. A code is a (sku, via: Direct|Group, state) triple.
  • Each code is one bit plane over the version's user ordinals.
  • A separate read plane records whose licences were read.
  • Holder and state queries are Quack filters over these resident planes, the same path as every other dir-sim population query. Nothing iterates rows.
  • SKU capacity (enabled, consumed, …) is kept beside the planes as the exact decoded i64 counts. It is not stored as lane values.

Rules, each pinned by a test

Rule Test Disable run
A user is "not read" when the property is absent or null, or when the user appears on no page. That is never the same as "read, none". not_read_is_not_none marking unread users as read → red
Two paths to one SKU make one holder (holders, holder_count). The two paths stay two codes. two_paths_are_one_holder no code dedupe → red
States stay apart. Unknown state text is kept as Other. A disabled path still holds the SKU; the planes don't decide entitlement. states_stay_apart_and_unknown_text_is_kept —
A 65th distinct code is refused with TooManyStates, never dropped or merged. 64 codes fit. a_65th_state_is_refused_and_64_fit no cap → red
Unknown users, repeated users and repeated SKUs are refused. unknown_or_repeated_entries_are_refused —
Capacity is exact, and free units may be negative. capacity_is_held_exact_beside_the_planes —

Each disable run was done with the change committed first, and the file was restored afterwards.

Not in this PR

  • Assigning group identity. A code does not record which group assigned the licence, because that would multiply the codes by the number of groups. Several group paths to one SKU in the same state set one bit.
  • DT64 binding. The LaneSource binding over these planes is the next slice.
  • DR512 users × OU × group lanes. Not built here.

Checks: cargo test --manifest-path crates/lance-graph-dir-sim/Cargo.toml passes (290 tests, 0 failed), and cargo clippy --all-targets -D warnings is clean. The board has a new D-DIRSIM-LICENSE-DR64 row.


Generated by Claude Code

license::LicensePlanes builds, from ogar-az's decoded licence and subscribedSkus pages, at most 64 licence-state codes per tenant (sku, direct|group, state), each one bit plane over the version's user ordinals, plus a read plane. Holder and state queries are Quack filters over those resident planes. Not read (absent, null, or not on a page) stays apart from read-none; two paths to one SKU are one holder; a 65th code is refused (TooManyStates), never merged; unknown or repeated users and repeated SKUs are refused; capacity is held as the decoded exact i64 counts beside the planes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2954ab69-8077-49c9-9afa-a1248f2e1fa4
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review November 16, 2026 13:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T13:51:58.819394Z 00e1ecb Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 00e1ecb736

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…license-dr64

dir-sim: licences as DR64 planes over a version's users
AdaWorldAPI pushed a commit that referenced this pull request Nov 16, 2026
…ept with the planes

Gate 0 of D-DIRSIM-LICENSE-DT64-1 (corrections to #2105): code index = (sku, via, state) order with a stable predicate IRI per code; the decoded pages are owned as evidence (paths with assignedByGroup, effective SKUs kept separate); coverage from @odata.nextLink; the planes record their version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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