Skip to content

feat(ogar-doc-ir): the composition brick — DocNode/ObjectSlot/ResolutionMode/ogar:// (W1, canon-free)#219

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

feat(ogar-doc-ir): the composition brick — DocNode/ObjectSlot/ResolutionMode/ogar:// (W1, canon-free)#219
AdaWorldAPI merged 1 commit into
mainfrom
claude/ogar-docir-architecture-jjzlig

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

The first compilable brick of the DocIr composition layer (#217 doctrine, #218 grounding) — the half of the original ask (#4/#7: the slice itself) that the merged grounding left outstanding. Placed per operator ruling A1 ("one ogar-doc crate; split axis is STATE not direction"): a compose module in ogar-doc-ir beside the observation IR — never a sibling crate. The observation IR is untouched.

The brick

  • Closed 5-kind DocNode vocabularyDocument / 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 (a 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 × 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, exactly 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 validationDOC_COMPOSE_VERSION = "doc-compose.v1" marker, closed-vocab serde rejection, out-of-range-id refusal, cycle refusal (iterative DFS).
  • RBAC posture pinned per grounding §A4 — slot masks are a request; the fail-closed requested ∧ role intersection is the resolver's job (ClassRbac enforcement is probe-gated, never assumed).

Verification

cargo test -p ogar-doc-ir16/16 green (7 observation + 9 new: the doctrine-§7 proof shape — a WorkPackage.description composing Text + User/WorkPackage/Attachment slots; all three ogar:// arms round-tripping; seven URI refusals; wide-position + snapshot-fallback serde round-trips). cargo clippy -p ogar-doc-ir --all-targets and cargo fmt --check clean.

Deferred (named, not hidden)

DocOp (§4 editor authority — the 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 in the same commit (board hygiene).

Generated with Claude Code


Generated by Claude Code

…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
@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_c4db0c93-9c4f-41cc-848b-8fbc54a98506)

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review July 20, 2026 21:11
@AdaWorldAPI
AdaWorldAPI merged commit 2255643 into main Jul 20, 2026
2 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Jul 20, 2026
…chitecture-jjzlig"

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