Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Perform a comprehensive, evidence-based audit of all explicit and implicit state machines in this codebase.
- PHASE 1: DISCOVERY AND DOCUMENTATION
- 1. Analyze the architecture and identify state machines across UI, services, business logic, asynchronous operations, persistence, and cross-module interactions.
- 2. Document their states, transitions, guards, invariants, and dependencies in a centralized Markdown document.
- 3. For large codebases, divide the audit into manageable modules and identify high-risk cross-module interactions.
- PHASE 2: BUG IDENTIFICATION AND VERIFICATION
- 4. Identify invalid states and transitions that the actual code can reach, including through concurrency, retries, race conditions, partial failures, stale state, and persistence or restoration.
- 5. Provide concrete code references, realistic reproduction scenarios, and supporting evidence.
- 6. Distinguish confirmed bugs from unverified hypotheses and architectural improvements.
- 7. Prioritize verified findings by severity, user impact, and likelihood.
- PHASE 3: REMEDIATION PLANNING
- 8. Group related fixes into logically scoped issues, identifying dependencies and regression risks.
- 9. Propose minimal, targeted fixes that preserve intended behavior and existing functionality.
- 10. Do not modify application code until the audit and remediation plan have been reviewed and explicitly approved.
- PHASE 4: IMPLEMENTATION AND VALIDATION (AFTER APPROVAL)
- 11. Implement approved fixes incrementally, with appropriate regression tests.
- 12. Run relevant tests and verify that existing behavior remains intact.
- 13. Update the centralized state machine document to reflect verified behavior and changes.
- 14. Report completed fixes, remaining risks, test results, and any unresolved issues.
- GENERAL REQUIREMENTS
- - Prioritize evidence over speculation.
- - Avoid unnecessary refactoring or architectural changes.
- - Respect existing project conventions and business rules.
- - Do not claim a bug is confirmed without sufficient evidence.
- - Do not claim tests passed unless they were actually executed.
- - For large projects, prefer incremental analysis over a single exhaustive pass.
Advertisement
Add Comment
Please, Sign In to add comment