Repository navigation
fix: preserve unknown insight materializer provenance - #5993
Merged
Merged
Conversation
|
You have reached your Codex usage limits for security reviews. Please try again later. |
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.
Summary
Return unknown provenance when a public insight has no materialized session profile.
Problem
Original 42.F007 (polylogue-5gj19; #4649 (comment)) identified reads that stamped the current materializer version despite a missing profile. Available thread and latency rows consequently claimed a version without recorded evidence.
Solution
Make public materializer, inference, and enrichment versions nullable and advance the archive insight contract to 12. The shared missing-profile projection returns unknown; recorded versions remain unchanged. Profile reads retain their existing absence contract. Query-time projection versions remain independently meaningful. Update the generated rigor matrix and read-path documentation.
Verification
agentctl job start polylogue pytest_focused --workspace <isolated checkout> -- tests/unit/storage/test_insight_provenance.py tests/unit/insights/test_projection_contracts.py tests/unit/insights/test_rigor_audit.py tests/unit/insights/test_archive_rollups.py tests/unit/insights/test_session_analytics.py tests/unit/mcp/test_insight_projection_derivation.py— job 9109, 99/99 passed; receipt20261005T035808Z-focused-test-2135751-7acb504a.agentctl job start polylogue verify_quick --workspace <isolated checkout>— job 9110, all 12 gates passed; receipt20261005T035825Z-quick-2137920-6ece2de9. Scoped Ruff, diff whitespace check and schema closure inspection passed.Self-review
Reviewed the coherent DTO, canonical producer, public serialization, schema, registry, audit, render, export, and recorded-profile consumers. Nullable versions propagate through the shared inference/enrichment copies; stored record versions remain integers. Dynamic Pydantic schemas own these insight shapes; the generated CLI schema catalog does not contain these models. The existing rigor audit skips absent observed versions. Both changed production files are in the derived schema closure, so they must land before reconvergence; no archive operation was executed. Public-route controls distinguish recorded version 3 from absent evidence and retain available thread/latency rows and missing profile behavior.
Residuals
This change qualifies recorded version provenance, not whole-archive freshness. The original work-event insight was explicitly retired in dafcfc6; it is not resurrected. The broader polylogue-5gj19 group remains open, and the unrelated uncalled F022 predecessor is outside this delivery. Original failed test/static receipts are retained: 9106 (98/99, fixture alias corrected using canonical native_session_id) and 9107 (unused import and generated matrix drift corrected).