Skip to content

feat(sdk): StorageProvider interface + FSStorageProvider (#481)#567

Closed
diberry wants to merge 1 commit intobradygaster:devfrom
diberry:squad/481-storage-provider
Closed

feat(sdk): StorageProvider interface + FSStorageProvider (#481)#567
diberry wants to merge 1 commit intobradygaster:devfrom
diberry:squad/481-storage-provider

Conversation

@diberry
Copy link
Copy Markdown
Collaborator

@diberry diberry commented Mar 23, 2026

Wave 1: Storage Abstraction Layer

Defines the \StorageProvider\ interface and ships \FSStorageProvider\ as a drop-in default. No call sites are migrated — this is the foundation only.

What's in this PR

  • \packages/squad-sdk/src/storage/storage-provider.ts\ — 9-method interface (6 async + 3 sync with @deprecated\ JSDoc)
  • \packages/squad-sdk/src/storage/fs-storage-provider.ts\ — Node.js \ s/\ s/promises\ implementation
  • \packages/squad-sdk/src/storage/index.ts\ — barrel export
  • \packages/squad-sdk/src/index.ts\ — wired into SDK barrel
  • \packages/squad-sdk/package.json\ — ./storage\ subpath export added
  • \ est/storage-provider.test.ts\ — 18 tests, all passing

Design decisions (per Dina)

  • DI with config fallback — constructor injection primary, \FSStorageProvider\ is the config-resolved default
  • Both sync and async — all 9 methods shipped; sync marked @deprecated\ after Wave 2
  • Wave 1 ships alone — zero behavior change, no call site migration yet

Test results

\
✓ FSStorageProvider (18 tests) 135ms — all passed
\\

Build

Clean build with \SKIP_BUILD_BUMP=1.


Working as EECOM (Core Dev)

Closes #481 (Wave 1)

@bradygaster
Copy link
Copy Markdown
Owner

please fix formatting issues

@bradygaster
Copy link
Copy Markdown
Owner

🔍 Squad Team Review

Reviewed by: CONTROL (TypeScript Engineer) — Pass 3 of consensus ceremony
Action: Phase 6 — Draft, awaiting author
Team Consensus: 5/5 AGREE

Review Summary

StorageProvider interface + FSStorageProvider. Currently in draft. Properly scoped and has tests. Awaiting author to mark ready for review.

Verdict: HOLD — awaiting author to mark ready

@diberry diberry marked this pull request as ready for review March 26, 2026 11:54
@diberry
Copy link
Copy Markdown
Collaborator Author

diberry commented Mar 27, 2026

Closing as duplicate — superseded by #640 (StorageProvider full migration).

@diberry diberry closed this Mar 27, 2026
@diberry
Copy link
Copy Markdown
Collaborator Author

diberry commented Mar 27, 2026

Reopening — this is the smaller foundational PR. The full migration (#640) is being closed instead.

…#481)

Wave 1 foundation: defines the 9-method StorageProvider interface
(6 async + 3 sync) and implements FSStorageProvider as a drop-in
wrapper around Node.js fs. No call sites migrated yet — this PR
establishes the abstraction layer only.

Decisions: DI with config fallback, both sync/async, sync deprecated
after Wave 2 migration.

Closes bradygaster#481 (Wave 1)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry diberry force-pushed the squad/481-storage-provider branch from 391777c to fd6b571 Compare March 28, 2026 14:19
@diberry
Copy link
Copy Markdown
Collaborator Author

diberry commented Mar 28, 2026

Closing -- this was the interface-only skeleton (6 files, 321 additions). The complete StorageProvider migration with all 3 providers, error handling, and consumer wiring is in #640. Archiving this as incomplete.

@diberry diberry closed this Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PRD: Squad State — Typed StorageProvider Interface with Contract Conformance

3 participants