Skip to content

indexer: surface op outcomes via simulate errors + OpStatus column#413

Merged
wilfreddenton merged 5 commits into
mainfrom
simulate-error-surfacing
May 15, 2026
Merged

indexer: surface op outcomes via simulate errors + OpStatus column#413
wilfreddenton merged 5 commits into
mainfrom
simulate-error-surfacing

Conversation

@wilfreddenton
Copy link
Copy Markdown
Contributor

@wilfreddenton wilfreddenton commented May 14, 2026

Note

Medium Risk
Adds a new DB column and API surface changes (OpWithResult enum + OpStatus) that affect persisted data, TypeScript bindings, and transaction execution/simulation plumbing; mistakes could break result queries or client decoding.

Overview
/transactions/simulate now surfaces per-op deterministic failure details by collecting errors during execution and attaching them as error_message on each returned OpWithResult entry (while /inspect continues to return error_message: None).

The response shape is updated from a struct to a tagged OpWithResult enum with Materialized vs Rejected variants, and ops now carry an explicit op_index in OpMetadata for stable positional alignment.

Result persistence is extended with an OpStatus enum: contract_results gains a non-null status column, the runtime classifies execution outcomes (Ok/ContractErr/OutOfFuel/Trap/Other), and queries/insert paths + TS bindings are updated accordingly; new tests cover simulate error surfacing and status classification.

Reviewed by Cursor Bugbot for commit 7a84143. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread core/indexer/src/reactor/blocks.rs
Comment thread core/indexer/src/reactor/executor.rs
Comment thread core/indexer-types/src/lib.rs Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default mode and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 38d8f31. Configure here.

Comment thread kontor-ts/src/bindings.d.ts
Comment thread kontor-ts/src/bindings.d.ts
@wilfreddenton wilfreddenton merged commit 088737e into main May 15, 2026
7 checks passed
@wilfreddenton wilfreddenton deleted the simulate-error-surfacing branch May 15, 2026 12:28
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