You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
config.storage authored with driver/root is silently ignored — a host asking for S3 gets local disk #4167
Found while fixing #4096 (PR #4166), which corrected the same mismatch one layer down. Filing rather than papering over, because the fix is a contract decision (AGENTS.md Prime Directive #12).
So a config authored as { driver: 's3', bucket: '…' } is accepted by the branch, passed to the plugin, and every key is dropped. The constructor's { adapter: 'local', ...options } default then applies and the host silently gets local disk — while believing it configured S3.
TypeScript does not catch it: the value is an untyped config field, and an object literal reaching a parameter whose interface has no index signature type-checks fine while doing nothing at runtime.
Why this is worth a decision, not a shim
#4096 was the same bug in serve's own fallback ({ driver: 'local', root }), where the consequence was a wrong upload directory plus a bogus migration warning on every boot. That one I fixed at the producer, because serve owns both ends.
This one crosses an authoring boundary, so the two honest options are:
The config schema is right and the plugin should accept the driver/root dialect — then it belongs in a declared conversion/alias shim (the ADR-0087 conversion layer or readAliasedConfig), warned once and removable on a schedule, not a bare ??.
The plugin's shape is canonical and the driver/root dialect is wrong — then config.storage should be validated at authoring/compile time so an unrecognised block is rejected loudly instead of silently downgrading to local disk.
Either way the current state — accepted, ignored, no diagnostic — is the declared ≠ enforced shape Prime Directive #10 is about. Note that whichever is chosen, serve's branch condition also needs revisiting: it currently treats the mere presence of driver as "the host configured a backend", which is what routes an unreadable block past the working default.
Boot with os serve. Files are written to local disk under the plugin's default root; nothing reports that the S3 configuration was discarded.
Scope note
Untouched by #4166, which deliberately keeps forwarding the block verbatim — the helper's doc comment records why, so the next reader does not "tidy" it into an alias.
Activity
docs(validating-metadata): the undeclared-key rule covers top-level s…
chore(spec): record STACK_KEY_GUIDANCE in the API-surface snapshot (#…
refactor(spec): rebuild the top-level stack-key lint on the #4178 walker
feat(spec): unknown-key lint descends into nested metadata, not just …
fix(spec,cli): config.storage was never a stack key — stop reading it…
fix(i18n): drop the undeclared `name:` key from all nine i18n-extract…
fix(devx): `check:i18n` fails on an undeclared authoring key, not jus…
test(spec): kernel test titles state each cited decision in words ins…