Skip to content

[lifecycle-RSK] RSK-20: Check abort before an ask posts #1803

Description

@edelauna

Tracking

  • Epic: [lifecycle-RSK] Run-state kernel #1790
  • Size: 1 SP
  • Design doc: docs/architecture/task-lifecycle-target-architecture.md (not yet on main)
  • Ticket plan: docs/architecture/task-lifecycle-run-state-kernel-tickets.md (not yet on main)

Context

This is race R-3 and requirement PR-8. Task#ask checks abort only at entry (Task.ts:1447). It then awaits getState and checkAutoApproval (Task.ts:1460, 1470) and adds the ask row without a second check (Task.ts:1505, 1551, 1569). An abort in that window adds a row that no one can answer, and then the ask throws.

Developer Notes

  • Check abort right before each branch sets lastMessageTs (Task.ts:1504, 1529, 1550, 1568). Throw the same error as Task.ts:1448, and release the queued message first, as the abort exit does (Task.ts:1676-1679).
  • Add a regression test: an abort during the checkAutoApproval await must not add an ask row.

Exit criteria: no ask row posts after abort. The R-3 entry leaves the ignore list.

Reversibility: revert this PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions