Skip to content

fix(doc): verify Markdown table alignment against full JSONML - #1551

Open
callzhang wants to merge 1 commit into
DingTalk-Real-AI:mainfrom
callzhang:codex/doc-jsonml-alignment-verification
Open

callzhang wants to merge 1 commit into
DingTalk-Real-AI:mainfrom
callzhang:codex/doc-jsonml-alignment-verification

Conversation

@callzhang

Copy link
Copy Markdown

Markdown exports can omit table alignment markers while the stored JSONML still has the requested paragraph alignment. The current verifier then rejects a completed write.

Read full JSONML for Markdown with explicitly aligned columns, check the target table/row/cell alignment, and only then restore the proven alignments in the Markdown comparison AST. Preserve rendered HTML equivalence and structural/content checks, append boundaries, failed reads and incomplete/malformed JSONML failures. Writes are not replayed. Compact receipts retain a hash of the JSONML alignment evidence.

Also correct a text-fingerprint defect exposed by the same case: joining escaped text fragments must not insert a space that was never authored. Empty content updates keep content verification; empty creates retain their existing metadata check.

Validation: fail-first regressions and the full document shortcut package pass locally; go vet passes. An offline historical fixture passes after the fix, with controls for real alignment loss and content changes. Fixtures committed here are synthetic; no private document bodies or logs are included. No commands, permissions, confirmation policy or write retry budget changed.

This branch has not been deployed

No deployments
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