Repository navigation
test(lineage): realign three tests with the #5525 and #5530 contracts - #5809
Merged
Merged
Conversation
Three lineage-normalization tests encoded contracts that later PRs changed deliberately: - #5530 stores an unreported usage lane as NULL, not 0, so the total_tokens-only event keeps NULL input/cached/output totals. - #5530 treats an explicit zero cumulative as a measurement that supersedes an earlier positive one, so the measured-zero tick now precedes the child's latest cumulative; the rollup stays 130/25/30. - #5525 makes a session with pending profile demand stale, so the fresh profile seed consumes the demand as publication does. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Sinity
enabled auto-merge (squash)
September 29, 2026 08:21
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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
Realigns three tests in
tests/unit/storage/test_lineage_normalization.pythat fail on master (polylogue-ezvw3). Each one encodes a contract that a named PR changed deliberately. No production code changes.Problem
At master 1beb2e5 (AgentCTL job 2441), these fail:
test_prefix_sharing_child_provider_usage_keeps_its_own_reported_totals(line 352). The child'stotal_tokens-only event (272 000) stores NULL input, cached and output totals, but the test expects 0. feat: stabilize source replay and add OTel GenAI import #5530 (904b2f8) replaced_payload_intwith_payload_optional_intin_provider_usage_event_row, so an unreported lane now stays NULL.test_child_before_parent_reextracts_provider_usage_tail(line 1730). The child rollup reads 0 instead of 130. The test put an all-zero cumulative tick after the child's 160/30/25 cumulative. feat: stabilize source replay and add OTel GenAI import #5530 also changed_provider_usage_row_has_lane_totalsfrom "any non-zero" to "any present", and addedtest_explicit_zero_cumulative_supersedes_prior_positive. An explicit zero cumulative is now a measurement, and the latest one wins.test_late_parent_resolution_invalidates_child_derived_products(line 873). The child is non-valid right after the test seeds a fresh profile. fix(storage): Publish profiles from captured input demand #5525 (ca25740) added trigger-capturedsession_profile_demand, and_classify_partition_with_demandreports a demanded session as stale until publication consumes the demand. The test's seed never consumed it.None of the suspects named on the bead (#5803, #5792, #5764, #5691) is the cause. #5803's PR body already lists these three as pre-existing failures.
Solution
total_tokens-only row now expects NULL input, cached and output totals. The docstring cites feat: stabilize source replay and add OTel GenAI import #5530. The rollup assertion (130/25/30) is unchanged, which proves the NULL row does not displace the latest lane totals.cyrows, including the tick'srequest_id, in their new order. A stale comment about the evidence predicate is corrected._seed_fresh_session_productsdeletes the session'ssession_profile_demandrow, aspublish_prepared_session_insight_partitiondoes. The docstring now says the retained-row assertion carries the anti-vacuity, because re-captured demand alone would also mark the child stale.Schema classification: none. No production file changes, so nothing enters the derived-identity closure.
Verification
agentctl job start polylogue pytest_focused --workspace /realm/worktrees/polylogue-mh-lineage -- tests/unit/storage/test_lineage_normalization.py→ job 2573:devtools test: PASSED exit=0(105 passedof 105, head 2d1d0a4).agentctl job start polylogue verify_quick --workspace /realm/worktrees/polylogue-mh-lineage→ job 2584:verify: PASSED exit=0(head 2d1d0a4).Self-review
c1row, dropped acyrow, or rebased the child against the parent. Test 2's NULL expectation fails if absent lanes are coerced to 0 again. Test 3's retained-row assertion fails if_reextract_prefix_tail_dbstops deleting profiles._seed_fresh_session_productshas one caller. No other test in this file seeds profiles or reads partition status.Residuals
polylogue-ezvw3
🤖 Generated with Claude Code
https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg