Skip to content

no-storage-in-stateless-modules

Disallow SQL or key/value access inside configured stateless modules; derive state from a system of record instead.

Why

Private storage in a stateless workflow creates another source of truth that can silently diverge.

Fix

Read from the system of record or derive state from an artifact the workflow already produces.

Examples

Before — flagged Do not write private state in a stateless module
src/engineer-digest/post.ts
await kv.put("digest:last", timestamp);
After — preferred Read from the system of record
src/engineer-digest/post.ts
const issues = await linear.listIssues();

Options

{
"additionalProperties": false,
"properties": {
"methods": {
"description": "Storage method names to flag. Replaces the defaults.",
"items": { "type": "string" },
"type": "array"
},
"modules": {
"description": "Regex sources matched against the filename. Empty (the default) disables the rule.",
"items": { "type": "string" },
"type": "array"
}
},
"type": "object"
}