Skip to content

chore(deps): upgrade Effect v4 to beta.107 - #56

Merged
altaywtf merged 4 commits into
mainfrom
chore/effect-v4-beta-107-audit
Aug 10, 2026
Merged

chore(deps): upgrade Effect v4 to beta.107#56
altaywtf merged 4 commits into
mainfrom
chore/effect-v4-beta-107-audit

Conversation

@altaywtf

@altaywtf altaywtf commented Aug 10, 2026

Copy link
Copy Markdown
Member

Summary

  • upgrade the CLI's Effect v4 packages from beta.102 to beta.107 while npm latest remains Effect v3
  • audit and harden typed failures, interruption, child-process cleanup, and packaged SDK compatibility
  • remove the obsolete Effect source-vendoring workflow and all remaining .repos configuration

Changed

  • pin effect, @effect/platform-node, and @effect/vitest to 4.0.0-beta.107, with matching pnpm override and release-age exceptions
  • preserve pagination input failures as typed CliCommandInputError values and retain original SDK continuation failures for localization
  • propagate interrupt-only top-level causes through NodeRuntime.runMain
  • make browser opening handle synchronous spawn failures, asynchronous child errors, cancellation, and listener cleanup
  • patch the pinned SDK's obsolete error constructors, bundle only that SDK into dist, and leave Effect as the single installed runtime
  • extend packed-install verification with an authenticated local SDK request and an exact single-Effect-version assertion
  • delete prepare-effect scripts, the package prepare hook, .worktreeinclude, .repos ignore/worktree/test configuration, and document node_modules/effect as the supported guidance/source path
  • add the required Effect learning guidance to AGENTS.md; no agent-readiness report or inbound report link existed in this repository

Review aids

flowchart LR
  A["CLI on Effect beta.107"] --> B["Typed CLI validation"]
  A --> C["Interrupt-safe Node runtime"]
  A --> D["Bundled patched SDK"]
  D --> E["One installed Effect runtime"]
  F["node_modules/effect guidance and source"] --> A
  G["Removed vendored .repos/effect workflow"] -. replaced by .-> F
Loading

The packaged-install smoke is the release-boundary proof: it installs the generated tarball with npm, checks the dependency tree, and calls transfers list with authentication against a strict local HTTP server.

Risks

  • the SDK compatibility patch is intentionally narrow: three Schema.TaggedErrorClass calls become Schema.TaggedError
  • bundling the SDK increases the shared runtime chunk; deps.onlyBundle restricts bundling to @putdotio/sdk, while Effect and other runtime dependencies remain external
  • Effect v4 is still beta, so exact pins and the packed/runtime gates remain required

Verification

  • pnpm exec vp run verify
    • architecture and dead-code guards
    • formatting, lint, and type checks
    • packed npm install and authenticated SDK request
    • 26 test files / 250 tests
    • coverage: 90.56% statements, 76.12% branches, 88.22% functions, 90.75% lines
  • pnpm exec vp install followed by assertion that .repos is absent
  • pnpm exec vp run build
  • built version, describe (28 commands), and isolated auth status JSON proofs
  • autoreview: Codex gpt-5.6-sol, high reasoning, native isolation, branch mode against origin/main; final result clean with zero findings

Complexity

Medium. The public command surface is unchanged; the meaningful complexity is confined to Effect error/cancellation boundaries and the npm package's SDK bundling contract.


Summary by cubic

Upgraded the CLI to Effect v4 beta.107, tightened error/interrupt handling, and hardened the URL opener. The packed-install smoke now asserts a single installed effect and performs an authenticated SDK request; the patched @putdotio/sdk is bundled so the CLI and SDK share one runtime and the old vendoring workflow is removed.

  • Dependencies

    • Pin effect, @effect/platform-node, and @effect/vitest to 4.0.0-beta.107.
    • Patch @putdotio/sdk@10.0.1 to use Schema.TaggedError, and bundle only the SDK in dist (Effect stays external); move SDK to devDependencies with inlinedDependencies.
    • Enforce one installed effect in the packed-install smoke (exact version query) and exercise an authenticated local SDK request; add pnpm overrides and patchedDependencies.
    • Remove prepare-effect scripts and all .repos config; docs now point to node_modules/effect.
  • Bug Fixes

    • Keep pagination validation failures typed as CliCommandInputError; preserve original continuation failures.
    • Consolidate top-level failure handling via handleCliCause: preserve interrupt-only causes for NodeRuntime, and format ordinary failures with exit code 1.
    • Harden URL opener: handle sync spawn errors, async child errors, cancellation via AbortSignal, and listener cleanup.

