Skip to content

fix(review): generated contributor docs no longer overclaim requireLinkedIssue enforcement#5300

Merged
JSONbored merged 1 commit into
mainfrom
fix/require-linked-issue-doc-accuracy
Jul 12, 2026
Merged

fix(review): generated contributor docs no longer overclaim requireLinkedIssue enforcement#5300
JSONbored merged 1 commit into
mainfrom
fix/require-linked-issue-doc-accuracy

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • requireLinkedIssue alone only surfaces the missing_linked_issue advisory finding — it never blocks a PR on its own. The real blocking authority is linkedIssueGateMode === "block" (default "advisory").
  • Generated contributor docs (repo-skill-render.ts, repo-doc-render.ts) rendered "Required: yes" from requireLinkedIssue alone, so a maintainer who toggles it on without separately setting linkedIssueGateMode: "block" gets docs that overclaim enforcement.
  • Threads linkedIssueGateMode through RepoProfileContributionWorkflow and keys the rendered text off it. Also corrects the db/schema.ts comment that made the same overstatement, and adds a doc comment to requireLinkedIssue itself.

Scope

src/types.ts, src/db/schema.ts, src/review/repo-profile.ts, src/review/repo-skill-render.ts, src/review/repo-doc-render.ts + 4 test files updated for the new required field + 2 new regression tests.

Validation

  • npm run typecheck — clean
  • npx vitest run test/unit/repo-skill-render.test.ts test/unit/repo-doc-render.test.ts test/unit/repo-profile.test.ts test/unit/generated-doc-refresh.test.ts — 92/92 passing
  • Scoped coverage on the 3 touched source files: 100% statements/branches/functions/lines
  • npm run docs:drift-check — clean

Safety

Deliberately did NOT widen the focus-manifest.ts:626 promotion condition (would be a real behavior change, its own decision) — this PR is doc-accuracy only.

Closes #5287

…nkedIssue enforcement

requireLinkedIssue alone only surfaces the missing_linked_issue
advisory finding -- it never blocks a PR on its own (the real
authority is linkedIssueGateMode === "block", default "advisory").
Generated docs (repo-skill-render.ts, repo-doc-render.ts) rendered
"Required: yes" from requireLinkedIssue alone, so the common
"toggle requireLinkedIssue, never touch the gate-mode dropdown" case
produced docs claiming enforcement that wasn't actually happening.

Threads linkedIssueGateMode through RepoProfileContributionWorkflow
and keys the rendered text off it instead. Also corrects the
overstating db/schema.ts comment and adds a doc comment to
requireLinkedIssue itself.

Refs #5287
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.36%. Comparing base (fb9fb20) to head (d30dfbe).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5300   +/-   ##
=======================================
  Coverage   94.36%   94.36%           
=======================================
  Files         474      474           
  Lines       40124    40124           
  Branches    14629    14629           
=======================================
  Hits        37865    37865           
  Misses       1583     1583           
  Partials      676      676           
Flag Coverage Δ
shard-1 46.27% <0.00%> (-0.15%) ⬇️
shard-2 34.73% <0.00%> (+0.03%) ⬆️
shard-3 32.17% <100.00%> (+0.10%) ⬆️
shard-4 31.84% <0.00%> (-0.26%) ⬇️
shard-5 33.44% <0.00%> (-0.24%) ⬇️
shard-6 45.07% <0.00%> (+0.23%) ⬆️

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

Files with missing lines Coverage Δ
src/db/schema.ts 73.07% <ø> (ø)
src/review/repo-doc-render.ts 100.00% <100.00%> (ø)
src/review/repo-profile.ts 100.00% <ø> (ø)
src/review/repo-skill-render.ts 100.00% <100.00%> (ø)
src/types.ts 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored self-assigned this Jul 12, 2026
@JSONbored JSONbored merged commit 29cb3f3 into main Jul 12, 2026
17 checks passed
@JSONbored JSONbored deleted the fix/require-linked-issue-doc-accuracy branch July 12, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Fix requireLinkedIssue docs and generated contributor docs that overclaim enforcement

1 participant