ww: finish initialization validation parity

This commit is contained in:
2026-08-14 20:03:11 +09:00
parent 25da54936d
commit c59a7c11de
26 changed files with 528 additions and 143 deletions

View File

@@ -4648,11 +4648,6 @@ build_one_sep_impl(const char *src, int entry_is_dir,
&& !sep_root_is_command(&g->pkg[products[0].root]);
if (sep_validate_artifact_paths(g, scratch) < 0)
return 1;
if (sep_validate_request_staging(g, scratch, warm, products, nproducts,
root_package, publish_package, emit_asm, is_test) < 0) {
sep_free_product_staging(products, nproducts);
return 1;
}
if (warm && workdir_exists && sep_validate_workdir_owners(g, scratch) < 0)
return 1;
int *order = calloc((size_t)g->n, sizeof *order);
@@ -4737,6 +4732,12 @@ build_one_sep_impl(const char *src, int entry_is_dir,
free(order);
return 1;
}
if (sep_validate_request_staging(g, scratch, warm, products, nproducts,
root_package, publish_package, emit_asm, is_test) < 0) {
sep_free_product_staging(products, nproducts);
free(order);
return 1;
}
/* Product completion and persistent package state remain untouched until
* all source-derived imports, contextual legality, cycles, command kind,
* output paths, and action closures have passed their pre-tool checks. */