Skip to content

fix: correlate sidecar failures with request ids - #10

Merged
EauDoon merged 1 commit into
mainfrom
devloop/cycle-04-http-failure-request-ids
Aug 29, 2026
Merged

fix: correlate sidecar failures with request ids#10
EauDoon merged 1 commit into
mainfrom
devloop/cycle-04-http-failure-request-ids

Conversation

@EauDoon

@EauDoon EauDoon commented Aug 29, 2026

Copy link
Copy Markdown
Owner

What

HTTP sidecar failures now carry a request_id, and action routes include the action_id they were asked about. Unexpected exceptions are no longer mapped to REQUEST_INVALID; the sidecar logs the real cause to stderr and returns INTERNAL_ERROR without leaking that cause to the client.

Why

The reference server swallowed non-RailError exceptions as a generic client error with nothing an operator could correlate. Boundary failures (malformed JSON, missing actions, method not allowed) also had no request identifier.

How tested

  • node ./scripts/check.js
  • node --test

Devin Review

Unexpected HTTP exceptions were swallowed as REQUEST_INVALID with no
operator diagnostic. Failures now include a request_id (and action_id
when the route named one), log the real cause to stderr, and return
INTERNAL_ERROR to the client.
@EauDoon
EauDoon merged commit 7c9f354 into main Aug 29, 2026
6 of 7 checks passed
@EauDoon
EauDoon deleted the devloop/cycle-04-http-failure-request-ids branch August 29, 2026 22:55

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Comment thread src/http-server.js
if (request.method !== allowedMethod) {
methodNotAllowed(response, [allowedMethod]);
methodNotAllowed(response, [allowedMethod], requestId);
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Wrong-method failures omit action identifiers

When an action endpoint receives the wrong HTTP method, methodNotAllowed omits its action identifier. Correlation then loses the affected action.

Prompt for agents
Update src/http-server.js so methodNotAllowed can include an action_id for matched action routes while preserving the current response shape for non-action routes. Pass the validated actionId from the action-route method check, and add a regression test for a wrong method on /v0/actions/{action_id} or one of its operations.
Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

1 participant