Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('a Task whose supervised worker is stopping', () => {
afterEach(() => db.close())

function localWorker() {
const task = db.createTask({ spec: 'local work' })
const task = db.createTask({ runId: 'run_legacy_local', spec: 'local work' })

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — correct, and the PR body is fixed: create-core-tables-sql.ts only supplies the column DEFAULT; the run_legacy_local row itself is inserted by migrate-v2-v12.ts (INSERT OR IGNORE INTO runs) during schema setup, which is why requireRun passes on a fresh :memory: db.

const { dispatch } = db.createStartingWorkerDispatch({
taskId: task.id,
startOptions: {},
Expand Down Expand Up @@ -59,7 +59,7 @@ describe('a Task whose supervised worker is stopping', () => {
})

it('control: still accepts dispatched for an active Dispatch with no supervised worker', () => {
const task = db.createTask({ spec: 'unsupervised work' })
const task = db.createTask({ runId: 'run_legacy_local', spec: 'unsupervised work' })
createRootDispatch(db, task.id, 'term_worker')

expect(db.updateTaskStatus(task.id, 'dispatched')?.status).toBe('dispatched')
Expand Down
Loading