Skip to content

test: Patch the row renderer where it now lives - #5179

Merged
Sinity merged 1 commit into
masterfrom
fix/cli-render-seam-stale-refs-v2
Sep 15, 2026
Merged

Sinity merged 1 commit into
masterfrom
fix/cli-render-seam-stale-refs-v2

Conversation

@Sinity

@Sinity Sinity commented Sep 15, 2026

Copy link
Copy Markdown
Owner

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: f7964acd12b25134c0e2e4cd8f73f9e6557a4a4f — the tip of branch rebase-5165, not master and not an ancestor of it — and final_git_head: 724d17535. 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.ai/code/session_01DYUNBGoE652b3nfmq3CtqK

#5156 moved the CLI row renderers into `cli/render/rows.py` and made them
public. This file's imports were retargeted then; the `patch()` dotted string
was not, and a patch target is a string, so nothing failed at collection --
the three pagination tests errored inside the context manager instead, before
reaching any assertion.

#5173 fixed the other half of the same rename (the binding registry's
references to the deleted private names). This is the last reference to
`archive_query._emit_rows` in the tree.

The three tests keep the anti-vacuity 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 before, which is what this restores.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK
@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, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 5f838700-4f65-41ca-908f-3be03ba62453

📥 Commits

Reviewing files that changed from the base of the PR and between 4105e36 and f3730a8.

📒 Files selected for processing (1)
  • tests/unit/cli/test_archive_query.py

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-15T01:57:48.498591Z f3730a8 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Sinity
Sinity merged commit c676444 into master Sep 15, 2026
3 checks passed
@Sinity
Sinity deleted the fix/cli-render-seam-stale-refs-v2 branch September 15, 2026 02:05
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