Skip to content

Persist pre_fix_sha to database for crash recovery #23

@chanakyav

Description

@chanakyav

In orchestrator.py, _pre_fix_sha is stored in-memory on the orchestrator object:

self._pre_fix_sha = get_head_sha(self.task["branch"])

If the orchestrator crashes between FIX and VERIFY_PUSH, the SHA is lost. On restart, _do_verify_push() falls through with pre_sha = None and can't verify commits were actually pushed.

Proposed fix:

  1. Add pre_fix_sha TEXT column to the tasks table (schema migration)
  2. Store via update_task(task_id, pre_fix_sha=sha) in _do_fix()
  3. Read from self.task["pre_fix_sha"] in _do_verify_push()
  4. Follow the migration pattern: bump SCHEMA_VERSION, add to _MIGRATIONS, SCHEMA, _TASK_COLUMNS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions