Skip to content

Fix persisted worker bootstrap recovery query#594

Merged
mrubens merged 1 commit into
developfrom
codex/fix-bootstrap-recovery-query
Jul 19, 2026
Merged

Fix persisted worker bootstrap recovery query#594
mrubens merged 1 commit into
developfrom
codex/fix-bootstrap-recovery-query

Conversation

@mrubens

@mrubens mrubens commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

What changed

  • move the persisted worker-bootstrap restart lookup to a dedicated core Drizzle query
  • preserve the correlated task_run_events.run_id = task_runs.id reference
  • add regression coverage that inspects the generated SQL and rejects the invalid relational alias

Why

The relational query builder aliased the outer task_runs table and remapped columns inside the correlated raw SQL fragment. That produced references such as taskRuns.run_id, taskRuns.source, and taskRuns.details, even though those columns belong to task_run_events. PostgreSQL rejected the recovery scan and interrupted controller iterations.

Impact

Controllers can scan for persisted bootstrap restarts without query failures, allowing queued work and bootstrap recovery to continue normally.

Validation

  • full controller Vitest suite: 117 passed, 2 skipped
  • controller and database TypeScript checks
  • controller and database ESLint checks
  • repository formatting check
  • generated-SQL regression test
  • corrected read-only correlation accepted by PostgreSQL

@roomote-roomote

roomote-roomote Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

No code issues found. See task

Reviewed bc2bc51

@mrubens
mrubens marked this pull request as ready for review July 19, 2026 17:40
@mrubens
mrubens merged commit c92b866 into develop Jul 19, 2026
17 checks passed
@mrubens
mrubens deleted the codex/fix-bootstrap-recovery-query branch July 19, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant