[wave 1] deploy-server+studio: execute post-deploy config steps (applyConfig endpoint + "Apply config" action) - #161
Merged
Conversation
Executes declarative post-deploy config steps via @redeploy/config's applyConfig against the selected network. Streams per-step progress as SSE `step` events and a terminal `done`, journal-backed for idempotent resume (stateDir = network deploymentDir). Adds a real viem-backed ConfigExecutor (with grantRole role->bytes32 hashing the CLI lacked) that resolves each call's ABI from Foundry artifacts. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds runApplyConfig SSE client and an "Apply config" toolbar action (with a confirm modal, since it broadcasts real txs) that streams per-step progress from POST /api/apply-config and reflects completed/ failed config steps in the inspector. Surfaces per-step ConfigExecError without aborting unrelated steps. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…sserts (#151 review) Adds Inspector tests for the config-step-<id>-apply-status "failed" badge (present on failed, absent otherwise) and replaces tautological "didn't crash" assertions in the apply-config failure tests with real post-failure UI-state checks (error banner text + button re-enabled). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
robercano
approved these changes
Jul 21, 2026
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.
What
Closes #151. Closes the authoring→execution gap for post-deploy config: the studio could author config steps but had no way to run them. Adds an HTTP surface for
@redeploy/config'sapplyConfigand a studio action to drive it.deploy-server
POST /api/apply-config[?network=<name>](SSE), mirroring/api/deploy: bareConfigSpecbody, network-aware (resolveNetworkForRequest→ per-network rpcUrl/deployer key/deploymentDir), journal-backed idempotent/resumable (stateDir = network deploymentDir).stepevents{stepId, kind, status: "executing"|"completed"|"failed", message?}and a terminaldone({success, executedStepIds, skippedStepIds, completedStepIds, deployment, warning?}/{success:false, errors:[...]}).ConfigExecutorthat resolves each call's ABI from Foundry artifacts, sends with explicit gas/gasPrice (legacy signing branch), and confirms via receipt polling. Fixes the grantRole role→bytes32 hashing the CLI executor lacked.ConfigExecErroris surfaced without aborting unrelated steps beyond ordered-step semantics. Security discipline preserved: rpcUrl / private key never appear in any SSE frame or stderr.studio
runApplyConfigSSE client and an "Apply config" toolbar action (confirm modal, since it broadcasts real txs) that streams per-step progress and reflects completed/failed config steps in the inspector.Acceptance
Author steps → deploy → apply config → re-run apply is a no-op (idempotent, all steps skipped) →
GET /api/deploymentshows steps completed.Gates
Review
Reviewed through all four lenses (correctness, tests, security, performance), consensus=all, on both the deploy-server and studio diffs. One tests-lens rejection (uncovered Inspector "failed" badge) was fixed in
5d99826and re-approved.🤖 Generated with Claude Code