Skip to content

fix: assigned issues #1441 #1453 #1456 #1457 - #1459

Merged
blurbeast merged 3 commits into
LabsCrypt:mainfrom
MarcusDavidG:fix/assigned-issues-1441-1453-1456-1457
Sep 25, 2026
Merged

blurbeast merged 3 commits into
LabsCrypt:mainfrom
MarcusDavidG:fix/assigned-issues-1441-1453-1456-1457

Conversation

@MarcusDavidG

Copy link
Copy Markdown
Contributor

Implements the four issues assigned to me. No builds/tests/package installs were run per instructions — implementation only.

#1441 — Storage Deposit Reclamation & State Pruning

  • New close_stream(caller, stream_id) entrypoint in contracts/stream_contract/src/lib.rs: auth sender/recipient/admin, requires terminal inactive state with zero balance, remove()s DataKey::Stream(id), emits StreamClosed.
  • storage.rs: new remove_stream helper; events.rs: new StreamClosedEvent; errors.rs: new StreamError::StreamStillActive = 17.
  • Tests cover prune-after-completed/cancelled, admin close, active-stream rejection, unauthorized caller, event emission, and post-close get_stream == None.

#1453 — TypeScript SDK Client-Side Signing & Tx Builder

  • New standalone SDK surface: packages/flowfi-sdk/src/client.ts (FlowFiClient), src/builder.ts (envelope builders + simulateTransaction assembly + fee-buffer padding), src/signers/index.ts (FreighterSigner / KeypairSigner / CustomSigner), src/types.ts, src/index.ts.
  • packages/flowfi-sdk/tests/client.test.ts with mocked RPC/signer shims covering builders, simulation, fee padding, signers, and all client methods.
  • README rewritten with 3-line quickstarts (Node + Freighter + custom wallet), architecture table, and simulation pipeline docs.

#1456 — PR Preview Ephemeral Environments

  • .github/workflows/pr-preview.yml: per-PR Postgres (flowfi_preview_pr_<N> or Neon/Supabase branch), prisma migrate deploy + seed, backend + frontend preview builds, Fly deploy when FLY_API_TOKEN set, bot comment with preview/health URLs.
  • .github/workflows/pr-preview-cleanup.yml: auto-teardown on PR close.
  • scripts/deploy-preview.sh / scripts/cleanup-preview.sh: provider-agnostic provision/migrate/seed/deploy/health-check/teardown (executable).

#1457 — ADRs & STRIDE Threat Model

  • docs/adr/README.md + 0001 TTL strategy, 0002 keeper-key deprecation, 0003 indexer cursor/dead-letter, 0004 SSE/WebSocket coexistence (MADR format, grounded in current code).
  • docs/security/STRIDE_THREAT_MODEL.md: 4 trust boundaries, full S/T/R/I/D/E matrix with mitigations + residual risks.
  • Root README.md links ADRs, STRIDE, SDK, and preview workflows for audit accessibility.

Closes #1453
Closes #1457
Closes #1456
Closes #1441

…sCrypt#1457

- LabsCrypt#1441: close_stream storage reclamation with StreamClosed event
- LabsCrypt#1453: SDK FlowFiClient + signers + builder + simulation pipeline
- LabsCrypt#1456: ephemeral PR preview envs with seeded DB + auto-teardown
- LabsCrypt#1457: ADRs + STRIDE threat model linked from README
- contracts: cargo fmt (lib.rs import wrap, test assert wraps)
- preview: migrate deploy with db-push fallback (init migration
  fails on fresh DB) + prisma generate, matching Backend CI
@blurbeast
blurbeast merged commit 45e956d into LabsCrypt:main Sep 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment