Skip to content

fix(effect): upgrade beta 107 and retire vendoring - #171

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

fix(effect): upgrade beta 107 and retire vendoring#171
altaywtf merged 4 commits into
mainfrom
chore/effect-beta-107-audit

Conversation

@altaywtf

@altaywtf altaywtf commented Aug 10, 2026

Copy link
Copy Markdown
Member

Summary

Upgrade the public SDK to Effect 4.0.0-beta.107, migrate the affected v4 APIs and error boundaries, preserve strict packed-consumer compatibility, and retire the obsolete cloned Effect-source/readiness workflow.

Changed

  • Updated the repo's only Effect v4 dependency from beta.101 to beta.107 with the lockfile and release-age policy kept coherent.
  • Migrated removed Effect APIs, propagated Schema parse options/input, adopted Effect record predicates, and retained valid-date behavior.
  • Preserved typed transport failures for successful and failed response body reads; schema-invalid error bodies still use the existing fallback envelope.
  • Added real interruption proof that aborts fetch and regression coverage for response body errors and schema input reporting.
  • Added the narrow beta.107 SchemaAST.Sentinel declaration augmentation required by strict skipLibCheck: false packed consumers.
  • Removed the .repos/effect prepare hook, script, worktree/ignore/symlink/test configuration, its orphaned is-ci dependency and Knip suppression, and the SDK readiness report plus inbound links.
  • Routed contributors to node_modules/effect/AGENTS.md and node_modules/effect/src.

Review aids

flowchart LR
  R["HTTP response"] --> S{"2xx?"}
  S -->|"yes"| B["Read success body"]
  S -->|"no"| E["Read error JSON"]
  B -->|"body read fails"| T["PutioTransportError"]
  B -->|"schema decode fails"| V["PutioValidationError"]
  E -->|"body read fails"| T
  E -->|"valid envelope"| A["Typed API/Auth/RateLimit error"]
  E -->|"schema-invalid JSON"| F["Fallback error envelope"]
Loading

Source lookup is now direct and version-aligned:

node_modules/effect/AGENTS.md
           |
           v
node_modules/effect/src

Risks

  • Effect v4 remains beta. The exact beta.107 version is pinned.
  • The SchemaAST.Sentinel augmentation mirrors beta.107 source because the published declaration omits the referenced internal interface; it should be removed once upstream emits it.
  • The live API suite could not provide acceptance evidence: configured first/third-party tokens were treated as unauthenticated and the API returned HTTP 429. Deterministic and packed runtime matrices are green.

Verification

  • node_modules/.bin/vp install — passed; did not recreate .repos
  • node_modules/.bin/vp run verify — passed; format, lint, build, Knip, production Knip, 25 route decisions, 24 files / 143 tests; 98.08% statements, 100% functions
  • node_modules/.bin/vp run lint:package — passed; Publint and ATTW ESM-only profile
  • node_modules/.bin/vp run test:compat — passed; packed strict TypeScript Node consumer and runtime, Vite build, Chromium, Firefox, WebKit, and Bun
  • Autoreview — Codex gpt-5.6-sol, high effort, branch mode against origin/main; P2 and P3 findings accepted/fixed, final result clean
  • vp run test:live — attempted; blocked by unauthenticated HTTP 429 fixture/rate-limit state

Complexity

Medium. The runtime changes are narrow and test-backed; most of the diff removes obsolete workflow/reporting machinery. No runtime dependency was added.


Summary by cubic

Upgrade the SDK to effect@4.0.0-beta.107, migrate v4 API changes, and remove the old vendored Effect workflow. Improves error handling and cancellation while keeping strict packed-consumer compatibility.

  • Dependencies

    • Upgrade effect to 4.0.0-beta.107 (pinned) and add a workspace release-age exception.
    • Remove the is-ci dev dependency.
  • Bug Fixes

    • Preserve typed PutioTransportError when body reads fail (JSON and binary); schema-invalid error JSON still falls back to the standard envelope.
    • Abort fetch when the Effect is interrupted.
    • Adopt v4 APIs: use Schema.TaggedError, Predicate.isObject, and pass parse options/input for better error reporting; add a narrow SchemaAST.Sentinel type for strict consumers.

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

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

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

