Skip to content

fix(preflight): redact private rerun hints from PR packet - #907

Merged
JSONbored merged 1 commit into
mainfrom
codex/propose-fix-for-public-pr-packet-leak
Jun 19, 2026
Merged

fix(preflight): redact private rerun hints from PR packet#907
JSONbored merged 1 commit into
mainfrom
codex/propose-fix-for-public-pr-packet-leak

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Motivation

  • The public PR packet markdown could expose private account/queue maturity and scoreability hints such as open PR count and credibility, which violates the public/private separation for copy-paste PR text.
  • The change aims to keep account-state blockers available in internal analysis while preventing any private-derived rerun guidance from appearing in public PR text.

Description

  • Replace the public-facing sanitizer for rerun guidance by updating publicSafeRerunCondition in src/signals/local-branch.ts to map account/queue, pending-PR, open-PR-count, projected-score, threshold, eligibility, multiplier, and score-derived phrases to a generic public-safe instruction.
  • Ensure the generic string returned is Rerun after any branch, base, or PR state changes before opening/submitting. so private signals do not surface in the PR packet markdown.
  • Add regression assertions in test/unit/local-branch.test.ts that the produced prPacket.markdown does not contain account/queue maturity, account-state, score, credibility, or open PR count terms and that the Next Steps section contains the generic rerun line.

Testing

  • Ran unit tests with npx vitest run test/unit/local-branch.test.ts test/unit/redaction.test.ts and all tests passed (2 files passed, 45 tests passed).
  • Ran type checking with npm run typecheck and tsc --noEmit completed without errors.

Codex Task

@ghost

ghost commented Jun 18, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #907 is no longer open. No action.

💰 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.

@ghost ghost added the gittensory:reviewed label Jun 18, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.71%. Comparing base (5d9d73a) to head (9b0a95d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #907   +/-   ##
=======================================
  Coverage   96.71%   96.71%           
=======================================
  Files         108      108           
  Lines       14641    14643    +2     
  Branches     5298     5298           
=======================================
+ Hits        14160    14162    +2     
  Misses        102      102           
  Partials      379      379           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ghost

ghost commented Jun 18, 2026

Copy link
Copy Markdown

gittensory · advisory review

Reviewed 2 changed file(s) — two independent AI reviewers.

Changed files: src/signals/local-branch.ts, test/unit/local-branch.test.ts

Suggested action:Safe to merge — both reviewers found no blocking issues.

Reviewer A · gpt-oss-120b — recommends ✅ merge
The PR expands the redaction logic in publicSafeRerunCondition to strip a broader set of private hints from PR packets and adds a unit test confirming the new generic rerun message appears while sensitive terms are omitted.

Suggestions

  • Add a brief comment above the regex explaining the purpose of each term group for future maintainers.
  • Consider adding a test case for a condition that should not be redacted to ensure the function leaves unrelated messages untouched.

Worth double-checking

  • The broader regex may inadvertently mask legitimate public‑safe messages that contain the word "score" or similar substrings.
  • If other parts of the UI rely on the original specific wording, they may now receive the generic message; verify that UI expectations are still met.

Reviewer B · nemotron-3-120b-a12b — recommends ✅ merge
The PR modifies the publicSafeRerunCondition function to redact additional private terms (account/queue maturity, pending PRs merge/close, open PR count, projected score, threshold) by replacing them with a public-safe rerun message. It also adds test assertions to verify that forbidden terms don't appear in the PR packet markdown and that the public-safe message appears in the bodySections. This strengthens the public/private boundary as required by project invariants.

Worth double-checking

  • Verify the regex terms are exhaustive for all private rerun hints that should be redacted
  • Ensure the function is used in all public-facing contexts where the condition string appears

@JSONbored
JSONbored merged commit 5f10a43 into main Jun 19, 2026
20 checks passed
@JSONbored
JSONbored deleted the codex/propose-fix-for-public-pr-packet-leak branch June 19, 2026 05:51
@github-actions github-actions Bot mentioned this pull request Jun 19, 2026
12 tasks
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.

1 participant