fix(content-lane): canonicalize the issue-body path token in checkContentLaneDeliverable - #9788
Conversation
…tentLaneDeliverable `checkContentLaneDeliverable` tested each `extractPathTokens` token against `matchesSpec` RAW, but the spec patterns are compiled by `globToRegExp` against a canonicalized (lowercased) path with no `i` flag — so they only match lowercase input. An issue body naming its target with any capitalization (`Registry/Subnets/Foo.json`) produced no `mentionedPath`, and the deliverable gate silently returned `not-applicable` — the exact "test-only PR closes a content issue without delivering the content" gap this check exists to close. The `changedFiles` side already canonicalizes; the issue-body side never did. Canonicalize the token at the point of test (mirroring `classifyRegistryPrScope`'s `matchesPattern`) while keeping the ORIGINAL token for `mentionedPath`, which is quoted verbatim into the public PR comment. Already-lowercase paths are unchanged. Closes JSONbored#9667
|
🚨 Contributor flagged. Click here for more info: Superagent Dashboard |
|
Caution 🛑 LoopOver review result - reject/close recommendedReview updated: 2026-07-29 08:53:22 UTC
Review summary Nits — 3 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. |
|
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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9788 +/- ##
===========================================
- Coverage 90.30% 76.69% -13.61%
===========================================
Files 913 283 -630
Lines 113595 59740 -53855
Branches 26963 6673 -20290
===========================================
- Hits 102584 45819 -56765
- Misses 9682 13639 +3957
+ Partials 1329 282 -1047
Flags with carried forward coverage won't be shown. Click here to find out more.
|
What & why
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 compared each issue-body token againstmatchesSpecraw:entryFilePattern/providerFilePatternare compiled byglobToRegExp, which canonicalizes (lowercases) the glob and emits^…$with noiflag — so the patterns only ever match lowercase input. An issue body naming its path with any capitalization (Registry/Subnets/Foo.json) produced nomentionedPath, and with no title fallback the check returnednot-applicable— the gate silently didn't run, exactly the gap the function exists to close. ThechangedFilesside already canonicalizes; the issue-body side never got that treatment (classifyRegistryPrScopein the same file documents why it matters).The fix
Canonicalize the token at the point of test, mirroring
classifyRegistryPrScope'smatchesPattern:mentionedPathstill holds the original token — it is quoted verbatim into the public PR comment, so it must match what the contributor and maintainer see in the issue. Already-lowercase tokens are byte-identical to today. No change toextractPathTokens,globToRegExp,canonicalize, or theissueTitleImpliesEntryPatternfallback (noiflag added to the compiled globs).Tests (
test/unit/content-lane-registry-logic.test.ts)New
#9667suite:Registry/Subnets/Foo.json) against a non-delivering PR →missingwithmentionedPathquoting the original mixed-case token (fails onmain).registry/subnets/foo.json→delivered(fails onmain).deliveredandmissing).not-applicable(not over-broadened).Validation
npm run typecheckgreen; the suite (175 tests) green.git diff --check <base> HEADclean; diff is two files, no route/schema/migration change.Closes #9667