fix(reliability): preflight converter payload allocations - #160
fix(reliability): preflight converter payload allocations#160seonghobae wants to merge 105 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Exact-head local validation for ae101c8: the 22 converter preflight, runtime-input, fallback, MIME, size, and authority contract files passed, 122/122 tests. This is focused local evidence only; the PR remains Draft and this is not approval or merge evidence. |
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
|
Draft head |
|
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 converter branch. PR #405 remains the single writer while this branch keeps its bounded Blob and base64 preflight delta. Signed-off-by: Seongho Bae <seonghobae@users.noreply.github.com> Commit-Message-Assisted-by: Claude (via Claude Code)
Closes #159.
Closes #306.
Closes #307.
Closes #308.
Closes #316.
Closes #324.
Closes #334.
Closes #335.
Closes #345.
Closes #363.
Closes #364.
Closes #369.
Current boundary
Protected shipped truth remains exact
main@3b38ead2d00f44eb578d0689087b9293b3dabe1e. Current exact Draft head is42b3a5004ec1b93181cd1ae52227b0fac2506227onfix/blob-size-preflight-20260811. GitHub reports the Draft mechanically mergeable; mergeability is not authorization.This lane is the canonical single writer for framework-neutral converter hardening under
src/converter/. It adds no network, persistence, credentials, tenancy, model/provider, deployment, retention, migration, authorization, or durable-audit authority.Implemented contract
The branch retains Blob/File pre-read guards, canonical and WHATWG-forgiving base64 predecode accounting, strict
maxBytesvalidation, descriptor-safe runtime options, intrinsic typed-array/Blob slot validation, bounded MIME metadata, stable payload-redacted parse/size failures, deterministic Node/browser behavior, and standalone no-service operation.Current active-PR behavior additionally:
;base64encoding marker only when it is the exact final marker, so a media-type parameter such as;base64=1is not misclassified as base64 encoding;%XXescapes as raw octets, including%80–%FF, rather than routing them through UTF-8 URI-component decoding;TextEncoderlone-surrogate replacement semantics;maxBytesto that exact length;trimStart()copy of attacker-controlled input;text/plaindefault;Uint8Arrayvalues through captured intrinsic TypedArray brand/slot capabilities rather thaninstanceof;ArrayBuffer.isView;Blob.prototype.arrayBuffermethod captured at module evaluation while preserving fallback selection;TextDecoderinstance and intrinsicdecodemethod at module evaluation for SVG/XML MIME sniffing; andBuffer.fromauthority.Latest test-first lineage
Earlier RED→GREEN lineages for #159, #306, #307, #308, #316, #324, #334, #335, #345, #363 and #364 remain historical behavior lineage only. No predecessor workflow/review evidence transfers to the current head.
Latest declared data-URI MIME resource-bound lineage:
5321c9dede813e88b7474b165a3ea8431fc34104, CI32558481749, build/test96996286302, proved that a 1,025-code-unit declared MIME with malformed%GGreached payload decoding and failed as malformed percent-encoding instead of being rejected at the metadata boundary; the exact 1,024 boundary and omitted-declaration default assertions passed;42b3a5004ec1b93181cd1ae52227b0fac2506227reusesMAX_MIME_TYPE_CODE_UNITSinparseDataUri()before payload handling, with the dedicated boundary/default regression corpus green.The preceding #369 false-green/package-contract lineage remains behavior history only: RED
1754029885c90980c58892af37a24b789a68bdc7/ CI32473354959/ build-test96744578570exposed the removed browser-startup coverage path; first repair1b5d037b4c97d8fc0c77a97197e65ee59fc111becorrectly failed strict packed-consumer TypeScript because its generated declaration leaked Node-onlyglobalThis.Buffer; repairecbf842fdf131782cd28fd72a888b1d6d96a341brestored a structural/browser-portable test-seam declaration while retaining captured Node authority.The preceding MIME-classifier-authority lineage also remains behavior history only: RED
07da81a11f29514dc5f44976adbcab699a21080e/ CI32262431173/ job96098633176proved a later hostile globalTextDecoderreplacement could escape the public MIME-sniff boundary; GREEN30d5e4f6a984f26153f4a1535f306553887cf5c5captured the trusted decoder capability.Exact-current-head evidence
For unchanged exact head
42b3a5004ec1b93181cd1ae52227b0fac2506227against protected base3b38ead2d00f44eb578d0689087b9293b3dabe1eat the latest fresh refetch:32558675130: completed / success;96996743975: checkout explicitly bound to42b3a5004ec1b93181cd1ae52227b0fac2506227, 163 test files / 912 tests, 100% statements / branches / functions / lines, includingsrc/converter/base64.tsandsrc/converter/base64DataUriMimeMetadata.test.ts;32558675113: completed / success;32558675118: completed / success;All observed repository-owned exact-current-head workflow generations are terminal success. Repository technical success does not substitute for separately applicable central workflows, qualifying independent approval, or then-live governance. Pending, queued, skipped, cancelled, absent, neutral, failed, stale, predecessor, status-only, model-only, or vacuous evidence remains non-passing.
Integration boundary
Keep this PR Draft and unmerged while #118 owns the frozen protected
v0.6.0publication/provenance identity and while qualifying independent approval plus every then-applicable governance/workflow gate remain incomplete. Before any lifecycle action, refetch exact head/live base, ancestry/mergeability, formal reviews/threads, live rules/permissions and every applicable repository/central workflow. Never self-approve, weaken gates, transfer predecessor evidence, force-push, destructively rebase, or synthesize release identity.