Practical workflows
Bug from Stack Trace Workflow
Turn a stack trace into a minimized reproducer, evidence-backed cause, bounded fix, regression test, and verified user outcome.
- Format
- Playbook
- Level
- Intermediate
- Audience
- Developer, Operator
- Owner
- Project42 Editorial
- Review cadence
- Every 90 days
- Prerequisites
- A secret-safe error report or stack trace; The relevant source and a reproducible environment; Permission to run tests and inspect logs
Orient from evidence before proposing a fix
Redact credentials, tokens, personal data, and unnecessary payloads while preserving exception type, message, frames, correlation identifiers, runtime and dependency versions, configuration shape, time window, and observable impact. Confirm which frame belongs to the application and which belongs to a dependency.
Ask the AI to list facts, hypotheses, missing evidence, and the next discriminating check separately. Do not accept a plausible explanation as a root cause.
Reproduce, isolate, and make the smallest coherent fix
Create the smallest deterministic failing case, compare it with a known-good case, and find the first divergent input, state, call, or version. Version-control history and bisect can narrow a regression when a reliable test distinguishes good from bad.
Add the failing regression test before or with the fix. Change only the responsible boundary, review the complete diff, and test adjacent error, timeout, and cleanup paths.
Task: [OBSERVED BUG AND USER IMPACT]
Scope: [REPOSITORY, COMPONENT, ENVIRONMENT, AND ALLOWED PATHS]
Permissions: [LOG/SOURCE READ, TEST COMMANDS, WRITES, NETWORK, AND DATA LIMITS]
Evidence: [REDACTED TRACE, VERSIONS, CORRELATION ID, AND EXPECTED BEHAVIOR]
Facts / hypotheses / unknowns: [SEPARATE LISTS]
Minimal reproducer: [INPUT, PRECONDITION, COMMAND, EXPECTED, ACTUAL]
First divergence and cause: [BOUNDARY -> EVIDENCE]
Stop conditions: [SECRET, PRODUCTION WRITE, NONDETERMINISM, OR SCOPE EXPANSION]
Verification: [FAILING-THEN-PASSING TEST, RELATED SUITE, DIFF, AND USER PATH]
Recovery: [REVERT BOUNDED CHANGE, RESTORE CONFIG/DATA, AND PRESERVE REPRODUCER]Expected evidence and verification
Expected evidence includes the redacted trace, exact environment, minimized reproducer, first divergence, rejected hypotheses, root-cause explanation, failing-then-passing regression, reviewed diff, relevant suite, and user-boundary result.
Stop if reproduction needs protected production data, the AI proposes unrelated cleanup, the failure is nondeterministic without containment, or a write outcome is unknown. Restore the bounded change or configuration, reconcile affected state, keep the reproducer, and resume only with a safer test boundary.