Skip to content

[wave 1] deploy-server+studio: execute post-deploy config steps (applyConfig endpoint + "Apply config" action) - #161

Merged
robercano-ghbot merged 3 commits into
mainfrom
feat/issue-151-apply-config
Jul 21, 2026
Merged

[wave 1] deploy-server+studio: execute post-deploy config steps (applyConfig endpoint + "Apply config" action)#161
robercano-ghbot merged 3 commits into
mainfrom
feat/issue-151-apply-config

Conversation

@robercano-ghbot

Copy link
Copy Markdown
Collaborator

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's applyConfig and a studio action to drive it.

deploy-server

  • New POST /api/apply-config[?network=<name>] (SSE), mirroring /api/deploy: bare ConfigSpec body, network-aware (resolveNetworkForRequest → per-network rpcUrl/deployer key/deploymentDir), journal-backed idempotent/resumable (stateDir = network deploymentDir).
  • Streams per-step progress as step events {stepId, kind, status: "executing"|"completed"|"failed", message?} and a terminal done ({success, executedStepIds, skippedStepIds, completedStepIds, deployment, warning?} / {success:false, errors:[...]}).
  • Adds a real viem-backed ConfigExecutor that 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.
  • Per-step ConfigExecError is surfaced without aborting unrelated steps beyond ordered-step semantics. Security discipline preserved: rpcUrl / private key never appear in any SSE frame or stderr.

studio

  • New runApplyConfig SSE 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/deployment shows steps completed.

Gates

  • typecheck, build, lint: green.
  • deploy-server: 244 tests pass, coverage 97.28% / 93.31% / 87.58% / 97.28%.
  • studio: 1176 tests pass, coverage 97.07% / 88.49% / 90.58% / 97.07%.

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 5d99826 and re-approved.

🤖 Generated with Claude Code

robercano and others added 3 commits July 21, 2026 11:24
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-ghbot
robercano-ghbot merged commit 782d0a5 into main Jul 21, 2026
6 checks passed
@robercano-ghbot
robercano-ghbot deleted the feat/issue-151-apply-config branch July 21, 2026 11:09
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.

[wave 1] deploy-server+studio: execute post-deploy config steps (applyConfig endpoint + "Apply config" action)

2 participants