Found while fixing #4782 (PR #6545). Recorded, not fixed there: #4782's file surface is
packages/metadata/src/loaders/database-loader.test.ts only.
Observation
packages/objectql/src/protocol-batch-atomic.test.ts:46:
const driver: any = {
name: 'snapshot',
version: '0.0.0',
supports: { transactions: true },
...
transactions was RETIRED by #4634 and is tombstoned in DriverCapabilitiesSchema as
retiredKey(...), i.e. never. Authoring it is meant to fail tsc at the authoring site
and to be rejected by a parse with the removal prescription.
Neither channel fires here, and the reason is the annotation: the literal is : any, so
it is never compared against IDataDriver, and nothing in this test parses the driver
through DriverInterfaceSchema. The bit is inert — transaction use gates on METHOD
presence (driver.beginTransaction), which this mock does implement, so the test passes
for the right reason and would pass identically with the bit deleted.
This is the same family as #4782 but a different failure mode, which is why it is worth a
separate line: #4782's block was at least partly VISIBLE to tsc (its four retired keys
were four real TS2322 in the @objectstack/metadata DEBT ledger). Here the : any erases
the diagnostic entirely.
Why this is observation-class, not a defect
Nothing a user hits, no gate is red, and no behaviour depends on it. The concrete harm is
the one #4782 names: it is a mock, and mocks get copied. A future author who copies this
one inherits a retired bit plus the : any that hides it.
Deliberately NOT flagged: packages/spec/src/data/driver.test.ts:317 spells
supports: { transactions: true, streaming: true } on purpose — it is the rejection
fixture (it('REJECTS a driver whose supports still authors a retired bit')) and asserts
the tombstone prescription. That one is correct as written.
Suggestion
Drop the bit (supports: {}), and consider whether const driver: any should be
const driver: IDataDriver — the any is what turned a compile error into silence, so
the annotation is the part that actually prevents recurrence. Whether that retyping is
cheap depends on how the rest of the literal lines up with IDataDriver; it was not
measured here.
A repo-wide grep for other supports: literals spelling retired or invented capability
keys found no further instances in packages/ or examples/ beyond this one, #4782's,
and the spec rejection fixture above.
Found while fixing #4782 (PR #6545). Recorded, not fixed there: #4782's file surface is
packages/metadata/src/loaders/database-loader.test.tsonly.Observation
packages/objectql/src/protocol-batch-atomic.test.ts:46:transactionswas RETIRED by #4634 and is tombstoned inDriverCapabilitiesSchemaasretiredKey(...), i.e.never. Authoring it is meant to failtscat the authoring siteand to be rejected by a parse with the removal prescription.
Neither channel fires here, and the reason is the annotation: the literal is
: any, soit is never compared against
IDataDriver, and nothing in this test parses the driverthrough
DriverInterfaceSchema. The bit is inert — transaction use gates on METHODpresence (
driver.beginTransaction), which this mock does implement, so the test passesfor the right reason and would pass identically with the bit deleted.
This is the same family as #4782 but a different failure mode, which is why it is worth a
separate line: #4782's block was at least partly VISIBLE to
tsc(its four retired keyswere four real TS2322 in the
@objectstack/metadataDEBT ledger). Here the: anyerasesthe diagnostic entirely.
Why this is observation-class, not a defect
Nothing a user hits, no gate is red, and no behaviour depends on it. The concrete harm is
the one #4782 names: it is a mock, and mocks get copied. A future author who copies this
one inherits a retired bit plus the
: anythat hides it.Deliberately NOT flagged:
packages/spec/src/data/driver.test.ts:317spellssupports: { transactions: true, streaming: true }on purpose — it is the rejectionfixture (
it('REJECTS a driver whose supports still authors a retired bit')) and assertsthe tombstone prescription. That one is correct as written.
Suggestion
Drop the bit (
supports: {}), and consider whetherconst driver: anyshould beconst driver: IDataDriver— theanyis what turned a compile error into silence, sothe annotation is the part that actually prevents recurrence. Whether that retyping is
cheap depends on how the rest of the literal lines up with
IDataDriver; it was notmeasured here.
A repo-wide grep for other
supports:literals spelling retired or invented capabilitykeys found no further instances in
packages/orexamples/beyond this one, #4782's,and the spec rejection fixture above.