Conversation
Step outputs that contain a BigInt (gas amounts, block numbers, token values from web3 steps) crashed when drizzle-orm serialized them to a JSONB column: PgJsonb.mapToDriverValue runs JSON.stringify, which throws on BigInt. The redacted output column was already protected, but the raw output_raw path (and step input) had no guard. Add a shared toJsonSafe helper that recursively normalizes BigInt, Uint8Array/Buffer, Map, Set, Date and circular refs to JSON-safe values, and apply it to the input, output, output_raw and workflow output writes at the persistence boundary so no non-serializable value can reach JSONB. Also harden batch-read-contract: when a call has no ABI outputs it returned the raw ethers Result (with BigInts) instead of serializing it.
Agents that need a transaction hash before continuing had to run their
own while(!terminal){sleep+GET} loop against the status endpoint, which
times out serverless workers.
Add GET /api/workflows/executions/{id}/wait?timeoutMs= that blocks until
the execution reaches a terminal state (or the timeout, capped at 60s)
and returns the receipt including transactionHashes, reusing the existing
waitForExecutionCompletion poller. Extract the shared auth + lookup +
access check into resolveAuthorizedExecution and route both the status
and wait endpoints through it.
KH_RELEASE_NAME was env-suffixed (keeperhub-staging / keeperhub-prod), so the rollout/teardown steps operated on ${KH_RELEASE_NAME}-common = keeperhub-staging-common / keeperhub-prod-common. No such ExternalSecret/Deployment exists; the main app release is keeperhub-common in namespace keeperhub. The rollout step failed NotFound and the vitest escape-matrix suite was skipped per deploy. Set KH_RELEASE_NAME to keeperhub so the resource resolves to keeperhub-common. Env-specific canary path / APP_URL stay keyed off the environment input. KEEP-648.
…x-rollout-step-keeperhub-env-common ci: resolve escape-matrix rollout to keeperhub-common
The shared seen WeakSet was never cleared, so an object reachable via two sibling paths was falsely serialized as [Circular] on its second visit. Delete each node from the set once its subtree is done so only true ancestor cycles are flagged. Add tests for shared refs and a sibling cycle.
…elper The logs route carried its own auth + access copy that checked only hasFullAccess, so a soft-deleted workflow still exposed its per-step logs while the status endpoint hid them. Route it through resolveAuthorizedExecution so all three execution endpoints enforce the same soft-delete 404 rule, matching what the helper's docstring already claims.
The wait route polled for completion and then re-read the same row to pick up transactionHashes/gasUsedWei/completedAt, which the poller did not surface. Have the poller select those columns and return the last-seen row plus a completed flag (waitForExecutionReceipt), so the route reads the receipt straight from the poll result. Removes one DB round-trip per request. waitForExecutionCompletion keeps its exact contract (null on timeout, no query when timeout <= 0).
The wait endpoint holds a connection and polls the execution row for up to 60s; at 250ms that is ~240 queries per in-flight waiter. Raise the default to 1s (~60 queries) to ease connection-pool pressure now that the long-poll is a public endpoint. Worst-case completion-detection lag grows by under a second, which is immaterial for both the 60s receipt wait and the 25s x402 call wait that share this poller.
The runs API whitelist omitted "cancelled", so selecting the Cancelled status filter dropped the param server-side and returned every run. Add it to VALID_STATUSES; the query layer already filters it correctly.
…ialization fix(executor): make step and workflow JSONB writes BigInt-safe
…-filter fix(analytics): allow cancelled status filter on runs endpoint
feat(executions): add wait-for-receipt long-poll endpoint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.