fix(content-lane): canonicalize issue-body path tokens in checkContentLaneDeliverable - #9889
Conversation
|
Caution 🛑 LoopOver review result - reject/close recommendedReview updated: 2026-07-29 19:19:28 UTC
Review summary Nits — 2 non-blocking
Why this is blocked
📋 Copy for AI agents — paste into your coding agentDecision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk 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.
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.
|
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
…tLaneDeliverable checkContentLaneDeliverable compared changed files canonicalized (lowercased, ./-stripped, backslash-normalized) but tested the issue-body path tokens RAW. The spec patterns are compiled by globToRegExp against a canonicalized path with no `i` flag, so an issue naming its target file with any capitalization — Registry/Subnets/ Foo.json — produced no mentionedPath, and the deliverable gate silently returned not-applicable, reopening the "test-only PR closes a content issue without delivering the content" gap the check exists to close. Test each token canonicalized at the point of match, mirroring classifyRegistryPrScope's matchesPattern helper, while find() still returns the ORIGINAL token so the mentionedPath rendered into the public PR comment quotes the issue body verbatim. Already-lowercase tokens are byte-identical. Closes JSONbored#9667
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9889 +/- ##
==========================================
+ Coverage 79.28% 79.37% +0.09%
==========================================
Files 281 282 +1
Lines 58510 58786 +276
Branches 6777 6895 +118
==========================================
+ Hits 46387 46663 +276
Misses 11840 11840
Partials 283 283
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
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. |
Summary
checkContentLaneDeliverable(src/review/content-lane/registry-logic.ts) is the deterministic "did this PR actually deliver the content file its linked issue names?" guard against a test-only PR closing a content issue via a bareCloses #N. It matchedchangedFilescanonicalized (matchesSpec(canonicalize(file))) but tested the issue-body path tokens raw:entryFilePattern/providerFilePatternare compiled byglobToRegExp, which canonicalizes the glob first and emits^…$with noiflag — so a compiled pattern only ever matches lowercase input. An issue body naming its target with any capitalization (Registry/Subnets/Foo.json) therefore yields nomentionedPath, and with noissueTitleImpliesEntryPatternmatch the check returnsnot-applicable— silently skipping the deliverable gate, the exact gap the function exists to close.classifyRegistryPrScopein the same file already documents and handles this for changed files; the issue-body side never got the treatment.Fix
Each token is tested canonicalized, mirroring
classifyRegistryPrScope'smatchesPatternhelper, while.findstill returns the original token — so thementionedPathrendered into the public PR comment quotes the issue body verbatim. An already-lowercase token is byte-identical to today. No change toextractPathTokens,globToRegExp,canonicalize, the compiled-globiflag, or theissueTitleImpliesEntryPatternfallback.Tests
Added to
test/unit/content-lane-registry-logic.test.ts:Registry/Subnets/Foo.json) with no matching changed file ⇒{ verdict: "missing", mentionedPath: "Registry/Subnets/Foo.json" }(original token preserved).deliveredwhen the PR changesregistry/subnets/foo.json.deliveredandmissing) unchanged.not-applicable(no over-broadening).The two mixed-case cases fail against the current raw-token query. Full file passes (175/175).
Closes #9667