Skip to content

Commit d1abef0

Browse files
committed
fix(metadata-protocol,runtime): type the record read's query options; pay the metadata load at module top in the AppPlugin seed test
Claude-Session: https://claude.ai/code/session_017xRBcTJTE7kSbcMoJQ4Txf Co-authored-by: Claude <noreply@anthropic.com>
1 parent b66e07d commit d1abef0

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎packages/metadata-protocol/src/seed-loader.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4090,11 +4090,12 @@ export class SeedLoaderService implements ISeedLoaderService {
40904090
if (cached) return cached;
40914091
const keys = new Set<string>();
40924092
try {
4093-
const rows = await this.engine.find(SEED_LANDED_KEY_OBJECT, {
4093+
const query: EngineQueryOptions = {
40944094
where: { organization_id: ledger.organizationId, object_name: objectName },
40954095
fields: ['seed_key'],
40964096
context: { isSystem: true },
4097-
} as any);
4097+
};
4098+
const rows = await this.engine.find(SEED_LANDED_KEY_OBJECT, query);
40984099
for (const row of rows || []) {
40994100
const key = (row as { seed_key?: unknown } | null | undefined)?.seed_key;
41004101
if (typeof key === 'string' && key !== '') keys.add(key);

‎packages/runtime/src/app-plugin.seed-landed.test.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import { AppPlugin } from './app-plugin';
55
import { SEED_SETTLEMENT_SERVICE, type ISeedSettlementService } from '@objectstack/spec/contracts';
66
import { assertEngineFindOnePredicate, assertEngineUpdateDispatch } from '@objectstack/metadata-core';
77
import type { PluginContext } from '@objectstack/core';
8+
// MODULE LOAD: AppPlugin imports it lazily, inside a clocked case
9+
// (`scripts/check-test-source-alias.mjs`, the clocked-window rule).
10+
import '@objectstack/metadata';
811

912
/**
1013
* #23354 — AppPlugin publishes which rows its seed landed on.

0 commit comments

Comments
 (0)