Coordinates suite test case editing workflows outside the web layer.
Summary
Functions
Converts a test case into parameters shared by the visual and JSON editors.
Builds the schemaless changeset used to validate the test-case editor form.
Creates an empty suite test case with variables derived from a prompt template.
Parses editor parameters and persists variables and assertions for a test case.
Functions
@spec build_form_params(Aludel.Evals.TestCase.t()) :: map()
Converts a test case into parameters shared by the visual and JSON editors.
@spec change_form( Aludel.Evals.TestCase.t() | map(), keyword() ) :: Ecto.Changeset.t()
Builds the schemaless changeset used to validate the test-case editor form.
Pass :assertion_error or :action in opts to surface assertion parsing
failures or set the changeset action.
@spec create_test_case(binary(), map()) :: {:ok, Aludel.Evals.TestCase.t()} | {:error, Ecto.Changeset.t()}
Creates an empty suite test case with variables derived from a prompt template.
@spec update_test_case( Aludel.Evals.TestCase.t(), map(), Aludel.Evals.AssertionParser.parse_mode() ) :: {:ok, Aludel.Evals.TestCase.t()} | {:error, String.t()} | {:error, Ecto.Changeset.t()}
Parses editor parameters and persists variables and assertions for a test case.