Skip to content

Commit 919e439

Browse files
authored
test(ilm): cover WORM expiry and tiering regressions (#168)
* test(ilm): cover WORM expiry and tiering regressions * test(scanner): verify catalog membership without fixed totals
1 parent 401ece9 commit 919e439

13 files changed

Lines changed: 445 additions & 88 deletions

‎.github/workflows/validation-catalog-tests.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ on:
7373
- scripts/run_validation_case.sh
7474
- rustfs-replication-test.sh
7575
- rustfs-storage-test.sh
76+
- rustfs-tier-test.sh
77+
- test_rustfs_tier.sh
7678
- test_validation_scanner_usage.sh
7779
- test_validation_scanner_usage.py
7880
- rustfs-scanner-usage-test.sh
@@ -152,6 +154,8 @@ on:
152154
- scripts/run_validation_case.sh
153155
- rustfs-replication-test.sh
154156
- rustfs-storage-test.sh
157+
- rustfs-tier-test.sh
158+
- test_rustfs_tier.sh
155159
- test_validation_scanner_usage.sh
156160
- test_validation_scanner_usage.py
157161
- rustfs-scanner-usage-test.sh
@@ -195,5 +199,6 @@ jobs:
195199
- run: bash -n scripts/run_validation_case.sh scripts/validation_heal/run_case.sh scripts/validation_oidc/run_case.sh
196200
- run: bash -n rustfs-storage-test.sh rustfs_pool_expand.sh rustfs-replication-test.sh scripts/validation_pool/run_case.sh scripts/validation_replication/run_case.sh test_validation_scanner_usage.sh
197201
- run: bash test_validation_scanner_usage.sh
202+
- run: RUSTFS_TIER_TEST_MODE=versioned-cleanup bash test_rustfs_tier.sh
198203
- run: python3 -B -m unittest -v test_validation_scanner_usage.py
199204
- run: bash -n rustfs-scanner-usage-test.sh scripts/validation_scanner_usage/run_case.sh

‎README.md‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ Public observations cannot prove internal ACK ordering or cross-cycle races,
159159
so missing candidate-native hooks remain BLOCKED or UNSUPPORTED.
160160
The endpoint-only usage runner records operator-supplied candidate and binary
161161
identities; it does not independently attest the remote installed binary.
162+
163+
Select the extra ILM cases through the validation workflow's `ilm-regressions` module or by case ID. `ilm.worm-expiration` follows current and historical versions through legal hold, expiry of unlocked controls, and expiration after release. `ilm.immediate-transition-and-restore` restarts the empty source with both scanners disabled to clear the rule-installation walk. The case verifies that a matching PUT reaches the dedicated remote tier, then waits for restore completion and reads back the original payload.
164+
162165
The canonical S3, KMS, IAM, and scanner smoke deployment cases above require a
163166
candidate manifest with `source_sha`, `package_url`, and `package_sha256`.
164167
Those deployment cases measure the installed binary SHA-256 on the test node
@@ -420,12 +423,6 @@ RUSTFS_TIER_TEST_MODE=versioned-cleanup ./test_rustfs_tier.sh
420423
python3 -m unittest -v test_rustfs_tier_report.py
421424
```
422425

423-
`TIER-115` (`VersionedTierDeleteCleanup`) runs in both topologies. It transitions
424-
both versions of one key into a fresh unversioned remote bucket, removes the lifecycle rule, and confirms that an
425-
ordinary delete hides the key while historical versions still block even a
426-
forced tier removal. Both versions must remain readable. After deleting every
427-
version and delete marker (checking per-object `DeleteObjects` errors), the case
428-
requires natural remote cleanup and successful ordinary tier removal. The source
429-
bucket and remote objects stay untouched by teardown until these assertions
430-
finish. Cleanup and removal each have a 180-second deadline; only the expected
431-
in-use response is retried after the remote namespace becomes empty.
426+
`TIER-115` (`VersionedTierDeleteCleanup`) runs in both topologies. It transitions three versions of one key into a fresh unversioned remote bucket and records each new remote key. An ordinary delete creates a marker, with the three historical versions still readable and forced tier removal rejected. A targeted delete must remove the first source version and its exact remote key while preserving both other versions, their bytes, and the marker.
427+
428+
The case then deletes both remaining versions and the marker in one batch, checks per-object results, waits for natural remote cleanup, and removes the tier. Remote cleanup and tier removal each have a 180-second deadline.

‎rustfs-storage-test.sh‎

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,11 @@ EOF
198198
if [ "${VALIDATION_CASE}" = "scanner.usage-convergence" ] || [ "${VALIDATION_CASE}" = "scanner.status-readiness" ]; then
199199
printf 'RUSTFS_SCANNER_ENABLED=true\nRUSTFS_SCANNER_CYCLE=5\nRUSTFS_SCANNER_START_DELAY_SECS=0\n'
200200
elif [[ "${VALIDATION_CASE}" == ilm.* ]]; then
201-
printf 'RUSTFS_SCANNER_ENABLED=true\nRUSTFS_SCANNER_CYCLE=2\nRUSTFS_SCANNER_START_DELAY_SECS=0\n'
201+
if [ "${VALIDATION_CASE}" = ilm.immediate-transition-and-restore ]; then
202+
printf 'RUSTFS_SCANNER_ENABLED=false\n'
203+
else
204+
printf 'RUSTFS_SCANNER_ENABLED=true\nRUSTFS_SCANNER_CYCLE=2\nRUSTFS_SCANNER_START_DELAY_SECS=0\n'
205+
fi
202206
printf 'RUSTFS_DATA_USAGE_UPDATE_DIR_CYCLES=1\nRUSTFS_ILM_DEBUG_DAY_SECS=10\nRUSTFS_ILM_PROCESS_TIME=1\n'
203207
printf 'RUSTFS_API_STALE_UPLOADS_CLEANUP_INTERVAL=2s\n'
204208
printf 'HTTP_PROXY=\nHTTPS_PROXY=\nALL_PROXY=\nhttp_proxy=\nhttps_proxy=\nall_proxy=\n'
@@ -283,6 +287,13 @@ volume_dirs() {
283287

284288
# ==================== Topology / environment ====================
285289

290+
ilm_case_uses_tier() {
291+
case "${VALIDATION_CASE}" in
292+
ilm.transition-and-restore|ilm.immediate-transition-and-restore) return 0 ;;
293+
*) return 1 ;;
294+
esac
295+
}
296+
286297
resolve_topology() {
287298
case "$1" in
288299
"${TOPO_SINGLE_SINGLE}") ENDPOINT="${ENDPOINT_SINGLE_SINGLE}"; VOLUMES="${VOLUMES_SINGLE_SINGLE}"; return 0 ;;
@@ -297,7 +308,7 @@ topology_nodes() {
297308
case "$1" in
298309
"${TOPO_SINGLE_SINGLE}"|"${TOPO_SINGLE_MULTI}") printf '%s' "${NODES[0]}" ;;
299310
"${TOPO_ILM_2X4}")
300-
if [ "${VALIDATION_CASE}" = ilm.transition-and-restore ]; then
311+
if ilm_case_uses_tier; then
301312
printf '%s %s %s' "${NODES[0]}" "${NODES[1]}" "${NODES[2]}"
302313
else
303314
printf '%s %s' "${NODES[0]}" "${NODES[1]}"
@@ -341,7 +352,7 @@ EOF
341352
for node in "${nodes[@]}"; do printf '%s\n' "${script}" | run_remote "${node}"; done
342353

343354
for node in "${nodes[@]}"; do
344-
if [ "${VALIDATION_CASE}" = ilm.transition-and-restore ] && [ "${node}" = "${NODES[2]}" ]; then
355+
if ilm_case_uses_tier && [ "${node}" = "${NODES[2]}" ]; then
345356
VALIDATION_CASE="" write_rustfs_config "${node}" "${VOLUMES_SINGLE_SINGLE}"
346357
ensure_volume_dirs "${node}" "${VOLUMES_SINGLE_SINGLE}"
347358
else
@@ -361,7 +372,7 @@ EOF
361372
sleep 5; waited=$((waited+5))
362373
done
363374
[ "${waited}" -lt "${SERVICE_TIMEOUT}" ] || die "S3 endpoint ${ENDPOINT} not ready"
364-
if [ "${VALIDATION_CASE}" = ilm.transition-and-restore ]; then
375+
if ilm_case_uses_tier; then
365376
waited=0
366377
while [ "${waited}" -lt "${SERVICE_TIMEOUT}" ]; do
367378
if curl --noproxy '*' -fsS --max-time 5 "${ILM_TIER_ENDPOINT}/minio/health/live" >/dev/null 2>&1; then
@@ -598,11 +609,11 @@ validation_write_result() {
598609
test_validation_ilm_case() {
599610
local harness_dir="${TEST_TMP}/ilm-evidence" harness_rc=0
600611
local -a ilm_args=()
601-
if [ "${VALIDATION_CASE}" = ilm.restart-persistence ]; then
612+
if [ "${VALIDATION_CASE}" = ilm.restart-persistence ] || [ "${VALIDATION_CASE}" = ilm.immediate-transition-and-restore ]; then
602613
ilm_args+=(--restart-hook "$(python3 -c 'import json,sys; print(json.dumps(sys.argv[1:]))' \
603614
bash "${SCRIPT_DIR}/scripts/validation_ilm/restart_cluster.sh" "${NODES[0]}" "${NODES[1]}")")
604615
fi
605-
if [ "${VALIDATION_CASE}" = ilm.transition-and-restore ]; then
616+
if ilm_case_uses_tier; then
606617
ilm_args+=(--tier-endpoint "${ILM_TIER_ENDPOINT}"
607618
--tier-access-key "${ACCESS_KEY}" --tier-secret-key "${SECRET_KEY}")
608619
fi
@@ -1423,7 +1434,10 @@ main() {
14231434
if [ -n "${VALIDATION_CASE}" ]; then
14241435
case "${VALIDATION_CASE}" in
14251436
scanner.usage-convergence|scanner.status-readiness) ;;
1426-
ilm.configuration-roundtrip|ilm.invalid-configuration|ilm.current-expiration|ilm.tag-filter-expiration|ilm.disabled-rule|ilm.rule-removal|ilm.versioned-current-expiration|ilm.noncurrent-expiration|ilm.newer-noncurrent-retention|ilm.delete-all-versions|ilm.delete-marker-expiration|ilm.multipart-expiration|ilm.restart-persistence|ilm.transition-and-restore) ;;
1437+
ilm.*)
1438+
need_cmd python3 "ILM case selection"
1439+
python3 -B -c 'import sys; sys.path.insert(0, sys.argv[1]); from scripts.validation_ilm.case_plan import ILM_SELECTABLE_CASE_IDS; sys.exit(sys.argv[2] not in ILM_SELECTABLE_CASE_IDS)' \
1440+
"${SCRIPT_DIR}" "${VALIDATION_CASE}" || die "unknown validation case: ${VALIDATION_CASE}" ;;
14271441
source-procedure.storage.*)
14281442
VALIDATION_SOURCE_CASE_ID="$(printf '%s' "${VALIDATION_CASE#source-procedure.storage.}" | tr '[:lower:]' '[:upper:]')"
14291443
SELECTED_CASES="${VALIDATION_SOURCE_CASE_ID}" ;;
@@ -1434,9 +1448,9 @@ main() {
14341448
[ "${KEEP_ENV}" -eq 0 ] || die "--validation-case requires environment teardown"
14351449
if [ "${VALIDATION_CASE}" = scanner.status-readiness ] || [[ "${VALIDATION_CASE}" == ilm.* ]]; then
14361450
SELECTED_TOPOLOGIES=("${TOPO_ILM_2X4}")
1437-
[ "${#NODES[@]}" -ge 2 ] || die "scanner.status-readiness needs two test nodes"
1438-
if [ "${VALIDATION_CASE}" = ilm.transition-and-restore ]; then
1439-
[ "${#NODES[@]}" -ge 3 ] || die "ilm.transition-and-restore needs three test nodes"
1451+
[ "${#NODES[@]}" -ge 2 ] || die "${VALIDATION_CASE} needs two test nodes"
1452+
if ilm_case_uses_tier; then
1453+
[ "${#NODES[@]}" -ge 3 ] || die "${VALIDATION_CASE} needs three test nodes"
14401454
fi
14411455
else
14421456
SELECTED_TOPOLOGIES=("${TOPO_SINGLE_MULTI}")

‎rustfs-tier-test.sh‎

Lines changed: 54 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,6 +2081,21 @@ wait_remote_state() {
20812081
return 1
20822082
}
20832083

2084+
read_remote_tier_keys() {
2085+
local bucket="$1"
2086+
REMOTE_TIER_KEYS=""
2087+
aws_target_run_with_timeout "${REMOTE_PROBE_TIMEOUT}" s3api list-objects-v2 \
2088+
--bucket "${bucket}" --max-keys 4 --output json --no-paginate
2089+
assert_aws_ok || return 1
2090+
REMOTE_TIER_KEYS="$(jq -ce '
2091+
(if has("Contents") then .Contents else [] end) as $items |
2092+
if .IsTruncated == false and ($items | type) == "array" and .KeyCount == ($items | length)
2093+
and all($items[]; .Key | type == "string" and length > 0)
2094+
and ([$items[].Key] | unique | length) == ($items | length)
2095+
then [$items[].Key] | sort
2096+
else error("incomplete or malformed remote tier inventory") end' <<< "${AWS_OUT}")"
2097+
}
2098+
20842099
# An empty current listing is insufficient for a versioned bucket. Compare the
20852100
# complete user-visible inventory, including delete markers, without pagination.
20862101
assert_versioned_bucket_state() {
@@ -2849,7 +2864,9 @@ test_tier114() { # force=true must override a lifecycle-only tier reference; non
28492864

28502865
test_tier115() {
28512866
local topo_tag token source remote tier key=versioned.txt out job version marker body status i
2852-
local v1 v2 versions markers objects
2867+
local versions markers objects first_version first_remote_key first_remote_keys
2868+
local remote_keys='[]' expected_remote_keys retained
2869+
local -a version_ids=()
28532870
# Recovery scans may take over a minute after lifecycle removal.
28542871
local REMOTE_STATE_TIMEOUT=180
28552872
token="${RUN_TOKEN//-/}"
@@ -2872,12 +2889,12 @@ test_tier115() {
28722889
rc_run ilm rule add "local/${source}" --storage-class "${tier}" --transition-days 0
28732890
assert_rc_ok || return 1
28742891

2875-
for i in 1 2; do
2892+
for i in 1 2 3; do
28762893
make_test_file "${TEST_TMP}/tier115-v${i}" 1048576
28772894
aws_run s3api put-object --bucket "${source}" --key "${key}" --body "${TEST_TMP}/tier115-v${i}"
28782895
assert_aws_ok || return 1
28792896
version="$(printf '%s' "${AWS_OUT}" | jq -er '.VersionId | select(type == "string" and length > 0 and . != "null")')" || return 1
2880-
if [ "${i}" -eq 1 ]; then v1="${version}"; else v2="${version}"; fi
2897+
version_ids+=("${version}")
28812898
out="$(run_transition "${source}")" || return 1
28822899
job="$(printf '%s' "${out}" | jq -r '.job_id // empty')" || return 1
28832900
if [ -n "${job}" ]; then wait_transition_job "${job}" >/dev/null || return 1; fi
@@ -2886,31 +2903,57 @@ test_tier115() {
28862903
assert_aws_ok || return 1
28872904
printf '%s' "${AWS_OUT}" | jq -e --arg tier "${tier}" --arg version "${version}" \
28882905
'.StorageClass == $tier and .VersionId == $version' >/dev/null || return 1
2906+
# Each serial transition must add one remote identity and preserve the earlier ones.
2907+
read_remote_tier_keys "${remote}" || return 1
2908+
jq -e --argjson previous "${remote_keys}" --argjson count "${i}" \
2909+
'length == $count and ($previous - .) == []' <<< "${REMOTE_TIER_KEYS}" >/dev/null \
2910+
|| { echo "version ${version} did not add exactly one remote key: ${REMOTE_TIER_KEYS}"; return 1; }
2911+
remote_keys="${REMOTE_TIER_KEYS}"
2912+
if [ "${i}" -eq 1 ]; then first_remote_keys="${remote_keys}"; fi
2913+
printf 'Transitioned version %s, remote inventory %s\n' "${version}" "${remote_keys}"
28892914
done
2890-
[ "${v1}" != "${v2}" ] || { echo "overwrites did not create distinct versions"; return 1; }
2891-
wait_remote_state "${remote}" "" nonempty || return 1
2915+
first_version="${version_ids[0]}"
2916+
first_remote_key="$(jq -er '.[0]' <<< "${first_remote_keys}")" || return 1
2917+
expected_remote_keys="$(jq -c --argjson first "${first_remote_keys}" '. - $first' <<< "${remote_keys}")" || return 1
28922918
delete_lifecycle_and_assert_absent "${source}" || return 1
28932919

2894-
# A Console-style ordinary delete hides the key, but preserves both versions.
2920+
# A Console-style ordinary delete hides the key while preserving its history.
28952921
aws_run s3api delete-object --bucket "${source}" --key "${key}"
28962922
assert_aws_ok || return 1
28972923
marker="$(printf '%s' "${AWS_OUT}" | jq -er 'select(.DeleteMarker == true) | .VersionId | select(type == "string" and length > 0 and . != "null")')" || return 1
2898-
versions="$(jq -nc --arg key "${key}" --arg v1 "${v1}" --arg v2 "${v2}" '[{Key:$key,VersionId:$v1},{Key:$key,VersionId:$v2}]')"
2924+
versions="$(jq -nec --arg key "${key}" --args \
2925+
'$ARGS.positional | if (unique | length) == 3 then map({Key:$key,VersionId:.}) else error("duplicate version IDs") end' \
2926+
"${version_ids[@]}")" || return 1
28992927
markers="$(jq -nc --arg key "${key}" --arg marker "${marker}" '[{Key:$key,VersionId:$marker}]')"
29002928
assert_versioned_bucket_state "${source}" "${versions}" "${markers}" || return 1
29012929
body="$(admin_api DELETE "/rustfs/admin/v3/tier/${tier}" "force=true")"; status="$(admin_api_code)"
29022930
[ "${status}" = "409" ] && [ "$(xml_error_code "${body}")" = "XMinioAdminTierBackendInUse" ] \
29032931
|| { echo "force remove did not protect historical versions: HTTP ${status}"; return 1; }
29042932
assert_tier_present "${tier}" || return 1
2905-
for i in 1 2; do
2906-
if [ "${i}" -eq 1 ]; then version="${v1}"; else version="${v2}"; fi
2933+
for i in 1 2 3; do
2934+
version="${version_ids[i-1]}"
2935+
aws_run s3api get-object --bucket "${source}" --key "${key}" --version-id "${version}" "${TEST_TMP}/tier115-get${i}"
2936+
assert_aws_ok || return 1
2937+
cmp "${TEST_TMP}/tier115-v${i}" "${TEST_TMP}/tier115-get${i}" || return 1
2938+
done
2939+
2940+
aws_run s3api delete-object --bucket "${source}" --key "${key}" --version-id "${first_version}"
2941+
assert_aws_ok || return 1
2942+
retained="$(jq -c --arg id "${first_version}" 'map(select(.VersionId != $id))' <<< "${versions}")" || return 1
2943+
assert_versioned_bucket_state "${source}" "${retained}" "${markers}" || return 1
2944+
wait_remote_state "${remote}" "${first_remote_key}" empty || return 1
2945+
read_remote_tier_keys "${remote}" || return 1
2946+
[ "${REMOTE_TIER_KEYS}" = "${expected_remote_keys}" ] \
2947+
|| { echo "targeted deletion changed a retained remote key: expected ${expected_remote_keys}, observed ${REMOTE_TIER_KEYS}"; return 1; }
2948+
for i in 2 3; do
2949+
version="${version_ids[i-1]}"
29072950
aws_run s3api get-object --bucket "${source}" --key "${key}" --version-id "${version}" "${TEST_TMP}/tier115-get${i}"
29082951
assert_aws_ok || return 1
29092952
cmp "${TEST_TMP}/tier115-v${i}" "${TEST_TMP}/tier115-get${i}" || return 1
29102953
done
2954+
printf 'Deleted version %s only, retained remote inventory %s\n' "${first_version}" "${REMOTE_TIER_KEYS}"
29112955

2912-
printf 'Ordinary delete: current listing empty; both historical versions protected and readable.\n'
2913-
objects="$(jq -nc --argjson versions "${versions}" --argjson markers "${markers}" '$versions + $markers')"
2956+
objects="$(jq -nc --argjson versions "${retained}" --argjson markers "${markers}" '$versions + $markers')"
29142957
delete_object_versions_and_assert "${source}" "${objects}" || return 1
29152958
assert_versioned_bucket_state "${source}" '[]' '[]' || return 1
29162959
printf 'All user versions and delete markers removed; waiting for natural remote cleanup.\n'

‎scripts/run_validation_case.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ case "${CASE_ID}" in
3535
SUITE=rustfs-table-test.sh; EXTRA_ARGS=() ;;
3636
source-procedure.upgrade.*)
3737
SUITE=rustfs-upgrade-test.sh; EXTRA_ARGS=(--topology single-single --backends local) ;;
38-
scanner.usage-convergence|scanner.status-readiness|ilm.configuration-roundtrip|ilm.invalid-configuration|ilm.current-expiration|ilm.tag-filter-expiration|ilm.disabled-rule|ilm.rule-removal|ilm.versioned-current-expiration|ilm.noncurrent-expiration|ilm.newer-noncurrent-retention|ilm.delete-all-versions|ilm.delete-marker-expiration|ilm.multipart-expiration|ilm.restart-persistence|ilm.transition-and-restore)
38+
scanner.usage-convergence|scanner.status-readiness|ilm.*)
3939
SUITE=rustfs-storage-test.sh; EXTRA_ARGS=() ;;
4040
kms.sse-kms-round-trip)
4141
SUITE=rustfs-kms-test.sh; EXTRA_ARGS=() ;;
@@ -52,7 +52,7 @@ case "${CASE_ID}" in
5252
exit 2 ;;
5353
esac
5454

55-
if [[ "${CASE_ID}" == pool.* || "${CASE_ID}" == bucket-replication.* || "${CASE_ID}" == site-replication.* || "${CASE_ID}" == scanner.usage-[0-9][0-9]-* || "${CASE_ID}" == s3.compatibility.* || "${CASE_ID}" == source-procedure.* ]]; then
55+
if [[ "${CASE_ID}" == pool.* || "${CASE_ID}" == bucket-replication.* || "${CASE_ID}" == site-replication.* || "${CASE_ID}" == scanner.usage-[0-9][0-9]-* || "${CASE_ID}" == ilm.* || "${CASE_ID}" == s3.compatibility.* || "${CASE_ID}" == source-procedure.* ]]; then
5656
python3 -B -c 'import json,sys; catalog=json.load(open(sys.argv[1])); valid={case["id"] for module in catalog["modules"]+catalog.get("local_modules",[]) for case in module["cases"]}; sys.exit(0 if sys.argv[2] in valid else 2)' \
5757
"${SCRIPT_DIR}/validation-cases.json" "${CASE_ID}" || {
5858
printf 'unknown canonical validation case: %s\n' "${CASE_ID}" >&2

‎scripts/validation_ilm/case_plan.py‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,28 @@
88

99

1010
CATALOG = Path(__file__).resolve().parents[2] / "validation-cases.json"
11+
IMMEDIATE_TRANSITION_CASE = "ilm.immediate-transition-and-restore"
12+
WORM_EXPIRATION_CASE = "ilm.worm-expiration"
1113

1214

13-
def ilm_case_ids() -> tuple[str, ...]:
15+
def ilm_case_ids(module_id: str = "ilm-expiration") -> tuple[str, ...]:
1416
catalog = json.loads(CATALOG.read_text(encoding="utf-8"))
15-
modules = [module for module in catalog["modules"] if module["id"] == "ilm-expiration"]
17+
modules = [module for module in catalog["modules"] + catalog.get("local_modules", []) if module["id"] == module_id]
1618
if len(modules) != 1:
17-
raise ValueError("canonical ILM module is missing or duplicated")
19+
raise ValueError(f"ILM module is missing or duplicated: {module_id}")
1820
return tuple(case["id"] for case in modules[0]["cases"])
1921

2022

2123
ILM_CASE_IDS = ilm_case_ids()
24+
ILM_SELECTABLE_CASE_IDS = ILM_CASE_IDS + ilm_case_ids("ilm-regressions")
2225

2326

2427
def ilm_harness_scored_cases(requested_cases: Iterable[str] | None) -> tuple[str, ...]:
2528
if requested_cases is None:
2629
return ILM_CASE_IDS
2730
selected = tuple(requested_cases)
28-
if len(selected) != len(set(selected)) or set(selected) - set(ILM_CASE_IDS):
29-
raise ValueError("duplicate or unknown canonical ILM case")
30-
return tuple(case_id for case_id in ILM_CASE_IDS if case_id in selected)
31+
if len(selected) != len(set(selected)) or set(selected) - set(ILM_SELECTABLE_CASE_IDS):
32+
raise ValueError("duplicate or unknown ILM case")
33+
if IMMEDIATE_TRANSITION_CASE in selected and len(selected) > 1:
34+
raise ValueError("immediate transition requires an isolated scanner-disabled run")
35+
return tuple(case_id for case_id in ILM_SELECTABLE_CASE_IDS if case_id in selected)

0 commit comments

Comments
 (0)