Repository navigation
release(uncertainty): publish coordinate-bound diagonal Laplace quantities #662
Description
Finding
Draft #639 currently records only posterior_approximation = diagonal_laplace in tepp.trsl_topic_lineage.v2. The numerical owner already retains ReferenceTopicModel::document_coordinate_variances, but the digest-bound release artifact discards those quantities. A downstream scientific consumer can therefore learn which approximation family was used without reconstructing or checking any actual uncertainty quantity.
That is insufficient for #638: a label is a claim boundary, not posterior evidence. At the same time, copying the variance matrix into the artifact without document/ALR coordinates would be equally unsafe because rows/columns could be rebound or reordered without an interpretable owner coordinate.
Required contract / RED
On the Analysis/topic-lineage owner path, define the smallest versioned uncertainty projection that binds each retained diagonal-Laplace quantity to its exact model coordinates. The source RED must prove at least:
- every modeled document has exactly one uncertainty row;
- each row is bound to the canonical opaque document UUID and exactly
topic_count - 1ALR coordinates; - coordinate
jis explicitly defined as numerator topic indexjagainst the reference topic indextopic_count - 1, or an equivalently explicit owner-defined basis; - rows have one canonical order independent of caller input order;
- every variance is finite and strictly positive; malformed, negative, zero, non-finite, wrong-length, duplicate-document, reordered/noncanonical, or detached-coordinate payloads fail closed;
- artifact serialization/digest covers the uncertainty projection so changing a variance or its coordinate changes result identity;
- no independent plausible-value semantics, joint covariance, interval coverage, or stronger posterior claim is inferred from diagonal quantities.
A positive fixture must use quantities emitted by an actual converged reference fit, not arbitrary caller-authored values. A mismatch fixture must show that uncertainty rows from fit B cannot be rebound to otherwise-matching artifact A.
Minimal owner direction
Keep numerical curvature/variance arithmetic in topic_measurement. Analysis may add only the read-only coordinate access needed to project the already-computed fit output and must not recalculate Laplace curvature. Prefer a dedicated uncertainty row/value object inside the unreleased v2 artifact over parallel detached arrays.
Canonical ordering must be owner-defined before hashing; do not silently normalize an already serialized consumer payload. Keep JointGaussNewtonLaplace and plausible-value generation out of this slice unless their full coordinate precision and recovery evidence are actually retained.
Dependency boundary
This issue does not replace #658 Evidence provenance or #605 Membership reconstruction. If the final released uncertainty coordinate needs provenance/membership identities from those owners, keep the dependent projection Draft and bind them only after normal protected-main landing; do not copy mutable owner source.
Acceptance
- causal source RED → minimal Rust projection fix → exact-head GREEN;
- public rustdoc/CHANGELOG/release-contract doctoring and docs(ddd): restore queue authority and bounded-context ownership #435 TRACEABILITY handoff;
- owned line/branch/edge coverage remains 100% with no skip/xfail or denominator tricks;
- scientific recovery later demonstrates calibration/coverage for the released uncertainty quantities before any interval-quality buyer claim;
- release(contract): publish immutable temporal-analysis contract for Orgmetra consumers #638 remains open through immutable release, compatibility/rollback and qualifying independent review.
Activity
test(release): require coordinate-bound topic uncertainty (#662)
test(release): make uncertainty RED runtime-causal (#662)
seonghobae commentedon Sep 22, 2026
Source RED is now on #639 ordinary-forward history. Initial commit
fb8e817e009ae3bbd1aae68acc831d517736f0b5exposed the missing public field at compile time; follow-upfd6e2f475c2b07dec2674eb91bd69e2fd33616fbremoves that confound and leaves a runtime-causal RED: an otherwise-valid v2 artifact carryingdiagonal_laplace_uncertaintyis rejected solely because the current owner schema does not admit coordinate-bound quantities.The same contract file already fixes the intended fail-closed surface for empty/missing rows, duplicate documents, noncanonical document order, detached document UUIDs, wrong ALR numerator/reference coordinate, zero/negative variance, and digest sensitivity. Those negative cases are not claimed as predecessor REDs by themselves because the unknown-field rejection currently masks them; the positive case is the causal RED.
Minimal production direction remains unchanged: expose only read-only modeled document identities from
ReferenceTopicInput, zip those owner identities withReferenceTopicModel::document_coordinate_variances, canonical-sort by UUID before serialization, validate exactlyevidence_countrows andtopic_count - 1coordinates per row, and bind each coordinate to numeratorj/ referencetopic_count - 1. Do not callbuild_joint_coordinate_precisionmerely to recover document IDs; that would recompute stronger curvature in the Analysis projection and violate this issue's owner boundary. A GREEN claim still requires a converged-fit producer fixture and a terminal-result digest mismatch fixture for fit-A/artifact-B uncertainty rebinding.feat(topic-measurement): expose modeled document coordinates (#662)
feat(release): project coordinate-bound Laplace uncertainty (#662)
test(release): bind cutoff fixture uncertainty (#662)
test(release): bind canonical-json fixture uncertainty (#662)
test(release): bind objective fixture uncertainty (#662)
test(release): bind seed fixture uncertainty (#662)
test(release): bind zero-ablation fixture uncertainty (#662)
test(release): bind zero-seed fixture uncertainty (#662)
test(release): bind document-id fixture uncertainty (#662)
test(release): bind edge-order fixture uncertainty (#662)
test(release): bind configuration fixture uncertainty (#662)
test(release): bind uncertainty-label fixture quantities (#662)
test(release): prove fit-bound uncertainty projection (#662)
test(release): verify coordinate-bound uncertainty GREEN (#662)
docs(changelog): record fit-bound Laplace projection (#662)
docs(release): bind diagonal Laplace quantity contract (#662)
seonghobae commentedon Sep 22, 2026
#662 implementation is now ordinary-forward on #639.
Exact lineage in this slice:
fd6e2f475c2b07dec2674eb91bd69e2fd33616fbe0a295cc14bf2c8cdcca7d561b7eb6f398990d65159d5c5472c6e1f6b56886a5ff3989678d9d77e2a3dd7727f9dcc74c2184737b356a97081d375155388037ffceb6c08af39228d2e67b1078855ab34cada916717265d9d486d67e0d6f4c845c4ade1cafce919d0c1c4c25b4fa9e30b1ddc43dfed6244e94The implementation projects
ReferenceTopicModel::document_coordinate_variancesdirectly; Analysis does not recompute curvature or call the joint-precision path. Each row is bound to a canonical modeled document UUID and exactlyK-1ALR coordinates with numeratorjand reference topicK-1, sorted canonically. Missing/duplicate/reordered rows, wrong basis, non-finite/non-positive variance, and edge-detached document support fail closed. The projection is inside canonical artifact bytes before SHA-256, so replacing fit-A uncertainty with fit-B uncertainty cannot preserve fit-A terminal-result identity.Boundary remains explicit: this is diagonal-Laplace marginal curvature only. It does not create joint covariance, independent plausible-value, interval coverage/calibration, or source-snapshot provenance authority. #658/Evidence remains the owner path for immutable source-population provenance.
Current exact-head hosted checks are non-terminal, so I am not claiming hosted GREEN yet. #662 should stay open until the exact head completes the required test/security/documentation generation and any failure is RCA'd rather than bypassed.
seonghobae commentedon Sep 22, 2026
Current source implementation is now complete ordinary-forward through
ce919d0c1c4c25b4fa9e30b1ddc43dfed6244e94; #639 body has been currentized from the stale RED head. Fresh compare against protectedmain@a243f18da4a4ca8a8d068c39922537f1f8ed6ad0is ahead 97 / behind 0 with protected main as merge base. Exact-head Rust Foundation35680791247, Security35680791181, Semgrep35680791231, CodeQL PR35680791209, and Documentation35680791290remain non-terminal, and there is still no submitted review or inline review thread, so this issue remains open and no hosted GREEN/merge/release claim is made.Post-#662 review identified the next separate release-coordinate gap as #663: the newly retained ALR uncertainty quantities are bound to document UUID + integer ALR positions, but those positions are not yet bound to the fitted topic basis itself. #663 is not folded into this issue; the #662 diagonal-Laplace projection remains the correct owner-safe quantity boundary.
seonghobae commentedon Sep 22, 2026
#669 found a source-level arithmetic inconsistency underneath this already-published Draft projection. The retained
document_coordinate_varianceswere usingdegree * relation_strength, while the owner joint-GGN path uses softmax-JacobianJ'Jrelation curvature. #639 now carries real-fit RED16e1a637...→ shared-curvature repair0620a9bb...→ formatting14fba5c4...→ CHANGELOGba63e287....This strengthens #662 rather than expanding its claim: the projected variance is now intended to be the reciprocal of the same fit's exact owner GGN precision diagonal. It is still not a marginal variance from the inverse joint precision, plausible values, or calibrated interval evidence. Keep #662/release acceptance open through exact-head GREEN, calibration/recovery, backend parity, provenance/topic-basis binding, and immutable release.