Skip to content

fix(fusion): retain native request correlation IDs - #1044

Open
vincentkoc wants to merge 1 commit into
mainfrom
fix/fusion-request-correlation-20261114
Open

vincentkoc wants to merge 1 commit into
mainfrom
fix/fusion-request-correlation-20261114

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Native Fusion benchmark failures lacked request correlation for provider investigation. Persist a unique OpenAI client request ID before dispatch and retain a bounded provider request ID before parsing the response, including HTTP and JSON failures. No prompts, completions, arbitrary headers or raw error bodies are added to receipts.

Verification

  • Focused Node tests after rebase: 96 passed; 38 optional Docker integration cases skipped.
  • Success, HTTP error, invalid JSON and transport failure fixtures verify saved IDs, unresolved reservations and no follow-on calls after failure.
  • Provider tests cover unique IDs, unchanged request bodies, excluded malformed IDs and unchanged Anthropic requests.
  • Independent P0–P2 review: no actionable findings; git diff --check passed.

Deployment and risk

Benchmark scripts only. No deployment, default routing, retry, scoring or budget-policy changes. Provider IDs outside the documented receipt allowlist are omitted. No paid model calls were made for this change.

Rebased onto the landed probe-qualified handoff and fresh Azure task. Both sets of regression tests are retained; the final rebased patch passed independent P0–P2 review. Fresh CI applies to the new head.

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review November 13, 2026 18:21
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 13, 2026
@clawsweeper

clawsweeper Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

This PR records OpenAI client and provider request IDs in native pair and workload benchmark receipts.

Example: An OpenAI benchmark request returns HTTP 400 with x-request-id=req_test-123.

  • Before: The receipt retains the failure and unresolved reservation without request correlation IDs.
  • After: The receipt also retains its generated clientRequestId and providerRequestId=req_test-123.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, useful patch with no identified defects; confidence in execution rests on fixture coverage and successful script CI rather than live provider evidence.
Proof confidence 🦐 gold shrimp (3/6) This benchmark-only diagnostic change has fixture coverage through the real pair runner with injected transport responses; it does not require shipped application proof, and no live-provider result is claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Benchmark investigators cannot correlate failed native pair and workload calls with OpenAI provider records.
Reason: Bounded correlation metadata offers useful diagnostic value at low implementation cost, and the maintainer author already owns this feature area and its direction.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR adds useful benchmark diagnostics absent from current main, with no actionable correctness or security findings.

Priority: P3
Reviewed head: 08415c399976b2df50e98d0444f3e9d47596a6a9

Before merge

None.

Findings

None.

Agent review details

How this fits together

Opt-in benchmark runners transform model requests, reserve spending, call native provider APIs, and write private JSON receipts containing accounting and bounded diagnostic metadata.

flowchart LR
  A[Benchmark runner] --> B[Native request adapter]
  B --> C[Reserve and save client ID]
  C --> D[Provider API]
  D --> E[Capture bounded response ID]
  E --> F[Settle or retain reservation]
  F --> G[Private JSON receipt]
Loading

Technical review

Best possible solution:

Keep correlation in the existing native adapter and receipt ledgers while preserving current privacy, accounting, and stopping rules.

Do we have a high-confidence way to reproduce the issue?

Current-main source shows that native pair and workload calls neither send client correlation IDs nor retain provider response IDs; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The implementation is focused: two shared helpers serve the existing dispatch owners, leave serialized bodies unchanged, and retain correlation without introducing another transport or accounting path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 43d978e80dfa.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Change scope Benchmark code +24/-2; tests +77/-1; documentation +11 The small implementation reuses existing owners; the larger test portion covers distinct success, HTTP, parsing, transport, and privacy cases.

Labels

Label changes:

  • add P3: This improves investigation of opt-in benchmark failures without changing production routing or user workflows.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This improves investigation of opt-in benchmark failures without changing production routing or user workflows.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 13, 2026, 1:34 PM ET / 18:34 UTC.

@vincentkoc
vincentkoc force-pushed the fix/fusion-request-correlation-20261114 branch from 08415c3 to 582a877 Compare November 13, 2026 18:45

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

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant