Repository navigation
feat: integrate archive contract patch wave - #2358
Conversation
Problem: the latest cloud patch batch covered adjacent Polylogue contract surfaces, but the raw patches overlapped in status routing, generated snapshots, read/action callback signatures, and generated docs.\n\nWhat changed: integrate the downloaded source patches for provider usage coverage, read-view HTTP capability metadata, root onboarding/status facets, demo/verifiability cleanup, and assertion review state. Re-render generated CLI/OpenAPI/devtools/product/docs/agents surfaces and repair the combined test drift around facade method classification and query-verb direct callback signatures.\n\nVerification: devtools test tests/unit/storage/test_provider_usage_report.py tests/unit/archive/test_view_profiles.py tests/unit/devtools/test_render_openapi.py tests/unit/daemon/test_web_reader.py tests/unit/cli/test_query_verbs_runtime.py tests/unit/cli/test_assertion_candidates.py tests/unit/storage/test_archive_tiers_assertions.py tests/unit/api/test_facade_contracts.py tests/unit/cli/test_demo_command.py tests/unit/devtools/test_render_devtools_reference.py tests/unit/devtools/test_lab_scenario.py tests/unit/devtools/test_devtools_main.py tests/unit/cli/test_dashboard_command.py tests/unit/cli/test_diagnose_and_error_discipline.py tests/unit/cli/test_help_contract.py tests/unit/cli/test_tutorial.py -> 664 passed after targeted repairs; devtools test tests/unit/api/test_facade_contracts.py tests/unit/cli/test_query_verbs_runtime.py -> 278 passed; devtools render all --check -> sync OK; devtools verify --quick -> exit_code 0; git diff --check -> clean.\n\nRef #2317. Ref #2316. Ref #2196. Ref #2177. Ref #1883.
|
Warning Review limit reached
More reviews will be available in 25 minutes and 10 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?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 credits. 🚦 How do rate 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 see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (69)
✨ 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: 84a8c048e0
ℹ️ 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".
| FROM session_provider_usage_events AS e | ||
| JOIN sessions AS s ON s.session_id = e.session_id | ||
| {_where_origin(origin, table_alias="s")} | ||
| {"AND" if origin is not None else "WHERE"} e.provider_event_type = 'token_count' |
There was a problem hiding this comment.
Include message_usage events in stale rollup checks
For Claude Code archives, provider usage evidence is stored as message_usage rows, but this query only derives expected rollups from token_count. When a Claude session's session_model_usage row is missing or stale, _stale_provider_rollup_stats() gets no expected row, so provider_usage_report can report exact_provider_telemetry with stale_rollup_session_count=0 even while provider request usage and model rollup usage disagree. Include message_usage last-token rows in this expected-rollup calculation so the audit surface flags stale Claude rollups.
Useful? React with 👍 / 👎.
Summary
Integrates the latest downloaded patch wave across provider usage coverage, read-view HTTP capability metadata, root onboarding/status facets, demo/verifiability cleanup, and assertion review state. The branch also resolves the integration drift that appeared only after combining the patches: facade method classification, query-verb callback signatures, generated docs/schemas, and stale snapshot whitespace.
Problem
The downloaded patches were source-useful but not directly mergeable as a batch. They overlapped in
statusrouting, generated snapshots, OpenAPI/docs output, and query verb tests. One patch also arrived with an exported/mnt/data/work/repoprefix, and another had stale generatedAGENTS.md/TESTING.mdcontext. Applying them independently would leave parallel truth in generated surfaces and failing tests.Solution
Applied all five patch inputs into a clean worktree, kept the coherent source changes, re-rendered generated surfaces, and repaired the combined test drift. Provider usage reporting is now exposed through the archive facade and diagnostics, read-view capability metadata drives OpenAPI generation, assertion review state gets typed payload/storage/API/CLI coverage, onboarding/status facets and demo/verifiability docs are refreshed, and the generated CLI/OpenAPI/devtools/product/agents surfaces are synchronized.
Ref #2317. Ref #2316. Ref #2196. Ref #2177. Ref #1883.
Verification
devtools test tests/unit/storage/test_provider_usage_report.py tests/unit/archive/test_view_profiles.py tests/unit/devtools/test_render_openapi.py tests/unit/daemon/test_web_reader.py tests/unit/cli/test_query_verbs_runtime.py tests/unit/cli/test_assertion_candidates.py tests/unit/storage/test_archive_tiers_assertions.py tests/unit/api/test_facade_contracts.py tests/unit/cli/test_demo_command.py tests/unit/devtools/test_render_devtools_reference.py tests/unit/devtools/test_lab_scenario.py tests/unit/devtools/test_devtools_main.py tests/unit/cli/test_dashboard_command.py tests/unit/cli/test_diagnose_and_error_discipline.py tests/unit/cli/test_help_contract.py tests/unit/cli/test_tutorial.pyinitially selected 670 tests; after repairing the combined drift, the previously failing slices passed.devtools test tests/unit/api/test_facade_contracts.py tests/unit/cli/test_query_verbs_runtime.py->278 passed.devtools render all --check-> sync OK.devtools verify --quick->exit_code 0.devtools verify --quick->exit_code 0for84a8c048e.git diff --check-> clean.