fix(reliability): harden public Markdown and local serialization boundaries - #176
fix(reliability): harden public Markdown and local serialization boundaries#176seonghobae wants to merge 95 commits into
Conversation
|
Exact cross-lane defect handoff from the current #377 reference-host acceptance lane; this belongs here because #176 explicitly remains the sole active writer for the public Markdown adapter/serialization boundary. Affected Inkspan evidence
First causal boundary / falsifiable RCA This is not correctly repairable in #381: changing RED acceptance to carry here Material remedy choices
GREEN required |
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
|
Restacked onto protected Fresh verification:
This remains draft and dependency-gated by #118. @codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Remove the duplicated Python support contract changes from this Markdown resource-policy branch. PR #405 remains the single writer while this branch keeps its bounded conversion and package delta. Signed-off-by: Seongho Bae <seonghobae@users.noreply.github.com> Commit-Message-Assisted-by: Claude (via Claude Code)
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Canonical allocation experiment — rejected (2026-09-05 UTC)The profile-directed experiment stayed in this existing canonical-serialization owner. No competing runtime writer was added to #379.
The diagnostic protocol retained all four committed synthetic profiles from #379, one fixed untimed correctness call and 25 actual changed-transition calls per profile in each of three fresh processes per phase. All 900 measured calls across baseline/trial/recheck are retained locally; every previous/resulting revision pair matches. This is owner-built module research, not full packed-package, browser, customer workload, supported-envelope, protected-release or 20ms acceptance evidence.
The trial's stress difference was only -1.675%, smaller than repetition variation, with an additional 119 ESM bytes. Restored-baseline p95 values were 177.257383, 42.218900 and 52.000450ms despite identical module bytes. The available shared-host evidence therefore does not establish a causal speedup; the trial was discarded. No outlier was dropped, denominator reduced, warm-up enlarged, deadline relaxed or security check bypassed. A later host snapshot showed concurrent VM/other activity, but it does not prove the cause of any earlier sample. Baseline/restored revision module SHA-256: Current-head The unchanged serialization contract remains aligned with RFC 8785 property ordering, Unicode preservation and primitive serialization. Reference: Rundgren, A., Jordan, B., & Erdtman, S. (2020). JSON Canonicalization Scheme (JCS) (RFC 8785). RFC Editor. Existing Inkspan negative-zero/Unicode rejection and bounded encoding semantics were preserved. Keep Draft. Fresh hosted checks, independent review, parent reconciliation and protected integration remain required. No merge, publication or speedup is claimed. |
…-resource-local Signed-off-by: Seongho Bae <me@seonghobae.me>
…euse Stack performance PR #379 after canonical owner #176 at 94b5ca8. The sole conflicted source file now exactly matches the owner, retaining original encoder reuse, output bounds and hostile-option validation. All benchmark and chunking deltas remain intact. Signed-off-by: Seongho Bae <me@seonghobae.me>
Preserve the controlled-value preview, rollback, composition and editability guards while inheriting PR #176 and its PR #402 prerequisite through ordinary history. The existing composition regression reproduced a second snapshot after TipTap 3 defaulted setContent to emit updates; use the options object in the shared synchronization helper. The focused policy, composition and editability tests and typecheck pass without weakening assertions. Signed-off-by: Seongho Bae <me@seonghobae.me>
Keep the child delta browser-only while inheriting PR #201 and its #176/#402 prerequisites through ordinary history. The heading, list and table setup assertions first reproduced false edit snapshots from the old TipTap setContent boolean. Use explicit update suppression in the existing fixture; all nine focused cases pass across Chromium, Firefox and WebKit without weakening input or callback oracles. Signed-off-by: Seongho Bae <me@seonghobae.me>
Preserve the four-file forced-colors source/test delta while inheriting #380 and its #201/#176/#402 prerequisites through ordinary history. The existing focus, forced-colors and print stylesheet tests pass. No browser discovery configuration is copied or re-owned here; normal theme rules and the already-merged #362 baseline remain intact. Signed-off-by: Seongho Bae <me@seonghobae.me>
Closes #169.
Closes #171.
Closes #173.
Closes #175.
Closes #177.
Closes #181.
Closes #204.
Closes #209.
Closes #223.
Closes #226.
Consolidated single-writer boundary
This Draft remains the existing Inkspan source owner across the overlapping public Markdown adapter, editor serialization, canonical envelope encoding, SafeLink resource policy, plain-text projection, and full-document email serialization option boundaries. Protected
mainis the only shipped implementation authority; #118 remains the stable-release operational-acceptance boundary.Standalone/product authority is unchanged: no service, database, network, credential, model, tenancy, durable persistence, transport, deployment, durable audit, Yjs authority, or durable PDF authority is introduced. Model/provider output remains untrusted proposal data.
Active-PR behavior
The current branch:
languageTag,textDirection, and title before Markdown parser materialization; andglobalThis.windowaccessor and neutralizes the pinned Turndown ambient-window probe so packed ESM/CJS/markdownconsumers remain standalone under hostile ambient browser accessors.These are active-PR claims only until integrated into protected
main.Test-first lineage
Branch history contains realistic RED→GREEN lineages for Markdown resource bounds, editor serialization modes, canonical envelope encoding, SafeLink validation, plain-text runtime options, email metadata, hostile option bags, non-string HTML, and ambient browser-authority isolation. Predecessor/cancelled/synthetic generations remain lineage only.
For the cross-lane defect reproduced by #381:
19e5052c440b1852b898228a3bacdf2fa3ad1b20added the packed hostile-ambient ESM/CJS regression; exact CI32869680521failed specifically at packed-package consumers after typecheck, 100% coverage, and build reached the intended boundary;ef5b707d5b2ec8dcbd99fde0af44c398a539176e,3123981884cebd2dd81f022b25445702d6d55906, and the historical repair heade1345c45ba9bf8e75bdab8ad7f56c7d7437f1470;32871290927is terminal success for that contributor head and verifies the packed consumer regression. feat(reference-host): add buyer integration safety fixtures #381 must inherit this owner repair rather than duplicate it.Current prerequisite integration — 2026-09-05
Validated local source:
94b5ca815749a7dd6bc071106eb685d2a193e4dd. The canonical #402 foundation at637b910d25dabb363e40d535c6d89f4a5beb8c6dwas inherited through a conflict-free normal merge, without dropping this owner's Markdown, canonical encoding, SafeLink or privacy deltas. The branch remains Draft and is stacked oncodex/fix-python-boundary-coverage. Protected main was freshly resolved independently as0b88c16f14f51b54a87eb7164f0edfb06dd60902; neither this PR nor #402 is shipped authority.The inherited dependency, public TipTap type, Python matrix and declaration-boundary changes remain owned by #402. Installation used its checked-in lock file with no new version selection. The former source-reconciliation TOOL_UNAVAILABLE/divergence paragraphs are superseded by verified ancestry and this supported non-force integration.
The canonical allocation experiment was rejected and reversed normally. Its only net addition before prerequisite integration is an exact-byte test for empty containers, mixed values and numeric-looking property-name ordering. No speedup or 20ms claim follows from that experiment.
The separately retained native encoder reuse from #379 commit
9258bdbdf8ec8ca87ab25b576fe2599c88ba9040is now consolidated here, preserving hostile-option checks and both output-size guards. The new regression was RED on receiver identity and now verifies reuse without sharing output buffers. Its source reconciliation record records the standard, alternatives, origin and historical-performance limits. #379 inherits this owner; it no longer owns a conflicting canonical source delta. The earlier 8.7% no-op diagnostic is not a current-head speedup claim.Exact-head local evidence
On
94b5ca815749a7dd6bc071106eb685d2a193e4dd:pnpm coverage --maxWorkers 2: 170 files, 1,002 tests passed; 100% statements, branches, functions and lines.pnpm build: full declared build and strict TypeScript passed.pnpm verify:package: package contents, declaration boundary, ESM/CJS, strict independent consumers and framework-free public subpaths passed.The first package check correctly rejected stale pre-migration declarations left by an earlier partial build. The complete source build removed that mismatch; the failure log is retained. The verifier and its declaration guard were not weakened or changed. A successful package check is not a protected publication.
Remaining integration gates
#381 remains the reference-host consumer and inherits this owner normally. #379 retains performance acquisition; #402 retains foundation/dependency ownership; #118 retains release acceptance. No predecessor is closed or declared superseded without complete valid-delta and acceptance proof.
Before Ready or merge, refetch independent live head/base refs, ancestry and active writers, reviews and unresolved threads, effective rules, all required repository/central jobs with their actual checkout/source SHA, and current package/browser/Office/security evidence. Queued, skipped-required, cancelled, absent, failed, stale, wrong-source or model/status-only evidence is non-passing.
Keep Draft and preserve parent-before-child protected integration. No self-approval, force push, bypass, gate weakening, tag or publication.