feat(agent): add deployer demo and update Phase 2 docs#28
Conversation
Add deployer agent that pays a compute provider, deploys itself, and monitors deployment status with multi-step effect-safe crash recovery. Includes mock compute provider server and demo script. Update IMPLEMENTATION_STATUS.md with complete Phase 2 section, HOSTCALL_ABI.md with wallet_pay (x402) capability docs, SPEC_INDEX.md with EFFECT_LIFECYCLE.md entry, and ROADMAP.md to reflect Phase 2 completion status. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51ad39448d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| _ = d.Effects.Compensate(intent.ID) | ||
| d.Effects.Prune() |
There was a problem hiding this comment.
Handle failed deploy attempts without invalid state transition
After Begin, this failure path calls Effects.Compensate, but Compensate only permits Unresolved intents (sdk/igor/effects.go), so the transition fails and the intent remains InFlight. Since the tick loop only executes Recorded intents, each transient deploy failure leaves a non-terminal zombie intent that is never pruned in-process and later becomes Unresolved on resume, polluting reconciliation/accounting and growing checkpoint state.
Useful? React with 👍 / 👎.
| cp "$DIR_B/history/deployer/"*.ckpt "$VERIFY_DIR/" 2>/dev/null || true | ||
| fi | ||
|
|
||
| CKPT_COUNT=$(ls "$VERIFY_DIR/"*.ckpt 2>/dev/null | wc -l | tr -d ' ') |
There was a problem hiding this comment.
Count checkpoints without aborting when none exist
With set -euo pipefail enabled, this command substitution exits non-zero when no *.ckpt files are present, so the script terminates before reaching the fallback branch that prints No checkpoint history found for verification. In short/failed demo runs where history files are missing, demo-deployer will fail unexpectedly instead of handling the empty-history case.
Useful? React with 👍 / 👎.
Summary
cmd/mockcloud) with 402 payment terms and deployment lifecycle (pending→provisioning→running)scripts/demo-deployer.sh) and Makefile targets (agent-deployer,demo-deployer)wallet_pay(x402) capability documentationTest plan
make checkpasses (fmt, vet, lint, tests)make demo-deployerruns end-to-end🤖 Generated with Claude Code