Skip to content

rpc: propagate request correlation across worker calls - #298

Merged
BigDella merged 2 commits into
Parcel-Protocol:mainfrom
sowunmirapheal2-max:issue-246-request-correlation
Oct 19, 2026
Merged

BigDella merged 2 commits into
Parcel-Protocol:mainfrom
sowunmirapheal2-max:issue-246-request-correlation

Conversation

@sowunmirapheal2-max

Copy link
Copy Markdown
Contributor

Summary

Carry a worker job's correlation ID through Soroban JSON-RPC request IDs and soroban.rpc telemetry. Generate a correlation UUID for standalone calls, and preserve failure/success records and RPC envelopes. Adds regression coverage for retries and transport failures and documents operational behavior.

Scope proof

Issue: Closes #246

Feature directory: N/A - focused cross-cutting core infrastructure change, not a UI feature slice.

Changed file count: 4

git diff --name-only origin/main...HEAD | wc -l
  • This pull request changes at least 20 meaningful files (the scaffold normally creates 23)
  • Every product change is inside the feature directory above
  • This work does not require another open issue or unmerged pull request
  • No generated registry file or shared navigation/route list was edited

How to Test

Run npm test -- --run core/rpc/__tests__/client.test.ts core/workers/__tests__/queue.test.ts (30 tests pass) and npm run verify:telemetry (passes). The focused test verifies a worker correlation ID appears as the JSON-RPC ID and in telemetry on success and transport failure, and remains the same across a worker retry. Network: Soroban RPC testnet/default configured endpoint; tests stub fetch and do not make live network requests.

Validation failure: return a malformed JSON-RPC envelope and confirm it remains a failure response with the correlated ID. Transport failure: reject fetch and confirm the failure telemetry retains the ID. These are exercised by the RPC test suite.

  1. Pass a worker context.correlationId to sorobanRpc.
  2. Confirm the JSON-RPC request/response ID matches it.
  3. Confirm success, transport failure and retry traces retain that identifier.

Evidence

Screenshots: not applicable to this headless core infrastructure change. Slice-specific npm run verify:features -- <slug> is not applicable because this is not a feature slice.

  • Focused tests: 2 files passed, 30 tests passed.
  • npm run verify:telemetry: passed.
  • npm run check: failed during repository-wide lint (21 errors, 84 warnings, including a parse error in untouched core/__tests__/registryManifestValidation.test.ts).
  • tsc --noEmit: also reports parse errors in that untouched test file.

Checklist

  • npm run check passes locally
  • Logic returns Result<T, Code> for every expected failure
  • Every error code has actionable copy in copy.ts
  • Idle, loading, success and error states are implemented
  • Network requests are tested through MSW, not internal-module mocks
  • Accessibility tests cover at least two states with zero WCAG 2.1 A/AA violations
  • Amount arithmetic uses strings/BigInt, never floating point
  • No secret key is accepted, rendered, stored, logged or transmitted
  • README.md records the feature's non-obvious technical decision
  • If this changes docs/FEATURE_CONTRACT.md, it adds or supersedes an ADR in docs/adr/

Follow-Up

This is a focused infrastructure change and intentionally does not satisfy the template's 20-file feature-slice scope. The PR requires review of this scope exception and resolution of the existing full-check failures before merge. No screenshots are relevant for this headless change.

olatecki and others added 2 commits October 18, 2026 21:45
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@sowunmirapheal2-max Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@sowunmirapheal2-max

Copy link
Copy Markdown
Contributor Author

@Parcel-Protocol maintainers: could you please review PR #298, approve the pending CI workflow run, and merge if the checks and repository requirements are satisfied? GitHub currently reports action_required for CI; focused local tests (30 tests) and npm run verify:telemetry passed, while the repository-wide check has the lint failures documented in the PR. The branch is currently reported as mergeable. I do not have maintainer permission to approve CI or merge this PR.

@BigDella
BigDella merged commit ba38eef into Parcel-Protocol:main Oct 19, 2026
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.

utix: Implement request correlation across API, workers, and external calls

3 participants