kill_mid_deploy

command
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

README

Go demo: kill mid deploy

Shows honest seal and resume for Trajectory IR in Go (same story as the Python demo under examples/kill_mid_deploy/).

Uses trajir/client with LocalSQLite for the IR log and durable step memos.

What you should see

  1. Model seals a deploy plan (DECISION).
  2. deploy_server starts (NON_IDEMPOTENT_WRITE).
  3. You kill the process mid flight.
  4. On -resume, the model is not asked again after seal, and a mid tool crash does not silently re-run deploy (block and gate).

Setup

From the repo root:

cd go

Crash during deploy (R02 style)

Terminal 1:

go run ./examples/kill_mid_deploy -workdir ./kill_mid_deploy-data -crash-during=tool_call

When you see TOOL_CALL: deploy_server started, kill the process:

# Unix / Git Bash
kill -9 <pid>

# Windows PowerShell (another window)
# find PID from the go run process tree, then:
Stop-Process -Id <pid> -Force

Terminal 1 again (or a new one):

go run ./examples/kill_mid_deploy -workdir ./kill_mid_deploy-data -resume

Expect a BLOCKED_NEEDS_GATE line and deploy_count=0 (effect never completed; gate refuses a blind retry).

Crash after decision seal (R01 style)

go run ./examples/kill_mid_deploy -workdir ./kill_mid_deploy-data2 -crash-after=decision_sealed
# kill when you see DECISION sealed
go run ./examples/kill_mid_deploy -workdir ./kill_mid_deploy-data2 -resume

Expect model_count=1 across both runs and a completed deploy on resume (deploy_count=1).

Clean workdir

# Unix
rm -rf ./kill_mid_deploy-data

# PowerShell
Remove-Item -Recurse -Force .\kill_mid_deploy-data
  • CI style tests: go test ./conformance
  • Fixture binary also used by tests: go/cmd/crashagent

Documentation

Overview

Command kill_mid_deploy is the human runnable Go demo for honest seal resume.

go run ./examples/kill_mid_deploy -workdir ./demo-run -crash-during=tool_call
# kill the process when you see the tool started line
go run ./examples/kill_mid_deploy -workdir ./demo-run -resume

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL