Skip to content

ogar-vocab: add ResidualRepresentation — the general loose-ends-as-DTO#226

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/a2ui-screen-addressing-continue-azizft
Jul 22, 2026
Merged

ogar-vocab: add ResidualRepresentation — the general loose-ends-as-DTO#226
AdaWorldAPI merged 1 commit into
mainfrom
claude/a2ui-screen-addressing-continue-azizft

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

ogar-vocab: add ResidualRepresentation — the general loose-ends-as-DTO

capability_registry::UnmintedRow is the capability-minting-specific slag
row (a concept the codebook could not mint). This adds its general sibling —
the doctrine ResidualRepresentation { surface, storage, handler, unresolved_reason }: any surface a transcode/codegen pass could not confidently
resolve (a schema column no recipe binds, an unhandled read, an unmapped case),
captured as a typed DTO rather than silently dropped or degraded to an id-0
sentinel. "Study the slag, teach the furnace" — each recurring residual names the
next config fact.

What's added (crates/ogar-vocab/src/residual.rs)

  • ResidualRepresentation { surface, storage, handler, unresolved_reason } — the
    four fields answer WHERE / HOW-STORED / WHAT-HANDLES-IT / WHY-UNRESOLVED.
  • new(surface, storage, handler, unresolved_reason) convenience constructor.
  • impl From<UnmintedRow>: an unminted capability row is a residual in
    general form (concept→surface, object_class→storage, capability→handler).
    The bridge shows the two slag types are one doctrine family, not two ideas.
  • Contract-appropriate: a plain typed value both producer and consumer build
    against (matching UnmintedRow); serde is feature-gated (serde::Serialize
    under feature = "serde"), nothing serializes to leave a boundary.

First consumer

medcare-analytics's schema-vs-recipe coverage sweep currently carries a local
ResidualColumn with the identical four fields (263 residuals emitted across
the pf_* corpus in the just-merged MedCare #237). It will re-export this as the
canonical type — the promotion is a move, not a redesign. The MedCare
consumer refactor follows in a medcare-rs PR once this merges (the path dep
builds against OGAR main).

Verification

  • ogar-vocab 5/5 (2 new residual tests: new builds the four fields, and the
    UnmintedRow → ResidualRepresentation bridge)
  • cargo build -p ogar-vocab --features serde clean
  • cargo fmt + cargo clippy --features serde -- -D warnings clean

🤖 Generated with Claude Code

`capability_registry::UnmintedRow` is the capability-minting-specific
slag row (a concept the codebook could not mint). This adds its GENERAL
sibling: the doctrine `ResidualRepresentation { surface, storage,
handler, unresolved_reason }` — any surface a transcode/codegen pass
could not confidently resolve (a schema column no recipe binds, an
unhandled read, an unmapped case), captured as a typed DTO rather than
silently dropped or degraded to an id-0 sentinel.

- `new(surface, storage, handler, unresolved_reason)` convenience ctor.
- `From<UnmintedRow>`: an unminted capability row IS a residual in
  general form (concept→surface, object_class→storage,
  capability→handler) — the bridge showing the two slag types are one
  doctrine family, not two ideas.
- Contract-appropriate: a plain typed value both producer and consumer
  build against (matching UnmintedRow); serde is feature-gated, nothing
  serializes to leave a boundary.

First consumer: medcare-analytics's schema-vs-recipe coverage sweep,
which currently carries a local `ResidualColumn` with the identical four
fields; it will re-export this as the canonical type (consumer refactor
follows in a medcare-rs PR).

ogar-vocab 5/5 residual+registry tests; serde build clean; fmt + clippy
clean.

Generated by [Claude Code](https://claude.ai/code)
@cursor

cursor Bot commented Jul 22, 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_2e804d6b-0d59-437a-b8cc-1026c8fecf4e)

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review July 22, 2026 11:35
@AdaWorldAPI
AdaWorldAPI merged commit e1b911b into main Jul 22, 2026
2 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