Skip to content

fix: preserve harness deployed state on early deploy errors#933

Merged
tejaskash merged 1 commit intopreviewfrom
fix/harness-deploy-state-loss
Apr 23, 2026
Merged

fix: preserve harness deployed state on early deploy errors#933
tejaskash merged 1 commit intopreviewfrom
fix/harness-deploy-state-loss

Conversation

@tejaskash
Copy link
Copy Markdown
Contributor

Summary

  • Early error returns in HarnessDeployer.deploy() (validation failure, read error, missing role ARN, delete failure) were not including state: resultState in the return value
  • This caused the caller in actions.ts to see harnessResult.state as undefined, wiping the harness entries from deployed-state.json
  • On the next deploy the missing state caused the deployer to take the "create" path instead of "update", producing a 409 "agent already exists" error

Test plan

  • Three new unit tests verify that existing harness state is preserved on validation failure, read failure, and missing role ARN
  • All 17 harness-deployer tests pass

Early error returns in HarnessDeployer (validation failure, read error,
missing role ARN, delete failure) were not including the resultState,
causing deployed harness entries to be wiped from deployed-state.json.
On the next deploy, the missing state caused the deployer to attempt a
create instead of update, resulting in a 409 "agent already exists" error.
@tejaskash tejaskash merged commit c1c92f6 into preview Apr 23, 2026
@tejaskash tejaskash deleted the fix/harness-deploy-state-loss branch April 23, 2026 19:06
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