Repository navigation
refactor(export): isolate portable media materialization - #591
Conversation
|
The two CI failures were source-resize fixture readiness races, repaired independently in #593 (tracker #592). A delayed-delivery reproduction matched both observed signatures exactly: 208→228px for source height at width 600 and 33→29px for the viewport pose. The repair preserves all numerical assertions and passed full CI before merge ( This branch now incorporates that upstream repair. The portable-media feature diff remains five files with the same verified patch SHA256 AI assistance: OpenAI |
Summary
Continue #441 by giving admitted-media materialization one owner:
portable-media.tsconsumes the existing selection plan and retained family references, copies/deduplicates admitted files, allocates filenames and projects limit/budget/failed-media replacements in original family order.The exporter supplies classified families and receives stage-owned replacement, content-hash/path and family-URL indexes plus assets, diagnostics and the media summary. Those indexes seed the existing captured-resource stage, which owns recursive copying and fallback promotion. Selection policy remains in
portable-media-plan.ts; receipt/report projection remains incapture-export-evidence.ts.This replaces approximately 120 lines of inline materialization with an explicit input/output boundary. It preserves existing naming, rendition/budget decisions, failed-sibling suppression, source bytes and publication rollback semantics. No performance improvement is claimed.
Verification
f90faac0: 8 routes × 4 fixtures (default budget, tight budget, zero budget, rendered document base). Every website/owned-sidecar byte matches, capture inputs remain unchanged and offline results match.npm run buildandnpm run test:packagepassed after integration. Generateddist/is unchanged from the base.https://example.com/capture: complete, 1 route, 3/3 frozen baseline cells. Baseline scope excludes dialogs, zoom and motion.Reproduction:
npm exec tsc -- --noEmit;npm exec vitest -- run src/lib/portable-media.test.ts src/lib/portable-media-plan.test.ts src/lib/portable-resources.test.ts src/lib/capture-export.test.ts src/lib/export-publication.test.ts src/lib/document-resource-base.test.ts src/lib/screenshot/mobile-fluid-capture.test.ts src/lib/capture-export-evidence.test.ts --maxWorkers=2;npm run build;npm run test:package. The retained loopback preload handles the independently established locallocaltest.meDNS limitation for broad browser runs.Evidence is sealed outside the worktree: source/patch snapshots, parity drivers/fixtures/digests, raw failed and passing test logs, capture/fidelity results and SHA256 manifests. Candidate patch SHA256:
69f2a07009979f5e46197d642173e0fac4317710bb3d5d52bcc610f705757186.AI assistance / execution provenance
OpenAI
openai/gpt-6.1-solthrough OpenCode implemented the stage extraction, reviewed source ownership, integrated upstream changes, ran verification and drafted this PR under Chris Huber's direction. Execution and finalization occur directly outside Homeboy under explicit operator authorization; retained session evidence links the runtime commands, source and results to #441. This slice does not close the broader tracker.