Skip to content

docs: ground the DocIr composition layer (#217) + record the geometry chunk [S]#218

Merged
AdaWorldAPI merged 3 commits into
mainfrom
claude/ogar-docir-architecture-jjzlig
Jul 20, 2026
Merged

docs: ground the DocIr composition layer (#217) + record the geometry chunk [S]#218
AdaWorldAPI merged 3 commits into
mainfrom
claude/ogar-docir-architecture-jjzlig

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

Companion grounding doc to docs/DOCIR-COMPOSITION-LAYER.md (the operator ruling, #217, ADOPTED). It grounds the 2026-07-20 feedback against shipped code + the append-only ledger, and answers the "produce a repo map / gap analysis / crate boundary / smallest slice / exact files / terminology" ask that came with it.

New: docs/DOCIR-COMPOSITION-GROUNDING.md. Ledger: grounding line appended to D-DOCIR-COMPOSITION; new [S] entry D-STL-GEOMETRY-REDISCOVERY. Docs-only, no code.

The correction that shaped it

The feedback framed several things as new; grounding them against the canon showed each is an expansion of a shipped/ruled brick, not new architecture (and the FieldView/ClassView case is an expansion, not a collision — operator-corrected mid-session).

Part A [G] — DocIr composition is the fourth beat of one arc

D-OGAR-DOC-LAYER (#191) → D-DOC-IR-SECOND-RETINA (#197) → D-A2UI (#204–207) → D-DOCIR-COMPOSITION (#217). Every "new" name is a widening:

Doctrine element Expands Grounding
ObjectSlot the A3 Klickwege brick ("document template = ClassView × WideFieldMask, no new DSL") = that brick + ObjectRef + ResolutionMode, made addressable
FieldView (enum) the E-ONE-MASK-THREE-PORTS fieldview fold the shipped ogar-render-askama::field_view::FieldView struct (field_view.rs:58) is its Text-leaf reading — widen + rename struct → FieldRow, not a collision
ProjectionRenderer the ruled DocRenderer trait ("gains its fourth adapter") rename to DocRenderer, widen adapter set
named multi-view masks are per-mode registry key ClassId → (ClassId, mode) (ogar-class-view/src/lib.rs:311)
RBAC by projection classview_mask ∧ role_mask (#205) already shipped
crate placement A1 ruling: "one ogar-doc crate; split axis is STATE not direction" composition is a module in the doc-ir family, not a sibling ogar-doc-compose

First-slice landing zone grounded to exact files in openproject-nexgen-rs: domain WorkPackage.description: Formattable (op-work-packages/src/work_package.rs:74-76, hand-written — never the generated String); render seam CellData::RichText at op-server/src/board.rs:735/1446; @mention/WP-link parsers are all-TODO stubs → clean, unblocked. Grounds against, not ahead of, the OGAR-AS-IR.md six-test gate.

Part B [S] — the STL/geometry chunk is a rediscovery (council-pending, NOT adopted)

The SourceMesh/MeshIr/FeatureIr/PartGraph/HhtlNode/Surfel/HelixAddress stack maps almost one-to-one onto the "address is geometry" arc:

  • HhtlNode / spatial LOD → the shipped HhtlMode::Located reading (ogar-fma-skeleton/src/guid.rs:328, located_3d/morton3, Cesium 3D-octree CRS) — HHTL stays key-path canon; a spatial index is the Located reading, not a new hierarchy.
  • HelixAddress → the shipped helix::ResidueEdge sphere codec (L7 hhtl++helix) — surfel normals ride it, never a new name.
  • Surfel math → jc::ewa_sandwich_3d + ndarray::splat3d; Aabbderived from address (D-BOUNDS), never stored; BufferRef → the anatomy-mesh out-of-line-Lance pattern (canonical_node.rs:706-723); PartGraph → extends same_family.

The one genuinely-new sliver is an STL-ingest producer (mirror of ogar-from-ruff), probe-gated (D-FMA-SKELETON grades splat-fit convergence CONJECTURE). No mint, no crate, no code — a reuse-map that defers the build so the arc is not rebuilt. Naming discipline throughout: widen the shipped carrier, never fork it.

Test plan

Docs-only; no code paths touched. No model identifier in the artifacts (per OGAR non-negotiable).

Generated with Claude Code


Generated by Claude Code

… chunk [S]

Companion grounding to docs/DOCIR-COMPOSITION-LAYER.md (#217, adopted).
Grounds the 2026-07-20 feedback against shipped code + the append-only
ledger, correcting the framing to "expansion, not collision."

Part A [G] — the composition layer is the continuation of
D-OGAR-DOC-LAYER -> D-DOC-IR-SECOND-RETINA -> D-A2UI -> D-DOCIR-COMPOSITION,
and every "new" name is a widening of a shipped/ruled brick:
- ObjectSlot = the A3 Klickwege brick (ClassView x WideFieldMask) made
  addressable (+ ObjectRef + ResolutionMode)
- FieldView (enum) = the E-ONE-MASK-THREE-PORTS fieldview fold formalized;
  the shipped ogar-render-askama::field_view::FieldView struct is its
  Text-leaf reading (widen + rename struct to FieldRow, not a collision)
- ProjectionRenderer = the ruled DocRenderer trait widened
- named multi-view = mask-per-mode; registry key ClassId -> (ClassId, mode)
- RBAC by projection = the shipped classview_mask & role_mask (#205)
- crate placement bound by the A1 "one ogar-doc crate" ruling -> module,
  not a sibling ogar-doc-compose
- first-slice landing zone grounded to exact files in openproject-nexgen-rs

Part B [S] — the STL/mesh/surfel/ogar-bim chunk is a rediscovery of the
"address is geometry" arc (HhtlMode::Located CODED, helix crate, jc,
D-FMA-SKELETON, D-BOUNDS, 3DGS-* plans). Reuse-map that defers the build:
ride the shipped Located/helix/splat carriers, never fork them; the one
genuinely-new sliver is an STL-ingest producer, probe-gated. Council-
pending, NOT adopted: no mint, no crate, no code.

Ledger: grounding line appended to D-DOCIR-COMPOSITION; new [S] entry
D-STL-GEOMETRY-REDISCOVERY. Docs-only.

Generated with Claude Code
@cursor

cursor Bot commented Jul 20, 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_6fa0b3b7-ddcb-4ef5-a660-aa996da7934b)

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review July 20, 2026 19:39
Per the DocIr composition grounding (#217/#218) + operator ruling A1
("one ogar-doc crate; split axis is STATE not direction"): DocIr here is
the observation retina; the composition DocNode is a MODULE in this crate
family (never a sibling ogar-doc-compose) that references this observation
IR through an ObjectSlot (the A3 Klickwege ClassView x WideFieldMask brick
+ ObjectRef + ResolutionMode). Observation IR untouched — referenced,
never retyped in place. Doc-comment only.

Generated with Claude Code

@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: ec4401d496

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

Comment thread docs/DOCIR-COMPOSITION-GROUNDING.md Outdated
Codex correctly flagged an overclaim: the grounding marked "RBAC by
projection" as already shipped. Verified — no impl ClassRbac /
effective_mask exists under OGAR crates/; ClassRbac is spec-only
(CLASSID-RBAC-KEYSTONE-SPEC.md) and enforcement is probe-gated
(PROBE-OGAR-RBAC-AUTHORIZE, ISS-RBAC-AUTHORIZE-BY-CLASSID). Only the
transport half is coded (ogar-a2ui-frame wide masks;
projection-before-framing in a2ui-server render_stream).

Fix:
- Part A A1 table: RBAC row regraded "Transport CODED; enforcement spec +
  probe-gated — NOT shipped"
- A4 slice: explicit fail-closed guard — the slice MUST apply
  resolved_mask = requested ∧ role server-side and refuse on a
  missing/narrow role mask (full_for is never an RBAC fallback, #205);
  it carries the intersection itself, does not assume the upstream primitive
- appendix + D-DOCIR-COMPOSITION ledger line softened to "ruled ... transport
  coded, enforcement probe-gated, NOT shipped"

Prevents the first slice from skipping the server-side intersection and
rendering unauthorized fields when a caller supplies an unfiltered mask.

Generated with Claude Code
@AdaWorldAPI
AdaWorldAPI merged commit 91e2cb8 into main Jul 20, 2026
1 check passed
AdaWorldAPI pushed a commit that referenced this pull request Jul 20, 2026
…ionMode/ogar:// (W1, canon-free)

The first compilable brick of the DocIr composition layer (#217 doctrine,
#218 grounding), placed per operator ruling A1 ("one ogar-doc crate; split
axis is STATE not direction"): a `compose` MODULE beside the observation
IR, never a sibling crate. The observation IR is untouched.

- Closed 5-kind `DocNode` vocabulary — Document/Section/Paragraph/Text/
  ObjectSlot, exactly the doctrine §7 slice scope; Figure/Table/PageBreak
  are a `doc-compose.v2` bump, never a silent widening. Exhaustive enums
  (renderer gets a compile error on an unhandled kind). NO domain
  variants — a Wall/WorkPackage enters only through a slot (§3).
- `ObjectSlot{target, class_view (named view), field_mask: u64,
  wide_mask_words: Vec<u64>, resolution, fallback}` — the A3 brick
  (ClassView x WideFieldMask) made addressable. Masks travel in wire form
  (word w bit b => position w*64+b, positions >= 64 native — the
  ogar-a2ui-frame precedent), typed at the contract membrane; the module
  stays serde-only, zero canon dependency (lands ahead of mints, like the
  observation IR did).
- `ResolutionMode{Live, Revision(u64), Snapshot([u8;32])}` + strict
  `ogar://app/class/id@{live|revision:N|sha256:hex64}` parse/format —
  every malformed input is a refusal; a missing resolution suffix has NO
  default.
- Load gate + structural validation: version marker `doc-compose.v1`,
  closed-vocab serde rejection, out-of-range id refusal, cycle refusal
  (iterative DFS, no recursion).
- RBAC posture pinned per grounding SA4: slot masks are a REQUEST; the
  fail-closed `requested & role` intersection is the resolver's job
  (ClassRbac enforcement is probe-gated, never assumed).

9 new tests incl. the doctrine-§7 proof shape (WorkPackage.description
composing Text + User/WorkPackage/Attachment slots), all three ogar://
arms round-tripping, seven URI refusals, wide-position and snapshot-
fallback serde round-trips. 16/16 crate tests green; clippy/fmt clean.

Deferred, named: DocOp (§4 editor authority — next brick); the FieldView
enum widening + (ClassId, mode) named-view registry (ogar-render-askama /
ogar-class-view side); ogar-render-typst.

Ledger: W1 status appended to D-DOCIR-COMPOSITION (same commit, board
hygiene).

Generated with Claude Code
AdaWorldAPI pushed a commit that referenced this pull request Jul 20, 2026
…chitecture-jjzlig"

This reverts commit 91e2cb8, reversing
changes made to 6149a84.
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