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
fix(spec,runtime): 槽查找 any 规则补上类型实参形态并把作用域扩到全部 packages(#4251 第一批) (#4321)
* fix(spec,runtime): catch the getService<any> type-argument form and widen the lookup guard to all packages (#4251)
The #4127/#4214 rule matched ': any' and 'as any' on a lookup result but not
the type-argument form getService<any>(...) — the shape the codebase actually
used — and its files glob stopped at packages/runtime while the composition
roots held the majority of lookups. Both gaps close here:
- eslint.config.mjs: third selector for the type-argument form
(typeArguments.params.0 = TSAnyKeyword), scope widened to packages/**,
http.server added to UNCONTRACTED_SLOTS (three providers, no contract).
The 40 not-yet-swept files are grandfathered in SLOT_LOOKUP_UNSWEPT — a
visible ratchet enumerated at 180 sites by running the rule with the list
emptied; batches remove entries, never add.
- The three in-scope runtime src sites are typed. Doing so surfaced the
batch's first yield: both addDatasource branches (DefaultDatasourcePlugin
parity branch, DriverPlugin.start) probed a method no metadata service
implements, so they had never run on any boot — deleted rather than typed
against a phantom shape. The inert DriverPluginOptions are tracked in
#4320; registerInMemory('datasource', ...) is the actual visibility path.
- Contracts declare the evidenced members those sites read, both optional:
IDataEngine.getDefaultDriverName/getDriverByName (ObjectQL's driver
registry, re-registered as driver.<name> services for os migrate and
serve storage detection) and IMetadataService.registerInMemory
(MetadataManager's boot-time seeding primitive, #3827).
- Runtime test lookups typed as IDataEngine; the five http.server test
lookups ride the slot exemption.
Verified: pnpm lint clean; spec check:generated all 8 up to date; tests
green — spec 7137/277, objectql 1345/85, runtime 954/67, metadata 281/13,
plugin-webhooks 25/3.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AWW5xEALZNU5VBXfGyWPGz
* docs(kernel): document the evidenced contract members added for #4251
The IDataEngine and IMetadataService contract references enumerate the
interface surface member by member, so the two additions (driver registry
lookups; registerInMemory) were stale-by-omission — flagged by the docs
drift check on #4321. Both interface listings and the per-member sections
now match packages/spec/src/contracts.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AWW5xEALZNU5VBXfGyWPGz
* feat(runtime,cli)!: retire the inert DriverPluginOptions (#4320)
new DriverPlugin(driver, { datasourceName, registerAsDefault }) never did
what it promised: both options configured the start() datasource block that
probed metadata.addDatasource — a method no metadata service implements —
so they were dead weight on every boot since inception. Routing to a named
auxiliary driver never came from the option: it keys off the DRIVER name
(init registers driver.<name>, ObjectQL's discovery loop adopts it, the
engine's lifecycle resolution looks the name up — engine.ts
LIFECYCLE_DATASOURCE), which is why serve's telemetry split worked all
along despite the option doing nothing.
- DriverPlugin constructor narrowed to (driver, driverName?); the options
interface (module-local, never exported from the package root) is gone.
- serve.ts drops the options argument; the telemetry wiring comment now
states the driver-name mechanism explicitly.
- Major changeset for @objectstack/runtime carries the FROM -> TO
migration; behavior is unchanged by construction (the code the options
configured never ran).
Verified: full turbo build green (71 packages); runtime 954/67 and cli
628/64 tests pass; pnpm lint clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AWW5xEALZNU5VBXfGyWPGz
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments