Skip to content

D-GRAMMAR-WHEN-1: binding a grammatical WHEN through DT64 (lab) - #1948

Merged
AdaWorldAPI merged 4 commits into
mainfrom
claude/clever-babbage-miiycg
Nov 3, 2026
Merged

AdaWorldAPI merged 4 commits into
mainfrom
claude/clever-babbage-miiycg

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

This PR is a source audit plus a lab falsifier. It changes no production code, mints no ClassId, adds no F### word and admits nothing.

Question

Can DT64 bind and invoke the meaning of a grammatical WHEN lawfully? The test case is two read-only methods, CandidateRecipient and CandidateExperiencer. Both require obl:arg ∧ Case=Dat; they differ only in the head verb's frame.

Findings

  • Correction to D-GRAMMAR-CONSTRAINTS-0: German dative roles as typed relational constraints (lab) #1947. Its head hop, Pred::EqU32Via, reads foreign[fk[i]]: a position taken from another lane's value. ADMISSION B (entries/2026-10-20-six-decisions.md:26-34) says such a position "is not admissible as a read address". The 2026-10-16 banner calls that read shape a violation. No ruling admits EqU32Via (EXO-140 is still open). The D-GRAMMAR-CONSTRAINTS-0: German dative roles as typed relational constraints (lab) #1947 report now carries a dated correction note.
  • What DT64 can and cannot state.
    • It can state the dependent's own conditions.
    • It cannot state the head frame. The only hop-shaped leaf is an opaque SetExpr::Sym, and admit checks witness equality only.
    • validate never checks WHEN lanes against the class basis; a test pins this.
    • There is no read-only "returns" DO.
    • R2IL still refuses any WHEN with GuardNotExecutable. Its integration suite passes 52/52, including that refusal test.
  • Approach A (a hop leaf in SetExpr) would duplicate Quack and push physical navigation into the guard.
  • Approach B (WHEN references a relational description) can be expressed in Quack today (Filter::EqU32Via), but not in RelAlg, whose Rel has no hop. DT64 can only point at it through an opaque Sym.
  • Approach C (cold composition) works in the lab: admit, check the description against the bound witness, then lower the description and the shared global WHERE into one program. Over the head hop, though, it inherits the same admission problem.
  • C′, the co-addressed form ("the join is the layout"). Store the head's frame code as a lane at the dependent's own position.
    • The WHEN then becomes row-local and is fully stated in today's SetExpr, so the two guards keep distinct witnesses with no Sym.
    • The query needs no EqU32Via: 10 mask ops, about 0.41–0.47 µs for both methods over 40 tokens, against 0.56–0.57 µs via the hop.
    • The cross-row read moves into a producer that runs once (35 counted lookups). That producer is the open EXO-46 / D-RMAP-1 question.
  • Falsifier: 16/16 in tests/when.rs, and D-GRAMMAR-CONSTRAINTS-0: German dative roles as typed relational constraints (lab) #1947's tests/p0.rs still passes 12/12.
    • Both forms match an independent string-level oracle and the gold annotation.
    • All 10 negative controls behave as predicted. Each prediction is written in its test's doc comment.
    • Each of 9 source disables turns at least one test red.
    • Candidate outputs stay read-only, UNKNOWN stays UNKNOWN, and the Direction/Purpose ambiguity is kept.
    • The hot path allocates 0 bytes.
  • Role vocabularies. They share 7 functions, with ordinals offset by one. CE64 adds Core and holds one code per edge; DeepNSM-v2's DativeFunction is a set of 8 and adds Judicantis.

Owner decisions

  1. EXO-140: classify EqU32Via. The report proposes, non-bindingly, gather-class, not admitted on the query path.
  2. EXO-46 / D-RMAP-1: admit or refuse a witnessed, sequential producer for co-addressed relation lanes.
  3. D-DT64-6:
    • a description identity the store verifies, instead of an opaque Sym;
    • guard-lane validation;
    • a read-only DO.
  4. Frame lexicon: an owner, a revision and a language scope.
  5. Role-vocabulary identity: which of the two is canonical.
  6. Candidate promotion: a selection policy, plus the hydration / Rubicon gate.

Test plan

cargo test --manifest-path crates/grammar-constraints-probe/Cargo.toml
cargo run --release --manifest-path crates/grammar-constraints-probe/Cargo.toml --example when_cost
cargo test --manifest-path crates/lance-graph-r2il/Cargo.toml --test integration

clippy with -D warnings and fmt are clean.

Refs: #1917, #1942, #1943, #1944, #1947; EXO-46, EXO-50, EXO-73, EXO-108, EXO-140.


Generated by Claude Code

Source audit and lab falsifier for two read-only DT64 methods,
CandidateRecipient and CandidateExperiencer, that share obl:arg + Case=Dat
and differ in the head verb's frame. Extends crates/grammar-constraints-probe
(src/when.rs, tests/when.rs, examples/when_cost.rs).

- The #1947 head hop (Pred::EqU32Via, foreign[fk[i]]) is gather-shaped:
  ADMISSION B does not admit a position derived from another column as a
  read address, and EXO-140 is still unclassified. A correction note is
  added to the #1947 report.
- DT64 states the dependent's own conditions but not the head frame (only an
  opaque Sym); admit checks witness equality only; validate does not check
  guard lanes; no read-only DO exists; R2IL still refuses WHEN.
- Co-addressed form ("the join is the layout"): the head's frame as a lane at
  the dependent's coordinate makes the WHEN row-local in today's SetExpr with
  distinct witnesses and no EqU32Via in the query. The cross-row read moves
  into a counted producer (EXO-46 / D-RMAP-1).
- Lab composer: admit, check description against witness, lower description
  and a shared global WHERE into one program. Both forms match an
  independent oracle and gold; 10 negative controls as predicted; 9 source
  disables red; 0 B per hot run.

No production change, no ClassId, no F###.

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

coderabbitai Bot commented Nov 3, 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: e5316993-98dd-4dfb-b175-0bb18dc55149
  • 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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

Copy link
Copy Markdown
Owner Author

member-tests failed at 7f63815 because the runner ran out of disk; no test failed.

  • The job log shows No space left on device (os error 28) while compiling datafusion-physical-plan and datafusion-datasource-csv, then Free space left: 29 MB. The job stopped before any test ran.
  • This PR doesn't cause it:
    • The diff touches only crates/grammar-constraints-probe/, which is excluded from the root workspace, plus .claude/ docs and board files. member-tests builds none of these.
    • member-tests passed on main at the base commit 0df42b9 (run 41721044009).
  • I tried to re-run the failed job once. GitHub refused it because other jobs in the same run were still in progress. I'll re-run it once when the run finishes.
  • A fix for the runner's disk budget belongs in the workflow, not in this PR, and none exists yet.

Generated by Claude Code

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review November 3, 2026 22:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 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-11-03T22:20:33.917508Z 7f63815 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: 7f63815ca4

ℹ️ 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".

…nder

Codex review on #1948: run() checked only that the frame belongs to the
table and that the row count matches, so a table re-sealed under a permuted
layout of the same size was answered with bits naming other gids. The
population now keeps its binding frame and both Rules::run and
Composed::run refuse any other (Refusal::PopulationFrame, checked with
Frame::same_issue after the map read).

Falsifiers c7b (p0) and n06b (when) were written first and failed before
the fix; both pass after. p0 13/13, when 17/17.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMLBmi7EtDd15CGwGb8
@AdaWorldAPI
AdaWorldAPI merged commit f1f4190 into main Nov 3, 2026
11 checks passed
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