Skip to content

fix(signals): populate labelPolicy.note in focusManifestPolicyToCompilerOutput (#5943) - #6021

Closed
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:fix/critical-issue-label-policy-note
Closed

fix(signals): populate labelPolicy.note in focusManifestPolicyToCompilerOutput (#5943)#6021
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:fix/critical-issue-label-policy-note

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

Fixes #5943

Two adapters compile FocusManifestPolicy into RepoPolicyCompilerOutput, but only compileRepoPolicyCompilerOutput populated labelPolicy.note. The registration-readiness report uses focusManifestPolicyToCompilerOutput, so onboardingPackPreview.labelPolicy.note was always null — silently dropping linked-issue-policy guidance.

Root cause

focusManifestPolicyToCompilerOutput omitted labelPolicy.note while its sibling adapter called the private labelPolicyNote() helper.

Fix approach

  • Export labelPolicyNote from repo-policy-compiler.ts
  • Reuse it in focusManifestPolicyToCompilerOutput with the same linkedIssuePolicy input
  • Cross-adapter parity test + registration-readiness end-to-end assertion

Impact

Repo owners evaluating registration readiness now see the same linked-issue guidance text as the direct onboarding-pack API/MCP path.

Risk / tradeoffs

  • Minimal: reuses existing helper logic unchanged; no other field mappings touched.

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 15, 2026 06:59
@superagent-security

Copy link
Copy Markdown
Contributor

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

Export labelPolicyNote and wire it into focusManifestPolicyToCompilerOutput
so the registration-readiness onboardingPackPreview matches the direct
onboarding-pack API/MCP path.

Closes JSONbored#5943

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.16%. Comparing base (cd78eac) to head (5bbcbaa).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6021   +/-   ##
=======================================
  Coverage   95.16%   95.16%           
=======================================
  Files         592      592           
  Lines       46944    46949    +5     
  Branches    15003    15003           
=======================================
+ Hits        44674    44679    +5     
  Misses       1512     1512           
  Partials      758      758           
Flag Coverage Δ
shard-1 43.93% <ø> (-0.01%) ⬇️
shard-2 36.55% <ø> (+0.02%) ⬆️
shard-3 31.98% <ø> (-0.02%) ⬇️
shard-4 31.89% <ø> (-0.06%) ⬇️
shard-5 32.24% <ø> (-0.28%) ⬇️
shard-6 44.93% <ø> (+0.32%) ⬆️

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

Files with missing lines Coverage Δ
src/signals/onboarding-pack.ts 98.90% <ø> (ø)
src/signals/repo-policy-compiler.ts 92.30% <ø> (ø)

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 15, 2026
@loopover-orb

loopover-orb Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Caution

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

🛑 LoopOver review result - reject/close recommended

Review updated: 2026-07-15 07:12:51 UTC

4 files · 1 AI reviewer · 1 blocker · readiness 74/100 · CI green · clean

🛑 Suggested Action - Reject/Close

Review summary
This PR closes a real parity gap: focusManifestPolicyToCompilerOutput never called labelPolicyNote, so onboardingPackPreview.labelPolicy.note was always null while the sibling compileRepoPolicyCompilerOutput adapter populated it correctly. The fix exports the existing private helper and reuses it with the same linkedIssuePolicy input, matching the sibling adapter's behavior exactly with no new logic introduced. Tests add both a direct cross-adapter parity assertion and an end-to-end registration-readiness assertion, which actually exercise the fixed code path.

Nits — 4 non-blocking
  • src/signals/onboarding-pack.ts:103 — worth double-checking that labelPolicyNote's signature (single linkedIssuePolicy string) hasn't diverged from other call sites now that it's a public export with a wider consumer surface.
  • Consider adding a short JSDoc note on the exported labelPolicyNote in repo-policy-compiler.ts documenting that it's now a shared adapter helper, to discourage future re-forking of this logic.
  • Pull request duplicates other open work — Check for an existing pull request or issue covering this change and coordinate or consolidate before continuing.
  • Readiness score is below the configured threshold — Use the readiness panel as advisory maintainer context; the score does not block this PR.

Why this is blocked

  • Linked issue overlaps another open PR — Review the related PRs before spending reviewer time on duplicate work.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. Linked issue overlaps another open PR — Review the related PRs before spending reviewer time on duplicate work.
Signal Result Evidence
Code review ❌ 1 blocker 1 reviewer
Linked issue ✅ Linked #5943
Related work ⚠️ Same linked issue: #6020 Another open PR references the same linked issue.
Change scope ❌ 8/20 High 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: 344 registered-repo PR(s), 165 merged, 29 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 344 PR(s), 29 issue(s).
Gate result ❌ Blocking Repo-configured hard blocker found.
Improvement ✅ Minor risk: low · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The diff exports labelPolicyNote and reuses it in focusManifestPolicyToCompilerOutput exactly as the issue prescribes, without touching other field mappings, and adds both the cross-adapter parity test and the registration-readiness end-to-end assertion required by the issue.

Review context
Contributor next steps
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 &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; 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://gittensory.aethereal.dev/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 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

@loopover-orb

loopover-orb Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (Linked issue overlaps another open PR; duplicate of another open PR). 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 15, 2026
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(signals): focusManifestPolicyToCompilerOutput drops labelPolicy.note, unlike its sibling adapter

1 participant