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
feat(spec)!: converge the dual-source MetadataFormat and CacheStrategy enum declarations (#4537) (#4557)
Two enum vocabularies were declared on both ./shared and ./system and
had diverged on their VALUES — which accepted value set you got depended
on nothing but the import path (the #4411 trap; #4535 A2, #4506
baseline). Value-level divergence is the silent kind: a mismatched value
never fails to compile.
MetadataFormat / MetadataFormatSchema — shared declaration is the
single source:
- system/metadata-persistence.zod.ts no longer declares its own
7-member copy; it re-exports shared/metadata-types.zod (the
MetadataManagerConfig pattern, in reverse). The extension-style
aliases yml/ts/js it carried had zero producers in this repo,
objectui and cloud: FilesystemLoader.detectFormat normalizes at the
boundary (.yml -> 'yaml', .ts -> 'typescript', .js -> 'javascript')
and the database/remote/memory loaders always emit 'json'.
- Direction: shared, not system — kernel/metadata-loader.zod has
imported the shared schema since #4411 (MetadataManagerConfig.formats
needs no change), and system already re-exports
MetadataManagerConfigSchema FROM kernel, so a system-side source
would close a module cycle (shared -> system -> kernel -> shared).
CacheStrategy — system/cache.zod.ts (CacheStrategySchema) is the
single declaration:
- shared/enums.zod.ts CacheStrategyEnum (+ its CacheStrategy type
export) removed: zero importers in all three repos, while the system
schema is the one CacheTier.strategy gates on. Same disposition as
AggregationFunctionEnum in the same file (objectui#2945): removed
rather than reconciled.
- 'adaptive', declared only on the system side with zero producers,
is dropped — the enum carries the four values both declarations
agreed on (lru | lfu | fifo | ttl).
Bookkeeping:
- dual-source-exports.baseline.json: the three converged rows deleted
(shrink-only ratchet).
- json-schema.manifest.json: shared/CacheStrategyEnum key deleted
(deliberate retirement, #2978 flow).
- Pin tests: yml/ts/js rejected on the system entry; 'adaptive'
rejected on CacheStrategySchema.
- api-surface.json, references docs, skill refs regenerated via
check:generated --fix.
- Changeset (major) carries the FROM -> TO migration lines.
- No ADR-0087 conversion / tombstone: loader envelope + config
vocabulary with no authorable-metadata producers (the #4411/#4536
route).
Claude-Session: https://claude.ai/code/session_01M9uWvoEp9CoLzYjNExj9sL
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments