Repository navigation
Conversation
#5156 moved the CLI row renderers out of `archive_query` into `cli/render/rows.py` and made them public, but two sites kept naming the deleted private symbols. `CLI_OPERATION_BINDINGS` still declared `polylogue.cli.archive_query:_emit_daemon_list_payload`, `:_emit_daemon_search_payload` and `:_emit_rows`. None resolve, so the `cli.query` and `query.units` declarations claimed a renderer that does not exist — the registry's whole purpose is to make exactly that visible, and its own test was reporting it. Name the canonical module rather than `archive_query`'s re-export, so the binding does not go stale again the next time the import list is tidied. The pagination test patched the same dotted string. Its imports were already retargeted to `render.rows`; only the `patch()` string, which is not checked at collection time, was missed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details🔇 Additional comments (2)
📝 WalkthroughWalkthroughThe CLI query bindings now resolve session list, session search, and row emitters from ChangesCLI renderer binding
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The CLI renderer relocation is wired consistently, with no identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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. A rabbit checks the rows in line Comment |
|
Already fixed on master by #5173, which points the same three bindings at Verified on current master (4105e36): every declared renderer reference resolves — Closing as redundant rather than merging a rename. If the binding-registry tests still fail after this, that is a separate cause worth its own diagnosis, since the references themselves are sound. |
## Summary Three pagination tests error before reaching any assertion because a `patch()` target still names a symbol #5156 deleted. Replaces #5174, which was closed after #5173 independently landed the product half of the same fix. ## Evidence Receipt `.cache/verify/runs/20260914T233651Z-all-207009-89ddea6b` (`verify_all`, job 1699, 22,540 selected, 29 failed). **Caveat on that receipt:** its `run.json` records `git_head: f7964ac` — the tip of branch `rebase-5165`, *not* `master` and not an ancestor of it — and `final_git_head: 724d175`. The shared checkout advanced across 7 merged PRs during the run, so it is not evidence of a frozen tree. I re-ran all 29 node ids at true `master` HEAD: 17 reproduce, 12 do not. These 3 are among the 17, and still reproduce at `4105e3698`. ## Per-failure classification | Failure | Classification | Cause | | --- | --- | --- | | `test_archive_query::TestDaemonSearchEnvelopeHonestPagination::test_clamped_page_reports_the_next_offset` | **stale test** | `patch("polylogue.cli.archive_query._emit_rows")` — #5156 moved it to `cli/render/rows.py` as public `emit_rows` | | `…::test_final_page_reports_no_next_offset` | **stale test** | same | | `…::test_limit_reports_what_the_daemon_applied` | **stale test** | same | ## Problem #5156 moved the CLI row renderers out of `archive_query` into `cli/render/rows.py` and made them public. This file's *imports* were retargeted at the time; the `patch()` dotted string was not. A patch target is a string, so nothing failed at collection — instead `mock` raised `AttributeError` inside the context manager, before any assertion ran. `emit_session_search_page` calls `emit_rows` from its own module namespace, so `polylogue.cli.render.rows.emit_rows` is the seam that actually intercepts it. #5173 fixed the other half of this same rename — `CLI_OPERATION_BINDINGS` still naming `archive_query:_emit_daemon_list_payload`, `:_emit_daemon_search_payload` and `:_emit_rows`, none of which resolved. I had that product fix in #5174; #5173 landed the identical change first (as `_RENDER_ROWS`), so #5174 was closed as conflicting and this PR carries only the remaining test half. After it, there is no reference to `archive_query._emit_rows` left in the tree. ## Solution One line: patch `polylogue.cli.render.rows.emit_rows`. ## Anti-vacuity The three tests keep the conditions stated in their own docstrings — hard-code `next_offset` to `None`, or echo the requested `limit` instead of the one the daemon applied, and they go red. They could not go red **for any reason** while the patch target was wrong, since they errored before the assertions. That is what this restores, and it is why the fix is worth making rather than deleting the tests: the behaviour they cover (a daemon-proxied clamped page must not present itself as complete) is not covered elsewhere — the golden-parity suite seeds a corpus smaller than its own `--limit` and never reaches a clamped page, as the class docstring notes. ## Verification ``` devtools test tests/unit/cli/test_archive_query.py tests/unit/operations/test_cli_operation_binding_registry.py devtools test: PASSED exit=0 diagnosis=pytest_passed receipt=.cache/verify/runs/20260915T015359Z-focused-test-338452-90aec230/run.json ``` The binding registry file is included to confirm #5173's half and this half agree at the current head. ## Schema closure `tests/unit/cli/test_archive_query.py` — **out** of the derived schema-identity closure. Test-only change; no product file touched. Does not need to land before an archive rebuild. ## Residuals None. This is the last stale reference to the pre-#5156 renderer names. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Summary
#5156 moved the CLI row renderers out of
archive_queryintocli/render/rows.pyand made them public. Two sites kept naming the deleted private symbols. This clears 5 of the failures onmaster.Evidence
Receipt
.cache/verify/runs/20260914T233651Z-all-207009-89ddea6b(verify_all, job 1699, 22,540 selected, 29 failed).Caveat on that receipt: its
run.jsonrecordsgit_head: f7964acd12b25134c0e2e4cd8f73f9e6557a4a4f— the tip of branchrebase-5165, which is notmasterand not an ancestor of it — andfinal_git_head: 724d17535. The shared checkout advanced across 7 merged PRs during the 100-minute run, so that receipt is not evidence of a frozen tree. I re-ran all 29 node ids at truemasterHEAD (724d175): 17 reproduce, 12 do not. The 5 in this PR are among the 17.Per-failure classification
test_cli_operation_binding_registry::test_each_binding_resolves_to_real_callables[cli.query]CLI_OPERATION_BINDINGSnamesarchive_query:_emit_daemon_list_payload/:_emit_daemon_search_payload; neither exists after #5156…[query.units]archive_query:_emit_rowstest_archive_query::TestDaemonSearchEnvelopeHonestPagination::test_clamped_page_reports_the_next_offsetpatch()dotted string stillpolylogue.cli.archive_query._emit_rows; #5156 retargeted the file's imports but a patch target is a string and is not checked at collection…::test_final_page_reports_no_next_offset…::test_limit_reports_what_the_daemon_appliedThe registry test is doing exactly the job it was added for: it reported a real, unresolvable declaration rather than drifting quietly. Not weakened.
Solution
polylogue/cli/operation_bindings.py: point thecli.queryandquery.unitsrenderers atpolylogue.cli.render.rows:emit_session_list_page,:emit_session_search_pageand:emit_rows. The canonical module is named rather thanarchive_query's re-export, so the binding does not go stale again when an import list is tidied.tests/unit/cli/test_archive_query.py: patchpolylogue.cli.render.rows.emit_rows, the module namespaceemit_session_search_pageactually calls through.Anti-vacuity. The registry test goes red on any binding reference that does not resolve — reverting either renderer name reproduces it exactly. The three pagination tests keep the conditions stated in their own docstrings: hard-code
next_offsettoNone, or echo the requestedlimitinstead of the daemon's, and they go red. With the patch target wrong they were erroring before reaching any assertion, so they were vacuous until now.Verification
Also resolved every entry in
CLI_OPERATION_BINDINGSdirectly: 0 unresolvable references (was 3).Schema closure
OUT of the derived schema-identity closure. The test file is not a closure input. This PR does not need to land before an archive rebuild.
Residuals
archive_querystill re-exports these renderers; the bindings no longer depend on that, but the re-export itself is untouched here.🤖 Generated with Claude Code
https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK
Summary by CodeRabbit