Expand description
File -> parsed artifact: the oracle’s decided.core.markdown.parse /
parse_file composition of the markdown body walk (markdown.rs) with
the frontmatter envelope (frontmatter.rs), per PORT-CONTRACT.d/04 §0
and PORT-CONTRACT.d/09 §1.7.
The markdown module owns the body surfaces (sections, requirements,
titles, parse budget issues) and the raw read path; this module attaches
product.metadata / product.metadata_issues exactly as the oracle’s
parse does:
split = split_frontmatter(text)
if split.raw is not None:
metadata, metadata_issues = parse_frontmatter(split.raw)
elif split.unterminated:
metadata_issues = [malformed-frontmatter "never closed"]The unterminated case is already emitted by markdown::parse; the
raw is not None case is completed here.
Structs§
- Artifact
- A parsed artifact: the markdown
Productplus the frontmatter metadata the oracle’sProduct.metadatacarries. - Issue
- One validation/parse finding, unified across the frontmatter, markdown,
and validation subsystems. Field order mirrors the Python
Issuedataclass (severity, code, message, line) —asdictemission order.
Functions§
- parse_
file decided.core.markdown.parse_file(path)with metadata attached.- parse_
text decided.core.markdown.parse(text, source_path)with metadata attached.