Skip to content

lance-graph-dt64: the bind store for meaning and behaviour - #1869

Merged
AdaWorldAPI merged 11 commits into
mainfrom
ccr-45a41fb4-0j3i0l
Oct 30, 2026
Merged

AdaWorldAPI merged 11 commits into
mainfrom
ccr-45a41fb4-0j3i0l

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Why a new PR

#1862 merged at head 4707683dc, before any lance-graph-dt64 commit was pushed. The crate and its follow-ups were left on the branch. This PR rebases them onto current main.

What

crates/lance-graph-dt64 is the DT bind store for meaning and behaviour (D-DRDT §1/§4, D-DT64-6 §1/§3). It is a workspace member that depends only on lance-graph-contract, holds bindings and their version log (never business data), and evaluates nothing.

Meaning (the classid is the lens)

  • view_class(classid) = ogar_codebook::classid_concept. Labels are resolved late through the ClassView.
  • field_view(&WideFieldMask) is the ERB/Redmine fieldview pattern, the same shape as OGAR ogar-render-askama::field_view minus the value: FieldRow { position, label, predicate }. action_ordinals() lists the actions.
  • field_meaning / mask_where / unspecified join each row to its property::PropertySpec (obligation, semantic type, marking). A risk mask is marking >= Pii. A field with no spec is UNKNOWN and never takes a default.

Behaviour (the classid switches over agnostic algebra)

  • Algebra methods form a classid-free catalogue (AlgebraEntry: id, sig_rev, polyfill, arity; immutable; D6).
  • A consumer classid's methods are MethodBindings:
    • identity: MethodId + SigRev;
    • ON / reads: WideFieldMask;
    • WHEN: a K3 Guard (SetExpr + Logic);
    • DO: ordered Effect { target, algebra: AlgebraRef, args };
    • Population / Truth / value demand.
  • register refuses: unknown algebra, revision or arity mismatch, out-of-basis positions, duplicate MethodIds, and UndeclaredRead (a step reading what no earlier step wrote).
  • D5: a classid's behaviour is immutable; an override is register_derived plus a re-route. Only routes are versioned (routed_at).
  • resolve / resolve_at / admit give named refusals, never an empty answer. admit covers a dropped, added or mismatched guard and a stale SigRev.
  • footprint() / methods_touching(mask) let a meaning mask reach behaviour.

The XLOG session shaped much of this. Its per-Y count (group-count twice, then checked i64 Mul) and an ONNX Mul(int64) node reuse one catalogue entry, and only the two consumers carry classids.

Board: PR_ARC_INVENTORY / LATEST_STATE records for #1862; plan Amendment A.5 and its addenda.

Tests

  • cargo test -p lance-graph-dt64: 19 pass. clippy --all-targets -D warnings and fmt are clean.
  • Every guard was disable-checked: removed, its test red, restored. The runs are recorded in plan A.5.

Open, with the owners (EXO-50 27–29)

  • Who declares the algebra catalogue entries and their ids; whether tract's per-op classids become catalogue entries.
  • MethodSignature (dr-math) vs MethodRef identity.
  • Whether a frame records the catalogue's extent (D8).
  • OGAR CapabilityAuthority wiring (D6); persistence (EXO-55).

Generated by Claude Code

claude added 10 commits October 30, 2026 16:05
DT is the existing DTO binding store, addressed by ClassId (D-DRDT §1).
This crate is that store as production code: a workspace member whose
only dependency is the zero-dep contract. It holds bindings and their
version log, never business data, and evaluates nothing.

Closes the four D-DRDT §4 gaps:
- MethodId + SigRev: identity independent of the source name;
- Guard = set_algebra::SetExpr + Logic, the description Quack's WHERE
  evaluates; Guard::witness is its normal form (Kleene for K3);
- ordered effects (field position + AlgebraRef, the D4 polyfill ref);
- one lookup: resolve(view, classid, schema_rev), fields borrowed from
  the ClassView, methods from the store; resolve_at by DR position.

D5: register is idempotent for an identical binding and refuses any
other (BehaviourImmutable); an override is register_derived plus a
re-route. Only routing is versioned: an append-only route log with
routed_at(version, position).

D-DRDT §5: admit(MethodRef) refuses a dropped, added or mismatched
guard and a stale signature revision; resolve refuses another schema
revision and a ClassView whose field basis moved. The first DR #4
falsifier passes: equal read/write sets, different effect order, both
kept and distinct.

