Repository navigation
Conversation
The channel's "preflight JSON" stages the given options on the program
session (ProgramSession::run_prechecks_only()), runs the program's
prechecks (ConsoleProgramInstance::run_prechecks(); Switch programs
override run_switch_prechecks()) under a scope that makes Start refuse
meanwhile, loads the prior options back and prints one line,
"preflight {JSON}": the verdict, each check, the refused option and
whether the options were restored. Lab/state.json gains
program.options_hash, the SHA-256 of the program's option JSON, also in
the reply. No program declares runnable checks on this branch yet, so
every preflight says "unsupported" until FRLG RNG's list (#485) arrives.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The lab server's preflight_program (#600) had no app command to call. This adds the channel command `preflight JSON`: the program session stages the given options (unknown keys, clamped or disabled values and `check_validity()` are refused), runs the program's start checks without starting it while Start is blocked, loads the prior options back and prints one line, `preflight {JSON}`, in the reply format of the fake app in #600 plus an `options_hash` field. A program supplies its checks by overriding `run_switch_prechecks()` next to `precheck_summaries()`; none does on this branch yet, so every preflight answers `unsupported` until FRLG RNG's list (#485) arrives. `Lab/state.json` gains `program.options_hash`, the SHA-256 of the program's option JSON (the same canonical form the server's Python produces). New unit tests in ProgramPrecheckRun, LabProgramContract and LabStateJson; touched files compiled locally, nothing run on a console.