Track G: Operations
Track G focuses on running ArcFlow in production-like local conditions: schema migrations, readiness probes, trace export, and idempotent re-migration. No application workflow authoring required.
Goal
Apply migrations, verify /ready, export trace via CLI, and confirm idempotent re-migration. Operator-focused tasks rather than SDK development.
Prerequisites
| Item | Required |
|---|---|
| Docker Compose | Server stack |
| Rust toolchain | For arcflow-cli from repo root |
| Prior reading | Track B for server basics |
| Guides | execution traces, Trace data policy rules |
Step 1: Start stack with migrate job
Compose runs arcflow-migrate before arcflow-server starts. Confirm migrate container exited successfully:
Step 2: Verify readiness
Expect /ready 200 when Postgres is reachable and schema is at head. 503 indicates degraded state; do not route production traffic.
Document result:
ready_http_code=200
Step 3: Create a run for trace export
Use Track B payload or quick curl create. Copy run_id after Completed.
Step 4: Export trace via CLI
Compare CLI output to HTTP trace:
Pass criteria: both exports list lifecycle events; no prompt text or secrets in JSON (trace data policy).
Step 5: Idempotent re-migration
Run migrate again explicitly:
Or restart migrate service:
Second run should exit zero with no pending migrations. Schema version remains at head; no duplicate object errors.
Verify /ready still 200 after re-migration.
Verification checklist
| Check | Expected |
|---|---|
| First migrate | Success, server starts |
/ready | 200 at head |
| CLI trace | JSON with event kinds |
| HTTP trace | Consistent with CLI for server runs |
| Second migrate | Idempotent, no failures |
| Trace policy | No raw prompts in export |
Expected output
Migrate logs show applied revisions once. CLI trace prints indented JSON event array. Re-migrate prints already at head or equivalent no-op message.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
/ready 503 | Postgres down or migrate failed | Inspect logs; restart postgres service |
| CLI trace not found | Wrong id or local-only SDK run | Use server-persisted run id from POST |
| Migrate conflict | Manual schema edit | Restore from backup; never patch prod schema by hand |
| Secrets in trace | Misconfiguration | Escalate; traces must stay metadata-only |
What you learned
Track G covers operational contracts operators rely on daily: migration idempotency, readiness gating, and auditable trace export without leaking user content.
Next tracks
| Track | Focus |
|---|---|
| H | IDE graph view and local CLI runs |
| Level 3 cert | Production deployment and token rotation |
Stop stack when done: