Skip to content

Property-test Markdown frontmatter parsing - #13

Draft
adewale wants to merge 2 commits into
mainfrom
codex/pbt-fuzz-next-step
Draft

Property-test Markdown frontmatter parsing#13
adewale wants to merge 2 commits into
mainfrom
codex/pbt-fuzz-next-step

Conversation

@adewale

@adewale adewale commented Aug 30, 2026

Copy link
Copy Markdown
Owner

What

  • Add a structured Hypothesis property for TOML frontmatter plus arbitrary Markdown bodies.
  • Assert exact metadata, body preservation, and body-line accounting through the production parser.
  • Add Hypothesis to the locked development dependency group.
  • Update the locked Wrangler toolchain to 4.127.1, which carries the fixed Undici required by the repository's high-severity audit gate.
  • Record the TOML/Markdown generator and oracle rule in docs/lessons-learned.md.

Why

Example source files combine two grammars at one trust boundary. The existing unittest suite covered examples but did not generate escaping, Unicode, empty values, and arbitrary Markdown combinations with shrinking.

The hosted audit also began rejecting Wrangler 4.114.0 after new high-severity Undici advisories were published. Wrangler 4.127.1 is the first supported release selected by npm's remediation.

How

The generator builds valid TOML string fields and an independent Markdown body, then calls _split_frontmatter and checks both sides of the boundary exactly. The test remains collectable by the repository's unittest runner. The project lesson preserves the need to reach the valid-frontmatter path without rebuilding the production parser as the oracle.

Testing

  • Full Python suite: 225 tests passed
  • Ruff passed
  • Clean npm install succeeded, Wrangler reports 4.127.1, and npm audit --audit-level=high found 0 vulnerabilities
  • Independent review reran the generated unittest property
  • Full Worker verification remains delegated to CI because the repository requires Node 22 and the local host provides Node 26
  • The focused unittest property was rerun after the lesson update: 1 passed

Risk

No application-runtime code changes. The Worker development toolchain moves within Wrangler 4.x and CI exercises it under the repository's required Node 22 runtime.

@adewale
adewale force-pushed the codex/pbt-fuzz-next-step branch from e3b5179 to d2c26a5 Compare August 31, 2026 00:13
@adewale
adewale force-pushed the codex/pbt-fuzz-next-step branch from d2c26a5 to 4897be1 Compare August 31, 2026 00:15
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