Skip to content

Conversation

@dandavison
Copy link
Contributor

@dandavison dandavison commented Nov 25, 2025

Currently read/update requests for CHASM executions are returning "workflow execution not found" as the NotFound error message. This PR fixes the message. It didn't look like Archetype exposes a string suitable for use here so I didn't try to do that.


Note

Maps backend NotFound to "execution not found" for missing CHASM executions and adds a unit test to validate it.

  • History Backend:
    • Normalize NotFound errors in getExecutionLease (in service/history/chasm_engine.go) to serviceerror.NewNotFound("execution not found").
  • Tests:
    • Add TestReadComponent_NotFound in service/history/chasm_engine_test.go to assert the standardized error message and ensure readFn is not invoked.

Written by Cursor Bugbot for commit 42a1a84. This will update automatically on new commits. Configure here.

@dandavison dandavison force-pushed the chasm-not-found branch 4 times, most recently from 803132d to 5f35b19 Compare November 25, 2025 01:13
@dandavison dandavison marked this pull request as ready for review November 25, 2025 01:13
@dandavison dandavison requested review from a team as code owners November 25, 2025 01:13
var notFound *serviceerror.NotFound
if errors.As(err, &notFound) {
err = serviceerror.NewNotFound("execution not found")
}
Copy link

Choose a reason for hiding this comment

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

Bug: Blanket NotFound replacement masks semantic errors

The fix replaces ALL NotFound errors with "execution not found" without checking the original error message or type. This could incorrectly mask other semantically distinct NotFound errors like ErrStaleReference ("stale reference") if the consistency predicate check returns such errors. The fix should only replace the specific "workflow execution not found" message, or handle staleReferenceErr separately to prevent masking reference staleness errors.

Fix in Cursor Fix in Web

@dandavison dandavison requested a review from yycptt November 26, 2025 03:15
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