Skip to content

Feature/17 add check/update logic to review and fix missing links between parent and child issues#18

Merged
miroslavpojer merged 6 commits intomasterfrom
feature/17-Add-check/update-logic-to-review-and-fix-missing-links-between-parent-and-child-issues
Mar 25, 2026
Merged

Feature/17 add check/update logic to review and fix missing links between parent and child issues#18
miroslavpojer merged 6 commits intomasterfrom
feature/17-Add-check/update-logic-to-review-and-fix-missing-links-between-parent-and-child-issues

Conversation

@miroslavpojer
Copy link
Contributor

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

  • Fix nightly 404 errors caused by GitHub API replication lag (retry with backoff added)
  • Automatically repair missing parent→child sub-issue links during sync
  • Clearer log messages when an issue cannot be found (deleted or transferred)

Closes #17

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_retry and “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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator

@tmikula-dev tmikula-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks alright to me.

return _completed(returncode=0, **kwargs)


def _err(stderr: str = "some error", **kwargs: Any) -> subprocess.CompletedProcess:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it have some reason for having one or two blank spaces between tests in this module?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 line is normal, two lines split logical groups instead of adding extra text delimiters.

@miroslavpojer miroslavpojer merged commit 40457bc into master Mar 25, 2026
11 checks passed
@miroslavpojer miroslavpojer deleted the feature/17-Add-check/update-logic-to-review-and-fix-missing-links-between-parent-and-child-issues branch March 25, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add check/update logic to review and fix missing links between parent and child issues

3 participants