Repository navigation
Share frontend command exception handling - #8936
Open
Eddy Ashton (eddyashton) wants to merge 3 commits into
Open
Eddy Ashton (eddyashton) wants to merge 3 commits into
Eddy Ashton (eddyashton) wants to merge 3 commits into
Conversation
Handle common request exceptions at the shared request boundary rather than duplicating response mapping in the KV and no-KV paths. Keep transaction-specific retry and fatal handling local to KV execution, and cover command error parity across store readiness states. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…efactor-process-command-duplication
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The snapshot lacks integration with merged PR #8490, leaving MapAccessDenied handling, no-KV compaction retries, and retained regression coverage unverified in the reconciled result.
No open issues 🎉
What changed in this PR
Centralizes exception-to-response mapping at the shared frontend request boundary, reducing duplication between KV-backed and no-KV execution.
Changes:
- Shares common error handling while retaining transaction-specific retries and fatal handling locally.
- Adds command-error parity tests across all four store readiness states, including response-header cleanup and completion events.
Custom instructions used
.github/copilot-instructions.md.github/instructions/reviewing.instructions.md
| File | Description |
|---|---|
| src/node/rpc/test/frontend_test.cpp | Tests consistent command-error responses across readiness states. |
| src/node/rpc/frontend.h | Moves common exception handling to the shared request boundary. |
Review effort: Balanced
Reconcile shared command exception handling with #8490. Preserve no-KV compaction retries and readiness re-evaluation, handle MapAccessDenied at the shared boundary, and cover it across all store readiness states. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The KV-backed and no-KV request paths duplicate their exception-to-response mapping, making it easy for fixes to diverge.
Handle these exceptions once at the shared request boundary, while keeping transaction-specific retry and fatal handling local to KV execution.
Safety and compatibility
Preserves #8490's no-KV compaction retries, including readiness re-evaluation and response reset.
Explicitly handles
MapAccessDeniedat the shared boundary because it does not derive fromstd::exception.Retains the existing regression coverage.
Validation after resolving conflicts
CLANG_TIDY=ONusing Clang/clang-tidy 21.1.8.frontend_testandnode_frontend_test(2/2 suites).ccftarget with clang-tidy enabled, including the frontend header.UV_PYTHON=/usr/bin/python3.14 scripts/ci-checks.sh. The initial run hit a gersemi source-package build failure under the automatically selected Python 3.15; selecting installed Python 3.14 resolved the tooling failure without repository changes.