feat: Add commit SHAs, closes_issues watermark, and PRD alignment
Migration 015 adds merge_commit_sha/squash_commit_sha to merge_requests (Gate 4/5 prerequisites), closes_issues_synced_for_updated_at watermark for incremental sync, and the missing idx_label_events_label index. The MR transformer and ingestion pipeline now populate commit SHAs during sync. The orchestrator uses watermark-based filtering for closes_issues jobs instead of re-enqueuing all MRs every sync. The Phase B PRD is updated to match the actual codebase: corrected migration numbering (011-015), documented nullable label/milestone fields (migration 012), watermark patterns (013), observability infrastructure (014), simplified source_method values, and updated entity_references schema to match implementation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -51,6 +51,8 @@ fn make_test_mr() -> GitLabMergeRequest {
|
||||
name: "Alice Wong".to_string(),
|
||||
}],
|
||||
web_url: "https://gitlab.example.com/group/project/-/merge_requests/42".to_string(),
|
||||
merge_commit_sha: Some("merge1234567890".to_string()),
|
||||
squash_commit_sha: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,6 +100,18 @@ fn transforms_mr_with_all_fields() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn preserves_commit_shas() {
|
||||
let mr = make_test_mr();
|
||||
let result = transform_merge_request(&mr, 200).unwrap();
|
||||
|
||||
assert_eq!(
|
||||
result.merge_request.merge_commit_sha,
|
||||
Some("merge1234567890".to_string())
|
||||
);
|
||||
assert!(result.merge_request.squash_commit_sha.is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parses_timestamps_to_ms_epoch() {
|
||||
let mr = make_test_mr();
|
||||
|
||||
Reference in New Issue
Block a user