Repository navigation
fix(daemon): answer an escaped route exception instead of dropping it - #5721
Conversation
The GET/POST/DELETE boundaries caught only client disconnects, so any other exception from an undecorated route reached socketserver, which printed a traceback and closed the socket with no status. The request boundary now applies the same typed mapping as daemon_safe_handler; an unexpected error answers 500 with outcome=error, and a failure after the status line was written closes the connection instead of sending a second status. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
|
You have reached your Codex usage limits for security reviews. Please try again later. |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2bd4d934d
ℹ️ 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".
… of socketserver QueryErrorPayload declares an optional OutcomeEnvelope, and the boundary's 500 answer carries outcome state=error through it, so clients validating the shared error model decode it. A disconnect raised while the boundary writes its answer is logged as client_disconnected instead of escaping. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a6c35ea53
ℹ️ 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".
Ordinary errors keep the four-field QueryErrorPayload envelope; only the request boundary's unexpected 500 uses QueryFailurePayload with a required outcome. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dcee83963d
ℹ️ 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".
…lability typed Every OpenAPI operation declares the request boundary's 500 QueryFailurePayload. An escaped QueryArchiveEpochUnreadableError answers 503 with its own code, as the query-unit route does. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27c3757c54
ℹ️ 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".
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg # Conflicts: # tests/unit/sources/test_live_batch_support.py
…ter merge Master commits #5721/#5729 (already merged, unrelated to this batch) shifted two sqlite-degradation anchor digests in polylogue/sources/live/batch.py and polylogue/sources/live/production_baseline.py. Pruned the one stale anchor and declared the two new ones via `devtools.verify_layering --prune-baselines` plus a direct baseline edit, matching the same reconciliation already done for the first master merge in 39f6f02. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Summary
The daemon HTTP request boundary now answers any exception that escapes a route, using the same typed mapping
daemon_safe_handlerapplies. Bead: polylogue-4riby.Problem
do_GET/do_POST/do_DELETEcaught only client disconnects. An undecorated route that raised (reproduced:GET /pagainst an archive withindex.dbbut nouser.dbraisesQueryArchiveEpochUnreadableError) reached socketserver, which printed "Exception occurred during processing of request" and closed the socket. The client sawRemoteDisconnectedwith no status and no outcome envelope.Solution
_answer_route_exceptionholds the exception-to-answer mapping (PolylogueError status, SQLite busy 503, timeout, backpressure, indeterminate mutation, cancellation, client disconnect).daemon_safe_handlerand the three method boundaries both call it.internal_errorwithoutcome: errorand is logged once asdaemon.http.route_failed.send_response_only, codes >= 200). A failure after that point is logged and the connection is closed, so no second status line is appended to a partly written response.sqlite3.OperationalErrorhandler is gone.Verification
nix develop --command devtools test tests/unit/daemon/test_http_request_boundary.py tests/unit/daemon/test_daemon_http.py→14 passednix develop --command devtools verify --quick→verify: PASSED exit=0except Exceptionboundary,getresponse()raisesRemoteDisconnected. Without the_response_startedcheck, the raw socket carries two status lines.Residuals
The fix was salvaged from an unmerged model-comparison attempt (
mx/opus-4riby) and rebased onto the current master unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg