Share canonical frontmatter boundary (#361) - #407
Conversation
Route both the library and CLI pipelines through `process_with_frontmatter` so only one function owns the leading YAML frontmatter split and verbatim rejoin.
Prove that the shared helper preserves valid YAML frontmatter, confines closures to the Markdown body, and handles documents without frontmatter. Pin the library and CLI formatting paths with end-to-end snapshots.
Define `process_with_frontmatter` as the sole owner of leading YAML frontmatter preservation and require every body transform to execute inside its closure.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Summary
Validation
WalkthroughChangesFrontmatter processing
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 19 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (19 passed)
📋 Issue PlannerBuilt with CodeRabbit's Coding Plans for faster development and fewer bugs. View plan used: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 694bc89698
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@coderabbitai review |
✅ Action performedReview finished.
|
Add a doctested public API example and align user, architecture, and frontmatter planning documentation with the canonical closure boundary.
State the delivered public boundary and retained internal detector without leaving the historical revision note ambiguous.
|
@coderabbitai no need to retcon historical execplans. The execplans should reflect the state of the architecture at the time they were implemented. |
|
Tip For best results, initiate chat on the files or code changes.
✏️ Learnings added
|
Remove the follow-up implementation notes so the completed ExecPlan retains its original historical record.
|
@coderabbitai Have the following failed checks now been resolved? If further work is required, please provide an AI agent prompt for the remaining work to be done to address these failures. Do not treat warnings as optional or aspirational. Where a change is out of scope for this PR, propose a GitHub issue unless one exists already. (Treat documentation and validation coverage as in scope). ❌ Failed checks (2 warnings)
|
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '=== Changed files ==='
git diff --name-status "$(git merge-base HEAD origin/main)" HEAD 2>/dev/null || git diff --name-status HEAD~1 HEAD
echo
echo '=== Documentation frontmatter references ==='
rg -n -i -C 4 'yaml frontmatter|frontmatter|process_with_frontmatter|split_frontmatter|split.*frontmatter' \
README.md docs 2>/dev/null || true
echo
echo '=== Documentation outlines ==='
for file in docs/users-guide.md docs/architecture.md docs/developers-guide.md; do
if [ -f "$file" ]; then
echo "--- $file ---"
rg -n '^#{1,6} ' "$file" || true
else
echo "Missing: $file"
fi
done
echo
echo '=== Relevant documentation diff ==='
git diff "$(git merge-base HEAD origin/main)" HEAD -- \
docs/users-guide.md docs/architecture.md docs/developers-guide.md 2>/dev/null \
|| git diff HEAD~1 HEAD -- docs/users-guide.md docs/architecture.md docs/developers-guide.mdLength of output: 41908
Do not create a follow-up issue or perform further documentation work for these two checks. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
The branch makes
process_with_frontmatterthe canonical leading-YAMLsplit/rejoin boundary, preventing the library and CLI pipelines from diverging.
It closes issue #361.
Closes #361.
Review walkthrough
Validation
make check-fmt: passed.make typecheck: passed.make lint: passed with warnings denied.make test: passed.make markdownlint: passed.make nixie: passed.mbake validate Makefile: passed.make: passed.coderabbit review --agent: requested after both implementation milestones; no findings were emitted.Notes
Kani is intentionally not used: the contract operates over unbounded Markdown
line input, so property testing is the appropriate adversary rather than a
bounded model-checking harness. A deliberate mutation that omitted the restored
frontmatter prefix was rejected by the preservation property.
References