A retry now carries the operator's worktree choice (refresh onto the base branch or continue the work already pushed on the task branch) from the dashboard through the task action to the daemon dispatch, and persists it on the task row so it survives a reload. The daemon resolves the mode from the task, never from the workflow; BeginRemediation records continue explicitly so a remediation still resumes its pull request branch.
21 lines
861 B
SQL
21 lines
861 B
SQL
-- Operator-selected retry worktree mode
|
|
-- (archie-core-vrl5: "retry should let the operator choose refresh-onto-base
|
|
-- or continue-pushed-work").
|
|
--
|
|
-- tasks.retry_mode records how the next dispatch positions the worktree:
|
|
-- 'refresh_onto_base' resets it onto the base branch, 'continue_pushed_work'
|
|
-- resumes the branch the task already pushed. The retry action writes the
|
|
-- operator's choice; BeginRemediationTask writes 'continue_pushed_work' when
|
|
-- it queues a remediation, because a remediation must continue its PR branch.
|
|
-- The default is the explicit refresh mode, so every existing row reads as a
|
|
-- retry that starts from base and no dispatch path infers the mode from the
|
|
-- workflow.
|
|
|
|
-- +goose Up
|
|
|
|
ALTER TABLE tasks ADD COLUMN retry_mode text NOT NULL DEFAULT 'refresh_onto_base';
|
|
|
|
-- +goose Down
|
|
|
|
ALTER TABLE tasks DROP COLUMN retry_mode;
|