Skip to content

ogar-from-ruff lance_sink: key the row by the minted facet, not a V1 tail - #331

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/odoo-rs-v3-ogar-transpile-nwriny
Oct 10, 2026
Merged

AdaWorldAPI merged 1 commit into
mainfrom
claude/odoo-rs-v3-ogar-transpile-nwriny

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Problem

compiled_class_to_noderow built its row key with NodeGuid::new(classid, 0, 0, 0, 0, identity). That is a V1 family:identity tail, and it drops the part_of:is_a rails the mint had just computed.

When W2 shipped (#192), this was a deliberate freeze: the rail-chain vs key-tail question ([H1]) was still open. lance-graph has since settled it:

  • a V3 mint never silently degrades to a V1 tail (#1213);
  • NodeGuid and FacetCascade are the same 16 bytes and convert without reinterpretation (canonical_node.rs).

lance-graph's V1-tail residue census (ISS-V1-TAIL-RESIDUE) did not count this site.

Change

  • Key is the minted facet: NodeGuid::from(compiled_class_to_facet(cc)), i.e. render classid + rails, byte for byte. NodeGuid::new is no longer called.
  • compiled_class_to_noderow(cc) drops its identity parameter, because the facet is now the row's identity. The only callers were this module and odoo_v3_sink_e2e.
  • New compiled_classes_to_noderows(&[CompiledClass]) refuses a batch where two classes mint the same facet (DuplicateFacetKey { first, second }).
  • Docs: the module docs drop the [H1] freeze and the deprecated symbiont reference. DISCOVERY-MAP gets a dated regrade on D-V3-SINK-COMPILEDCLASS (append-only).

Tests

Test Pins
T-D (inverted) key == facet byte for byte; rails readable back from the key; anti-vacuity guard that the fixture's rails are non-zero
T-E / T-F round-trip and field isolation over two distinct classes
T-H (new) duplicate guard fires on a repeated class and stays silent on distinct ones
e2e capstone key == facet for both real Odoo classes (account_payment_term.py)

Verified

  • cargo test -p ogar-from-ruff --features lance-sink: 87 lib tests and all integration tests pass (kausal witness 11/11, e2e capstone).
  • cargo clippy -p ogar-from-ruff --features lance-sink --all-targets -- -D warnings: clean.
  • Disable run: restoring the V1 key turns T-D, T-E and T-H red.

Not changed

[H2] (rails into a value tenant) and [H3] (L6 quads) are untouched, and ENVELOPE_LAYOUT_VERSION stays 2. No bytes at rest move: the row stride and value slab are identical; only the key's bytes 4..16 now carry the rails.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NSfzujtWL1BnHgnJGAhg9N


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Class records now retain the complete minted facet in their keys, including rail information, keeping keys consistent with their facets.
    • Batch processing now detects when multiple classes produce the same key and reports the conflicting entries rather than returning ambiguous records.
  • Documentation
    • Updated guidance and examples to reflect the current key format and duplicate-key handling.

…tail

compiled_class_to_noderow built its key with NodeGuid::new(classid, 0, 0, 0,
0, identity): a V1 family:identity tail that dropped the part_of:is_a rails
the mint had computed. That was a deliberate freeze while the rail-chain vs
key-tail reconciliation ([H1]) was open. lance-graph has since settled it: a
V3 mint never degrades to a V1 tail (#1213), and NodeGuid <-> FacetCascade is
a byte-identical conversion.

- key = NodeGuid::from(compiled_class_to_facet(cc)): the minted 16-byte
  facet, classid + rails, byte for byte. NodeGuid::new is no longer called.
- compiled_class_to_noderow drops its `identity` parameter; the facet is
  the row's identity. Only callers were this module and odoo_v3_sink_e2e.
- new compiled_classes_to_noderows refuses a batch in which two classes
  mint the same facet (DuplicateFacetKey { first, second }).
- tests: T-D inverted (key == facet, anti-vacuity guard that the fixture's
  rails are non-zero); T-E/T-F use two distinct classes; T-H pins the
  duplicate guard firing and staying silent. The e2e capstone now asserts
  key == facet for both real Odoo classes.
- module docs drop the [H1] freeze and the deprecated symbiont reference;
  DISCOVERY-MAP regrades D-V3-SINK-COMPILEDCLASS in place (append-only).

Verified: ogar-from-ruff --features lance-sink 87 lib + all integration
tests pass; clippy -D warnings clean. Disable run: restoring the V1 key
turns T-D, T-E and T-H red.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NSfzujtWL1BnHgnJGAhg9N
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 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-10T08:16:51.985736Z d2ee92f PR opened
ℹ️ 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.

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 83b78af6-f786-4141-84ba-97594a80f7f7

📥 Commits

Reviewing files that changed from the base of the PR and between f988514 and d2ee92f.


📒 Files selected for processing (3)
  • crates/ogar-from-ruff/src/lance_sink.rs
  • crates/ogar-from-ruff/tests/odoo_v3_sink_e2e.rs
  • docs/DISCOVERY-MAP.md

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.



📝 Walkthrough

Walkthrough

Compiled-class row keys now use the bytes of each minted facet, including its rails. Batch conversion preserves input order and returns the first and later indices when it finds duplicate facet keys.

Changes

Facet-Key Sink

Layer / File(s) Summary
Facet key mapping and duplicate detection
crates/ogar-from-ruff/src/lance_sink.rs
compiled_class_to_noderow no longer accepts an identity argument. It uses the minted facet as the NodeGuid key. The new batch conversion preserves input order and reports duplicate key indices.
Facet-key validation and documentation
crates/ogar-from-ruff/src/lance_sink.rs, crates/ogar-from-ruff/tests/odoo_v3_sink_e2e.rs, docs/DISCOVERY-MAP.md
Tests check key bytes, rail preservation, round trips, and duplicate rejection. The end-to-end test uses batch conversion, and the discovery map records the updated mapping and test expectations.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: claude


Merge Risk: ⚪ Minimal · up to d2ee9

No actionable merge-blocking issue is established. Compatibility with any external dataset using the former keys remains unknown, but this change does not read or update such a dataset in the reviewed code.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: using the minted facet, instead of a V1 tail, as the row key in lance_sink.
Docstring Coverage Passed Docstring coverage is 91.67% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 2 files. (1 skipped: 1 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


A rabbit checks each facet’s face,
And sets its bytes in the key’s place.
The rails stay true, the order stays,
Duplicate keys meet index ways.
Two distinct rows hop through the gate,
The rabbit nods: all keys align.

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

@AdaWorldAPI
AdaWorldAPI merged commit 2fbae6e into main Oct 10, 2026
4 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