Runbook / diagnose before replaying
Turn a symptom into a bounded investigation.
Start with identity, region and request IDs. Repeatedly resending the same command without checking its acceptance state can hide the original problem and create unnecessary load.
First five checks
# Illustrative diagnostics for the imagined CLI.
pulseflow config view --redact
pulseflow doctor --redact --json --timeout 10s
pulseflow traces list --since 30m --limit 20 --json
# Record exit status, request ID, workspace, region and UTC time.
# Never dump all environment variables or print the token.- Confirm which workspace and region won configuration precedence.
- Check the exit code before interpreting a JSON body as success.
- Use the same request ID when correlating redacted diagnostics.
- Check the synthetic status snapshot for the corresponding component.
- Reproduce with one minimal event, not a full export.
Symptom guide
| Symptom | Likely boundary | Safe next step |
|---|---|---|
| Exit 2 before a request | Arguments or missing workspace | Inspect redacted config and command syntax |
| Exit 3 / 401 | Token absent, expired or revoked | Repair secret injection; do not log its value |
| Exit 4 / 403 | Wrong scope or workspace | Review the service identity's grants |
| Exit 5 / timeout | Transport or service unavailable | Check deadline and retry idempotently |
| Exit 6 / 429 | Quota or burst limit | Honor Retry-After; reduce producer rate |
| Accepted but no trace | Region, filters or indexing lag | Check UTC range and allow visibility delay |
| Plugin result is malformed | Extension protocol | Disable the plugin and inspect bounded stderr |
Accepted does not mean indexed
The fictional API acknowledges durable acceptance before updating query indexes. Search in the workspace's selected region and use the event's UTC occurrence time rather than your local wall clock. Expand a narrow filter once, check queue lag and inspect a single request ID before deciding the event was lost.
Duplicate notifications after a replay
Outbound delivery is at least once. Preserve the original event ID, inspect attempt IDs and confirm whether the receiver committed the side effect before its acknowledgment was lost. Deduplication must be durable and atomic with processing; an in-memory cache is not sufficient for production recovery.
CI-only failures
- Check whether the protected environment actually released the secret to this job.
- Do not grant production secrets to an untrusted fork merely to make a test pass.
- Disable interactive prompts explicitly and parse stdout as JSON.
- Ensure plugin and CLI versions match the reviewed lock or artifact manifest.
- Use a bounded overall timeout; do not allow exponential retries to exceed the job budget.
Build a useful evidence bundle
Record CLI reference version 1.8.0, operating system, UTC failure time, workspace ID, region, exit code and request ID. Include only a redacted command shape and minimal schema-valid payload. Exclude token values, raw headers, personal data and full environment exports. A real support path would need access controls; no support ticket is sent by this site.
Verify recovery
Run one diagnostic, submit one idempotent synthetic marker and confirm one visible trace. Check queue age and dropped-event counts before declaring recovery. If a configuration change was ineffective, roll it back rather than stacking speculative changes.
Related references: exit statuses, plugin isolation, synthetic incident retrospectives and the local delivery simulator.