Repository navigation
FIX: Show only supported scenario inputs in scanner forms - #3119
Richard Lundeen (richlundeen) merged 5 commits into
Conversation
Expose all declared parameter names and gate controls, validation, and request aliases. Preserve omitted common inputs across launch and resume. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c198c14a-c4c7-4e5b-b068-1e62287c0d92
|
Must Fix: Preserve the effective defaults for nullable retry/concurrency inputs
For example, this is now a valid launch request: {"scenario_name": "garak.exploitation", "target_name": "my_target", "max_retries": null}I reproduced the save/resume path with a real scenario registry and SQLite: the resolved retry count was Could we save the resolved numeric values when these inputs are supported, while keeping Location: scenario_run_service.py:341-347 |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c198c14a-c4c7-4e5b-b068-1e62287c0d92
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c198c14a-c4c7-4e5b-b068-1e62287c0d92
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c198c14a-c4c7-4e5b-b068-1e62287c0d92
Resolve supported numeric launch fields using the same parameter declarations and argument precedence as initialization. Keep unsupported fields omitted and cover real SQLite failure/resume with nulls, overrides, and changed defaults. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c198c14a-c4c7-4e5b-b068-1e62287c0d92
Description
The scanner form showed common input fields for every scenario, even when a scenario explicitly removed those inputs from
supported_parameters(). Users could enter values that the scenario could not accept, causing estimate or launch failures.For example, Garak Exploitation (
garak.exploitation) uses a fixed reference corpus and excludesdataset_config. However, its GUI still showed Dataset override, Max dataset size, Harm categories, and Data types. These request fields all map to the unsupporteddataset_configinput.This fix makes controls, validation, previews, and estimate/launch requests follow each scenario's declared inputs. Hidden inputs and stale unsupported drafts are not submitted. The catalog exposes
supported_parameter_namesfrom all declarations because the existing typedsupported_parameterslist excludes opaque inputs such asdataset_config. Omitted common inputs also stay omitted through launch and resume.Related: #3118 adds
technique.execute, which also excludes dataset configuration. This PR fixes the generic GUI issue for all scenarios. The separate one-technique selection rule remains in #3118.