fix: upgrade Effect v4 runtime boundaries - #60
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR upgrades the repo’s Effect v4 dependency set to 4.0.0-beta.107 and tightens runtime-boundary behavior (notably cancellation/timeout propagation and typed failure handling) across Roku HTTP, packaging, and installer operations, while removing the previously-maintained local Effect source checkout/readiness machinery.
Changes:
- Upgrade
effect,@effect/platform-node, and@effect/vitestto4.0.0-beta.107and migrate schema-backed errors toSchema.TaggedErrorconstructor usage. - Ensure interruption propagates to in-flight
fetchcalls by composing Effect interruption signals with request timeouts at touched HTTP boundaries. - Write package ZIPs via a scoped same-directory temp file and atomic rename; add tests for interruption, retry exhaustion behavior, ZIP replacement, and cleanup.
Reviewed changes
Copilot reviewed 35 out of 36 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/roku.test.ts | Adds coverage that Effect interruption aborts in-flight ECP fetch requests. |
| test/roku-capture.test.ts | Adds coverage that screenshot retry exhaustion surfaces the underlying failure detail. |
| test/package-zip.test.ts | Adds coverage for atomic ZIP replacement and temp-file cleanup on write failure. |
| test/errors.test.ts | Updates tests to construct tagged errors via new ...() after Effect upgrade. |
| test/cli.test.ts | Removes CI/local Effect-checkout test now that prepare script is deleted. |
| src/timing.ts | Adds helper to combine interruption signals with request timeouts. |
| src/screenshot.ts | Updates tagged error usage and composes interruption + timeout for screenshot HTTP; refines retry logic. |
| src/runtime.ts | Updates runtime-thrown errors to new ...() constructors. |
| src/roku-context-requirements.ts | Updates required-context/password failures to new ...() constructors. |
| src/rokit-effect.ts | Updates InvalidInput failure construction to new ...(). |
| src/polling.ts | Refactors pollUntilEffect into Effect.fn-style implementation. |
| src/package-zip.ts | Switches ZIP writes to scoped temp file + rename; updates errors for new TaggedError API. |
| src/installer.ts | Composes interruption + timeout for installer HTTP; updates tagged error API usage. |
| src/errors.ts | Migrates all repo error types to Schema.TaggedError and constructor instantiation. |
| src/ecp.ts | Composes interruption + timeout for ECP HTTP and updates tagged error API usage. |
| src/discovery.ts | Updates InvalidInput construction for discovery timeout validation. |
| src/device.ts | Composes interruption + timeout for device status fetch. |
| src/debug.ts | Uses Effect Clock.currentTimeMillis and updates DebugPortUnavailable construction. |
| src/cli.ts | Updates CLI parse failures to new InvalidInput constructor usage. |
| src/cli-runner.ts | Updates command runner InvalidInput failures to constructor usage. |
| src/cli-node-condition.ts | Updates CLI usage error to constructor usage. |
| src/cli-input-source.ts | Updates input source validation error to constructor usage. |
| src/cli-input-json-read.ts | Updates JSON parsing/decoding error mapping to constructor usage. |
| src/cli-command.ts | Updates CLI parsing error normalization to constructor usage. |
| src/cli-artifact-commands.ts | Updates package output usage errors to constructor usage. |
| skills/rokit/SKILL.md | Removes obsolete guidance about local Effect source setup. |
| skills/rokit/references/live-proof.md | Removes references to deleted readiness doc. |
| scripts/prepare-effect.sh | Deleted (removes local Effect source checkout machinery). |
| README.md | Bumps required Node version and removes readiness doc link. |
| pnpm-workspace.yaml | Excludes new Effect beta versions from minimum release age gating. |
| pnpm-lock.yaml | Locks Effect ecosystem upgrades and transitive dependency updates. |
| package.json | Updates Effect versions and removes prepare script hook. |
| docs/READINESS.md | Deleted (removes obsolete readiness report). |
| docs/DISTRIBUTION.md | Updates wording after readiness doc removal. |
| AGENTS.md | Points Effect learning to installed node_modules/effect/AGENTS.md and source. |
| .worktreeinclude | Removes .repos/effect from worktree include list. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
putio-releaser Bot
added a commit
that referenced
this pull request
Aug 10, 2026
## [2.4.3](v2.4.2...v2.4.3) (2026-08-10) ### Bug Fixes * upgrade Effect v4 runtime boundaries ([#60](#60)) ([bb7b84d](bb7b84d))
Contributor
|
🎉 This PR is included in version 2.4.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
4.0.0-beta.102to4.0.0-beta.107Changed
Schema.TaggedErrorconstructor APInode_modules/effect/AGENTS.mdandnode_modules/effect/srcscripts/prepare-effect.sh, its package hook/test/worktree configuration,docs/READINESS.md, and all supporting referencesReview aids
The hardware-free proof uses the packed npm tarball as a consumer: package dry-run, real generic Roku ZIP creation, schema introspection, and install dry-run. No put.io product fixtures or physical Roku behavior changed.
Risks
Verification
4.0.0-beta.107foreffect,@effect/platform-node, and@effect/vitest;effectlatest remains v3pnpm install --frozen-lockfilepnpm verify— format/lint, TypeScript, build, CLI version/help, 12 test files / 88 tests, npm pack dry-rundescribe packageschema v5, package dry-run, real ZIP entries, no temp entries, install dry-run.repos/effect, readiness report, or inbound referencesComplexity
Medium. The public CLI stays compatible; changes are concentrated at Effect API and external-resource boundaries.
Follow-Ups
None.