Skip to content

Commit 31f98e0

Browse files
committed
Add Stage 5 release candidate validator
1 parent fde866d commit 31f98e0

5 files changed

Lines changed: 1141 additions & 1 deletion

File tree

changelog.d/1024.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added a Stage 5 release candidate validation service backed by the shared validation core.

docs/engineering/stages/release_promotion.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,19 @@ or step manifests. Release-specific details such as missing staged artifacts,
6161
missing validation reports, finalized-release conflicts, version mismatches, or
6262
destination conflicts should live in canonical finding metadata.
6363

64+
Use `ReleaseCandidateValidator` for the `5a_validate_outputs` library seam.
65+
It wraps `policyengine_us_data.validation_core` and calls existing release
66+
guards through injected dependencies, including staged-artifact presence,
67+
release-manifest preflight, matching finalized-manifest checks, and release
68+
completion marker checks. It should require all base dataset artifacts plus the
69+
regional/national H5 artifact families. By default, canonical
70+
`validation_report.json` files must parse as shared `ValidationReport` payloads
71+
with release-acceptable statuses. Manual overrides may set the validator's
72+
`validation_report_policy` to `presence_only`, but that override only relaxes
73+
report parsing/status checks; report files must still exist. Keep dependencies
74+
injectable so unit tests do not need Hugging Face, GCS, Modal, or production
75+
credentials.
76+
6477
## Rerun Comparison Material
6578

6679
Before public writes, rerun and reuse decisions should compare semantic

policyengine_us_data/release_promotion/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,31 @@
2525
read_stage4_release_candidate_bundle,
2626
)
2727
from .validation import build_release_candidate_shape_report
28+
from .validation import (
29+
DEFAULT_REQUIRED_RELEASE_ARTIFACT_FAMILIES,
30+
RELEASE_VALIDATION_SUBSTAGE_ID,
31+
ReleaseCandidateValidationDependencies,
32+
ReleaseCandidateValidator,
33+
VALIDATION_REPORT_POLICY_PRESENCE_ONLY,
34+
VALIDATION_REPORT_POLICY_REQUIRE_PASSING,
35+
default_release_candidate_validation_dependencies,
36+
)
2837

2938
__all__ = [
3039
"BASE_RELEASE_ARTIFACT_PATHS",
40+
"DEFAULT_REQUIRED_RELEASE_ARTIFACT_FAMILIES",
41+
"RELEASE_VALIDATION_SUBSTAGE_ID",
3142
"ReleaseArtifactSpec",
3243
"ReleaseCandidateInputBundle",
3344
"ReleasePromotionContext",
45+
"ReleaseCandidateValidationDependencies",
46+
"ReleaseCandidateValidator",
47+
"VALIDATION_REPORT_POLICY_PRESENCE_ONLY",
48+
"VALIDATION_REPORT_POLICY_REQUIRE_PASSING",
3449
"build_legacy_release_candidate_bundle",
3550
"build_release_candidate_bundle_from_stage4_contract",
3651
"build_release_candidate_shape_report",
52+
"default_release_candidate_validation_dependencies",
3753
"dedupe_normalized_release_paths",
3854
"infer_artifact_identity",
3955
"infer_release_artifact_spec",

0 commit comments

Comments
 (0)