Skip to content

Let the exercise skip a leg the target cannot run - #49

Merged
davidtorcivia merged 1 commit into
mainfrom
exercise-can-skip-unsupported-legs
Aug 4, 2026
Merged

davidtorcivia merged 1 commit into
mainfrom
exercise-can-skip-unsupported-legs

Conversation

@davidtorcivia

Copy link
Copy Markdown
Contributor

Run 15 got the entire media path working on a real Cloudflare deployment:

[e2e] watermarked rendition is ready
[e2e] watermark burned: clean 255982 bytes, burned 454517 bytes (drawtext changed the encode)
[e2e] watermarked rendition retains BT.709 tags and source tmcd

Then it stopped on the marker export, which that target cannot do.

Why exports are node-only, and not fixable in passing

  • pdf-report.ts reads its font with node:fs
  • annotation-svg.ts composites with sharp, a native module

So the export module cannot be loaded in an isolate at all — and wrangler bundles dynamic imports, so deferring the import does not avoid it. Making exports work there means embedding the font as bytes and replacing sharp with something that runs in a Worker. That is real work, tracked separately, and #47 already records it in apps/cf/src/index.ts.

Why skipping is the right call rather than a dodge

The acceptance criterion for P0-2 is specific: CI uploads through the real deployment, kills the first worker attempt, the job is retried on another worker, and the resulting rendition plays. Blocking on an unrelated feature gap means never reaching it.

So the exercise takes ONELIGHT_E2E_SKIP_EXPORTS, the acceptance run sets it, and the docker integration job does not — exports stay fully covered on the target that supports them, which is the one you actually run.

The skip logs itself rather than passing silently, so a run that skips it says so.

Run 15 got the whole media path working on a real Cloudflare deployment: the
watermark burned, kept its BT.709 tags and source timecode, and the clean and
burned renditions differ. Then it stopped on the marker export, which that
target cannot do.

Exports are node-only and not by oversight. The PDF report reads its font with
node:fs, and the annotation compositor is sharp, a native module, so the export
module cannot be loaded in an isolate at all -- and wrangler bundles dynamic
imports, so deferring the import does not avoid it either. Making exports work
there means the font as bytes and a compositor that is not sharp, which is real
work and is tracked on its own.

It is also not what this run exists to prove. The acceptance criterion is that
a worker killed mid-encode has its job finished by another and the rendition
plays, and blocking on an unrelated feature gap means never reaching it.

So the exercise takes a flag, the acceptance run sets it, and the docker
integration job does not: exports stay fully covered where they are supported.
@davidtorcivia
davidtorcivia merged commit f1efa81 into main Aug 4, 2026
10 checks passed
@davidtorcivia
davidtorcivia deleted the exercise-can-skip-unsupported-legs branch August 4, 2026 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant