Skip to content

Commit 44ab858

Browse files
os-zhuangclaude
andcommitted
fix(metadata-protocol,objectql,runtime): clear the type-check ratchet drift this card introduced (#8442)
All four new tsc errors are inside test files this PR adds, so they cannot have existed at the merge base. Fixed rather than ledgered: - metadata-protocol (+2, TS2352): section 6's fixture inspection cast an `Error & {...}` straight to `Record<string, unknown>`. Now cast through `unknown`, which is what the diagnostic itself prescribes. - objectql / runtime (+1 each, TS2554): `registry.registerObject` takes `(schema, packageId, ...)`. The one-argument form copied from neighbouring fixtures is itself part of those packages' frozen TEST_DEBT, so it was not replicated; both calls now pass a package id. No DEBT / TEST_DEBT entry was raised. `check:type-check-debt` re-measures 33 entries with none above its recorded number, surplus none. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012WMpuAfA2KSdDjGF6tm1bH
1 parent 8169e9a commit 44ab858

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎packages/metadata-protocol/src/seed-loader-driver-text.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ describe('[#8442] the harness is non-vacuous', () => {
403403
it('the validation double is recognised by `validationFailureDetails` and declares NO status', () => {
404404
const err = validationFault('Plan must be at most 4 characters.', [
405405
{ field: 'plan', code: 'max_length', message: 'Plan must be at most 4 characters.' },
406-
])() as Record<string, unknown>;
406+
])() as unknown as Record<string, unknown>;
407407

408408
// The exact own-property set measured from the real class.
409409
expect(Object.getOwnPropertyNames(err).sort())
@@ -417,7 +417,7 @@ describe('[#8442] the harness is non-vacuous', () => {
417417

418418
// The driver fixture carries its dialect on a PROPERTY, not only in the
419419
// sentence — and is NOT mistaken for a validation failure.
420-
const driver = driverFault() as Record<string, unknown>;
420+
const driver = driverFault() as unknown as Record<string, unknown>;
421421
expect(driver.code).toBe('SQLITE_ERROR');
422422
expect(driver.errno).toBe(1);
423423
expect(driver.status).toBeUndefined();

‎packages/objectql/src/seed-loader-authoring-feedback.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ async function seedLoaderOverRealEngine() {
133133
const engine = new ObjectQL();
134134
engine.registerDriver(makeMemoryDriver().driver, true);
135135
await engine.init();
136-
engine.registry.registerObject(ACCT as never);
136+
engine.registry.registerObject(ACCT as never, 'com.objectstack.test.8442');
137137
const metadata = { getObject: async () => ACCT, listObjects: async () => [ACCT] };
138138
const logger = { info() {}, warn() {}, error() {}, debug() {} };
139139
return new SeedLoaderService(engine as never, metadata as never, logger as never);

‎packages/runtime/src/seed-loader-driver-text-real-driver.integration.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ describe('[#8442] a REAL driver constraint violation is withheld from the seed r
115115
engine = new ObjectQL();
116116
engine.registerDriver(driver, true);
117117
await engine.init();
118-
engine.registry.registerObject(ACCT as any);
118+
engine.registry.registerObject(ACCT as any, 'com.objectstack.test.8442');
119119

120120
const logger = { info() {}, warn() {}, error: (() => {
121121
const calls: string[] = [];

0 commit comments

Comments
 (0)