Upgrades @putdotio/sdk to effect@4.0.0-beta.107, migrates impacted Effect v4 APIs (Schema parsing options/input reporting, record predicates, tagged errors), tightens transport-vs-validation error boundaries, and removes the now-obsolete vendored Effect source/readiness workflow.

Changes:

  • Bump Effect v4 from 4.0.0-beta.1014.0.0-beta.107 and keep pnpm release-age policy coherent for the pinned beta.
  • Adjust Schema decoding/error handling to preserve typed transport failures (including body-read failures) while keeping validation errors typed and input-reportable.
  • Retire .repos/effect vendoring + readiness docs/hooks/config and route contributors to node_modules/effect/* for source lookup.

Reviewed changes

Copilot reviewed 22 out of 24 changed files in this pull request and generated no comments.

Show a summary per file
File Description
vite.config.ts Removes .repos/** exclusions now that vendoring is retired; keeps live tests excluded.
src/utilities/localized-error.ts Switches object checks to Effect Predicate helpers for v4 alignment.
src/index.ts Adds beta.107 SchemaAST.Sentinel augmentation needed for strict packed-consumer TS.
src/domains/supporting.spec.ts Adds regression coverage for Schema input reporting (reportInput).
src/domains/files.ts Updates schema usage to the beta.107-compatible date schema.
src/domains/config.ts Migrates custom Schema constructors to accept/propagate parse options and input.
src/domains/auth.ts Updates tagged error class usage for Effect beta.107 API changes.
src/core/http.ts Refines decode/error boundaries so transport failures remain typed and distinct from validation failures.
src/core/http.spec.ts Adds interruption/abort proof and regression tests for typed body-read failures.
src/core/errors.ts Aligns predicates/tagged errors with beta.107 and keeps fallback envelope handling in one place.
src/core/errors.spec.ts Extends predicate coverage (e.g., array is not a valid envelope).
src/core/client.spec.ts Uses Effect predicates for object traversal in tests.
scripts/prepare-effect.sh Deleted: removes the vendored Effect repo preparation hook.
README.md Removes readiness doc link now that readiness workflow/docs are retired.
pnpm-workspace.yaml Excludes effect@4.0.0-beta.107 from minimum release age gating.
pnpm-lock.yaml Locks Effect to beta.107 and drops now-unused transitive/dev dependencies (e.g., is-ci).
package.json Bumps Effect dependency; removes prepare hook and is-ci devDependency.
knip.json Removes is-ci ignore now that dependency is gone.
docs/READINESS.md Deleted: removes obsolete readiness/reporting document.
CONTRIBUTING.md Removes readiness doc link.
AGENTS.md Updates worktree guidance and adds direct Effect source-lookup routing.
.worktreeinclude Stops carrying .repos/effect into worktrees.
.gitignore Removes .repos ignore as vendoring is retired.
.claude/settings.json Deleted: removes .repos symlink/worktree settings tied to vendoring.
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.

@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 src/domains/supporting.spec.ts
Comment thread src/domains/files.ts
@altaywtf
altaywtf merged commit 99ba228 into main Aug 10, 2026
11 checks passed
@altaywtf
altaywtf deleted the chore/effect-beta-107-audit branch August 10, 2026 08:20
putio-releaser Bot added a commit that referenced this pull request Aug 10, 2026
## [11.1.2](v11.1.1...v11.1.2) (2026-08-10)

### Bug Fixes

* **effect:** upgrade beta 107 and retire vendoring ([#171](#171)) ([99ba228](99ba228))
@putio-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 11.1.2 🎉

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