Skip to content

[lifecycle-RSK] RSK-22: Test the 32-state turn crossing with an unsafe kernel #2366

Open

Description

@edelauna

Tracking

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.

Reversibility: the change is in the checker only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions