Skip to content

scientific(topic): retain fitted basis identity in document-coordinate summary #667

Description

@seonghobae

Finding

#664's FittedDocumentCoordinateSummary is now minted only from owner-issued ReferenceTopicFit, and construction validates the fitted topic basis. However, the summary discards that FittedTopicBasisIdentity after validation and exposes each ALR coordinate only as {numerator_topic_index, reference_topic_index, location, variance}.

That means the fit-local uncertainty/location view still requires a consumer to interpret bare topic indexes without the owner-derived fitted basis that gives those indexes numerical meaning. This is narrower than #663's release/source-vocabulary problem: the missing binding already exists inside topic_measurement and should be retained in the fit-local owner view before Analysis projection is attempted.

Required RED

Use an actual converged ReferenceTopicFit and require FittedDocumentCoordinateSummary::topic_basis_identity() to equal FittedTopicBasisIdentity::from_bound_fit(&fit). Verify that every coordinate index resolves into that retained basis and that the reference index resolves to the same fitted reference topic for every document row.

Hostile/malformed-state tests must continue to reject invalid basis rows, invalid ALR locations, dimension mismatches, and non-positive/non-finite variances.

Minimal repair

Store the validated FittedTopicBasisIdentity once at summary scope and expose it read-only. Keep per-coordinate storage normalized as local indexes + one immutable summary-level basis rather than copying SHA-256 strings into every document coordinate. No topic reordering or semantic naming.

Boundary

Keep #639 Draft. No Evidence/source claim, covariance transformation, LLM interpretation, force push, destructive rebase, self-approval, or gate weakening.

Refs #638 #639 #658 #663 #664 #665 #666 ADR 0012.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions