Repository navigation
DT64: behaviour lenses read their basis by the full classid (D-DT64-7 O9, L1) - #1903
Merged
Merged
Conversation
…4-7 L4) Each POLYFILL word now records which alias is its SQL and which its Quack name (sql_at, quack_at index into the existing aliases, so no name is spelled twice). FrozenWord gains name_of, name_in and is_alias. PolyfillView is a ClassView answering 0xFFFF with one label per position in R2IL, SQL or Quack; the predicate IRI names the word, the label the language. WithPolyfill puts it over a consumer's view, answering 0xFFFF and delegating every other concept. The binding path and the 0xC401 reading are unchanged. 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
… O9, L1) The contract's ClassView gains a defaulted lens_fields(u32), and is_behaviour_lens names a lens whose right half is 0xF000..=0xFFFF. BindStore::resolve_algebra reads such a lens's basis through lens_fields; a view that does not know it refuses with the new Refusal::UnknownLensBasis, and the concept's basis is never inherited. Every other lens, and every data class, keeps the left-half lookup, so the 0xC401 R2IL reading and existing lab lenses are unchanged. lance-graph-r2il follows: PolyfillView answers the polyfill lens through lens_fields and holds no concept basis; WithPolyfill routes lens_fields for lenses under 0xFFFF. The existing polyfill test view gains lens_fields; its assertions are unchanged. Tests (red first: 4 behavioural failures on the old resolve_algebra): two lenses under 0xFFFF with 17 and 5 words resolve independently; a data class and a behaviour lens sharing a left half do not cross-read; an unknown behaviour lens fails closed even when the concept's basis has the right count; a non-behaviour lens still reads its concept; a view without lens_fields compiles and refuses behaviour lenses. 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
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
AdaWorldAPI
marked this pull request as ready for review
October 31, 2026 23:40
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 2 of the execution order in plan §1d (decision O9; see #1901).
Contract change and compatibility impact
ClassView::lens_fields.lance_graph_contract::class_view::ClassViewgainsfn lens_fields(&self, lens: u32) -> Option<&[FieldRef]>, whose default returnsNone.impl ClassViewcompiles unchanged. A test view that implements only the required methods pins this.is_behaviour_lens. Newclass_view::is_behaviour_lens(classid). It returns true when the classid's right (custom) half is in0xF000..=0xFFFF.Refusal::UnknownLensBasis(u32). New variant onlance_graph_dt64::Refusal. No crate incrates/matchesRefusalexhaustively, so nomatchbreaks.Behaviour change
BindStore::resolve_algebranow reads a behaviour lens's basis fromview.lens_fields(lens). If the view does not know the lens, the call refuses withUnknownLensBasis. It never falls back to the left half's basis, even when that basis has the right field count.Unchanged:
0xF000, including the0xC401R2IL reading and lab lenses such as0x7F0A_0001;resolve);AlgebraRef.word,WideFieldMaskand the 256-position limit.The only lens on
mainthis affects is the polyfill lens0xFFFF_F000:PolyfillViewnow answers it throughlens_fieldsand no longer holds a concept basis.WithPolyfillforwardslens_fieldsfor lenses under0xFFFF.lens_fieldsmethod. Their assertions are unchanged, except that the L4 view tests now read the lens throughlens_fields.Tests
Red first. With only the trait method and the variant added (no new lookup yet), 4 of the 5 new DT64 tests failed and the compatibility twin passed.
New tests in
crates/lance-graph-dt64/tests/bind_store.rs:0xFFFF_F000(17 words) and0xFFFF_F200(5 words) resolve independently, while concept0xFFFFholds a 3-label basis.0x7F0B_0001(2 fields) and behaviour lens0x7F0B_F001(3 words) do not read each other's basis.lens_fieldsis not consulted.lens_fieldscompiles and refuses behaviour lenses.Disable runs, all red:
WithPolyfilldoes not forwardlens_fieldsLocal runs:
lance-graph-contract(1562 unit tests plus integration suites),lance-graph-dt64andlance-graph-r2ilpass.xlog-relcomp-probe,dt64-admission-probeandmath-polyfill-probepass; their lenses use right halves0x0000or0x0001.clippy --all-targets -D warningsis clean for contract, dt64 and r2il, andfmtis clean.entries_index,citation_decayandappend_only_gatepass.67243df.Board entry:
.claude/board/entries/2026-10-31-behaviour-lens-full-classid-l1.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF