Skip to content

fix(agent): exclude private GitHub Projects v2 from suggestion comments - #3944

Merged
JSONbored merged 1 commit into
mainfrom
codex/fix-private-org-project-title-leak
Jul 7, 2026
Merged

fix(agent): exclude private GitHub Projects v2 from suggestion comments#3944
JSONbored merged 1 commit into
mainfrom
codex/fix-private-org-project-title-leak

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • Prevent leaking private organization Projects v2 titles into public PR suggestion comments by ensuring only open, public projects are considered for suggest-mode matches.

Description

  • Request the Projects v2 public field in the GraphQL projectsV2 query and extend the ProjectV2Node type to include public in src/integrations/project-tracker-adapter.ts.
  • Filter returned projects to only those that are not closed and are public before producing suggestion candidates.
  • Update test/unit/project-tracker-adapter.test.ts fixtures and assertions to cover closed and private project filtering and rename the related regression test to reflect the private-project filter.

Testing

  • Ran the unit suite for the modified file: npx vitest run test/unit/project-tracker-adapter.test.ts --reporter=verbose, and all tests in that file passed.
  • Verified type checking with npm run typecheck (tsc --noEmit) succeeded locally.
  • Attempted the full local gate via npm run test:ci; the run progressed into the coverage phase but did not complete in this environment due to an unrelated test-suite recursion/stack overflow observed in test/unit/queue.test.ts and network-restricted npm audit (registry 403), so the end-to-end CI could not be fully completed here.

Codex Task

@superagent-security

Copy link
Copy Markdown
Contributor

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

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

loopover-orb Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-07 07:48:32 UTC

2 files · 1 AI reviewer · 2 blockers · readiness 93/100 · CI green · clean

⏸️ Suggested Action - Manual Review

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.

Review summary
This PR closes a real privacy leak: GitHubProjectsAdapter.listOpenProjects (src/integrations/project-tracker-adapter.ts:210-220) now requests the `public` field on projectsV2 nodes and filters to `!project.closed && project.public`, so private org boards can no longer surface in the fuzzy-match suggestion comment posted to public PRs. The GraphQL query, type, and filter predicate are all consistent with each other, and the test fixtures were updated in lockstep (closed/public flags added to every mock node) plus a new private-project case was added to the existing regression test at test/unit/project-tracker-adapter.test.ts. This is a narrow, correctly-scoped fix with matching test coverage for the new branch.

Nits — 5 non-blocking
  • The PR description doesn't cite an eligible open issue number for this specific privacy fix (only references the pre-existing feat(agent): auto-match PRs to open GitHub Projects v2 (suggest-mode) #3184/feat(agent): auto-match PRs to open GitHub Projects v2 (suggest-mode) #3184 doc comments) — worth confirming there's a tracked issue this closes.
  • resolveProjectV2Fields (src/integrations/project-tracker-adapter.ts:~160) still operates on raw project IDs without any public/closed check; if it's ever called for a project that failed the new filter it would silently succeed, so it may be worth a comment noting that function is intentionally unfiltered (auto-apply field resolution, not suggestion) to avoid future confusion.
  • The new private-project fixture (`PVT_private`, test/unit/project-tracker-adapter.test.ts) is added to the existing closed-board regression test rather than as its own isolated test case — fine for coverage, but the combined test name/body now covers two independent regressions (closed AND private) which slightly muddies the regression trail if one of them breaks later.
  • Consider a short inline comment at the new filter (project-tracker-adapter.ts:219) documenting that `public` here refers to GitHub's org-visibility field, not a boolean about attach-mode behavior, since 'public' is a slightly overloaded term in this codebase's docs.
  • If there's an eligible open issue for this leak, add an explicit 'Fixes #NNNN' line to the PR description per repo convention.

Concerns raised — review before merging

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.
Signal Result Evidence
Code review ❌ 2 blockers 1 reviewer
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
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 (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 51 registered-repo PR(s), 43 merged, 343 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 51 PR(s), 343 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, TypeScript, JavaScript, Ruby, Go, Kotlin, MDX, Shell
  • Official Gittensor activity: 51 PR(s), 343 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Explain no-issue PR.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
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.

🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.66%. Comparing base (1ce4364) to head (45fb197).
⚠️ Report is 15 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3944   +/-   ##
=======================================
  Coverage   93.66%   93.66%           
=======================================
  Files         372      372           
  Lines       34856    34856           
  Branches    12743    12743           
=======================================
  Hits        32649    32649           
  Misses       1588     1588           
  Partials      619      619           
Files with missing lines Coverage Δ
src/integrations/project-tracker-adapter.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 7, 2026
@JSONbored
JSONbored merged commit 452d431 into main Jul 7, 2026
10 checks passed
@JSONbored
JSONbored deleted the codex/fix-private-org-project-title-leak branch July 7, 2026 07:57
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

Development

Successfully merging this pull request may close these issues.

1 participant