Skip to content

od-ontology: region grammar (Edit 3) — the render half of the structure oracle#35

Merged
AdaWorldAPI merged 3 commits into
mainfrom
claude/odoo-rs-v3-ogar-transpile-nwriny
Jul 12, 2026
Merged

od-ontology: region grammar (Edit 3) — the render half of the structure oracle#35
AdaWorldAPI merged 3 commits into
mainfrom
claude/odoo-rs-v3-ogar-transpile-nwriny

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Summary

The consumer half of the region-grammar knowledge transfer (ruff #76 WinForms → Odoo XML), closed end-to-end and live now that ruff #79 (extract_odoo_view_regions) is merged to ruff main. This is the render half of the Klickweg structure oracle — where each control docks — complementing the existing value/field-set half (view_mask.rs).

docs/knowledge/ODOO-REGION-GRAMMAR.md

The grounded transfer. Odoo arch element → six-region map (<header>→top_bar, <searchpanel>→left_nav, <sheet>/<list>/<kanban>/<notebook>→center, chatter→right_panel, <footer>→bottom_bar, action-button/dropdown→popup); tab_order = arch DOM position; opens_popup's two Odoo spellings; the render equation (view_mask's WideFieldMask IS the per-screen local_mask); the three-edit recipe status; anti-patterns.

data/nav/odoo_regions.conf

The sanctioned region=<token>:<region> convention config (furnace output #2), consumed by ruff's own region= directive. Data-as-config, not hand-rolled Rust; covers every dock token the real arm emits (incl. content view-roots + the root extension-view fallback).

tests/region_grammar.rs + tests/region_digest.rs (+ data/nav/account_regions.spo.ndjson)

  • region_grammar (3): the conf parses through ruff_spo_triplet::parse; the full token→region map is pinned (drift fuse); every region is one of the six canonical.
  • region_digest (5): the real harvest is byte-frozen as account_regions.spo.ndjson (103 triples), folded through the conf using ruff's OWN build_nav_digest (consume, don't reimplement). The load-bearing pins: live_harvest_reproduces_the_frozen_corpus runs extract_odoo_view_regions over the vendored account views TODAY and asserts byte-equality with the corpus; every real dock token is covered by the config (no unmapped: leak — the render frame is total over real Odoo source); every resolved region is canonical; the [regions] section folds.

Two furnace disciplines held: no predicate mint (layout is not a domain concept — two-axis refusal) and reuse over parallel structure (build_nav_digest + the Klickweg corpus-carriage, no new digest).

Test Plan

  • cargo test -p od-ontology --features cli,fieldmask — full suite green against merged ruff main (region_grammar 3/3, region_digest 5/5, all else unregressed).
  • Rebased onto current main; the live-harvest test confirms the merged-main arm (with the shared-crate RegionFact collapse + canonical {screen}.{control} subject) reproduces the frozen corpus.

🤖 Generated with Claude Code


Generated by Claude Code

claude added 3 commits July 12, 2026 18:05
…code

Carry ruff PR #76's region-grammar plane (Predicate::{DockedAt,TabOrder,
OpensPopup} -> the six-region frame {top_bar,left_nav,center,right_panel,
bottom_bar,popup}) into the odoo-rs transcode. #76 built it for C# WinForms
(DockStyle/TabIndex/ContextMenuStrip); the furnace playbook §8.1 says Odoo
XML arch tags map to regions "exactly like DockStyle" — this makes that
concrete, grounded in the vendored real account views.

- docs/knowledge/ODOO-REGION-GRAMMAR.md: the transfer. Odoo arch element ->
  region map (header->top_bar, searchpanel->left_nav, sheet/list/kanban/
  notebook->center, chatter->right_panel, footer->bottom_bar, act_window
  target=new / dropdown -> popup); tab_order = arch DOM position (reuses
  odoo_views.rs's position-ordered scan); opens_popup's two Odoo spellings;
  the render equation (value half = view_mask WideFieldMask IS the per-screen
  local_mask); the three-edit recipe (Edit 1 vocab DONE on ruff main; Edits
  2 harvester arm + 3 digest section = named [H]); anti-patterns.
- data/nav/odoo_regions.conf: the sanctioned convention config (furnace
  output #2) — the arch-token -> region rows, consumed by ruff's own region=
  directive. Data, not hand-rolled Rust.
- tests/region_grammar.rs: proof-by-execution — the conf parses through
  ruff_spo_triplet::parse (the real region= directive), the full token->region
  map is pinned (drift fuse), every region is one of the six canonical, and
  the six-region frame is fully reachable from Odoo arch. 3/3 green.

No predicate mint (region tokens are layout, not concepts — two-axis refusal,
playbook §3). Reuses the existing Klickweg wiring; no parallel structure.
…orpus)

The region-grammar knowledge transfer, now APPLIED across all three edits.
Edit 2 (the ruff Odoo harvester arm ruff_python_spo::extract_odoo_view_regions)
is on ruff branch claude/odoo-region-grammar-arm; this closes the loop
consumer-side.

- data/nav/account_regions.spo.ndjson: the real harvest, byte-frozen. The ruff
  arm run over the vendored account views -> 103 docked_at/tab_order/opens_popup
  triples (corpus carriage, same pattern as account_nav.spo.ndjson).
- tests/region_digest.rs (Edit 3): folds the corpus through odoo_regions.conf
  using ruff's OWN build_nav_digest (consume, don't reimplement). Pins: corpus
  byte round-trip; EVERY real dock token is covered by the config (no unmapped:
  leak — the render frame is total over real Odoo source); every resolved
  region is one of the six canonical; the [regions] section folds. 4 green.
- data/nav/odoo_regions.conf: added the content view-root tokens (pivot/graph/
  calendar/activity/gantt -> center) and root:center (the extension-view <xpath>
  fallback), so the config covers every token the real arm emits.
- tests/region_grammar.rs: EXPECTED updated to match (23 rows); doc notes all
  three edits now built.
- docs/knowledge/ODOO-REGION-GRAMMAR.md: status APPLIED; §4 per-edit map updated.

No predicate mint (layout is not a domain concept). Reuses build_nav_digest +
the Klickweg corpus-carriage pattern; no parallel structure.
ruff PR #79 merged extract_odoo_view_regions to ruff main. Float picks it up;
close the loop with a LIVE harvest instead of a fixture in the middle.

- tests/region_digest.rs: new live_harvest_reproduces_the_frozen_corpus runs
  ruff_python_spo::extract_odoo_view_regions over the vendored account views
  TODAY and asserts it reproduces the committed corpus byte-for-byte. The
  frozen ndjson is no longer a stand-in — it's exactly what the merged arm
  emits (regenerate on an intentional arm change; fails loudly otherwise).
- data/nav/account_regions.spo.ndjson: regenerated from the authoritative main
  arm. The merge promoted RegionFact/region_triples into the shared
  ruff_spo_triplet crate (one type for Odoo/Rails/WinForms) and canonicalized
  the subject {screen}::{control} -> {screen}.{control} so it round-trips
  through the one build_nav_digest (which decodes on the last dot). Corpus
  now carries the canonical `.` subject; 51 facts / 103 triples unchanged
  otherwise.
- docs/knowledge/ODOO-REGION-GRAMMAR.md: status APPLIED + LIVE; records the
  shared-crate collapse + separator canonicalization.

region_digest 5/5, region_grammar 3/3, full od-ontology suite green against
merged ruff main.
@cursor

cursor Bot commented Jul 12, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_a87329c1-98e7-42f2-8b94-74e54fe927b9)

@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: 5617219a1d

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

{"s":"account_account_views.xml#view_account_search.name","p":"docked_at","o":"search","f":0.95,"c":0.9}
{"s":"account_account_views.xml#view_account_search.name","p":"tab_order","o":"0","f":0.95,"c":0.9}
{"s":"account_account_views.xml#view_account_search.account_type","p":"docked_at","o":"search","f":0.95,"c":0.9}
{"s":"account_account_views.xml#view_account_search.account_type","p":"tab_order","o":"1","f":0.95,"c":0.9}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include search filters in the region corpus

For view_account_search, the source fixture has the <filter> controls between <field name="name"> and <field name="account_type"> (and this commit maps filter to top_bar in odoo_regions.conf), but the frozen corpus jumps straight to account_type with tab_order 1 and has no filter subjects. Any digest/render oracle built from this corpus will silently drop the search filters and order later controls as if they did not exist; the harvest/corpus needs to include those filters before byte-pinning it.

Useful? React with 👍 / 👎.

{"s":"account_account_views.xml#view_account_form.related_taxes_amount","p":"tab_order","o":"1","f":0.95,"c":0.9}
{"s":"account_account_views.xml#view_account_form.account.action_move_line_select","p":"docked_at","o":"sheet","f":0.95,"c":0.9}
{"s":"account_account_views.xml#view_account_form.account.action_move_line_select","p":"tab_order","o":"2","f":0.95,"c":0.9}
{"s":"account_account_views.xml#view_account_form.account.action_move_line_select","p":"opens_popup","o":"account.action_move_line_select","f":0.95,"c":0.9}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Don't mark ordinary action buttons as popups

This fact pins account.action_move_line_select as an opens_popup, but in the vendored XML the control is just a type="action" smart button and the data/nav fixture set contains no target="new"/modal action definition for it. Since build_nav_digest treats opens_popup as a popup interaction, this makes the render oracle label a normal navigation/stat action as a popup; only actions proven to open a modal/dropdown should get this predicate.

Useful? React with 👍 / 👎.

@AdaWorldAPI AdaWorldAPI merged commit 233438a into main Jul 12, 2026
1 check 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