Skip to content

feat(core): report scenario override outcomes - #6

Open
92Infinitus92 wants to merge 7 commits into
developfrom
feat/scenario-override-outcomes
Open

feat(core): report scenario override outcomes#6
92Infinitus92 wants to merge 7 commits into
developfrom
feat/scenario-override-outcomes

Conversation

@92Infinitus92

@92Infinitus92 92Infinitus92 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator
  • Return a typed outcome for every scenario override.
  • Report whether each override was applied or skipped, including the reason.
  • Add outcome-aware time travel for pending overrides.
  • Preserve RPC error classification and expose the new contract through the Node SDK.

Greptile Summary

The PR adds typed applied/skipped outcomes for scenario overrides and exposes outcome-aware registration, cancellation, and time travel through RPC and the Node SDK.

  • Stages override materialization before atomically committing account changes and schedule removal.
  • Batches cancellation updates across scheduled slots.
  • Preserves invalid-parameter versus internal-error classification across runloop responses.
  • Adds generated SDK types and methods for the new RPC contract.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
crates/core/src/surfnet/svm.rs Implements staged override materialization, batched cancellation, outcome reporting, and retry-aware time travel; the previously reported failures are resolved or explicitly accepted.
crates/core/src/storage/mod.rs Extends the storage contract with batch and cross-table atomic operations used by override scheduling.
crates/core/src/storage/sqlite.rs Implements transactional batch updates and atomic account/schedule commits for supported SQLite configurations.
crates/core/src/storage/postgres.rs Implements transactional batch updates and cross-table schedule removal for PostgreSQL.
crates/core/src/rpc/surfnet_cheatcodes.rs Exposes scenario outcomes, outcome-aware time travel, and scheduled-override cancellation through RPC.
crates/types/src/scenarios.rs Defines the typed override outcome contract shared across core and SDK surfaces.
crates/sdk-node/surfpool-sdk/kit/generated/methods.ts Exposes the new outcome-aware RPC methods through generated Node SDK bindings.

Sequence Diagram

sequenceDiagram
    participant Client
    participant RPC
    participant SVM
    participant Stage as Staged SVM
    participant Store as Account and Schedule Storage
    Client->>RPC: Register scenario or time travel
    RPC->>SVM: Materialize scheduled overrides
    SVM->>Stage: Apply override batch
    Stage-->>SVM: Typed applied/skipped outcomes
    SVM->>Store: Atomic account commit and schedule removal
    Store-->>SVM: Commit success
    SVM-->>RPC: Epoch context and outcomes
    RPC-->>Client: "RpcResponse<OverrideOutcome[]>"
Loading

Reviews (9): Last reviewed commit: "fix(core): retry current-slot overrides ..." | Re-trigger Greptile

@92Infinitus92 92Infinitus92 self-assigned this Aug 14, 2026
Comment thread crates/core/src/surfnet/svm.rs
Comment thread crates/core/src/surfnet/svm.rs Outdated
Comment thread crates/core/src/surfnet/svm.rs Outdated
Comment thread crates/core/src/surfnet/svm.rs Outdated
Comment thread crates/core/src/surfnet/svm.rs Outdated
Comment thread crates/core/src/surfnet/svm.rs Outdated
Comment thread crates/core/src/surfnet/svm.rs Outdated
Comment thread crates/core/src/surfnet/svm.rs Outdated
Comment thread crates/core/src/surfnet/svm.rs
@92Infinitus92
92Infinitus92 force-pushed the feat/scenario-override-outcomes branch from bfb0481 to 291cabf Compare August 17, 2026 08:37
@92Infinitus92
92Infinitus92 force-pushed the feat/scenario-override-outcomes branch from 291cabf to 3601a68 Compare August 17, 2026 09:02
Comment thread crates/core/src/surfnet/svm.rs

@greptile-apps greptile-apps 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.

92Infinitus92 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@failfmi

failfmi commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

@greptileai

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