Heading/list empty container — fix delivery
Owner: Ion · updated 2026-12-01 01:55 UTC · lane 2 ~/wt/heading-list-empty · State: FEEDBACKRECEIVED / EXACT-HEADREVALIDATIONNEEDED on PR #1474, now head ed459aed3d332da77df85d70bee1e3f0906694ad (pushed by Eric at his request). Previous review receipt at 8337201b8d7c2e03c32dde0f4c15da9ca08c9cf8 is historical only. No deploy or merge.
Originating task · Signed source reproduction · current reproduction protocol · coordination · review · enforcement.
Acceptance heading-list-trailing-paragraph-v1: input # H\n\n- a\n- b\n\nAfter para.\n must preserve heading, bullets and subsequent paragraph in order, without a visible blank block. Existing signed write produces Heading(Group) → Paragraph ''(Unordered) → a,b; Paragraph 'After para.'. Logic reproduction gate: failing parser test on the exact main SHA; retain assertion unchanged through fix.
GitHub-authenticated feedback: Eric's new-head explanation reports nested Slot editor rewrite, mobile reader omission and more parser list-container cases; authenticated PR API confirmed two commits and head ed459aed3d332da77df85d70bee1e3f0906694ad, open/non-draft, with no reviews at intake. Ion acknowledged once. Next: original lane owner re-establishes clean-main failing evidence for newly exposed editor/mobile surfaces as applicable, reviews Eric's full delta, verifies unchanged acceptance and exact-head tests/CI, then updates reviewer-first task and PR evidence. Do not queue or request renewed review on obsolete 8337201b evidence; gate is required before any new product edit or review request. Another live reviewer-first session owns the separate PR/task-format audit; coordinate without duplicating its edits. No deployments or merge.
Baseline and product-edit gate
Exact upstream main 5d76c950129668ba2b32b4e684ec037eabe0f783. Added a parser regression test in frontend/packages/client/__tests__/markdown-roundtrip.test.ts: parseMarkdown('# H\n\n- a\n- b\n\nAfter para.\n'), assert heading H with Group children, first child's type is not Paragraph, child list Unordered with a,b, then After para.. Run pnpm --filter @seed-hypermedia/client exec vitest run __tests__/markdown-roundtrip.test.ts -t 'without an empty paragraph block' after pnpm install --frozen-lockfile --offline: failed expected AssertionError: expected 'Paragraph' not to be 'Paragraph' at regression line 430 (1 failed, 33 skipped). This is the reported observable signed-write shape, not a setup failure. Falsification: heading+list alone merges cleanly; trailing paragraph triggers wrap. Acceptance assertion remains unchanged for fix.
Mandatory archived unchanged workflow_gate source ipfs://bafyreihc4nehqveutmennmpzebcbnwaqn4o6dznumrz4ebto6zz2zndcrm invoked with exact input {"transition":"product-edit","record":"hm://z6MkuBbsB1HbSNXLvJCRCrPhimY6g7tzhr4qvcYKPuSZzhno/ion/progress/heading-list-empty-container-20261130","defect":true,"checks":{"policyVersion":"mounted reproduction bafyreidydlwzgh5ptdap46s44cyg6pyrxsebfgb2brhhbppbfagu5gdwg4; coordination bafyreihsfctlvdy5vklmvxdcsbtnbqgoghpeyltey434gz4k42inljflta; review bafyreic65wcr2waybj342vd2ftlaktdgw7gkun62z6gmcjgtn4r6rpa7tm; enforcement bafyreiezopz2icxte2rksltx4hvpput3p7zo5jwa3y65xtcmcg4ykget2i","owner":"Ion, lane 2, thread:747ab2c8-cd2e-4717-b658-ea3e11c15584","goal":"Preserve heading/list/trailing content without a visible blank block on parser-mediated writes, and preserve historical document rendering","baselineSha":"5d76c950129668ba2b32b4e684ec037eabe0f783","observableFailure":"Exact-main parser test fails: expected list container type not Paragraph; received Paragraph, matching signed write empty-text Paragraph and visible gap","publicBaselineEvidence":"hm://z6MkuBbsB1HbSNXLvJCRCrPhimY6g7tzhr4qvcYKPuSZzhno/ion/progress/heading-list-empty-container-20261130","falsification":"Heading+list alone has no empty container; trailing paragraph is necessary to switch Heading childrenType to Group. Test fails assertion on output shape, not setup.","applicableSurfaces":"shared client Markdown parser for agent write, CLI and SDK; web read-only/viewer for historic output"}}. Returned {"allowed":true,"missing":[],"transition":"product-edit","record":"hm://z6MkuBbsB1HbSNXLvJCRCrPhimY6g7tzhr4qvcYKPuSZzhno/ion/progress/heading-list-empty-container-20261130","limitation":"Checks presence and shape of supplied attestations only. Caller must read evidence and public policy; this does not intercept execute, git or GitHub."}. Actual signed scratch and failing test independently inspected. Gate attests shape only, not proof.
Design comparison and fix validation in progress
General rule: a heading may own a list followed by a paragraph while the children remain ordered and preserve their list/group types; no synthetic text paragraph should be visible. Parser-side candidate selected for review: use an invisible Slot block (a supported typed list wrapper whose block content is CSS-hidden already) rather than a generated empty Paragraph; heading stays Group, Slot owns Unordered children, tail remains next Group child. This is a structural change for future agent/CLI/SDK writes, not a synthetic visible paragraph or a reordered trailing paragraph. Existing paragraph-and-list fallback branches remain unchanged. Markdown exports Slot with a type:Slot identity comment; reimport/export is stable (105 client tests passed, including new exact roundtrip and existing invisible-container tests).
Rendering-only alternative: keep generated Paragraph with same signed shape and suppress its empty line via CSS/renderer. This avoids a new wire block type but leaves agent/CLI/SDK output with a meaningless Paragraph and gives offline consumers the original defect; CSS-only would not fix other renderers and might hide intentionally editable blank paragraphs. Rejected as sole fix. Historical signed documents: they retain their original Paragraph and block IDs/changes, including the original /ion/workflows container; a narrow read-only rendering adapter presents empty unannotated list-only paragraphs as Slots without writing back. SSR and client viewer both use the adapter; editing a historical document still exposes its original Paragraph until deliberately migrated. No preview under no-deploy instruction. Eric should decide whether to adopt Slot semantics or prefer legacy-only visual treatment.
Exact-head verification and self-review
Baseline 5d76c950129668ba2b32b4e684ec037eabe0f783 → fix commit 8337201b8d7c2e03c32dde0f4c15da9ca08c9cf8, branch clean, regression assertion unchanged. Same parser regression now passes; client Markdown round-trip/lossless/Slot tests 105 passed; SSR + read-only viewer tests 17 passed, including legacy empty-list conversion and ordinary blank paragraph persistence. Repository-wide pnpm format:check passed; repository-wide pnpm typecheck passed after type-safe adapter correction; changed-files Prettier check and git diff --check passed. First renderer test attempt SIGSEGV (transient) and first typecheck caught genuine union-type errors corrected in commit; final runs green.
Reviewed complete six-file diff: parser only replaces generated wrapped list Paragraph with existing Slot type; list items and tail not changed; existing direct-heading list and list fallback tests remain; exporter carries Slot type and roundtrip preserved; read-only adapter converts only empty, unannotated, list-bearing Paragraph with no other attributes, never mutates signed data; SSR and browser use same adapter; edit mode retains historic original. Potential downside: legacy edit view still has gap; explicit review decision. No query/RPC introduced. Measured render-only extra traversal with bun -e over flat synthetic nodes after warmup, 1000 iterations: 100 blocks 0.0035 ms/visit; 1000 blocks 0.0196 ms; 5000 blocks 0.0937 ms. CPU-only microbenchmark, not a browser performance guarantee. Avoided desktop packaging: no desktop/Electron source or build config changed. No deployed visual run under Eric's no-deploy request; SSR structural no-blank test is available.
Open-PR transition gate
Ran archived unchanged workflow_gate source ipfs://bafyreihc4nehqveutmennmpzebcbnwaqn4o6dznumrz4ebto6zz2zndcrm with exact input {"transition":"open-pr","record":"hm://z6MkuBbsB1HbSNXLvJCRCrPhimY6g7tzhr4qvcYKPuSZzhno/ion/progress/heading-list-empty-container-20261130","defect":true,"checks":{"policyVersion":"mounted reproduction bafyreidydlwzgh5ptdap46s44cyg6pyrxsebfgb2brhhbppbfagu5gdwg4; coordination bafyreihsfctlvdy5vklmvxdcsbtnbqgoghpeyltey434gz4k42inljflta; review bafyreic65wcr2waybj342vd2ftlaktdgw7gkun62z6gmcjgtn4r6rpa7tm; enforcement bafyreiezopz2icxte2rksltx4hvpput3p7zo5jwa3y65xtcmcg4ykget2i","owner":"Ion, lane 2, thread:747ab2c8-cd2e-4717-b658-ea3e11c15584","goal":"Replace generated empty Paragraph with Slot for heading-list-tail writes, preserve content and historic read-only display","baselineSha":"5d76c950129668ba2b32b4e684ec037eabe0f783","observableFailure":"Exact-main regression fails because grouped list container is Paragraph and signed genesis displays a blank gap","publicBaselineEvidence":"hm://z6MkuBbsB1HbSNXLvJCRCrPhimY6g7tzhr4qvcYKPuSZzhno/ion/progress/heading-list-empty-container-20261130","falsification":"Heading+list alone clean; trailing paragraph triggers wrap, and existing parser test fails on shape not setup","applicableSurfaces":"shared client Markdown parser (agent, CLI, SDK), read-only web SSR/browser historical docs"}}. Returned {"allowed":true,"missing":[],"transition":"open-pr","record":"hm://z6MkuBbsB1HbSNXLvJCRCrPhimY6g7tzhr4qvcYKPuSZzhno/ion/progress/heading-list-empty-container-20261130","limitation":"Checks presence and shape of supplied attestations only. Caller must read evidence and public policy; this does not intercept execute, git or GitHub."}. Independently checked baseline, tests and diff; this gate validates attestations, not GitHub mutation.
PR delivery receipt
Pushed branch ion/heading-list-empty-20261130 to Ion fork using ephemeral protected-environment Git askpass; local and remote SHAs both 8337201b8d7c2e03c32dde0f4c15da9ca08c9cf8. PR #1474, base=ff3f016e8356c7df9b865e798d1490eae33412c3 at creation, exact head verified by GitHub API. PR body starts with clickable originating task URL, task body gained PR: https://github.com/seed-hypermedia/seed/pull/1474, status thread updated and both read back. Exact-head CI all required checks green, review gate allowed, GraphQL markPullRequestReadyForReview returned isDraft=false. Task Status changed to In Review and read back; ready milestone replied in existing status thread. No preview/deploy or merge under Eric's instruction.
Review-readiness gate and CI
PR #1474 exact head 8337201b8d7c2e03c32dde0f4c15da9ca08c9cf8: GitHub check-runs All Tests Passed, validate, check, Hostile page and web pane, integration-tests, Unit Tests client/desktop/web/shared, E2E Tests editor, Typecheck, Lint all completed success; publish skipped (not a failure). Archived unchanged workflow_gate source ipfs://bafyreihc4nehqveutmennmpzebcbnwaqn4o6dznumrz4ebto6zz2zndcrm, exact input {"transition":"request-review","record":"hm://z6MkuBbsB1HbSNXLvJCRCrPhimY6g7tzhr4qvcYKPuSZzhno/ion/progress/heading-list-empty-container-20261130","defect":true,"checks":{"policyVersion":"mounted reproduction bafyreidydlwzgh5ptdap46s44cyg6pyrxsebfgb2brhhbppbfagu5gdwg4; coordination bafyreihsfctlvdy5vklmvxdcsbtnbqgoghpeyltey434gz4k42inljflta; review bafyreic65wcr2waybj342vd2ftlaktdgw7gkun62z6gmcjgtn4r6rpa7tm; enforcement bafyreiezopz2icxte2rksltx4hvpput3p7zo5jwa3y65xtcmcg4ykget2i","owner":"Ion, lane 2, thread:747ab2c8-cd2e-4717-b658-ea3e11c15584","goal":"No visible blank block on heading+list+tail writes; preserve historical signed documents","baselineSha":"5d76c950129668ba2b32b4e684ec037eabe0f783","observableFailure":"Exact-main parser assertion fails on empty Paragraph under heading matching signed genesis","publicBaselineEvidence":"hm://z6MkuBbsB1HbSNXLvJCRCrPhimY6g7tzhr4qvcYKPuSZzhno/ion/progress/heading-list-empty-container-20261130","falsification":"Heading+list alone clean, adding tail paragraph triggers branch; test fails on output shape not environment","applicableSurfaces":"shared parser agent, seed-cli, SDK; historical read-only SSR and viewer","headSha":"8337201b8d7c2e03c32dde0f4c15da9ca08c9cf8","verification":"Unchanged parser regression now passes; 105 client tests, 17 SSR/viewer tests, full format/typecheck and 11 GitHub CI checks successful on exact head","fullDiffSelfReview":"Reviewed all six files, Slot parser grouping, old Paragraph view adapter preserving signed data, identity/comment roundtrip and editor caveat, no token/sensitive data","performance":"No RPC/query; O(n) render adapter synthetic 100/1000/5000 blocks 0.0035/0.0196/0.0937 ms per visit, CPU microbenchmark only","causalNarrative":"Heading list initially merged; trailing non-list content forces heading Group; parser previously inserted empty Paragraph, generating visible gap. Slot grouping avoids text block; legacy read-only compatibility avoids rewriting signed documents; CSS-only rejected for offline clients","publicAfterEvidenceOrNonApplicability":"Public task and work record with SHA/test outcomes and PR diff; no deployed visual run because Eric explicitly requested no deployments, so SSR structural test and shared renderer tests are applicable non-deployment evidence; browser visual parity remains untested"}}. Result {"allowed":true,"missing":[],"transition":"request-review","record":"hm://z6MkuBbsB1HbSNXLvJCRCrPhimY6g7tzhr4qvcYKPuSZzhno/ion/progress/heading-list-empty-container-20261130","limitation":"Checks presence and shape of supplied attestations only. Caller must read evidence and public policy; this does not intercept execute, git or GitHub."}. Evidence and CI independently inspected; no preview/deploy under Eric's restriction.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime