Skip to content

fix(integrations): raise the comment-marker search page cap to match comments.ts - #8947

Merged
JSONbored merged 2 commits into
JSONbored:mainfrom
kai392:fix/critical-issue-project-tracker-marker-pages
Jul 26, 2026
Merged

fix(integrations): raise the comment-marker search page cap to match comments.ts#8947
JSONbored merged 2 commits into
JSONbored:mainfrom
kai392:fix/critical-issue-project-tracker-marker-pages

Conversation

@kai392

@kai392 kai392 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

project-tracker-adapter.ts's comment-marker search reused GITHUB_LIST_PAGE_LIMIT = 3, but
comments.ts's sibling COMMENT_SEARCH_PAGE_LIMIT was bumped 3 -> 10 (#7232, commit 18fe74628)
specifically because a >300-comment thread let the marker hide and caused a duplicate post. This file
was never updated, so maybeSuggestProjectOrMilestoneMatch could still double-post the
PROJECT_TRACKER_SUGGEST_COMMENT_MARKER comment on any PR/issue with >300 comments.

Introduces a dedicated COMMENT_MARKER_SEARCH_PAGE_LIMIT = 10 for the marker-search path, matching
comments.ts. The milestone/project list searches keep the 3-page bound (only marker detection
needs the deeper scan to stay double-post-safe).

Test plan

  • New: the marker on page 4 (past the old 3-page cap) is found — maybeSuggestProjectOrMilestoneMatch returns { suggested: false } and never POSTs
  • Non-vacuity verified: with the old cap the loop stops at page 3, misses the marker, and the test fails
  • npx vitest run test/unit/project-tracker-adapter.test.ts — 54/54 pass; tsc --noEmit clean

Closes #8889

@kai392
kai392 requested a review from JSONbored as a code owner July 26, 2026 14:00
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

RealDiligent and others added 2 commits July 26, 2026 22:04
…comments.ts

project-tracker-adapter.ts's marker search reused GITHUB_LIST_PAGE_LIMIT = 3, but comments.ts's
sibling COMMENT_SEARCH_PAGE_LIMIT was bumped 3 -> 10 (JSONbored#7232) precisely because a >300-comment thread
let the marker hide and caused a duplicate post. This file was never updated, so
maybeSuggestProjectOrMilestoneMatch could still double-post its marker comment on any PR/issue with
>300 comments. Introduce a dedicated COMMENT_MARKER_SEARCH_PAGE_LIMIT = 10 for the marker search
(the milestone/project list searches keep the 3-page bound).

Closes JSONbored#8889

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.61%. Comparing base (ad5f3bf) to head (8ea14bb).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8947      +/-   ##
==========================================
+ Coverage   90.56%   90.61%   +0.05%     
==========================================
  Files          96       97       +1     
  Lines       22490    22626     +136     
  Branches     3884     3920      +36     
==========================================
+ Hits        20367    20503     +136     
  Misses       1945     1945              
  Partials      178      178              
Flag Coverage Δ
backend 100.00% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/integrations/project-tracker-adapter.ts 100.00% <100.00%> (ø)

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 26, 2026
@loopover-orb

loopover-orb Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-26 14:20:27 UTC

2 files · 1 AI reviewer · no blockers · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This is a narrow, correct fix: it raises the comment-marker search cap in maybeSuggestProjectOrMilestoneMatch from 3 to a dedicated COMMENT_MARKER_SEARCH_PAGE_LIMIT = 10 pages, matching comments.ts's existing COMMENT_SEARCH_PAGE_LIMIT, while leaving the milestone/project list searches on the original 3-page GITHUB_LIST_PAGE_LIMIT. The new test correctly demonstrates non-vacuity (marker on page 4, past the old cap) and asserts no double-post, and the diff traces cleanly to the referenced comments.ts precedent (#7232).

Nits — 3 non-blocking
  • The new constant and its 4-line comment push project-tracker-adapter.ts over the external size-smell threshold (~410 lines); consider trimming the comment now that comments.ts already documents the history in full.
  • The loop still has no upper bound tied to the batch.length < 100 early-exit shared with GITHUB_LIST_PAGE_LIMIT — fine here since it mirrors comments.ts, but worth confirming both limits are meant to diverge permanently rather than drift again.
  • Consider extracting the shared page-limit constant/comment pattern between comments.ts and project-tracker-adapter.ts into one place if a third caller ever needs the same 10-page marker search, to avoid a third silent drift.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8889
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 133 registered-repo PR(s), 66 merged, 6 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kai392; Gittensor profile; 133 PR(s), 6 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Linked issue satisfaction

Addressed
The PR introduces a dedicated COMMENT_MARKER_SEARCH_PAGE_LIMIT = 10 for the marker-search loop (matching comments.ts's COMMENT_SEARCH_PAGE_LIMIT) while leaving the milestone/project list searches at the original 3-page bound, and adds a test placing the marker on page 4 that verifies detection and no double-post.

Review context
  • Author: kai392
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, Cuda, JavaScript, Kotlin, Perl, TypeScript, Vue
  • Official Gittensor activity: 133 PR(s), 6 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Triage stale or unlinked PRs.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Decision record
  • action: merge · clause: success
  • config: 03a7f8b529a9 · pack: oss-anti-slop
  • record: 31e0e7c2ac34 (schema v2, head 8ea14bb)

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 26, 2026
@JSONbored
JSONbored merged commit b723ba8 into JSONbored:main Jul 26, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants