Skip to content

Review F4b SectionPassage public schema and 0.4.0 authority transition #1337

Description

@pzfreo

Review request

b123d-recognisers F4b is ready to implement its first public emitter of the planar-section schema
accepted in #1302. Package issue #184 deliberately makes a new Draftwright review a hard gate before
any production/schema code or holdout allocation is written.

Authoritative package artifacts:

This request covers the new enclosing public records, aggregate transition, compatibility break,
and 0.4.0 consumer choreography
. The #1302 ACCEPT covered the private nested geometry value; it did
not approve a named emitted record or the authority transition below.

Proposed public schema

All five values are frozen, ordered public Record dataclasses owned by family passages:

@dataclass(frozen=True, order=True, slots=True)
class PassageFrame(Record):
    origin: tuple[float, float, float]
    run: tuple[float, float, float]
    u: tuple[float, float, float]
    v: tuple[float, float, float]

@dataclass(frozen=True, order=True, slots=True)
class PassageSectionVertex(Record):
    point: tuple[float, float]
    bulge: float

@dataclass(frozen=True, order=True, slots=True)
class PassageSection(Record):
    boundary: tuple[PassageSectionVertex, ...]

@dataclass(frozen=True, order=True, slots=True)
class PassageEnds(Record):
    low_capped: bool
    high_capped: bool

@dataclass(frozen=True, order=True, slots=True)
class SectionPassage(Record):
    frame: PassageFrame
    run_interval: tuple[float, float]
    section: PassageSection
    ends: PassageEnds

SectionPassage is the sole enclosing/output record. The other four are nested records and advance
in lockstep with its schema. Each has schema version 1; the existing passages family
introduced_in remains unchanged. The new public surface is documented/released in package 0.4.0;
manifest format remains version 1. SectionPassage.to_dict() and JSON reproduce the already
accepted nested F4a shape. No BodyRef, graph handle, kernel value, mutable mapping, or public
deserializer is introduced.

Public constructors validate the accepted serialized self-consistency contract: exact tuple/key
types and cardinality, finite non-boolean numerics, canonical right-handed rounded frame and gauge,
increasing interval, canonical simple positive line/arc boundary, centring/perpendicular bounds, and
PassageEnds(False, False). Only the private full-precision projection boundary proves the existing
<= 0.002 mm source-to-serialized displacement bound; a public reader does not claim access to an
unserialized source.

Singular authority and aggregate transition

The end state has one physical Passage authority:

  • recognise_section_passages(...) -> list[SectionPassage] is the only attributed/ledger API.
  • FamilyId.PASSAGES issues exactly one SectionPassage Candidate per physical occurrence.
  • RecognitionResult.section_passages is the physical result field and sole Passage census source.
  • Reconciliation decisions attach to rich Candidate identity. Principal line-only occurrences use
    an exact temporary legacy projection to retain existing Slot precedence; no oblique Slot policy is
    invented.
  • RecognitionResult.passages becomes an accepted-only, post-reconciliation compatibility
    projection. It issues no Candidate/evidence, is NotCounted, never reruns discovery, and contains
    only exactly representable principal line-polygons.
  • Both aggregate fields retain the existing prismatic applicability/projection gate.
  • Principal legacy values and accepted order remain byte-for-byte exact. Genuinely oblique
    occurrences appear only as SectionPassage. One occurrence never emits two physical Candidates.

Intentional pre-1.0 compatibility break

Writer-free recognise_passages(part, *, face_edges=None, ledger=None) retains its existing
principal-axis values, types, order and to_dict() output. Any non-None ClaimLedger or
EvidenceWriter fails before graph construction, discovery, validation, issuance or sink mutation:

PassageCompatibilityError(RuntimeError)

Exact message:

recognise_passages(..., ledger=...) is unavailable from 0.4.0; use recognise_section_passages(..., ledger=...)

The keyword remains temporarily as a fail-loud sentinel and is documented for removal at 1.0. It
cannot truthfully retain the old candidate.record is returned Passage guarantee once
SectionPassage is the singular physical Candidate, and the package will not create an alias or a
parallel evidence authority to simulate it.

Requested Draftwright decision

Please return ACCEPT or REVISE, with concrete findings, on:

  1. Whether the five named schemas and enclosing version ownership are sufficient for a kernel-free
    consumer and preserve the accepted Review proposed planar-section schema v1 from b123d-recognisers #179 #1302 decoding contract.
  2. Whether RecognitionResult.section_passages plus accepted-only legacy .passages is a safe,
    fail-loud transition for Draftwright's exact-pinned consumer.
  3. Whether retiring the legacy ledger= identity contract via the named 0.4.0 error is explicit and
    safe, without creating a second Candidate authority.
  4. What Draftwright capability declaration state should accompany the new schema before adoption:
    supported, deferred with a tracking issue, geometry-only, or another evidenced closed state.
  5. Whether Draftwright's supported package range/pin choreography can remain on its current exact
    release while package 0.4.0 is implemented and released, then move only in a separate consumer
    PR against the immutable stable artifact.
  6. Any required migration-guide, unknown-schema/version refusal, IR/DSL/drawing/completeness
    declaration, or independent consumer fixture missing from the frozen package contract.

Acceptance of this issue authorizes only the package design gate. It does not authorize a
Draftwright dependency change, lockfile movement, adapter implementation, release, or production
enablement. Those remain separate consumer-owned work after a stable package artifact exists.

Acceptance checklist

  • Exact five-record schema and nested lockstep reviewed.
  • Singular rich Candidate/result/census authority reviewed.
  • Accepted-only legacy aggregate projection reviewed.
  • Legacy ledger= fail-loud 0.4.0 transition reviewed.
  • Unknown schema/version behavior and consumer declaration state decided.
  • Stable-pin/package-range choreography decided without moving the current pin.
  • Independent Draftwright reviewer records ACCEPT or actionable REVISE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:recognitionFeature recognition and geometry detectiondesignArchitecture or API design workenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions