fix(effect): upgrade beta 107 and retire vendoring - #171
Conversation
There was a problem hiding this comment.
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.101→4.0.0-beta.107and 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/effectvendoring + readiness docs/hooks/config and route contributors tonode_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.
There was a problem hiding this comment.
All reported issues were addressed across 24 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
## [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))
|
🎉 This PR is included in version 11.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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
SchemaAST.Sentineldeclaration augmentation required by strictskipLibCheck: falsepacked consumers..repos/effectprepare hook, script, worktree/ignore/symlink/test configuration, its orphanedis-cidependency and Knip suppression, and the SDK readiness report plus inbound links.node_modules/effect/AGENTS.mdandnode_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"]Source lookup is now direct and version-aligned:
Risks
SchemaAST.Sentinelaugmentation mirrors beta.107 source because the published declaration omits the referenced internal interface; it should be removed once upstream emits it.Verification
node_modules/.bin/vp install— passed; did not recreate.reposnode_modules/.bin/vp run verify— passed; format, lint, build, Knip, production Knip, 25 route decisions, 24 files / 143 tests; 98.08% statements, 100% functionsnode_modules/.bin/vp run lint:package— passed; Publint and ATTW ESM-only profilenode_modules/.bin/vp run test:compat— passed; packed strict TypeScript Node consumer and runtime, Vite build, Chromium, Firefox, WebKit, and Bungpt-5.6-sol, high effort, branch mode againstorigin/main; P2 and P3 findings accepted/fixed, final result cleanvp run test:live— attempted; blocked by unauthenticated HTTP 429 fixture/rate-limit stateComplexity
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
effectto4.0.0-beta.107(pinned) and add a workspace release-age exception.is-cidev dependency.Bug Fixes
PutioTransportErrorwhen body reads fail (JSON and binary); schema-invalid error JSON still falls back to the standard envelope.Schema.TaggedError,Predicate.isObject, and pass parse options/input for better error reporting; add a narrowSchemaAST.Sentineltype for strict consumers.Written for commit dc1c000. Summary will update on new commits.