Skip to content

fix(reliability): bound plain-text projection parser input #173

Description

@seonghobae

Current authoritative state

Protected shipped truth is exact main@3b38ead2d00f44eb578d0689087b9293b3dabe1e. The original separate plain-text Marked lexer resource gap is repaired on consolidated Draft PR #176 / branch fix/public-markdown-resource-options-175, the sole active writer for the overlapping Markdown/plain-text serialization surface and explicit closer of #173. At this issue synchronization the exact Draft head is 68aa1ed4f08e2c65826dccb02ca8f3e2da3a9407; the live PR/head and independently resolved protected main remain lifecycle authority.

Implemented active-PR contract

PlainTextOptions now carries the shared maxMarkdownBytes limit and the HTML-side maxHtmlBytes limit. markdownToPlainText() resolves the shared Markdown resource policy and enforces the byte ceiling before plainTextMarked.lexer() materializes tokens. htmlToPlainText() first routes HTML through htmlToMarkdown() with its independent HTML ceiling, then applies the Markdown ceiling to the normalized Markdown before the plain-text lexer. The two limits remain separate because normalization can change representation size.

The public option bag also fails closed on malformed containers/keys/property shapes and invalid includeImageAlt without silently accepting misspellings or invoking accessor-backed properties. Accepted reading order, list/table/code structure, link-label-without-destination behavior, image alternatives, raw-HTML omission, deterministic browserless output, package/SSR/browser/Office behavior and standalone no-network/no-database/no-credential/no-model authority remain preserved.

Verification / integration boundary

#176 carries executable resource-bound, exact UTF-8, option-bag, plain-text projection, package-consumer and coverage tests for this implementation. Current exact-head workflows, formal reviews, review threads, ancestry and live base must be refetched before any lifecycle action; predecessor #172/#174 or earlier #176-head evidence does not transfer.

Keep this issue open until #176 integrates under then-live protected-main governance. #176 remains Draft/unmerged while #118 owns exact protected v0.6.0 publication/provenance acceptance. Do not revive predecessor stacked writers, weaken gates, force-push/destructively rebase, move protected main, or represent this active-PR implementation as shipped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: apiAPI, protocol, event, or external contractarea: authAuthentication, authorization, identity, or tenant isolationarea: ci-cdCI, GitHub Actions, checks, release, or supply chainarea: dataDatabase, schema, migration, ETL, or lineagepriority: mediumNormal-priority or P2 workstatus: triagedOpen issue has an organization taxonomy assignmenttype: bugDefect or incorrect behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions