Skip to content

fix(content-lane): canonicalize issue-body path tokens in checkContentLaneDeliverable - #9893

Closed
bitfathers94 wants to merge 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-9667
Closed

fix(content-lane): canonicalize issue-body path tokens in checkContentLaneDeliverable#9893
bitfathers94 wants to merge 1 commit into
JSONbored:mainfrom
bitfathers94:fix/issue-9667

Conversation

@bitfathers94

Copy link
Copy Markdown
Contributor

fix(content-lane): canonicalize issue-body path tokens in checkContentLaneDeliverable

The spec's entry/provider patterns are compiled by globToRegExp against a
canonicalized (lowercased, no i flag) path, so an issue body writing the target
file with any capitalization produced no mentionedPath and the deliverable gate
silently reported not-applicable — letting a test-only PR close a content issue
without delivering the content. Test each extracted token via canonicalize(),
mirroring classifyRegistryPrScope's matchesPattern, while keeping the original
token for the public-comment mentionedPath. Already-lowercase paths are
byte-identical to before.

Closes #9667

…tLaneDeliverable

The spec's entry/provider patterns are compiled by globToRegExp against a
canonicalized (lowercased, no i flag) path, so an issue body writing the target
file with any capitalization produced no mentionedPath and the deliverable gate
silently reported not-applicable — letting a test-only PR close a content issue
without delivering the content. Test each extracted token via canonicalize(),
mirroring classifyRegistryPrScope's matchesPattern, while keeping the original
token for the public-comment mentionedPath. Already-lowercase paths are
byte-identical to before.
@bitfathers94
bitfathers94 requested a review from JSONbored as a code owner July 29, 2026 19:20
@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 19:29:08 UTC

2 files · 1 AI reviewer · 1 blocker · CI green · clean

🛑 Suggested Action - Reject/Close

Review summary
This is a narrow, well-targeted fix: `checkContentLaneDeliverable` now runs each extracted issue-body path token through `canonicalize()` before testing it against the spec patterns, mirroring the exact same fix already applied to `classifyRegistryPrScope`'s `matchesPattern` in the existing code (visible in the FULL FILE CONTENT). The `mentionedPath` returned to the public comment correctly keeps the original, non-canonicalized token, and the accompanying tests cover mixed-case delivered/missing, byte-identical lowercase behavior, and a not-over-broadened non-matching case. The trace holds up: `spec.entryFilePattern`/`providerFilePattern` are compiled by `globToRegExp` without the `i` flag against canonicalized paths elsewhere in this file, so an uncanonicalized token genuinely failed to match before this diff — this is a real, reachable bug fix, not a can't-occur guard.

Nits — 3 non-blocking
  • The PR title/description says 'Closes orb(content-lane): canonicalize issue-body path tokens in `checkContentLaneDeliverable #9667' but the external history note shows partial/inconsistent linkage records for that issue — worth double-checking the issue reference resolves as expected.
  • registry-logic.ts is now large (~941 lines per the size-smell note); this diff doesn't make that worse, but it's a candidate for splitting the surface-model logic out of the scope-classification/deliverable-check logic in a future pass.
  • Consider adding a regression test with a `./`-prefixed or backslash-separated issue-body token (mirroring the `classifyRegistryPrScope` coverage for that same canonicalization) since `canonicalize()` also strips `./` and normalizes `\`→`/`, not just case.

Why this is blocked

  • Linked issue's expected content was never delivered: This PR's linked issue names registry/subnets/foo.json, but the PR's changed files never touch it -- the issue's actual content deliverable does not appear to have been added. — Edit registry/subnets/foo.json to deliver the issue's actual ask, or link the correct issue.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. Linked issue's expected content was never delivered: This PR's linked issue names `registry/subnets/foo.json`, but the PR's changed files never touch it -- the issue's actual content deliverable does not appear to have been added. — Edit registry/subnets/foo.json to deliver the issue's actual ask, or link the correct issue.

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 #9667
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: 94 registered-repo PR(s), 65 merged, 1 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bitfathers94; Gittensor profile; 94 PR(s), 1 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The diff canonicalizes each issue-body token before testing against matchesSpec while preserving the original token for mentionedPath, exactly mirroring classifyRegistryPrScope's approach as required, and adds named tests covering mixed-case delivered/missing, lowercase-unchanged behavior, and the not-applicable non-match case.

Review context
  • Author: bitfathers94
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 94 PR(s), 1 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.

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

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label 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.39%. Comparing base (35e574d) to head (ec98b12).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9893      +/-   ##
==========================================
+ Coverage   79.29%   79.39%   +0.09%     
==========================================
  Files         281      282       +1     
  Lines       58566    58842     +276     
  Branches     6785     6903     +118     
==========================================
+ Hits        46440    46716     +276     
  Misses      11843    11843              
  Partials      283      283              
Flag Coverage Δ
backend 100.00% <100.00%> (?)

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

Files with missing lines Coverage Δ
src/review/content-lane/registry-logic.ts 100.00% <100.00%> (ø)

@loopover-orb

loopover-orb Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (Linked issue's expected content was never delivered). 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.

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.

orb(content-lane): canonicalize issue-body path tokens in `checkContentLaneDeliverable

1 participant