Skip to content

fix(review): avoid leaking private manifest warnings in public PR comments#3909

Merged
JSONbored merged 1 commit into
mainfrom
codex/fix-private-manifest-warnings-leak
Jul 7, 2026
Merged

fix(review): avoid leaking private manifest warnings in public PR comments#3909
JSONbored merged 1 commit into
mainfrom
codex/fix-private-manifest-warnings-leak

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • Prevent container-private/self-host .gittensory configuration parse warnings from being published in public unified PR comments, which could disclose operator-only or sensitive terms.

Description

  • Load the repo-published manifest for public comment rendering via loadPublicRepoFocusManifest while preserving the normal loadRepoFocusManifest for maintainer review configuration so private settings remain usable but not exposed.
  • Wire the unified comment manifestWarnings to the public-only manifest (publicRepoFocusManifestForComment?.warnings ?? []) while still using the full manifest for reviewConfig.
  • Added a regression unit test that registers a private local manifest sentinel and asserts that only repo-published warnings are included in the public comment and that private terms are absent.
  • Modified src/queue/processors.ts and test/unit/manifest-validation-collapsible.test.ts to implement and verify the change.

Testing

  • Ran the modified unit suite: npx vitest run test/unit/manifest-validation-collapsible.test.ts and all tests in that file passed.
  • Ran type checking via npm run typecheck which succeeded with no errors.
  • Attempted a full coverage run with npm run test:coverage, but the existing test/unit/queue.test.ts suite hit a preexisting RangeError: Maximum call stack size exceeded and the run was terminated, so full coverage could not be completed.

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

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - fixes required

Review updated: 2026-07-07 09:38:08 UTC

2 files · 1 AI reviewer · 3 blockers · readiness 93/100 · CI failing · unknown

🛑 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.
  • Possible leaked secret in the diff (generic_secret_assignment) — Remove the secret from the diff, rotate the exposed credential, then re-run the gate.

Review summary
This wires manifestWarnings in the public unified comment to a new loadPublicRepoFocusManifest call (repo-published manifest only) while keeping loadRepoFocusManifest (which may include private self-host config) for reviewConfig — a sound, narrowly-scoped fix for the stated info-disclosure risk, and both the unified-comment and buildPublicPrIntelligenceComment branches share the same commentArgs so the fix isn't limited to only one rendering path. The added test exercises loadPublicRepoFocusManifest + buildUnifiedCommentBody directly and confirms the private sentinel term is excluded, but it never calls maybePublishPrPublicSurface itself, so the actual Promise.all/`.catch(() => null)`/`?? []` wiring added in processors.ts is not exercised by any test — matching the 33% patch coverage on that file's hunk. The `OPERATOR_ONLY_SECRET_9f3c` string flagged by the external brief is a deliberate test sentinel, not a real credential.

Nits — 5 non-blocking
  • The new integration wiring in src/queue/processors.ts (the Promise.all, the `.catch(() => null)` fallback, and the `publicRepoFocusManifestForComment?.warnings ?? []` fallback) has no test that exercises maybePublishPrPublicSurface end-to-end — the added test only unit-tests loadPublicRepoFocusManifest and buildUnifiedCommentBody in isolation, which is why codecov/patch is failing at 33%.
  • The `.catch(() => null)` on loadPublicRepoFocusManifest silently swallows any failure (network/DB/parse) and falls back to an empty manifestWarnings array with no logging — worth confirming this fail-closed behavior (hide warnings on error) is intentional rather than masking a real fetch failure.
  • The PR description doesn't reference a linked open issue, which this repo's contribution policy requires for external PRs — worth confirming there's an eligible issue this closes before treating it as mergeable.
  • Add a test that drives maybePublishPrPublicSurface (or the smallest wrapper around it) with a private-manifest warning and a public-manifest warning present simultaneously, asserting the rendered comment only contains the public one — this is the actual changed code path and currently has zero coverage.
  • Consider logging on the loadPublicRepoFocusManifest catch (e.g. a debug/warn log) so a genuine fetch failure isn't indistinguishable from 'no warnings' during triage.

Why this is blocked

  • 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.
  • Possible leaked secret in the diff (generic_secret_assignment) — Remove the secret from the diff, rotate the exposed credential, then re-run the gate.

CI checks failing

  • codecov/patch — 33.33% of diff hit (target 99.00%)
Signal Result Evidence
Code review ❌ 3 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, 569 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 51 PR(s), 569 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), 569 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

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.57%. Comparing base (ac8414c) to head (bcc5af4).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/queue/processors.ts 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3909      +/-   ##
==========================================
- Coverage   93.57%   93.57%   -0.01%     
==========================================
  Files         340      340              
  Lines       33516    33518       +2     
  Branches    12262    12263       +1     
==========================================
  Hits        31364    31364              
- Misses       1528     1529       +1     
- Partials      624      625       +1     
Files with missing lines Coverage Δ
src/queue/processors.ts 94.47% <33.33%> (-0.07%) ⬇️
🚀 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 aefb158 into main Jul 7, 2026
9 of 10 checks passed
@JSONbored
JSONbored deleted the codex/fix-private-manifest-warnings-leak branch July 7, 2026 09:40
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.

1 participant