How adirwt852-cloud/crash-test-guard works
Crash-Test Guard is a CI reliability gate for stateful agents: load a test configuration, run a baseline and crash scenario, restart and resume the agent, verify recovery, then emit a report and pass/fail status. The CLI wires configuration, execution, orchestration, and reporting; the engine owns crash timing and verification, while executors manage local processes or Docker containers and the protocol client talks to the agent. The README documents JUnit and human reports and the six-endpoint agent protocol. Some scenario details are unsampled, so links beyond the shown calls are limited to documented relationships.
Main entry points: engine.go Test Orchestrator · main.go Test CLI · executor.go Executor Interface · client.go HTTP Protocol Client
Components 15
CLI and Configuration
- Test CLI
cmd/crash-test-guard/main.go - Test Configuration
internal/config/config.go
Crash Test Workflow
- Test Orchestrator
internal/orchestrator/engine.go - Baseline Run
internal/orchestrator/engine.go - Crash Scenario
internal/orchestrator/engine.go - Resume and Verify
internal/orchestrator/engine.go
Agent Integration
- Executor Interface
internal/executor/executor.go - Local Process
internal/executor/local.go - Docker Container
internal/executor/docker.go - HTTP Protocol Client
internal/protocol/client.go
Reporting
- Human Report
internal/reporter/human.go - JUnit Report
internal/reporter/junit.go - JSON Report
cmd/crash-test-guard/main.go
Other components
- CI or Engineer
- Agent Under Test
Connections 17
- CI or Engineer → Test CLI: runs test
README.md - Test CLI → Test Configuration: loads config
cmd/crash-test-guard/main.go - Test CLI → Test Orchestrator: runs test
cmd/crash-test-guard/main.go - Test CLI → Human Report: selects report
cmd/crash-test-guard/main.go - Test CLI → JUnit Report: selects report
cmd/crash-test-guard/main.go - Test CLI → JSON Report: writes report
cmd/crash-test-guard/main.go - Test Orchestrator → Baseline Run: runs baseline
internal/orchestrator/engine.go - Test Orchestrator → Crash Scenario: injects crash
internal/orchestrator/engine.go - Test Orchestrator → Resume and Verify: verifies recovery
internal/orchestrator/engine.go - Test Orchestrator → Executor Interface: starts agent
internal/orchestrator/engine.go - Test Orchestrator → Executor Interface: crashes and restarts
internal/orchestrator/engine.go - Test Orchestrator → HTTP Protocol Client: controls workflow
internal/orchestrator/engine.go - Local Process → Executor Interface: implements lifecycle
internal/executor/local.go - Docker Container → Executor Interface: implements lifecycle
internal/executor/docker.go - HTTP Protocol Client → Agent Under Test: calls HTTP endpoints
README.md - Test Orchestrator → Human Report: reports results
- Test Orchestrator → JUnit Report: reports results