Skip to content

ci(governance): harden aggregate against plan tampering (A1-A8) - #113

Merged
DTALEX66 merged 5 commits into
mainfrom
feat/wl3-800-gate-hardening
Aug 15, 2026
Merged

ci(governance): harden aggregate against plan tampering (A1-A8)#113
DTALEX66 merged 5 commits into
mainfrom
feat/wl3-800-gate-hardening

Conversation

@DTALEX66

Copy link
Copy Markdown
Owner

Summary

WL3-800 — harden the required aggregate check so a candidate cannot fake a
green CI by editing the planner or its plan (gaps A1–A8 from the R6 taskpack).

aggregate_gate.py (A1–A8, all fail-closed)

  • A1 plan_id must be work-lab-gate
  • A2 source_identity.repository must equal the workflow-injected expected_repository
  • A3 source_identity.tree.oid must equal the workflow-injected expected_head_tree (HEAD tree bound to the actual checkout, not just existence)
  • A4 skipped_gates must exactly cover PLAN_GATES - required with non-empty reasons (no silent omission)
  • A5 risk / delivery_effect / platform_scope / generated_at are validated
  • A6 critical risk is re-derived from the project profile's risk_zones.critical over changed_paths; a critical change with an under-selecting plan fails even with green jobs
  • A8 non-selected gate jobs must be explicitly skipped

workflow

  • aggregate job now injects expected_repository (github.repository) and
    expected_head_tree (git rev-parse HEAD^{tree}) into the payload.

capability conformance (WL3-700 overlap)

  • Open Design is a current read-only client adapter (experimental,
    detect/capabilities/observe) — no longer rejected as "retired"; only the
    historical migration alias (opendesign-assistance) is rejected. Fixed a
    set-ordering bug in adapter lookup.

Verification

  • tests/ci full suite (excluding env-dependent test_exact_tree_review):
    111 passed, 25 subtests passed
  • py_compile clean; CURRENT_STATE_FRESHNESS_PASS
  • Trusted-base note: this PR touches .github/, scripts/ci/, 00-governance/
    so it correctly triggers ALL gates (design intent).

- 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
@DTALEX66
DTALEX66 merged commit a9d0373 into main Aug 15, 2026
14 checks passed
@DTALEX66
DTALEX66 deleted the feat/wl3-800-gate-hardening branch August 15, 2026 12:53
DTALEX66 added a commit that referenced this pull request Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant