Test infrastructure: add workerd integration coverage #5

Open
opened 2026-05-06 04:58:54 +02:00 by jesse · 0 comments
Owner

Background

The regression suite uses local fakes for KV, R2, Durable Objects, browser APIs, and receive-page execution. This follow-up tracks adding a real Workers-compatible integration layer for receive flows so runtime-specific behavior is covered outside the fake harness.

Source: Deferred from receive links fix pass after PR multi-agent code review
File: tests/worker-regression.test.mjs, package.json:1
Branch: feature/receive-links-foundation

Motivation

Real workerd or Miniflare coverage would exercise Cloudflare-specific request parsing, streamed bodies, R2 multipart semantics, KV TTL constraints, cookies, and Durable Object behavior. The fake harness is fast and valuable, but it can miss runtime compatibility issues.

  • Adding workerd or Miniflare introduces dependency, lockfile, and CI workflow decisions.
  • The review-fix pass avoided package/tooling churn while stabilizing the receive-link implementation and regression suite.

Proposed work

  • Choose the integration runner, preferably workerd or Miniflare, and document the rationale.
  • Add package metadata, lockfile, and test scripts for the integration suite.
  • Add integration coverage for receive link creation, small upload, multipart upload, finalization-pending retry, and stale cleanup.
  • Wire the integration suite into CI without replacing the fast fake-based regression suite.
  • Document how to run the integration suite locally.

Acceptance

  • CI runs the existing fake regression suite and the new Workers-compatible integration suite.
  • Integration tests cover at least one successful direct receive upload and one successful multipart receive upload.
  • Integration tests cover a finalization-pending retry path.
  • The repository contains a committed lockfile if new npm dependencies are introduced.

References

  • Follow-up from feature/receive-links-foundation receive-links review fix pass.
  • package.json:1
## Background The regression suite uses local fakes for KV, R2, Durable Objects, browser APIs, and receive-page execution. This follow-up tracks adding a real Workers-compatible integration layer for receive flows so runtime-specific behavior is covered outside the fake harness. **Source:** Deferred from receive links fix pass after PR multi-agent code review **File:** `tests/worker-regression.test.mjs`, `package.json:1` **Branch:** `feature/receive-links-foundation` ## Motivation Real workerd or Miniflare coverage would exercise Cloudflare-specific request parsing, streamed bodies, R2 multipart semantics, KV TTL constraints, cookies, and Durable Object behavior. The fake harness is fast and valuable, but it can miss runtime compatibility issues. ## Why deferred from receive links fix pass - Adding workerd or Miniflare introduces dependency, lockfile, and CI workflow decisions. - The review-fix pass avoided package/tooling churn while stabilizing the receive-link implementation and regression suite. ## Proposed work - [ ] Choose the integration runner, preferably `workerd` or Miniflare, and document the rationale. - [ ] Add package metadata, lockfile, and test scripts for the integration suite. - [ ] Add integration coverage for receive link creation, small upload, multipart upload, finalization-pending retry, and stale cleanup. - [ ] Wire the integration suite into CI without replacing the fast fake-based regression suite. - [ ] Document how to run the integration suite locally. ## Acceptance - CI runs the existing fake regression suite and the new Workers-compatible integration suite. - Integration tests cover at least one successful direct receive upload and one successful multipart receive upload. - Integration tests cover a finalization-pending retry path. - The repository contains a committed lockfile if new npm dependencies are introduced. ## References - Follow-up from `feature/receive-links-foundation` receive-links review fix pass. - `package.json:1`
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jesse/ycloud-cloudflare#5
No description provided.