Skip to content

fix(core): bypass poisoned markdown cache - #42558

Open
1052326311 wants to merge 1 commit into
anomalyco:devfrom
1052326311:markdown-cache-fix
Open

fix(core): bypass poisoned markdown cache#42558
1052326311 wants to merge 1 commit into
anomalyco:devfrom
1052326311:markdown-cache-fix

Conversation

@1052326311

@1052326311 1052326311 commented Aug 14, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #42350

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

It bypasses gray-matter's content cache in the shared markdown parser. Without this, a strict YAML error caches the original content before the sanitized retry, so parsing the same skill again returns empty frontmatter. Passing an options object disables that cache while preserving the existing strict-then-sanitize behavior.

How did you verify your code works?

On current origin/dev (e23586af2623f1bc2e8e6965d2d7acf7bd03d5c3), the issue's content returns sanitized data once and {} on the second parse. On candidate 80169062af83bead2f28b7a2046815daf38e8ccf, both parses return the sanitized data.

  • Focused regression: 1 pass, 2 assertions
  • Package and repository typechecks: pass (30/30 root tasks)
  • Oxlint and Prettier checks on changed files: pass

Screenshots / recordings

Not applicable; this is a parser fix.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Aug 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

Skills silently vanish on re-parse: gray-matter cache is poisoned when strict-YAML frontmatter parse throws

1 participant