Skip to content

fix: http action error attribution by splitting request deadlines - #758

Open
justinkaseman wants to merge 1 commit into
mainfrom
CRE-5543
Open

fix: http action error attribution by splitting request deadlines#758
justinkaseman wants to merge 1 commit into
mainfrom
CRE-5543

Conversation

@justinkaseman

@justinkaseman justinkaseman commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Endpoint timeouts were reported as platform execution errors, firing
"[HTTP Action] Execution Errors in More than F nodes" on a user error.

Two causes:

  1. The node derived a single deadline from input.Timeout and started it
    before marshal, DON resolution, awaitConnection and SendToGateway.
    The gateway derives the same timeout starting on receipt, so the node
    always expired first. The gateway's correctly classified response
    arrived after responses.cleanup() had run and was dropped, so
    IncrementExternalEndpointError never fired.

  2. The ctx.Done() branch returned NewUserError but called
    IncrementExecutionTimeout, which also bumped executionError (Gabriel's fix fix: Execution Errors in More than F nodes not alerting on user errors #755). A
    timeout had nowhere else to land.

Changes:

  • Split the deadline. sendCtx keeps input.Timeout and bounds only
    delivery to a gateway. waitCtx is created after the send with
    input.Timeout + ResponseGraceMs (default 5s, mirroring the gateway's
    own send-response budget), so the gateway always reaches its timeout
    first and its classified response wins.

  • Split the ctx.Done() branch three ways: TimeoutError (gateway silent,
    system/DeadlineExceeded, counts as an execution error because it now
    genuinely is one), CanceledError (caller cancelled, system/Canceled,
    new http_action_request_canceled_count, not an execution error), and
    the existing classified-response paths, unchanged.

@github-actions

Copy link
Copy Markdown
Contributor

👋 justinkaseman, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@cl-sonarqube-production

Copy link
Copy Markdown

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