Skip to content

Commit 17bf0db

Browse files
committed
fix(gastown): use bare column names in Rule 1b subquery
The aliased table 'am' combined with the qualified interpolator agent_metadata.bead_id produced 'am.agent_metadata.bead_id' (double- qualified). Use agent_metadata.columns.bead_id for the bare column name with the manual 'am.' prefix.
1 parent fe8abd4 commit 17bf0db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cloudflare-gastown/src/dos/town/reconciler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,8 @@ export function reconcileBeads(sql: SqlStorage, opts?: { draining?: boolean }):
635635
AND b.${beads.columns.rig_id} IS NOT NULL
636636
AND NOT EXISTS (
637637
SELECT 1 FROM ${agent_metadata} am
638-
WHERE am.${agent_metadata.bead_id} = b.${beads.columns.assignee_agent_bead_id}
639-
AND am.${agent_metadata.current_hook_bead_id} = b.${beads.columns.bead_id}
638+
WHERE am.${agent_metadata.columns.bead_id} = b.${beads.columns.assignee_agent_bead_id}
639+
AND am.${agent_metadata.columns.current_hook_bead_id} = b.${beads.columns.bead_id}
640640
)
641641
`,
642642
[]

0 commit comments

Comments
 (0)