Found during #9630 (H2: does the storage / file-storage naming difference have a recorded reason?). Filed rather than guessed — #9630's PR documents that the slot is file-storage, but could not document why, because nothing in the tree says.
What was measured
'file-storage' is canonical and consistent — that is not in question:
packages/spec/src/system/core-services.zod.ts:27 lists it in the CoreServiceName enumCORE_SERVICE_PROVIDER maps it to @objectstack/service-storage- registered at
packages/services/service-storage/src/storage-service-plugin.ts:237 - resolved by
packages/cli/src/commands/migrate/files-to-references.ts:197, packages/plugins/plugin-email/src/email-plugin.ts:223, packages/runtime/src/http-dispatcher.ts:1135
It is also the only member of that enum whose name is a compound where every sibling is a bare noun (metadata, data, auth, search, cache, queue, automation, analytics, realtime, job, notification, ai, i18n, ui).
What is missing
Searched for a stated reason and found none:
- The registration site (
storage-service-plugin.ts:237) carries no comment on the name. - The enum entry carries only
// Storage Driver (Local/S3) — a description of the capability, not of the spelling. - ADRs:
file-storage appears in docs/adr/0076 and docs/adr/0115, both using it as an established fact; neither discusses the name. - Changesets: no
.changeset/*.md mentions it. - The contract file (
packages/spec/src/contracts/storage-service.ts:13) says "Aligned with CoreServiceName 'file-storage'" — which records the alignment, not the reason for it.
There are plausible reasons (a bare storage collides with the /api/v1/storage route namespace and with ObjectStackClient.storage, both of which are real and differently shaped — see #9630). But that is inference, and this issue exists precisely so nobody has to infer it again.
Why it is worth a line
CoreServiceName is a published enum and the divergence has already cost one documentation defect (#9630), where a reader following the docs wrote ctx.getService('storage') and got a throw. A one-clause comment at the enum member converts a recurring "is this a typo?" into a settled fact. The next person to notice the asymmetry will otherwise re-run the same search.
Suggested resolution
Add one clause to the CoreServiceName entry stating why the slot is file-storage rather than storage — if a maintainer knows the reason. If there is no reason beyond history, saying that is equally useful and equally cheap.
⚠️ Explicitly not proposed: renaming the slot. It is a published CoreServiceName member with three internal consumers; #9630's dispatch ruled that route out, and nothing here reopens it.
Refs: #9630
Found during #9630 (H2: does the
storage/file-storagenaming difference have a recorded reason?). Filed rather than guessed — #9630's PR documents that the slot isfile-storage, but could not document why, because nothing in the tree says.What was measured
'file-storage'is canonical and consistent — that is not in question:packages/spec/src/system/core-services.zod.ts:27lists it in theCoreServiceNameenumCORE_SERVICE_PROVIDERmaps it to@objectstack/service-storagepackages/services/service-storage/src/storage-service-plugin.ts:237packages/cli/src/commands/migrate/files-to-references.ts:197,packages/plugins/plugin-email/src/email-plugin.ts:223,packages/runtime/src/http-dispatcher.ts:1135It is also the only member of that enum whose name is a compound where every sibling is a bare noun (
metadata,data,auth,search,cache,queue,automation,analytics,realtime,job,notification,ai,i18n,ui).What is missing
Searched for a stated reason and found none:
storage-service-plugin.ts:237) carries no comment on the name.// Storage Driver (Local/S3)— a description of the capability, not of the spelling.file-storageappears indocs/adr/0076anddocs/adr/0115, both using it as an established fact; neither discusses the name..changeset/*.mdmentions it.packages/spec/src/contracts/storage-service.ts:13) says "Aligned with CoreServiceName 'file-storage'" — which records the alignment, not the reason for it.There are plausible reasons (a bare
storagecollides with the/api/v1/storageroute namespace and withObjectStackClient.storage, both of which are real and differently shaped — see #9630). But that is inference, and this issue exists precisely so nobody has to infer it again.Why it is worth a line
CoreServiceNameis a published enum and the divergence has already cost one documentation defect (#9630), where a reader following the docs wrotectx.getService('storage')and got a throw. A one-clause comment at the enum member converts a recurring "is this a typo?" into a settled fact. The next person to notice the asymmetry will otherwise re-run the same search.Suggested resolution
Add one clause to the
CoreServiceNameentry stating why the slot isfile-storagerather thanstorage— if a maintainer knows the reason. If there is no reason beyond history, saying that is equally useful and equally cheap.CoreServiceNamemember with three internal consumers; #9630's dispatch ruled that route out, and nothing here reopens it.Refs: #9630