persistence-production

Audits and fixes data persistence in Node/Express apps running on stateless runtimes like Cloud Run.

1|Updated Aug 24, 2026
One-click install
npx skills add https://github.com/danilonovaisv/DAN-IMAGES-PROMPTS-2 --skill persistence-production-danilonovaisv
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: persistence-production
Source: https://github.com/danilonovaisv/DAN-IMAGES-PROMPTS-2/tree/main/.agents/skills/persistence-production
Command: npx skills add https://github.com/danilonovaisv/DAN-IMAGES-PROMPTS-2 --skill persistence-production-danilonovaisv

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Applications deployed to stateless runtimes such as Cloud Run silently lose data when they write to local filesystems, and silent fallbacks to filesystem storage hide the failure until data disappears after a restart or redeploy. ## Core Features & Use Cases - Persistence Boundary Audit: Maps all storage adapters and identifies how the persistence provider is selected per environment. - Fail-Closed Enforcement: Requires a durable external provider in production and prohibits silent fallback to filesystem storage when the durable provider fails. - Safe Data Operations: Validates seeds and migrations so they do not overwrite existing data, and checks concurrency and atomicity for counters and updates. - Use Case: A Node/Express API deployed to Cloud Run loses all records after each redeploy. Use this Skill to trace the adapter selection logic, enforce a durable database provider in production, restrict filesystem storage to dev/test, and add tests proving safe failure without real credentials. ## Quick Start Audit my Node/Express app for persistence risks before deploying to Cloud Run and fix any silent filesystem fallbacks in production.

Frequently Asked Questions about persistence-production

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent data loss when deploying Node/Express apps to Cloud Run?▼

Cloud Run has an ephemeral filesystem, so any data written locally disappears on restart or redeploy. Configure a durable external provider such as a managed database for production, and reserve filesystem storage for dev and test environments only.

How do I audit persistence adapters in an Express application?▼

Map the persistence boundary by listing every adapter and tracing how the provider is selected per environment. Then confirm whether the target runtime has a durable filesystem and verify that production always resolves to an external durable provider.

Why does my app lose data after every redeploy on Cloud Run?▼

Cloud Run containers are stateless, so writes to the local filesystem are discarded when instances are replaced. The usual root cause is a filesystem adapter being selected in production, often through a silent fallback when the durable provider fails.

Should production fall back to filesystem storage when the database fails?▼

No. Silent fallback to filesystem storage in a stateless runtime hides failures and guarantees data loss. Production should fail closed, surfacing the error instead of degrading to non-durable storage.

How do I test provider selection without real database credentials?▼

Write tests that simulate provider selection per environment and verify fail-safe behavior when the durable provider is unavailable. These tests assert that production never resolves to filesystem storage, without needing live credentials.