fix(library): ignore sentence punctuation after bare internal URLs in check:library-content - #8540
Conversation
… check:library-content
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
…licit link targets
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
1 issue found across 2 files
Confidence score: 4/5
scripts/check-library-content.tscan treat escaped Markdown prose as a library link and include its trailing period in the slug, leading to incorrect audit results. Ignore escaped openers and strip trailing punctuation from actual link targets.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="scripts/check-library-content.ts">
<violation number="1" location="scripts/check-library-content.ts:337">
P2: Distinguish escaped Markdown openers from actual link targets here; `\[label](https://www.sim.ai/library/kept-guide.` is prose, but this treats it as an explicit target and leaves the period in the slug, so the audit still fails.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Summary
check:library-contentread a bare internal URL that ends a sentence (…see https://www.sim.ai/library/<slug>.) as the slug<slug>.and reported a valid link as missing.,;:!) from the captured slug before the lookup; route segments with a dot such asrss.xmlare unaffectedType of Change
Testing
scripts/check-library-content.test.ts: added a passing sentence-ending bare URL to the clean-post case and a sentence-ending broken URL to the missing-link case (reported as/library/<slug>, not<slug>.); both fail without the fix, 19/19 pass with itbun run check:library-content(80 posts),bun run lint,bun run check:audits(54 passing),docs-manifest:checkChecklist
test-auditauthoring gate)