ogar-vocab: add ResidualRepresentation — the general loose-ends-as-DTO#226
Merged
Merged
Conversation
`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)
Bugbot couldn't run - usage limit reachedBugbot 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
marked this pull request as ready for review
July 22, 2026 11:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ogar-vocab: addResidualRepresentation— the general loose-ends-as-DTOcapability_registry::UnmintedRowis the capability-minting-specific slagrow (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 confidentlyresolve (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 }— thefour 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 ingeneral form (
concept→surface,object_class→storage,capability→handler).The bridge shows the two slag types are one doctrine family, not two ideas.
against (matching
UnmintedRow); serde is feature-gated (serde::Serializeunder
feature = "serde"), nothing serializes to leave a boundary.First consumer
medcare-analytics's schema-vs-recipe coverage sweep currently carries a localResidualColumnwith the identical four fields (263 residuals emitted acrossthe
pf_*corpus in the just-merged MedCare #237). It will re-export this as thecanonical 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-vocab5/5 (2 new residual tests:newbuilds the four fields, and theUnmintedRow → ResidualRepresentationbridge)cargo build -p ogar-vocab --features serdecleancargo fmt+cargo clippy --features serde -- -D warningsclean🤖 Generated with Claude Code