Skip to content

[Code scan] Stop defaulting init submissions to removed API version 0.9 #1913

Description

@njzjz

This issue is from a Codex global scan of the repository.

Some init workflows still default missing api_version to 0.9, but the dispatcher now rejects versions below 1.0.

Evidence:

dpgen/dpgen/data/surf.py

Lines 596 to 605 in 7af5246

fp_resources,
[fp_command],
work_dir,
run_tasks,
fp_group_size,
forward_common_files,
forward_files,
backward_files,
api_version=mdata.get("api_version", "0.9"),
)

[],
[ff_path, data_init_path, control_path, lmp_path],
[trj_path],
outlog=log_file,
errlog=log_file,
api_version=mdata.get("api_version", "0.9"),
)

if Version(api_version) < Version("1.0"):
raise RuntimeError(
"API version below 1.0 is no longer supported. Please upgrade to version 1.0 or newer."
)

init_surf and init_reaction call make_submission_compat(..., api_version=mdata.get("api_version", "0.9")). make_submission_compat() raises for api_version < 1.0, so machine files that omit api_version fail through the default path.

Expected behavior: use a supported default such as 1.0, or require api_version explicitly during normalization with a clear error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions