test(ci): regression for all-required aggregation fail-closed gate (#2615) #2633

Merged
devops-engineer merged 2 commits from fix/all-required-aggregation-regression-test into main 2026-06-12 08:32:04 +00:00
Member

Closes tracking: molecule-core#2615

Extracts the inline CI / all-required aggregation logic from ci.yml into .gitea/scripts/all-required-check.sh and adds a regression test that locks in the fail-closed contract.

Comprehensive testing performed

  • Ran bash .gitea/scripts/tests/test_all_required_check.sh — all 9 cases passed.
  • Ran python -m pytest .gitea/scripts/tests -q — 390 passed, 2 skipped.
  • Verified the script directly with all-success and one-failure env var sets.

Local-postgres E2E run

N/A: this change touches only CI workflow/script files and pytest/shell tests; no database or service code changed.

Staging-smoke verified or pending

N/A: CI/script-only change. The new shell test runs in test-ops-scripts.yml; no runtime staging surface.

Root-cause not symptom

This PR closes the coverage gap where the CI / all-required fail-closed aggregator had no regression test; a weakened aggregator could let a red sub-check pass.

Five-Axis review walked

  • Correctness: fail-if-any-non-success contract preserved from inline ci.yml logic.
  • Readability: extracted script + thin wrapper in ci.yml.
  • Architecture: uses needs: + job name: for umbrella-reaper derivation.
  • Security: no credential handling; anti-mask check prevents || true swallow.
  • Performance: aggregator remains sub-second.

No backwards-compat shim / dead code added

Yes. The inline logic is removed, not duplicated.

Memory consulted

None applicable; this is a new regression test following existing test_jq_install.sh / test_ci_workflow_bookkeeping.py patterns.

Also updates umbrella-reaper.py to derive required sub-jobs from the authoritative needs: list + job name: fields instead of parsing the now-extracted run block.

Refs: molecule-core#656 (Phase 4 all-required hard-gate)

🤖 Generated with Claude Code

Closes tracking: molecule-core#2615 Extracts the inline CI / all-required aggregation logic from ci.yml into `.gitea/scripts/all-required-check.sh` and adds a regression test that locks in the fail-closed contract. ## Comprehensive testing performed - Ran `bash .gitea/scripts/tests/test_all_required_check.sh` — all 9 cases passed. - Ran `python -m pytest .gitea/scripts/tests -q` — 390 passed, 2 skipped. - Verified the script directly with all-success and one-failure env var sets. ## Local-postgres E2E run N/A: this change touches only CI workflow/script files and pytest/shell tests; no database or service code changed. ## Staging-smoke verified or pending N/A: CI/script-only change. The new shell test runs in `test-ops-scripts.yml`; no runtime staging surface. ## Root-cause not symptom This PR closes the coverage gap where the CI / all-required fail-closed aggregator had no regression test; a weakened aggregator could let a red sub-check pass. ## Five-Axis review walked - Correctness: fail-if-any-non-success contract preserved from inline ci.yml logic. - Readability: extracted script + thin wrapper in ci.yml. - Architecture: uses `needs:` + job `name:` for umbrella-reaper derivation. - Security: no credential handling; anti-mask check prevents `|| true` swallow. - Performance: aggregator remains sub-second. ## No backwards-compat shim / dead code added Yes. The inline logic is removed, not duplicated. ## Memory consulted None applicable; this is a new regression test following existing `test_jq_install.sh` / `test_ci_workflow_bookkeeping.py` patterns. Also updates `umbrella-reaper.py` to derive required sub-jobs from the authoritative `needs:` list + job `name:` fields instead of parsing the now-extracted run block. Refs: molecule-core#656 (Phase 4 all-required hard-gate) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
agent-dev-a added 1 commit 2026-06-12 08:21:01 +00:00
test(ci): regression for all-required aggregation fail-closed gate (#2615)
CI / Python Lint & Test (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 3s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 5s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 8s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 7s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 7s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 7s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 3s
qa-review / approved (pull_request_target) Failing after 9s
security-review / approved (pull_request_target) Failing after 7s
E2E Chat / detect-changes (pull_request) Successful in 19s
E2E API Smoke Test / detect-changes (pull_request) Successful in 18s
reserved-path-review / reserved-path-review (pull_request_target) Failing after 11s
E2E Chat / E2E Chat (pull_request) Successful in 3s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2s
CI / Detect changes (pull_request) Successful in 25s
CI / Platform (Go) (pull_request) Successful in 1s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 18s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
CI / Canvas (Next.js) (pull_request) Successful in 3s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 26s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 24s
CI / Canvas Deploy Status (pull_request) Successful in 1s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Failing after 32s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 29s
CI / all-required (pull_request) Failing after 1s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 37s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 34s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 3s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 56s
lint-setup-go-cache / lint-setup-go-cache (pull_request) Successful in 57s
lint-no-coe-on-required / lint-no-coe-on-required (pull_request) Successful in 1m2s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Failing after 24s
sop-checklist / review-refire (pull_request_target) Has been skipped
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-checklist / all-items-acked (pull_request_target) Successful in 3s
gate-check-v3 / gate-check (pull_request_target) Failing after 13s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 24s
c2b5d84b0f
Extract the inline CI / all-required aggregation logic from ci.yml into
.gitea/scripts/all-required-check.sh and add a regression test that locks in
the fail-closed contract:

- all constituent checks success  -> gate passes (rc=0)
- any check failure/skipped/cancelled -> gate fails (rc=1)
- odd argument count -> gate fails (caller bug)
- anti-mask check -> no || true / || echo swallow patterns
- anti-inline check -> ci.yml invokes the extracted script

Also update umbrella-reaper.py to derive required sub-jobs from the
authoritative needs: list + job name: fields instead of parsing the
now-extracted run block.

Refs: molecule-core#656 (Phase 4 all-required hard-gate)
Closes tracking: molecule-core#2615

Co-Authored-By: Claude <noreply@anthropic.com>
agent-dev-a added 1 commit 2026-06-12 08:27:16 +00:00
fixup! ci: add checkout to all-required job for extracted script
CI / Python Lint & Test (pull_request) Successful in 3s
E2E Chat / detect-changes (pull_request) Successful in 5s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 4s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 6s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 8s
E2E Chat / E2E Chat (pull_request) Successful in 2s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 7s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 3s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 6s
sop-checklist / review-refire (pull_request_target) Has been skipped
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
CI / Detect changes (pull_request) Successful in 15s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 14s
CI / Platform (Go) (pull_request) Successful in 1s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
CI / Canvas (Next.js) (pull_request) Successful in 3s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 4s
CI / Canvas Deploy Status (pull_request) Successful in 1s
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4
reserved-path-review / reserved-path-review (pull_request_target) Failing after 9s
sop-checklist / na-declarations (pull_request) N/A: (none)
gate-check-v3 / gate-check (pull_request_target) Failing after 13s
sop-checklist / all-items-acked (pull_request_target) Successful in 10s
CI / all-required (pull_request) Successful in 5s
lint-setup-go-cache / lint-setup-go-cache (pull_request) Successful in 18s
E2E API Smoke Test / detect-changes (pull_request) Successful in 28s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 21s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 3s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Successful in 31s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 31s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 31s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Failing after 37s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 51s
lint-no-coe-on-required / lint-no-coe-on-required (pull_request) Successful in 1m2s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Failing after 35s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m12s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 1m8s
qa-review / approved (pull_request_target) Approved via pull_request_review trigger
security-review / approved (pull_request_target) Approved via pull_request_review trigger
qa-review / approved (pull_request_review) Successful in 3s
security-review / approved (pull_request_review) Successful in 3s
reserved-path-review / reserved-path-review (pull_request_review) Successful in 9s
audit-force-merge / audit (pull_request_target) Successful in 8s
16023acbec
agent-reviewer-cr2 approved these changes 2026-06-12 08:31:45 +00:00
agent-reviewer-cr2 left a comment
Member

APPROVED. Reviewed head 16023acbec. The extracted all-required-check.sh keeps the CI / all-required aggregation fail-closed: only success is accepted, failure/skipped/cancelled and caller-shape errors return non-zero, and the workflow invokes the tested script rather than re-inlining logic. The umbrella-reaper update derives subcontexts from all-required needs plus job display names, which is more robust against run-block shape changes. Local shell regression test passed; pytest is not installed in this container, but the PR's Ops Scripts Tests context is green. Relevant CI contexts checked: CI / all-required, E2E API Smoke Test, and Ops Scripts Tests are green. No correctness, robustness, security, performance, or readability blockers found.

APPROVED. Reviewed head 16023acbecbd9a8db2b5b674cb2e0970d0568d3f. The extracted all-required-check.sh keeps the CI / all-required aggregation fail-closed: only success is accepted, failure/skipped/cancelled and caller-shape errors return non-zero, and the workflow invokes the tested script rather than re-inlining logic. The umbrella-reaper update derives subcontexts from all-required needs plus job display names, which is more robust against run-block shape changes. Local shell regression test passed; pytest is not installed in this container, but the PR's Ops Scripts Tests context is green. Relevant CI contexts checked: CI / all-required, E2E API Smoke Test, and Ops Scripts Tests are green. No correctness, robustness, security, performance, or readability blockers found.
devops-engineer merged commit 442033392b into main 2026-06-12 08:32:04 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2633