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-22: Test the 32-state turn crossing with an unsafe kernel #2366
Model doc: docs/architecture/task-lifecycle-model.md (Run-state kernel submodel)
Context
scripts/check-run-state-kernel.ts checks the turn region in a separate pass, checkTurnRegion. The main run applies every event to one state of each shape, in each of the 32 turn states. The known-unsafe kernel runs use only two turn states, all false and all true, to keep the run time low.
No unsafe kernel can therefore test the 32-state crossing. A kernel that is wrong only in a mixed turn state passes the unsafe-kernel runs. An example is a toolUsed that copies toolRejected into toolFailed. If a change drops the crossing back to two turn states, the checker stays green.
Developer Notes
Add an allTurnStates field to UnsafeKernel with the default false. Pass it to runModelCheck.
Add one unsafe kernel that is wrong only in a mixed turn state, and set allTurnStates: true on it. Its caughtBy must match only its own error.
Confirm that the new kernel fails when the main run uses only the all-false and all-true turn states.
Measure the run time of pnpm lifecycle:model-check before and after. Report the change in the PR.
Update the unsafe-kernel count and the turn bullet in task-lifecycle-model.md.
Exit criteria: an unsafe kernel fails the checker when the 32-state crossing is removed. pnpm lifecycle:model-check passes.
Activity