You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[lifecycle-RSK] RSK-20: Check abort before an ask posts #1803
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.
Tracking
docs/architecture/task-lifecycle-target-architecture.md(not yet onmain)docs/architecture/task-lifecycle-run-state-kernel-tickets.md(not yet onmain)Context
This is race R-3 and requirement PR-8.
Task#askchecksabortonly at entry (Task.ts:1447). It then awaitsgetStateandcheckAutoApproval(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
abortright before each branch setslastMessageTs(Task.ts:1504, 1529, 1550, 1568). Throw the same error asTask.ts:1448, and release the queued message first, as the abort exit does (Task.ts:1676-1679).checkAutoApprovalawait 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.