Skip to main content

Module grounding

Module grounding 

Source
Expand description

The GroundingSource trait module (PRD §5.5) — the sole boundary between ethos-verify and any parser, Ethos included.

Design rules (invariant 4):

  • This module depends on serde only — no canonical model, no backend types, no PDFium, nothing Ethos-parser-internal.
  • Foreign adapters (e.g. adapters/grounding/opendataloader-json) implement GroundingSource over foreign output; missing capabilities become explicit capability_limited downgrades in verification reports, never silent approximation.

Geometry here is integer quanta when the source declares a compatible coordinate system; foreign sources that cannot provide that declare it via Capabilities.

Structs§

Capabilities
Capability declaration (PRD §5.5). Capability-driven downgrades are explicit: whatever is false/Unknown here must surface as a capability_limited warning in verification reports that needed it.
GroundingCell
A table cell exposed for table_cell claims.
GroundingElement
An addressable element exposed for evidence checks.
GroundingSpan
Optional span with char offsets (capability spans / char_offsets).
GroundingTable
A table exposed for table_cell claims.
PageGeometry
Page geometry as declared by the grounding source.
ParserIdentity
Identity of the parser that produced the grounding data.

Enums§

CoordinateOrigin
Coordinate origin declared by the grounding source.

Traits§

GroundingSource
Parser output as evidence: everything ethos-verify is allowed to know about a document. Implementations must be deterministic — same underlying artifact, same returned data, same order.