bcgov / bcgov/lcfs

LCFS (TFRS Shutdown) - Validate Compliance Report History and Chain Integrity

Open
#2,989 0 comments 0 reactions 1 assignee Claimed by @AlexZorkin View on GitHub
Medium Task
Dominant language
Python
Stars
6
Forks
6
Avg merge
2d 4h
Merged PRs (30d)
87

Description

**Describe the task**
Validate that all compliance report status changes are properly migrated and correctly associated with their corresponding compliance reports and supplemental reports, ensuring accurate status transition workflows.

**Purpose**
Report status changes are critical for tracking compliance workflow progression and maintaining audit compliance. This validation ensures that every status transition from TFRS is captured in LCFS and properly linked to the correct report (original or supplemental), maintaining the integrity of the compliance workflow audit trail.

**Acceptance Criteria**
- [ ] All historical report versions from TFRS exist in LCFS
- [ ] Report chains maintain proper parent-child relationships
- [ ] Version numbers are sequential and complete
- [ ] Status transitions follow valid workflows
- [ ] Timestamps are accurately preserved
- [ ] User actions and comments are migrated
- [ ] Supplemental reports link correctly to originals
- [ ] No orphaned history records exist
- [ ] Audit trail is complete and traceable

**Validation Steps**
1. Validate all compliance_report_history records migrated
2. Verify version chains for each compliance report
3. Check status transition validity
4. Validate supplemental report linkages
5. Verify timestamps and user associations
6. Sample check report chains for completeness
7. Cross-reference with current report statuses
8. Validate no gaps in version sequences

**Additional context**
- Critical for maintaining audit compliance
- Must preserve complete change history
- Status transitions must follow business rules
- Supplemental reports must maintain parent links
- User associations needed for accountability
- Consider performance with large history sets
- Reference: Compliance report workflow documentation

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.