Project Planning & Task Breakdown
Milestones
What are the major checkpoints?
- Milestone 1: LIS Algorithm Implementation
- Milestone 2: Integration with Validation Result
- Milestone 3: Unit & Integration Tests
Task Breakdown
What specific work needs to be done?
Phase 1: Core Logic
- Task 1.1: Implement
calculate_lis_lengthutility. - Task 1.2: Implement
OrderCheckerclass.- Input: List of found chunks (from completeness checker) with their positions.
- Logic: Extract the sequence of observed positions. Check how long the increasing subsequence is.
- Task 1.3: Integrate order metrics into
ValidationResult.
Phase 2: Testing
- Task 2.1: Unit tests for specific reordering scenarios (A B C -> A C B).
- Task 2.2: Add order check to standard
Validatorflow.
Timeline & Estimates
- Implementation: 1.5 hours.
Risks & Mitigation
- Risk: LCS is slow O(N^2).
- Mitigation: Use pylib
difflib.SequenceMatcheror optimized O(N log N) LIS (Longest Increasing Subsequence) since chunk indices are unique.