Skip to content

Commit f4991a1

Browse files
committed
Merge remote-tracking branch 'origin/main' into agent/stage-2/pr-2a-specs-explicit-identity
# Conflicts: # docs/generated/pipeline_map.json
2 parents c5cffc6 + 4978fd1 commit f4991a1

10 files changed

Lines changed: 1222 additions & 8 deletions

File tree

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.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"base_release_version": "1.115.5",
3+
"candidate_scope": "1.115.5-minor",
4+
"release_bump": "minor",
5+
"run_id": "usdata-gha26249511671-a1",
6+
"would_release_as_at_build_time": "1.116.0"
7+
}

.github/publication_scope.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"base_release_version": "1.115.5",
3-
"candidate_scope": "1.115.5-patch",
4-
"release_bump": "patch",
5-
"run_id": "usdata-gha26245240310-a1",
6-
"would_release_as_at_build_time": "1.115.6"
3+
"candidate_scope": "1.115.5-minor",
4+
"release_bump": "minor",
5+
"run_id": "usdata-gha26249511671-a1",
6+
"would_release_as_at_build_time": "1.116.0"
77
}

docs/engineering/pipeline-map.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,6 +1371,14 @@ def build_release_candidate_shape_report(bundle: ReleaseCandidateInputBundle) ->
13711371

13721372
Describe candidate-bundle shape using the shared validation schema.
13731373

1374+
### `policyengine_us_data.release_promotion.validation.ReleaseCandidateValidator`
1375+
1376+
```python
1377+
class ReleaseCandidateValidator
1378+
```
1379+
1380+
Validate a Stage 5 release candidate before public release writes.
1381+
13741382
### `policyengine_us_data.release_promotion.context.ReleasePromotionContext`
13751383

13761384
```python

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

docs/generated/pipeline_api.json

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3229,7 +3229,7 @@
32293229
"docstring": "Describe candidate-bundle shape using the shared validation schema.",
32303230
"id": "release_candidate_shape_report",
32313231
"kind": "function",
3232-
"line": 28,
3232+
"line": 103,
32333233
"metadata": {
32343234
"api_refs": [
32353235
"policyengine_us_data.release_promotion.validation.build_release_candidate_shape_report"
@@ -3252,6 +3252,40 @@
32523252
"signature": "def build_release_candidate_shape_report(bundle: ReleaseCandidateInputBundle) -> ValidationReport",
32533253
"source_file": "policyengine_us_data/release_promotion/validation.py"
32543254
},
3255+
"release_candidate_validator": {
3256+
"docstring": "Validate a Stage 5 release candidate before public release writes.",
3257+
"id": "release_candidate_validator",
3258+
"kind": "class",
3259+
"line": 166,
3260+
"metadata": {
3261+
"api_refs": [
3262+
"policyengine_us_data.release_promotion.validation.ReleaseCandidateValidator"
3263+
],
3264+
"artifacts_in": [
3265+
"ReleaseCandidateInputBundle",
3266+
"staged release artifacts"
3267+
],
3268+
"artifacts_out": [
3269+
"ValidationReport"
3270+
],
3271+
"description": "Stage 5 validation-core adapter for release candidates before promotion side effects.",
3272+
"id": "release_candidate_validator",
3273+
"label": "ReleaseCandidateValidator",
3274+
"node_type": "validation",
3275+
"pathways": [
3276+
"5_validate_and_promote_release"
3277+
],
3278+
"source_file": "policyengine_us_data/release_promotion/validation.py",
3279+
"stability": "moving",
3280+
"status": "transitional",
3281+
"validation_commands": [
3282+
"uv run pytest tests/unit/release_promotion/test_validation.py"
3283+
]
3284+
},
3285+
"object_path": "policyengine_us_data.release_promotion.validation.ReleaseCandidateValidator",
3286+
"signature": "class ReleaseCandidateValidator",
3287+
"source_file": "policyengine_us_data/release_promotion/validation.py"
3288+
},
32553289
"release_promotion_context": {
32563290
"docstring": "Canonical run, candidate, release, and destination identity for Stage 5.",
32573291
"id": "release_promotion_context",

docs/generated/pipeline_map.json

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,6 +1436,31 @@
14361436
"uv run pytest tests/unit/release_promotion/test_candidate.py"
14371437
]
14381438
},
1439+
{
1440+
"api_refs": [
1441+
"policyengine_us_data.release_promotion.validation.ReleaseCandidateValidator"
1442+
],
1443+
"artifacts_in": [
1444+
"ReleaseCandidateInputBundle",
1445+
"staged release artifacts"
1446+
],
1447+
"artifacts_out": [
1448+
"ValidationReport"
1449+
],
1450+
"description": "Stage 5 validation-core adapter for release candidates before promotion side effects.",
1451+
"id": "release_candidate_validator",
1452+
"label": "ReleaseCandidateValidator",
1453+
"node_type": "validation",
1454+
"pathways": [
1455+
"5_validate_and_promote_release"
1456+
],
1457+
"source_file": "policyengine_us_data/release_promotion/validation.py",
1458+
"stability": "moving",
1459+
"status": "transitional",
1460+
"validation_commands": [
1461+
"uv run pytest tests/unit/release_promotion/test_validation.py"
1462+
]
1463+
},
14391464
{
14401465
"api_refs": [
14411466
"policyengine_us_data.release_promotion.context.ReleasePromotionContext"
@@ -1896,9 +1921,9 @@
18961921
}
18971922
],
18981923
"metadata": {
1899-
"api_node_count": 92,
1924+
"api_node_count": 93,
19001925
"canonical_stage_count": 5,
1901-
"decorated_object_count": 150,
1926+
"decorated_object_count": 151,
19021927
"mapped_decorated_node_count": 58,
19031928
"stage_count": 17,
19041929
"substage_count": 17

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)