Skip to content

fix(orb): SKILL.md linked-issue trigger must key on the gate-mode enforcement authority (#9671) - #9925

Closed
kai392 wants to merge 1 commit into
JSONbored:mainfrom
kai392:fix/9671-skill-linked-issue-gate-v2
Closed

fix(orb): SKILL.md linked-issue trigger must key on the gate-mode enforcement authority (#9671)#9925
kai392 wants to merge 1 commit into
JSONbored:mainfrom
kai392:fix/9671-skill-linked-issue-gate-v2

Conversation

@kai392

@kai392 kai392 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

What

repo-skill-render.ts asserted "a linked issue is required" from two different fields in the same generated file. hasStrictLinkedIssueRule keyed on requireLinkedIssue && linkedIssuePolicy !== "optional", while the Linked-issues section keyed on linkedIssueGateMode === "block". For a repo with requireLinkedIssue: true, linkedIssuePolicy: "required", linkedIssueGateMode: "advisory" (a real, common combo — advisory is the default), the generated SKILL.md said "A linked issue is required, with a 'required' policy." a few lines above "Required: no" — directly contradictory misinformation, written into contributor repos and read by AI agents. Only "block" mode actually blocks (repo-profile.ts:68-70). hasStrictLinkedIssueRule is also one of shouldGenerateRepoSkill's three signals, so a skill file could be generated off a signal that enforces nothing.

How

  • hasStrictLinkedIssueRule now keys on linkedIssueGateMode === "block" — the documented enforcement authority, matching repo-doc-render.ts:106.
  • renderTriggerReasons' sentence states the blocking mode and only fires when the gate actually blocks. The Linked-issues section (Policy: / Required:) is unchanged.

Tests

  • The linked-issue signal counts toward shouldGenerateRepoSkill only under block mode.
  • REGRESSION: the advisory-mode SKILL.md never claims a linked issue is required and says Required: no; the block-mode doc states it is required and says Required: yes (agree both ways).
  • Advisory linked-issue + multi-stage CI no longer reaches the 2-of-3 threshold.
  • Existing repo-skill-render fixtures that meant a genuine strict rule now set block mode, and repo-doc-pr's seedSkillTriggerRepo sets a blocking gate.linkedIssue in the manifest so the skill-generation trigger still fires under the corrected semantics.

Closes #9671

@kai392
kai392 requested a review from JSONbored as a code owner July 29, 2026 23:35
@loopover-orb

loopover-orb Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - reject/close recommended

Review updated: 2026-07-29 23:46:28 UTC

3 files · 1 AI reviewer · 1 blocker · CI green · dirty

🛑 Suggested Action - Reject/Close

Review summary
This PR retargets `hasStrictLinkedIssueRule` from `requireLinkedIssue && linkedIssuePolicy !== "optional"` to `linkedIssueGateMode === "block"`, fixing a real contradiction where SKILL.md could claim a linked issue is required while also stating "Required: no". The change is well-scoped: source fix, updated trigger-reason string, and corresponding test updates across three files that consistently set `linkedIssueGateMode: "block"` where a strict rule is intended. Tests directly cover the regression scenario (advisory mode never claims required) and the block-mode agreement case, which is real coverage of the actual bug, not fabricated.

Nits — 3 non-blocking
  • src/review/repo-skill-render.ts:27 — the comment cites `repo-profile.ts:68-70` as a line-number reference; line numbers drift as files change, consider referencing the exported constant/function name instead for durability.
  • The PR touches `linkedIssuePolicy !== "optional"` semantics but leaves the `linkedIssuePolicy` field's own meaning seemingly redundant with `linkedIssueGateMode` in the rendered doc (Policy: vs Required:) — worth a doc comment clarifying they're now independent axes to avoid a future contributor reintroducing the same conflation.
  • Consider extracting the `linkedIssueGateMode === "block"` check into a shared helper if `repo-doc-render.ts:106` duplicates the same condition, to prevent the two from drifting apart again as happened here.

Why this is blocked

  • No linked issue detected: The PR cites an issue number, but it could not be verified as a currently open issue. — If this PR is intended to solve an issue, link it explicitly in the PR body.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. No linked issue detected: The PR cites an issue number, but it could not be verified as a currently open issue. — If this PR is intended to solve an issue, link it explicitly in the PR body.

Decision drivers

  • ❌ Code review — 1 blocker (1 reviewer)
  • ❌ Gate result — Blocking (Repo-configured hard blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #9671
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 (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 101 registered-repo PR(s), 55 merged, 7 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kai392; Gittensor profile; 101 PR(s), 7 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Linked issue satisfaction

Addressed
The diff changes hasStrictLinkedIssueRule to key on linkedIssueGateMode === "block" (matching repo-doc-render.ts), updates the trigger sentence to reflect the gate mode, leaves the :121 section untouched, and adds the required named tests covering both arms of the boolean, the rendered-body regression for advisory/block modes agreeing, and the shouldGenerateRepoSkill threshold no longer counting a

Review context
  • Author: kai392
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, Cuda, JavaScript, Kotlin, MDX, Perl, Ruby, TypeScript
  • Official Gittensor activity: 101 PR(s), 7 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Decision record
  • action: hold · clause: missing_linked_issue
  • config: fbbd2f69a3ec0b07b53edb4d586e8cb238d14891e0387c806c1c5d85ef7590ac · pack: oss-anti-slop · ci: passed
  • note: diverted by the randomized close-audit holdout (calibration: randomized ε-holdout on would-close PRs with propensity logging #8831) — the deterministic pipeline would otherwise have closed this PR
  • record: 5ba8410464dbb83a67cd51fd58400ef5a0e2ea41321951c0d669c4272bb52928 (schema v5, head 00408b7)

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

  • Re-run LoopOver review

@superagent-security

Copy link
Copy Markdown
Contributor

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

…orcement authority (JSONbored#9671)

repo-skill-render.ts asserted "a linked issue is required" from two
different fields in the same generated file: hasStrictLinkedIssueRule keyed
on `requireLinkedIssue && linkedIssuePolicy !== "optional"`, while the
Linked-issues section keyed on `linkedIssueGateMode === "block"`. For a repo
with requireLinkedIssue:true, policy:"required", gateMode:"advisory" (a real,
common combo -- advisory is the default), the generated SKILL.md said
"A linked issue is required, with a 'required' policy." a few lines above
"Required: no" -- directly contradictory misinformation, since only "block"
mode actually blocks (repo-profile.ts:68-70). hasStrictLinkedIssueRule is
also one of shouldGenerateRepoSkill's three signals, so a skill file could be
generated off a signal that enforces nothing.

- hasStrictLinkedIssueRule now keys on `linkedIssueGateMode === "block"`, the
  documented enforcement authority, matching repo-doc-render.ts:106.
- renderTriggerReasons' sentence states the blocking mode and only fires when
  the gate actually blocks. The Linked-issues section is unchanged.
- Tests: the signal counts only under block mode; a regression rendering the
  full advisory-mode SKILL.md asserts it never claims a linked issue is
  required while saying "Required: no"; the block-mode doc agrees both ways;
  advisory linked-issue + multi-stage CI no longer reaches the 2-of-3
  threshold. Existing repo-skill-render fixtures that meant a genuine strict
  rule now set block mode, and repo-doc-pr's seedSkillTriggerRepo now sets a
  blocking gate.linkedIssue in the manifest so the trigger still fires.

Closes JSONbored#9671

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 29, 2026
@kai392 kai392 closed this Jul 29, 2026
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.53%. Comparing base (4b57927) to head (00408b7).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #9925       +/-   ##
===========================================
- Coverage   91.86%   79.53%   -12.34%     
===========================================
  Files         921      282      -639     
  Lines      113266    58609    -54657     
  Branches    27301     8645    -18656     
===========================================
- Hits       104049    46613    -57436     
- Misses       7929    11706     +3777     
+ Partials     1288      290      -998     
Flag Coverage Δ
backend 100.00% <100.00%> (+4.31%) ⬆️

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

Files with missing lines Coverage Δ
src/review/repo-skill-render.ts 100.00% <100.00%> (ø)

... and 772 files with indirect coverage changes

@loopover-orb loopover-orb Bot reopened this Jul 29, 2026
@loopover-orb loopover-orb Bot closed this Jul 29, 2026
@loopover-orb

loopover-orb Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

LoopOver had already started reviewing this pull request — closing it to dodge the one-shot review process is not allowed. Please open a new pull request with the issues addressed.

@loopover-orb loopover-orb Bot added the review-evasion Gittensor contributor context label Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual-review Gittensor contributor context review-evasion Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

orb(review): generated SKILL.md contradicts itself on whether a linked issue is required

2 participants