11 tests; clippy -D warnings and fmt clean. Board: STATUS_BOARD
D-DT64-6-BS, plan Amendment A.5, entry 2026-10-30-d-dt64-6-bs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY
A classid is a codebook lens, never one per item (operator). So:
- ClassSchema drops the declared view class; view_class(classid) is
  ogar_codebook::classid_concept, the codebook's own split.
- Effect carries EffectOp::{Algebra(AlgebraRef), Call(MethodRef)}. A
  Call reuses another lens's entry by reference, is admitted when the
  caller registers (CallRefused wraps the reason), and callers_of(lens)
  lists who reuses it.

Shaped by the XLOG session's critique: its per-Y count is three Calls
into one algebra lens (group-count twice, checked i64 Mul), two classes
bound in total. Route targets stay bare classids.

14 tests; clippy and fmt clean.

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

The XLOG session found that a Call recorded where a result goes but not
what it reads: the binding could not tell counting R and S apart from
counting R twice. Effect now carries ordered args (Field position or
Const). MethodBinding::inputs is part of the signature, and a Call with
another arity is refused at registration (ArityMismatch in CallRefused).
Field args are checked against the caller's basis. 15 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY
Operator: the classid switches behaviour, labels and polyfill over
otherwise agnostic addresses and algebra methods. The algebra lens
classid and class-to-class Call were wrong and are removed. The store
holds a classid-free algebra catalogue (AlgebraEntry: id, sig_rev,
polyfill, inputs; immutable; D-DT64-6 D6). A consumer's effects bind an
AlgebraRef with ordered operands, checked at registration (UnknownAlgebra,
AlgebraRevisionMismatch, ArityMismatch). users_of lists the classids
switching over an entry. XLOG's count and an ONNX Mul(int64) node reuse
one entry; only the consumers carry classids. 15 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY
Operator: classid x WideFieldMask ergonomics is the ERB Redmine
fieldview pattern, as in OGAR ogar-render-askama::field_view.
Resolved::field_view(mask) yields FieldRow { position, label, predicate }
ascending, the position as layout address, labels borrowed late from the
ClassView (OGAR FieldView minus the value; the store holds none).
Resolved::action_ordinals() gives the methods as action addresses. 16 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY
DT owns field semantics; the contract carries them per predicate as
PropertySpec (obligation, codec route, semantic type, marking).
field_meaning joins fieldview rows to their spec; mask_where derives
WideFieldMasks from meaning (risk: marking >= Pii; obligation: Required);
unspecified surfaces fields with no spec, which never take the spec
default. 17 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY
…ing masks

register refuses UndeclaredRead: a step may read only declared reads or
what an earlier step of the same method wrote, so a recipe's order is
what it says. MethodBinding::footprint (ON, reads, writes) and
Resolved::methods_touching(mask) let a risk or RBAC mask reach
behaviour. 19 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY
#1862 merged at head 4707683, before the lance-graph-dt64 commits were
pushed. PR_ARC_INVENTORY and LATEST_STATE record what landed and that
the crate follows. Entries index regenerated after the rebase.

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

coderabbitai Bot commented Oct 30, 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: 4877c87c-cde6-4962-8c09-e6ee31dae226
  • 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

Comment @coderabbitai help to get the list of available commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 30, 2026 16:09
@AdaWorldAPI
AdaWorldAPI merged commit 9d119bb into main Oct 30, 2026
12 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T16:10:32.300225Z 1761d4c 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.

AdaWorldAPI pushed a commit that referenced this pull request Oct 30, 2026
…-op classid question

STATUS_BOARD: D-DT64-6-BS row is Shipped #1869; the D-TRACT-HARVEST-0
row still said "op signature -> classid", which #1870 corrected in the
plans but not on the board.

Plan D-DT64-6 Amendment A.5 addendum 7: one ONNX lens classid with op
signatures as fields is the shape lance-graph-dt64 implements; the
MethodKey vs MethodRef identity stays open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY
AdaWorldAPI pushed a commit that referenced this pull request Oct 31, 2026
…1869 and #1871

PR_ARC_INVENTORY gains the #1869 and #1871 entries that were missing,
LATEST_STATE records main after them, STATUS_BOARD moves the
D-DT64-6-BS row, and a board entry records the dr module. Addendum 12
also records that #1871 merged without the thin-provisioned extent,
which this branch restores.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMPh2Seh2WLccCksAdY
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