ci(governance): harden aggregate against plan tampering (A1-A8) - #113
Merged
Conversation
- A6: re-derive critical risk from the project profile's risk_zones and require ALL gates on critical changed paths (a candidate cannot evade full gates by editing the planner) - A1-A3: verify plan_id, source repository and HEAD tree OID against workflow-injected expected values (tree identity bound to the checkout) - A4: require skipped_gates to exactly cover non-required gates with reasons - A5: validate risk / delivery_effect / platform_scope / generated_at - A8: require non-selected gate jobs to be explicitly 'skipped' - capability conformance: the Open Design client is a current read-only adapter (experimental, detect/capabilities/observe); only the historical migration alias is rejected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WL3-800 — harden the required
aggregatecheck so a candidate cannot fake agreen CI by editing the planner or its plan (gaps A1–A8 from the R6 taskpack).
aggregate_gate.py (A1–A8, all fail-closed)
plan_idmust bework-lab-gatesource_identity.repositorymust equal the workflow-injectedexpected_repositorysource_identity.tree.oidmust equal the workflow-injectedexpected_head_tree(HEAD tree bound to the actual checkout, not just existence)skipped_gatesmust exactly coverPLAN_GATES - requiredwith non-empty reasons (no silent omission)risk/delivery_effect/platform_scope/generated_atare validatedrisk_zones.criticaloverchanged_paths; a critical change with an under-selecting plan fails even with green jobsskippedworkflow
aggregatejob now injectsexpected_repository(github.repository) andexpected_head_tree(git rev-parse HEAD^{tree}) into the payload.capability conformance (WL3-700 overlap)
detect/capabilities/observe) — no longer rejected as "retired"; only the
historical migration alias (
opendesign-assistance) is rejected. Fixed aset-ordering bug in adapter lookup.
Verification
tests/cifull suite (excluding env-dependenttest_exact_tree_review):111 passed, 25 subtests passed
py_compileclean;CURRENT_STATE_FRESHNESS_PASS.github/,scripts/ci/,00-governance/so it correctly triggers ALL gates (design intent).