Skip to content

feat: add simulate to direct execution inputs - #4

Open
alexursol2 wants to merge 1 commit into
KeeperHub:mainfrom
alexursol2:feat/simulate-in-direct-execution
Open

feat: add simulate to direct execution inputs#4
alexursol2 wants to merge 1 commit into
KeeperHub:mainfrom
alexursol2:feat/simulate-in-direct-execution

Conversation

@alexursol2

Copy link
Copy Markdown

docs/api/direct-execution.md prescribes a safe first-write sequence: send the
request with simulate: true and continue only when the response has
success: true and wouldRevert: false.

The SDK cannot currently express it. Neither simulate nor idempotency appears anywhere in the published package, in the types or the compiled output, so a caller has to drop to client.rawRequest to follow the documentation — which puts the escape hatch on the safe path and the typed methods on the unsafe one.

Types only, and additive: the field is optional, and rawRequest already sends the whole input as the request body, so no executor change is needed for it to work. DirectSimulationResult describes what comes back.

Found while migrating a transaction firewall onto this SDK, where the simulate step is the core of the product: https://github.com/alexursol2/tx-guardrail

docs/api/direct-execution.md prescribes a safe first-write sequence: send the
request with simulate: true and continue only when the response has
success: true and wouldRevert: false.

The SDK cannot currently express it. Neither simulate nor idempotency appears
anywhere in the published package, in the types or the compiled output, so a
caller has to drop to client.rawRequest to follow the documentation — which puts
the escape hatch on the safe path and the typed methods on the unsafe one.

Types only, and additive: the field is optional, and rawRequest already sends the
whole input as the request body, so no executor change is needed for it to work.
DirectSimulationResult describes what comes back.

Found while migrating a transaction firewall onto this SDK, where the simulate
step is the core of the product: https://github.com/alexursol2/tx-guardrail
alexursol2 added a commit to alexursol2/tx-guardrail that referenced this pull request Aug 4, 2026
STATUS.md: superseded twice over. It claimed 30/30, 68 and 103 tests in the same
file, and pointed at guard 0x43dAB747 and Safe 0xC63c73a2, both dead since the
redeploys. Its live content — the KeeperHub findings and the API-key rotation
note — is in FEEDBACK.md; its milestone history is in the git log. A file that
opens with "superseded" and then makes three contradictory factual claims is
worse than no file.

contributions/submit.sh: an interactive fork-and-push helper that stops halfway
to make you apply the patch by hand. Both PRs were opened directly instead
(KeeperHub/sdk#4, KeeperHub/mcp#8), so it never ran, and its own README section
explaining how to submit described a route nobody took.

contributions/README.md said "Prepared, not submitted" for work that has been
submitted. Now links both PRs.

.gitattributes only pinned line endings for submit.sh, which is gone. Replaced
with a repo-wide rule, because contracts/.gitignore and contracts/README.md were
sitting dirty in the working tree purely from CRLF rewrites by a Windows editor.
The index was already LF throughout, so this normalises the checkout without
touching a single stored blob.
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