.agents/chaos/goal-integration.md
Goal consumes Agent Chaos through application-owned adapters. @achaos/* must not import Goal,
Task, Drizzle schemas, QStash, or server services.
Place concrete integration code under apps/server/src/services/goal/__chaos__/:
getTestDB().createRuntimeChaosHooks(controller) for preflight result replacement/drop faults. For
retryable failures, wrap each executeToolWithRetry attempt with executeToolAttemptWithChaos.@achaos/database port for scoped lease/state mutations.GoalService.tick, completion ingestion, scheduled wake, or
human decision) as the runner exercise.ChaosRunResult JSON and trace events to Acceptance evidence.done.This campaign requires settleStaleRunning / recoverAbandonedWork from the Goal runtime
resilience work to be present on the target branch.
executeToolWithRetry attempt.achieved while a required criterion failed.Every campaign must preserve its seed, result JSON, trace id, baseline revision and candidate revision. A discovered probabilistic failure becomes a reduced deterministic fixture before it is accepted as regression coverage.