Skip to content

Commit 8e6edc2

Browse files
committed
refactor: skip sys_metadata operations for project kernels in ObjectStackProtocolImplementation
1 parent 89bcd42 commit 8e6edc2

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

packages/objectql/src/protocol.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@ export class ObjectStackProtocolImplementation implements ObjectStackProtocol {
263263
// entries (the previous fallback-only logic meant project metadata
264264
// was never surfaced whenever system-bridged items populated the
265265
// registry). Deduplicate against whatever the registry returned.
266-
try {
266+
// Skip on project kernels — sys_metadata is control-plane only.
267+
if (this.environmentId === undefined) try {
267268
const whereClause: Record<string, unknown> = {
268269
type: request.type,
269270
state: 'active',
@@ -367,8 +368,10 @@ export class ObjectStackProtocolImplementation implements ObjectStackProtocol {
367368
}
368369
}
369370

370-
// Fallback to database if not in registry
371-
if (item === undefined) {
371+
// Fallback to database if not in registry.
372+
// Skip on project kernels — sys_metadata is control-plane only;
373+
// project kernels source metadata from the artifact via MetadataService below.
374+
if (item === undefined && this.environmentId === undefined) {
372375
try {
373376
const scopedWhere: Record<string, unknown> = {
374377
type: request.type,

0 commit comments

Comments
 (0)