Written for commit d94f792. Summary will update on new commits.

Copilot AI lite review requested due to automatic review settings August 10, 2026 08:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the CLI’s Effect v4 dependency set to 4.0.0-beta.107, removes the obsolete .repos/vendoring workflow, and tightens runtime boundaries (interrupt handling, browser opener cleanup) while ensuring the packaged CLI ships with a patched/bundled @putdotio/sdk so the CLI + SDK share a single installed Effect runtime.

Changes:

  • Pin effect, @effect/platform-node, and @effect/vitest to 4.0.0-beta.107 (with matching pnpm overrides/lock updates) and remove the old Effect vendoring/prepare workflow.
  • Centralize top-level CLI cause handling (preserve interrupt-only causes) and harden openExternal against sync spawn failures, async errors, interruption, and listener cleanup (with tests).
  • Strengthen the packed-install smoke to assert a single installed Effect version and exercise an authenticated SDK-backed request via a local mock API server.

Reviewed changes

Copilot reviewed 22 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
vite.config.ts Pack config updates to bundle only @putdotio/sdk; removes .repos from test excludes.
src/sea.ts Switches top-level CLI error handling to shared handleCliCause.
src/bin.ts Switches top-level CLI error handling to shared handleCliCause.
src/internal/main.ts New shared cause handler that preserves interrupt-only causes for NodeRuntime.runMain.
src/internal/main.test.ts Adds coverage to ensure interrupt-only causes remain failures with interrupt-only causes.
src/internal/runtime.ts Makes openExternal interrupt-safe and resilient to sync/async child-process failures with cleanup.
src/internal/runtime.test.ts Extends tests for async spawn errors and interruption cleanup behavior.
src/internal/output-service.ts Refactors object detection for sanitization using Predicate helpers.
src/internal/localizers/helpers.ts Updates localizer helper predicates using Predicate.
src/internal/command.ts Preserves pagination validation failures as typed CliCommandInputError values while leaving continuation failures untouched.
src/internal/command.test.ts Adds tests asserting typed pagination validation errors and preserved continuation failures.
scripts/smoke-packed-install.mts Extends packed-install verification with single-Effect-runtime assertion and authenticated SDK request via local mock server.
scripts/prepare-effect.sh Removes obsolete Effect vendoring preparation script.
scripts/prepare-effect.mts Removes obsolete Effect vendoring preparation script.
pnpm-workspace.yaml Updates Effect override/version exceptions and adds patchedDependencies for the SDK patch.
pnpm-lock.yaml Updates lockfile for Effect beta.107 and the patched SDK entry.
patches/@putdotio__sdk@10.0.1.patch Patch for @putdotio/sdk@10.0.1 to use Schema.TaggedError instead of obsolete constructors.
package.json Pins Effect packages to beta.107, removes prepare hook, moves SDK to dev + inlined dependency for bundling.
docs/DISTRIBUTION.md Documents SDK bundling and aligns commands to pnpm exec vp ….
CONTRIBUTING.md Aligns contributor commands to pnpm exec vp … and documents the “single Effect runtime + patched SDK” distribution constraint.
AGENTS.md Removes .repos worktree guidance and adds Effect learning guidance via node_modules/effect.
.worktreeinclude Removes .repos/effect worktree include.
.gitignore Removes .repos ignore entry now that vendoring is removed.
.claude/settings.json Removes Claude worktree symlink configuration for .repos.
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.

Comment thread src/internal/localizers/helpers.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 24 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread scripts/smoke-packed-install.mts Outdated
Comment thread src/internal/main.ts
Comment thread AGENTS.md
Comment thread AGENTS.md Outdated
Comment thread scripts/smoke-packed-install.mts Outdated
Comment thread src/internal/runtime.ts

@altaywtf altaywtf left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated and dispositioned all automated findings against head d94f792. Accepted fixes are covered by the full repository gate; rejected suggestions include concrete package or runtime evidence in their threads.

Comment thread AGENTS.md
@altaywtf
altaywtf merged commit af36001 into main Aug 10, 2026
6 checks passed
@altaywtf
altaywtf deleted the chore/effect-v4-beta-107-audit branch August 10, 2026 08:44
@putio-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants