Skip to content

Commit 3c25c2a

Browse files
committed
feat(ogar-doc-ir): the composition brick — DocNode/ObjectSlot/ResolutionMode/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
1 parent 91e2cb8 commit 3c25c2a

3 files changed

Lines changed: 601 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)