Skip to content

Share frontend command exception handling - #8936

Open
Eddy Ashton (eddyashton) wants to merge 3 commits into
mainfrom
agents/refactor-process-command-duplication
Open

Eddy Ashton (eddyashton) wants to merge 3 commits into
mainfrom
agents/refactor-process-command-duplication

Conversation

@eddyashton

@eddyashton Eddy Ashton (eddyashton) commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

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 MapAccessDenied at the shared boundary because it does not derive from std::exception.
Retains the existing regression coverage.

Validation after resolving conflicts
  • Configured a fresh RelWithDebInfo build with CLANG_TIDY=ON using Clang/clang-tidy 21.1.8.
  • Built and passed frontend_test and node_frontend_test (2/2 suites).
  • Explicitly reran the command-error parity, endpoint-lookup compaction retry, and access-denial regression cases: 3 cases, 259 assertions passed.
  • Built the production ccf target with clang-tidy enabled, including the frontend header.
  • Full local checks passed: 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.
  • Independent review found no significant issues.
  • Remote CI results are separate from these local checks; no full e2e or compatibility suite was run.

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>
@eddyashton
Eddy Ashton (eddyashton) requested a review from a team as a code owner December 3, 2026 15:13
Copilot AI balanced review requested due to automatic review settings December 3, 2026 15:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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>
Copilot AI balanced review requested due to automatic review settings December 4, 2026 13:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the change centralizing exception-to-response handling.

No open issues 🎉

Review effort: Balanced

This branch has not been deployed

No deployments
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.

2 participants