Skip to contents

Structural preflight for start_sequential_lrt(). Checks the anchor locator (job_id for an already-fit refit, XOR model_rds/mmdl_path to fit fresh here), that operations lists >= 1 SINGLE nested add/remove effect each (unique id, action, positive integer df, a distribution of chisq or boundary_mixture), alpha_add/ alpha_remove in (0, 1), a positive integer fit_budget, and host_resources$max_concurrent_fits. Does not launch anything.

Usage

validate_sequential_lrt(spec, project_dir = ".")

Arguments

spec

A named list (or, via MCP, a JSON object string) with fields: anchor (job_id XOR model_rds/mmdl_path, optional darwin_ofv and ofv_tolerance), operations (list of {id, action, df, distribution, effect_description, alpha, candidate_source}), alpha_add (default 0.05), alpha_remove (default 0.10), fit_budget (default 30), host_resources ({max_concurrent_fits}), optional analysis_plan_id, and user_confirmed.

project_dir

Project root (used only to resolve/validate candidate file paths; no session is created here).

Value

A list with valid, errors, warnings, normalized_spec, plan_summary (n_operations, n_add, n_remove, alpha_add, alpha_remove, fit_budget, max_concurrent_fits), and user_confirmed.

See also

start_sequential_lrt() to launch a session from a validated, user-confirmed plan.