Skip to content

fix(library): ignore sentence punctuation after bare internal URLs in check:library-content - #8540

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/library-check-trailing-punctuation
Oct 1, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
fix/library-check-trailing-punctuation

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • check:library-content read 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
  • Strip trailing sentence punctuation (.,;:!) from the captured slug before the lookup; route segments with a dot such as rss.xml are unaffected
  • Raised on v0.9.10: geo, chat fixes, sandbox fixes #8539

Type of Change

  • Bug fix

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 it
  • bun run check:library-content (80 posts), bun run lint, bun run check:audits (54 passing), docs-manifest:check

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 1, 2026 9:05pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Adjusts URL validation logic in a content-checking script.

The PR does not appear safe to merge until escaped Markdown openers stop causing false missing-link findings.

Findings

  1. P1 Escaped opener misclassifies bare URL ▶

Summary

The PR strips sentence punctuation from bare internal URLs while preserving punctuation in explicit Markdown and HTML link targets.

  • Adds tests for valid and missing bare URLs and for explicit targets ending in a period.

Reviews (2) · Last reviewed commit: "fix(library): only strip trailing punctu..."

Comment thread scripts/check-library-content.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

Comment thread scripts/check-library-content.ts
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files

Confidence score: 4/5

  • scripts/check-library-content.ts can 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

Comment thread scripts/check-library-content.ts
Comment thread scripts/check-library-content.ts
@waleedlatif1
waleedlatif1 merged commit 90e3b91 into staging Oct 1, 2026
23 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/library-check-trailing-punctuation branch October 1, 2026 21:10

This branch was successfully deployed

1 active deployment
Preview — fb9099f1 Deployed Oct 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant