Skip to content

local storage device linking 3g7ves - #404

Open
promisszn wants to merge 3 commits into
codebestia:mainfrom
promisszn:claude/local-storage-device-linking-3g7ves
Open

local storage device linking 3g7ves#404
promisszn wants to merge 3 commits into
codebestia:mainfrom
promisszn:claude/local-storage-device-linking-3g7ves

Conversation

@promisszn

Copy link
Copy Markdown
Contributor

Summary

  • Adds LocalDiskObjectStore (apps/backend/src/lib/localObjectStore.ts), a pure-fs implementation matching ObjectStore's shape (putObject/getObject/deleteObject/getPresignedPutUrl/getPresignedGetUrl), storing bytes under a gitignored apps/backend/.local-storage/ directory.
  • Adds a new /local-storage Express route (apps/backend/src/routes/localStorage.ts, mounted only outside production) that serves real GET/PUT against those files, gated by an HMAC-signed, expiring, method-bound token — the same guarantee a real presigned S3 URL provides.
  • getObjectStore() (lib/objectStore.ts) now selects the local-disk store outside production and the real S3 client in production, so services/fileCleanup.ts's hard-delete pass keeps working unchanged against whichever backend is active.
  • lib/storage.ts no longer falls back to fakeUrl() — its isProduction() branch now issues a real presigned URL from the local-disk store in dev/test and from S3 in production.
  • No Docker/MinIO required anywhere in this path.

Test plan

  • pnpm --filter backend test — 413/413 passing, including new localObjectStore.test.ts and localStorage.routes.test.ts (round-trip PUT→GET, expired/tampered/wrong-method signature rejection, path-traversal rejection) and new coverage in objectStore.test.ts for the prod/dev backend selection.
  • pnpm --filter backend lint and tsc --noEmit — no new errors (pre-existing, unrelated errors in roomManager.ts/stellarListener.ts/uploads.test.ts confirmed present on main before this change).

Closes #330

claude added 3 commits July 27, 2026 18:35
Replaces lib/storage.ts's fakeUrl() string template with a real,
fs-backed ObjectStore implementation used outside production, served
through a new /local-storage Express route so presigned PUT/GET URLs
issued in dev are genuine, working URLs instead of never-dereferenced
strings. getObjectStore() now selects the local-disk store outside
production and the real S3 client in production, so fileCleanup.ts's
hard-delete pass works unchanged against whichever backend is active.
No Docker/MinIO needed locally.
.claude/worktrees/ holds isolated working copies the Agent tool spins up
for background subagents (used here to parallelize work on issues
codebestia#333/codebestia#334/codebestia#337) — internal tooling state, not project source.
@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

@promisszn Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@promisszn promisszn changed the title Claude/local storage device linking 3g7ves local storage device linking 3g7ves Jul 27, 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.

Local-disk object store for development, swappable to S3 in production

2 participants