Skip to content

[finding][spec] memory-driver persistence.path / persistence.key still accept unresolved ${…} placeholders — the #8336 shape one surface over, deliberately outside its connection-material class #8495

Description

@qq9340100

Found while implementing #8336 (session session_012MNV7ZSCjNfA38eDCjsXQL, PR #8457).

#8336 refuses ${…} placeholder syntax across the connection-material driver-config keys (postgres/mysql/mongo/turso/sqlite). The memory driver was deliberately excluded from that class: it connects to nothing, and its initialData carries arbitrary record values where a literal ${…} may be legitimate data.

Two memory-config keys sit outside that reasoning, though: persistence.path (file persistence, also the auto override) and persistence.key (localStorage). A ${DATA_DIR} written there is resolved by nothing — the driver would create and write a literal ./${DATA_DIR}/… path (or a literal localStorage key), the same authored-under-a-false-belief shape #8336 closes, one surface over. Milder consequence than a database connection (the dump lands in a wrongly-named location instead of failing at a distance), and no occurrence measured anywhere in examples or fixtures — hence observation-class, not a defect card.

If it is ever worth closing: placeholderFree from packages/spec/src/data/driver/common.zod.ts applies directly to both keys (FilePersistenceConfigSchema, LocalStoragePersistenceConfigSchema, AutoPersistenceConfigSchema in memory.zod.ts); initialData must stay unjudged.

Refs: #8336 (ruling), #7990/#8078 (census measurement).


Generated by Claude Code

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions