Repository navigation
test(daemon): cover provider usage periodic drain - #2797
Conversation
Problem: the provider-usage self-heal regression covered the selector and executor directly, but not the daemon entry point that invokes them. What changed: run the stale-rollup fixture through the bounded periodic session-insight drain against an isolated index tier, then assert the second pass is idle. Ref polylogue-f2qv. Co-Authored-By: Claude <[email protected]>
|
Warning Review limit reached
Next review available in: 49 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c07d83bc69
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Problem: the provider-usage drain fixture was selected through a missing profile, so it did not prove the provider-usage stale selector was necessary. What changed: seed a fresh session-insight bundle before downgrading only the provider-usage materialization stamp. Ref polylogue-f2qv. Co-Authored-By: Claude <[email protected]>
Problem: the drain regression proved rollup repair but not the operator-visible zero-token debt transition required by the usage-refresh acceptance criteria. What changed: use a Codex fixture, prove the seeded bundle is initially converged, and assert provider-usage debt appears after corruption then clears through the daemon drain. Ref polylogue-f2qv. Co-Authored-By: Claude <[email protected]>
Adversarial review — iteration 1Findings:
What survived scrutiny: the production drain, stale selector, insight rebuild, usage rollup, materialization stamp, and operator-visible debt surface are now exercised end-to-end against an isolated archive. Focused verification: |
Adversarial review — iteration 2No new legitimate findings. A cold review rechecked the full branch diff, f2qv/f2qv.5 design and notes, production stale-selection/rebuild/debt paths, PR claims, and current review discussion. The test’s fresh-bundle idle drain prevents missing-profile selection from masking provider-usage staleness; its Codex fixture proves the real archive-debt row appears and then clears through the bounded daemon drain. |
Final f2qv.5 acceptance-criteria matrixRef polylogue-f2qv.
No criterion is deferred or misframed. The operator live archive was intentionally not accessed; that is not required for this isolated convergence contract. |
…789,2792,2797 d3xj, w8et, w379 (cost-honesty, PR #2776), fs1.3 (hermes-wedge, PR #2789), and f2qv.5 (usage-convergence, PR #2797) fully satisfied — closed. cuxz (temporal-provenance, PR #2786), th0 (test-harness, PR #2777), and fs1.11/ fs1.12 (hermes-wedge cluster, PR #2792) partially satisfied — noted with disposition, left open per closure-discipline (no closing on partial ACs). Co-Authored-By: Claude <[email protected]>
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
Summary
Strengthen the provider-usage convergence regression by running its stale-rollup fixture through the daemon’s bounded periodic session-insight drain.
Problem
The usage-refresh mechanism was present, but its regression invoked the stale selector and executor directly. That did not prove the bounded daemon drain selected and refreshed stale provider-usage materialization.
Solution
Update
tests/unit/storage/test_session_insight_refresh.pyto use an isolated active archive root, establish a fresh insight bundle, corrupt a Codex provider-usage rollup, invoke_drain_session_insights_once(), and verify the repaired rollup, materialization stamp, and operator-visible debt transition.Acceptance criteria
Ref polylogue-f2qv.
session_model_usagewithout a manual index rebuild.Verification
POLYLOGUE_PYTEST_BASETEMP_ROOT=/realm/tmp/polylogue-pytest TMPDIR=/realm/tmp devtools test tests/unit/storage/test_session_insight_refresh.py -k stale_provider_usage_self_heals_via_session_insight_rebuild—1 passed.TMPDIR=/realm/tmp git push— required quick baseline passed all checks.Adversarial review notes
8b295bbc0), and archive-debt AC coverage was absent (8aaaffa55).