Repository navigation
fix(cli): capture writes inline SVG logos whole and parakeet takes long audio - #5662
Conversation
terencecho
left a comment
There was a problem hiding this comment.
Source review at e45921e65f192657074b0414ee6a4e6280ad61f8: no introduced, reachable blocker found in the audited scope.
packages/cli/src/capture/assetDownloader.ts:346–363checks the post-namespace UTF-8 bytes, skips oversized SVGs whole, and hashes/writes the same normalized string. The new drop reason flows through the dynamic counters and output paths.packages/cli/src/whisper/sherpa.ts:85–87rounds upward and saturates the timeout without changing worker segmentation, timestamp merging, fallback or cancellation. The actual duration producer is prepared-WAV file size, not an arbitrary numeric input.
Audited: all six changed files, legacy then HEAD where present; capture extraction, normal/partial persistence, drop summaries and disk-driven consumers; transcription duration, worker, fallback, cancellation and cleanup paths. A separate independent adversarial-user pass found no blocker, including interactions within and between the two fixes.
Trusting / limits: source-only review, not whole-repository semantic coverage. No tests, compiler, browser, native tools or CI commands were run; author execution receipts remain unverified. Browser transfer occurs before the SVG writer ceiling, and actual transport/rasterization/native behavior was not exercised. The media-use wrapper's separate preexisting 30-minute timeout is unchanged; this is not an unlimited-duration guarantee for every entry point.
Verdict: APPROVE
Reasoning: Both fixes preserve the inspected producer/consumer contracts, and the source and adversarial audits found no introduced reachable defect.
— tai
What
hyperframes capturewrites inline SVGs whole. Before, any inline SVG over 10,000 characters (often a site's logo) landed inassets/svgscut mid-tag and did not parse, while the full SVG sat inextracted/page.html.transcribe -e parakeetno longer fails on long audio withThe value of "timeout" is out of range.Why
svg.outerHTML.slice(0, 10000), and the asset pass wrote that string as it was.audioSeconds * 2000. For audio whose length is not a whole number of milliseconds that is a fraction (1851.245 s gave 3702490.25), andexecFileonly takes a whole number.How
outerHTML. The asset pass, the one place that writesassets/svgs, skips an SVG over 2 MB and counts it under a newsize-ceilingdrop reason (shown in the capture's dropped summary and the--jsondroppedfield) instead of writing part of it.Verification
expected 10000 to be 100935;decodeTimeoutMsfor 1851.245125 s and for 10,000,000 s of audio gives a timeoutexecFileSyncaccepts.hyperframes capture --jsonof a local page whose header holds a 41 KB inline logo, through the built CLI on Linux: on mainassets/svgs/logo-*.svgis exactly 10000 bytes and does not parse as XML; with this change it is 50005 bytes and parses.packages/cli: the three test files green 3 runs in a row (75 tests), tsc clean, oxlint and oxfmt clean on the changed files.