Skip to content

fix(integrations): maybeSuggestProjectOrMilestoneMatch's comment-marker search still uses the 3-page cap that comments.ts proved insufficient #8889

Description

@JSONbored

⚠️ Definition of Done: this issue must be completed in full, in a single PR. Do not split this
work across multiple PRs, and do not defer any Deliverable below to a follow-up issue. A PR that
satisfies only some of the Deliverables, stubs a required test, or leaves a checkbox
partially-done does NOT resolve this issue and will be closed.

Context

src/integrations/project-tracker-adapter.ts:57,402-413's GITHUB_LIST_PAGE_LIMIT = 3 is commented as "mirrors src/github/comments.ts's COMMENT_SEARCH_PAGE_LIMIT: 3 pages * 100 = 300 items is generously above any realistic ... PR-comment count" -- but comments.ts itself was bumped from 3 to 10 pages by commit 18fe74628 (fix #7232, 2026-07-19) specifically because a >300-comment thread let the marker hide and caused a duplicate post. This file was never updated to match, so maybeSuggestProjectOrMilestoneMatch (line 402) can still double-post the PROJECT_TRACKER_SUGGEST_COMMENT_MARKER comment on any PR/issue with >300 comments. test/unit/project-tracker-adapter.test.ts:605 only exercises 2 pages, never the >3-page scenario.

Requirements

Bump GITHUB_LIST_PAGE_LIMIT (or introduce a separate constant) to 10 for the comment-marker search path, matching comments.ts's COMMENT_SEARCH_PAGE_LIMIT exactly, and add a test with a marker on page 4+.

Deliverables

  • project-tracker-adapter.ts's comment-marker search page cap is raised to 10, matching comments.ts's COMMENT_SEARCH_PAGE_LIMIT
  • A test with the marker comment on page 4 or later, asserting maybeSuggestProjectOrMilestoneMatch still finds it and does not double-post

All of the above Deliverables are required in the same PR unless the deliverable text itself states otherwise.

Test Coverage Requirements

src/** -- 99%+ patch coverage, branch-counted, including the new page-4+ test.

Expected Outcome

A PR/issue with more than 300 comments no longer gets a duplicate project/milestone-suggestion comment, matching the fix already applied to the sibling comment-marker search in comments.ts.

Links & Resources

  • src/integrations/project-tracker-adapter.ts:57,402-413
  • src/github/comments.ts
  • test/unit/project-tracker-adapter.test.ts:605

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions