Repository navigation
fix: preserve falsy non-mapping Markdown frontmatter - #13569
flysheep-ai wants to merge 1 commit into
Conversation
|
@flysheep-ai is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
|
|
|
Hi @flysheep-ai, thanks a lot for your contribution! 🙏 We noticed that the Contributor License Agreement (CLA) check ( To get your PR reviewed, please sign the CLA via the link in the |
|
Hi @flysheep-ai, just a friendly reminder: this PR is still in draft because the Contributor License Agreement (CLA) hasn't been signed yet. We'd love to review your contribution! Please sign the CLA via the link in the |
Related Issues
No existing issue; found while reading
MarkdownToDocument. This follows the frontmatter support added in #11615. A bounded review of recent open/closed PRs and all frontmatter PR search results found no matching correction.Proposed Changes
With
extract_frontmatter=True, frontmatter containingfalse,0,[], or""is silently removed from the document. These values are not mappings, butor {}converts them to an empty mapping before the existing type check. Other non-mapping values are already kept as content and produce a warning.Normalize only
Noneto an empty mapping, so falsy non-mappings follow the existing content-preserving path. Empty/null frontmatter and empty mappings retain their behavior. A release note describes the correction.How did you test it?
run()cases on unchanged source: 4 failed, 5 passed. The four failures show lost frontmatter content.Notes for the reviewer
The regression cases are grouped in a dedicated frontmatter test module. Their coverage and assertions are unchanged from the red-before-fix run. An initial attempt to add them to the existing module encountered baseline codespell findings in unrelated encoding byte literals. The existing module is unchanged in this PR and was still executed in full; no hook was bypassed or disabled and no spelling suppression was added.
This issue was selected and the patch implemented, tested, and independently reviewed autonomously by OpenAI Codex agents. The account owner authorized publication. No independent human code review or human test execution is claimed. Agents have not signed a CLA.
Checklist