Feature/17 add check/update logic to review and fix missing links between parent and child issues#18
Conversation
…d improve error logging
There was a problem hiding this comment.
Pull request overview
This PR improves the GitHub issue sync reliability by adding targeted retry/backoff for transient 404s (likely due to GitHub replication lag) and introduces logic to detect/repair missing parent → child sub-issue links during sync.
Changes:
- Add
_gh_with_retryand “not found” detection/hints to reduce noisy 404 failures and improve log clarity. - Add
gh_issue_get_sub_issue_numbers()and_ensure_child_linked_to_parent()to detect and repair missing parent→child sub-issue links. - Add/extend unit tests covering the retry logic and the missing-link repair behavior.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/shared/github_issues.py |
Adds retry/backoff wrapper, 404 detection, improved logging, and sub-issue listing helper. |
src/security/utils/issue_sync.py |
Adds missing-link repair for existing child issues and uses sub-issue listing + cache. |
src/security/utils/models.py |
Extends SyncContext with a parent_sub_issues_cache. |
tests/security/test_github_issues.py |
New unit tests for shared.github_issues retry behavior and 404 hints. |
tests/security/utils/test_issue_sync.py |
Adds unit tests for _ensure_child_linked_to_parent and updates existing tests for new calls. |
.gitignore |
Ignores output.txt. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 6 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.
tmikula-dev
left a comment
There was a problem hiding this comment.
It looks alright to me.
| return _completed(returncode=0, **kwargs) | ||
|
|
||
|
|
||
| def _err(stderr: str = "some error", **kwargs: Any) -> subprocess.CompletedProcess: |
There was a problem hiding this comment.
Does it have some reason for having one or two blank spaces between tests in this module?
There was a problem hiding this comment.
1 line is normal, two lines split logical groups instead of adding extra text delimiters.
Target
Fixes nightly 404 log errors caused by GitHub API replication lag after issue creation, and adds automatic repair of missing parent→child sub-issue links.
Release Notes
Closes #17