build(preflight): install CommonMark runtime - #312
Conversation
Punchcard-Session: brisk-workshop-valley-n7
|
Codex review: needs changes before merge. Reviewed August 15, 2026, 5:57 PM ET / 21:57 UTC. ClawSweeper reviewWhat this changesThe PR pins CommonMark, installs it before validation and external-merge workflows, and adds a contract test for dependency setup and Markdown rendering boundaries. Merge readiness⛔ Blocked by patch quality or review findings - 4 items remain Keep this member-authored PR open, but block merge: its new CommonMark contract test asserts that a reference-definition title is rendered even though the helper collects only visible text and code literals. Priority: P2 Review scores
Verification
How this fits togetherClownfish’s GitHub Actions workflows validate cluster jobs and preflight external merges before any guarded apply. This PR provisions a Markdown parser runtime for the preflight text-analysis path and tests the parser boundary that a later preflight change would consume. flowchart LR
A[External pull request] --> B[External merge preflight]
C[GitHub Actions workflow] --> D[Project dependency install]
D --> E[CommonMark parser]
E --> B
F[Markdown boundary contract test] --> E
B --> G[Guarded merge decision]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the parser runtime change narrow, move the positive sentinel into visible Markdown while retaining the title-only negative case, then validate the exact head in the affected workflows. Do we have a high-confidence way to reproduce the issue? Yes, from source: the walker excludes link-reference titles, while the positive assertion places its only sentinel in such a title. Is this the best way to solve the issue? Yes, the narrowest repair is to make the positive sentinel visible Markdown and keep the existing title-only fixture as the negative boundary check. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a2b287af3b2f. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (43 earlier review cycles; latest 8 shown)
|
Summary
0.31.2with an npm lockfileWhy
Clownfish PR #311 needs authoritative CommonMark parsing in the external-merge
preflight. Repeated review found that a handwritten Markdown state machine was
reimplementing parser semantics and accumulating bypasses. This prerequisite PR
adds only the maintained parser runtime and its workflow installation boundary;
it does not change preflight authorization behavior.
Validation
node --test test/commonmark-runtime.test.mjspassesnpm run validatevalidates 6,707 jobsnpm testpasses all 557 testsnpm audit --omit=devreports zero vulnerabilities31f2feffac0d58ca1beded6ab883957acb7d5ae0Risk
The workflows gain an npm install step. The runtime version and transitive graph
are locked, lifecycle scripts are disabled, and audit/funding network calls are
disabled during CI installation. Exact-head hosted CI must still exercise the
clean-runner installation and cache ordering before merge.
Maintainer decision
Adopt
commonmark@0.31.2as the locked parser runtime for external-mergepreflight review text. The reference parser owns Markdown syntax; Clownfish owns
the authorization projection over its AST. The paired parser PR must load it
only in the review-text parsing path so apply-only execution remains independent.
Any incompatible parser or contract change requires a separately reviewed
dependency update.
Gate disposition
installation before all 557 tests