Skip to content

feat(review): append follow-up-issue command to nit fix-handoff blocks (#1962)#4055

Closed
carlh7777 wants to merge 1 commit into
JSONbored:mainfrom
carlh7777:feat/fix-handoff-follow-up-issue-emission
Closed

feat(review): append follow-up-issue command to nit fix-handoff blocks (#1962)#4055
carlh7777 wants to merge 1 commit into
JSONbored:mainfrom
carlh7777:feat/fix-handoff-follow-up-issue-emission

Conversation

@carlh7777

Copy link
Copy Markdown
Contributor

Summary

Completes the remaining slice of #1962 that #4053 left open: the follow-up-issue action. PR #4053 wired fix-handoff block emission into the unified review comment; buildFollowUpIssueSpec (#2177 / #3834) and the gittensory_file_follow_up_issue MCP tool already existed, but no review comment ever surfaced the action. This appends a runnable gh issue create command to nit fix-handoff blocks only — deferred findings a maintainer may want tracked instead of fixed in this PR. Blockers are unchanged (fix in-PR, not defer).

Closes the follow-up-issue deliverable of #1962.

Design

  • src/review/fix-handoff-render.ts: optional FixHandoffBuildOptions.repoFullName. When set, nit blocks gain an Or file a follow-up issue fenced bash block composed by buildFollowUpIssueSpec (same file_issue spec shape + LOCAL_WRITE_BOUNDARY as every other local-write artifact). Blockers and callers that omit repoFullName ⇒ byte-identical.
  • src/queue/processors.ts: passes repoFullName into buildFixHandoffBlocks at the existing fix-handoff publish site (same gate, same aiReview.inlineFindings source as feat(review): emit fix-handoff blocks into the unified review comment (#1962) #4053).
  • Default-OFF parity preserved at every layer: flag off ⇒ no Fix handoff section; flag on but no repoFullName at call site ⇒ unchanged (processor always passes it when emitting).

Tests

  • test/unit/fix-handoff-render.test.ts: nit gets follow-up command; blocker does not; path-only nit location; absent repoFullName parity.
  • test/unit/fix-handoff-collapsible.test.ts: unchanged (still passes — blocks built without repoFullName in bridge unit tests).
  • test/unit/queue.test.ts: end-to-end review with GITTENSORY_REVIEW_FIX_HANDOFF + review.fixHandoff emits follow-up gh issue create for a nit finding in the unified comment.

Validation

  • npm run typecheck — clean
  • npx vitest run test/unit/fix-handoff-render.test.ts test/unit/fix-handoff-collapsible.test.ts — 26 passed
  • npx vitest run test/unit/queue.test.ts -t "Fix handoff" — passed

Safety

  • No secrets/wallet/hotkey/trust-score/reward terms exposed — reuses buildFollowUpIssueSpec's existing marker stripping + bounded title/body.
  • Public GitHub text stays sanitized; follow-up command is content-only (contributor runs locally with own creds).
  • No auth/cookie/CORS/GitHub App/session change.
  • No API/OpenAPI/MCP surface change (reuses existing spec builder; no new tool).
  • No UI change.
  • No docs/changelog change needed.

UI Evidence

N/A — backend review-comment rendering only.

@carlh7777
carlh7777 requested a review from JSONbored as a code owner July 7, 2026 17:26
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 7, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@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 - reject/close recommended

Review updated: 2026-07-07 17:31:30 UTC

4 files · 1 AI reviewer · 2 blockers · readiness 93/100 · CI pending · blocked

🛑 Suggested Action - Reject/Close

  • 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 wires an optional `repoFullName` through `buildFixHandoffBlock`/`buildFixHandoffBlocks` so nit fix-handoff blocks gain a runnable `gh issue create` follow-up command via the pre-existing `buildFollowUpIssueSpec`, while blockers and callers that omit `repoFullName` remain byte-identical. The change is small, narrowly scoped to the nit branch (`finding.severity === "nit" && options?.repoFullName`), reuses the existing spec builder rather than inventing new command-building logic, and is backed by targeted unit tests (nit-with-repo, blocker-excluded, parity-when-absent, path-only line) plus an end-to-end queue test asserting ordering relative to the blocker block. It closes the stated follow-up-issue deliverable of #1962 that #4053 left open.

Nits — 5 non-blocking
  • fix-handoff-render.ts:41-48 recomputes the line>0 check separately from the `hasLine` constant computed a few lines later in `buildFixHandoffBlock` — consider passing `hasLine`/`line` through instead of re-deriving `line > 0` in `followUpIssueSection`.
  • processors.ts:10182 — confirm `repoFullName` in scope at this call site is the same normalized owner/repo string `buildFollowUpIssueSpec` expects elsewhere (e.g. matches the `gh issue create --repo 'JSONbored/gittensory'` format asserted in queue.test.ts) rather than a differently-cased or partial value.
  • No test exercises a nit finding that has both a `suggestion` and the new follow-up block together — worth one assertion confirming ordering/spacing when both are present.
  • Add a unit test where `finding.body` contains a single-quote or other shell-special character to confirm `buildFollowUpIssueSpec` (owned elsewhere) escapes it correctly when reached through this new call site.
  • Consider a brief doc comment on `FixHandoffBuildOptions.repoFullName` noting which processor call site is expected to always supply it (mirrors the existing 'flag off ⇒ omitted' comment style already used in this file).

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.
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: 189 registered-repo PR(s), 125 merged, 16 issue(s).
Contributor context ✅ Confirmed Gittensor contributor carlh7777; Gittensor profile; 189 PR(s), 16 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Review context
  • Author: carlh7777
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: JavaScript, Python, TypeScript, Cuda, HTML, MDX, Rust
  • Official Gittensor activity: 189 PR(s), 16 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • 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

@loopover-orb

loopover-orb Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Gittensory is closing this pull request on the maintainer's behalf (No linked issue detected; Maintainer requires a linked issue). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 7, 2026
@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.59%. Comparing base (66a70b8) to head (b207adb).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4055   +/-   ##
=======================================
  Coverage   93.59%   93.59%           
=======================================
  Files         379      379           
  Lines       35582    35586    +4     
  Branches    13049    13051    +2     
=======================================
+ Hits        33302    33306    +4     
  Misses       1618     1618           
  Partials      662      662           
Files with missing lines Coverage Δ
src/queue/processors.ts 94.95% <ø> (ø)
src/review/fix-handoff-render.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.

@carlh7777
carlh7777 deleted the feat/fix-handoff-follow-up-issue-emission branch July 13, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant