Repository navigation
test: Update daemon-client doubles to the post-#5043 contract - #5105
Conversation
PR #5043 (d995eb4) made auth_token a lazy callable in cli/operation_kernel.py:256 and added an explicit connection.connect() at daemon_client.py:175, so credentials are resolved only after the socket is reached. TimedOutConnection and InterruptedConnection defined connected but no connect, so both raised AttributeError instead of reaching the indeterminate path; give them connect(). The typed-indeterminate assertions are untouched. test_confirmed_delete_uses_an_unbounded_daemon_wait compared the kernel's kwargs to {'auth_token': None}, which is now a lambda. Assert instead that exactly one kwarg named auth_token is passed, that it is callable, and that calling it resolves to None -- strictly stronger than the old equality, and it pins the deferral #5043 introduced. 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. |
|
Warning Review limit reachedNext included review available in 7 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
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 |
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. |
Summary
Three CLI tests asserted the daemon client's pre-#5043 construction shape.
The test doubles are updated to the real connection contract and the
credential assertion is retargeted onto the laziness the PR introduced. The
typed-indeterminate mutation assertions are unchanged.
Which merged PR moved the ground
PR #5043 (
d995eb4e4, "Read verbs no longer take the exclusivemaintenance-writer lease") made two changes these tests depend on:
cli/operation_kernel.py:256now passesauth_tokenas a lazy callablerather than an already-resolved value, so an absent socket costs nothing --
least of all a write into the archive root.
daemon_client.py:175now callsconnection.connect()explicitly beforeresolving credentials.
TimedOutConnectionandInterruptedConnectiondefinedconnectedbut noconnect, so both raisedAttributeErrorinstead of reaching theindeterminate path;
test_confirmed_delete_uses_an_unbounded_daemon_waitcompared the captured kwargs to
{"auth_token": None}, which is now a lambda.Solution
connect()to both connection doubles. This restores the intendedroute: connect succeeds,
getresponseraisesTimeoutError/KeyboardInterrupt, and the client must still raiseDaemonMutationIndeterminateError. Those assertions are untouched -- aconnected daemon with no receipt is never interchangeable with no daemon.
test_confirmed_delete_uses_an_unbounded_daemon_wait, assert the kernelpasses exactly one kwarg named
auth_token, that it is callable, and thatcalling it resolves to the monkeypatched
None. This is strictly strongerthan the old equality: it pins both the argument set and the deferral.
Verification
Anti-vacuity
..._is_typed_indeterminate..._unbounded_daemon_waitcallablegoes False), or pass any extra kwarg (the key assertion goes red)Residuals
Test-only change. The doubles remain minimal stand-ins for
_UnixHTTPConnection; they do not track its full surface, only the calls_request_json_responsemakes.🤖 Generated with Claude Code
https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK