feat(remediation): default sort with target date#1127
Conversation
cf4a2d7 to
07db4b5
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new default ordering for vulnerabilities that incorporates the (aggregated) earliest target remediation date, and propagates the new ordering field through MariaDB ordering/cursor logic plus tests/docs.
Changes:
- Introduce
IssueEarliestTargetRemediationDateas a newOrderByFieldand add MariaDB column mapping for it. - Extend issue query/cursor generation to support ordering (and cursor encoding) by earliest target remediation date.
- Update/extend tests and documentation to reflect the new default ordering behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/entity/order.go | Adds a new order-by field constant for earliest target remediation date. |
| internal/database/mariadb/order.go | Maps the new order-by field to the DB column alias used for ordering. |
| internal/database/mariadb/issue.go | Adds SQL column projection + cursor wiring for earliest target remediation date. |
| internal/database/mariadb/cursor.go | Extends issue cursor fields to include earliest target remediation date when ordered by it. |
| internal/database/mariadb/issue_test.go | Updates pagination cursor helpers and adds an ordering test for earliest target remediation date. |
| internal/app/issue/issue_handler_test.go | Adjusts mocks/tests to the updated WithIssue cursor signature. |
| internal/api/graphql/graph/baseResolver/vulnerability.go | Updates the default ordering for vulnerabilities to include earliest target remediation date. |
| docs/ordering.md | Attempts to document the new ordering field / DB column alias. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ebfb91a to
15292d5
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
9cfe886 to
e2818f5
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
2381d6b to
621432d
Compare
d775c80 to
56b0ecf
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Added default sort by earliestTargetRemediationDate. Adjusted existing tests, added a test for this feature.
What type of PR is this? (check all applicable)
Related Tickets & Documents
Added tests?
Added to documentation?
Checklist