Skip to content

test: fix stale query_units call-log naming assertions - #3352

Merged
Sinity merged 1 commit into
masterfrom
test/fix-query-units-callog-naming-0twa
Jul 27, 2026
Merged

Sinity merged 1 commit into
masterfrom
test/fix-query-units-callog-naming-0twa

Conversation

@Sinity

@Sinity Sinity commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes two tests in tests/unit/archive/query/test_execution_control.py that asserted a stale operation name in the execution-control call log.

Problem

test_api_query_units_routes_through_execution_control and test_api_multi_aggregate_receipt_reports_real_work_selection_and_delivery assert the execution-control call log / owner_ref records the operation as "api.query_units". Current production code (query_units_transaction_request in polylogue/archive/query/transaction.py) sets operation="query_units" — no api. prefix.

Investigation (see polylogue-0twa): the constructor's docstring states it is "the single constructor shared by the API, MCP, and daemon HTTP adapters so the three surfaces cannot drift into building the request differently" (introduced in #3068, feat(query): bind query_units continuations to the archive epoch). An api.-prefixed name would be incorrect given the name is intentionally shared across non-API surfaces too. This is a stale test assertion, not a production regression.

Solution

Updated both assertions from "api.query_units" to "query_units". No production code changed.

Verification

  • devtools test tests/unit/archive/query/test_execution_control.py -> 23 passed
  • mypy --strict tests/unit/archive/query/test_execution_control.py -> Success
  • ruff check / ruff format --check on the changed file -> clean
  • Pre-push quick verification baseline (format/lint/mypy/render-all/layering/etc.) -> all ok

Ref polylogue-0twa

🤖 Generated with Claude Code

Problem: test_api_query_units_routes_through_execution_control and
test_api_multi_aggregate_receipt_reports_real_work_selection_and_delivery
asserted the execution-control call log/owner_ref recorded the operation
as "api.query_units", but production has used plain "query_units" since
query_units_transaction_request() (polylogue/archive/query/transaction.py)
became the single canonical constructor shared by the API, MCP, and
daemon HTTP adapters (introduced in #3068) — an "api." prefix would be
wrong for that shared naming since the same operation string is used by
non-API surfaces too.

What changed: updated both assertions to expect "query_units" instead of
"api.query_units", matching current, intentional production behavior. No
production code changed.

Verification:
- devtools test tests/unit/archive/query/test_execution_control.py -> 23 passed
- mypy --strict tests/unit/archive/query/test_execution_control.py -> Success
- ruff check / ruff format --check tests/unit/archive/query/test_execution_control.py -> clean

Ref polylogue-0twa

Co-Authored-By: Claude <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Sinity, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 464fbcf3-ce82-4969-a35c-60e3fa34f5e4

📥 Commits

Reviewing files that changed from the base of the PR and between 510c533 and f5fb828.

📒 Files selected for processing (1)
  • tests/unit/archive/query/test_execution_control.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/fix-query-units-callog-naming-0twa

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Sinity
Sinity merged commit efe9b03 into master Jul 27, 2026
3 checks passed
@Sinity
Sinity deleted the test/fix-query-units-callog-naming-0twa branch July 27, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant