Compare commits

..
Author SHA1 Message Date
forge-recovery 7a14aead7a Merge pull request 'ci: use the shared source verification pipeline' (#169) from migration/shared-source-configuration-20261105 into develop
QRun-IO/ci-policy: ci / ci-result (push) Successful in 10s
QRun-IO/ci-policy: Shared pipeline / Prepare plan [workflow 60e5a80ed7a5a67877bfb3e129b1929c83464b6e] (push) Successful in 1m7s
QRun-IO/ci-policy: Shared pipeline / Secret scan (push) Successful in 28s
QRun-IO/ci-policy: Shared pipeline / Report (push) Successful in 20s
QRun-IO/ci-policy: ci / head-profile (push) Skipped
QRun-IO/ci-policy: ci / repository-policy (push) Skipped
QRun-IO/ci-policy: Shared pipeline / Release tag (push) Skipped
QRun-IO/ci-policy: ci / java-docker-3 (push) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (push) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (push) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (push) Skipped
QRun-IO/ci-policy: ci / node-8 (push) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (push) Skipped
QRun-IO/ci-policy: ci / node-10 (push) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (push) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (push) Skipped
QRun-IO/ci-policy: ci / source-config-13 (push) Skipped
QRun-IO/ci-policy: native / dotnet-0 (push) Skipped
QRun-IO/ci-policy: native / fork-deny (push) Skipped
QRun-IO/ci-policy: ci / source-config-14 (push) Skipped
QRun-IO/ci-policy: ci / original-voyage (push) Skipped
QRun-IO/ci-policy: ci / original-cli (push) Skipped
QRun-IO/ci-policy: native / native-result (push) Successful in 10s
QRun-IO/ci-policy: Shared pipeline / Verify ${{ matrix.display }} (push) Skipped
QRun-IO/ci-policy: Shared pipeline / Verify source / Linux / Node 22.20.0 (push) Successful in 37s
QRun-IO/ci-policy: ci / Scoped workflow [workflow 60e5a80ed7a5a67877bfb3e129b1929c83464b6e] (push) Successful in 10s
QRun-IO/ci-policy: ci / shared-pipeline (push) Successful in 5m43s
QRun-IO/ci-policy: ci / application-template-0 (push) Skipped
QRun-IO/ci-policy: ci / gradle-1 (push) Skipped
QRun-IO/ci-policy: ci / java-docker-3-head (push) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (push) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (push) Skipped
QRun-IO/ci-policy: ci / java-maven-7 (push) Skipped
QRun-IO/ci-policy: ci / fork-guard (push) Skipped
QRun-IO/ci-policy: ci / node-9 (push) Skipped
QRun-IO/ci-policy: ci / android-0 (push) Skipped
QRun-IO/ci-policy: ci / original-business (push) Skipped
QRun-IO/ci-policy: ci / original-mcp (push) Skipped
QRun-IO/ci-policy: ci / not-enrolled (push) Skipped
2026-11-05 12:56:18 +00:00
forge-recoveryandCodex 5233336fd6 ci: delegate source verification to the shared pipeline
QRun-IO/ci-policy: Shared source and config CI / verify (pull_request) Successful in 23s
QRun-IO/ci-policy: Shared source and config CI / secrets (pull_request) Successful in 25s
QRun-IO/ci-policy: Shared source and config CI / gate (pull_request) Successful in 21s
QRun-IO/ci-policy: ci / ci-result (pull_request) Successful in 8s
QRun-IO/ci-policy: ci / fork-guard (pull_request) Skipped
QRun-IO/ci-policy: native / fork-deny (pull_request) Skipped
QRun-IO/ci-policy: native / dotnet-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / head-profile (pull_request) Skipped
QRun-IO/ci-policy: ci / repository-policy (pull_request) Skipped
QRun-IO/ci-policy: ci / application-template-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (pull_request) Skipped
QRun-IO/ci-policy: ci / node-8 (pull_request) Skipped
QRun-IO/ci-policy: ci / original-business (pull_request) Skipped
QRun-IO/ci-policy: ci / original-voyage (pull_request) Skipped
QRun-IO/ci-policy: ci / original-cli (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-14 (pull_request) Successful in 1m31s
QRun-IO/ci-policy: ci / Scoped workflow [workflow 60e5a80ed7a5a67877bfb3e129b1929c83464b6e] (pull_request) Successful in 14s
QRun-IO/ci-policy: ci / gradle-1 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3-head (pull_request) Skipped
QRun-IO/ci-policy: native / native-result (pull_request) Successful in 11s
QRun-IO/ci-policy: ci / java-docker-4 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-9 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-10 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (pull_request) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-13 (pull_request) Skipped
QRun-IO/ci-policy: ci / android-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / original-mcp (pull_request) Skipped
QRun-IO/ci-policy: ci / not-enrolled (pull_request) Skipped
QRun-IO/ci-policy: ci / shared-pipeline (pull_request) Skipped
Co-Authored-By: Codex <noreply@openai.com>
2026-11-05 12:51:24 +00:00
forge-recovery 8656e4a384 ci: deliver the approved one-key npm recovery source
QRun-IO/ci-policy: ci / head-profile (push) Skipped
QRun-IO/ci-policy: ci / java-docker-3 (push) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (push) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (push) Skipped
QRun-IO/ci-policy: ci / node-8 (push) Skipped
QRun-IO/ci-policy: ci / node-10 (push) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (push) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (push) Skipped
QRun-IO/ci-policy: ci / source-config-13 (push) Skipped
QRun-IO/ci-policy: native / fork-deny (push) Skipped
QRun-IO/ci-policy: native / dotnet-0 (push) Skipped
QRun-IO/ci-policy: Shared source and config CI / verify (push) Successful in 13s
QRun-IO/ci-policy: ci / repository-policy (push) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (push) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (push) Skipped
QRun-IO/ci-policy: native / native-result (push) Successful in 6s
QRun-IO/ci-policy: Shared source and config CI / gate (push) Successful in 10s
QRun-IO/ci-policy: ci / source-config-14 (push) Successful in 29s
QRun-IO/ci-policy: ci / ci-result (push) Successful in 4s
QRun-IO/ci-policy: ci / fork-guard (push) Skipped
QRun-IO/ci-policy: ci / application-template-0 (push) Skipped
QRun-IO/ci-policy: ci / gradle-1 (push) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (push) Skipped
QRun-IO/ci-policy: ci / java-maven-7 (push) Skipped
QRun-IO/ci-policy: ci / node-9 (push) Skipped
QRun-IO/ci-policy: ci / android-0 (push) Skipped
QRun-IO/ci-policy: ci / original-business (push) Skipped
QRun-IO/ci-policy: ci / original-mcp (push) Skipped
QRun-IO/ci-policy: ci / not-enrolled (push) Skipped
QRun-IO/ci-policy: ci / java-docker-3-head (push) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (push) Skipped
QRun-IO/ci-policy: Shared source and config CI / secrets (push) Successful in 15s
2026-11-03 15:52:58 +00:00
forge-recoveryandCodex 570f8965f3 ci: add the approved one-shot encrypted npm recovery
QRun-IO/ci-policy: ci / fork-guard (pull_request) Skipped
QRun-IO/ci-policy: ci / head-profile (pull_request) Skipped
QRun-IO/ci-policy: ci / application-template-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-8 (pull_request) Skipped
QRun-IO/ci-policy: ci / original-business (pull_request) Skipped
QRun-IO/ci-policy: native / fork-deny (pull_request) Skipped
QRun-IO/ci-policy: Shared source and config CI / verify (pull_request) Successful in 12s
QRun-IO/ci-policy: Shared source and config CI / secrets (pull_request) Successful in 12s
QRun-IO/ci-policy: ci / repository-policy (pull_request) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (pull_request) Skipped
QRun-IO/ci-policy: Shared source and config CI / gate (pull_request) Successful in 12s
QRun-IO/ci-policy: ci / ci-result (pull_request) Successful in 5s
QRun-IO/ci-policy: ci / gradle-1 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-9 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-10 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (pull_request) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-13 (pull_request) Skipped
QRun-IO/ci-policy: ci / android-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / original-mcp (pull_request) Skipped
QRun-IO/ci-policy: ci / not-enrolled (pull_request) Skipped
QRun-IO/ci-policy: native / dotnet-0 (pull_request) Skipped
QRun-IO/ci-policy: native / native-result (pull_request) Successful in 6s
QRun-IO/ci-policy: ci / java-docker-3-head (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-14 (pull_request) Successful in 28s
Co-Authored-By: Codex <noreply@openai.com>
2026-11-03 15:49:48 +00:00
james.maes a276ec1f48 Merge pull request 'fix: use PostgreSQL for core consumer acceptance' (#167) from fix/printing-postgres-consumer-20261102 into develop
QRun-IO/ci-policy: ci / head-profile (push) Skipped
QRun-IO/ci-policy: ci / java-docker-3 (push) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (push) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (push) Skipped
QRun-IO/ci-policy: ci / node-8 (push) Skipped
QRun-IO/ci-policy: ci / node-10 (push) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (push) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (push) Skipped
QRun-IO/ci-policy: ci / source-config-13 (push) Skipped
QRun-IO/ci-policy: native / fork-deny (push) Skipped
QRun-IO/ci-policy: native / dotnet-0 (push) Skipped
QRun-IO/ci-policy: native / native-result (push) Successful in 5s
QRun-IO/ci-policy: Shared source and config CI / verify (push) Successful in 10s
QRun-IO/ci-policy: ci / repository-policy (push) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (push) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (push) Skipped
QRun-IO/ci-policy: Shared source and config CI / gate (push) Successful in 9s
QRun-IO/ci-policy: ci / source-config-14 (push) Successful in 22s
QRun-IO/ci-policy: ci / ci-result (push) Successful in 3s
QRun-IO/ci-policy: ci / fork-guard (push) Skipped
QRun-IO/ci-policy: ci / application-template-0 (push) Skipped
QRun-IO/ci-policy: ci / gradle-1 (push) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (push) Skipped
QRun-IO/ci-policy: ci / java-maven-7 (push) Skipped
QRun-IO/ci-policy: ci / node-9 (push) Skipped
QRun-IO/ci-policy: ci / android-0 (push) Skipped
QRun-IO/ci-policy: ci / original-mcp (push) Skipped
QRun-IO/ci-policy: ci / not-enrolled (push) Skipped
QRun-IO/ci-policy: ci / java-docker-3-head (push) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (push) Skipped
QRun-IO/ci-policy: Shared source and config CI / secrets (push) Successful in 11s
2026-11-03 15:30:38 +00:00
james.maesandCodex 53b5d42f11 fix: regenerate packed resource with standard zlib
QRun-IO/ci-policy: ci / fork-guard (pull_request) Skipped
QRun-IO/ci-policy: ci / head-profile (pull_request) Skipped
QRun-IO/ci-policy: ci / application-template-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-8 (pull_request) Skipped
QRun-IO/ci-policy: native / fork-deny (pull_request) Skipped
QRun-IO/ci-policy: Shared source and config CI / verify (pull_request) Successful in 10s
QRun-IO/ci-policy: ci / repository-policy (pull_request) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (pull_request) Skipped
QRun-IO/ci-policy: Shared source and config CI / gate (pull_request) Successful in 8s
QRun-IO/ci-policy: Shared source and config CI / secrets (pull_request) Successful in 10s
QRun-IO/ci-policy: ci / ci-result (pull_request) Successful in 3s
QRun-IO/ci-policy: ci / gradle-1 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-9 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-10 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (pull_request) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-13 (pull_request) Skipped
QRun-IO/ci-policy: ci / android-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / original-mcp (pull_request) Skipped
QRun-IO/ci-policy: ci / not-enrolled (pull_request) Skipped
QRun-IO/ci-policy: native / dotnet-0 (pull_request) Skipped
QRun-IO/ci-policy: native / native-result (pull_request) Successful in 5s
QRun-IO/ci-policy: ci / java-docker-3-head (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-14 (pull_request) Successful in 20s
Python 3.14 on Windows uses zlib-ng, whose compressed bytes differ from the Linux pipeline. Regenerate with standard Linux zlib; all 12 decoded resources and generator logic remain identical. The stale-resource check now passes.

Co-Authored-By: Codex <noreply@openai.com>
Signed-off-by: James Maes <james@kof22.com>
2026-11-03 09:29:01 -06:00
e4a93c8826 fix: use self-supporting PostgreSQL consumer acceptance
QRun-IO/ci-policy: ci / fork-guard (pull_request) Skipped
QRun-IO/ci-policy: ci / head-profile (pull_request) Skipped
QRun-IO/ci-policy: ci / application-template-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-8 (pull_request) Skipped
QRun-IO/ci-policy: native / fork-deny (pull_request) Skipped
QRun-IO/ci-policy: Shared source and config CI / verify (pull_request) Successful in 21s
QRun-IO/ci-policy: ci / repository-policy (pull_request) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (pull_request) Skipped
QRun-IO/ci-policy: Shared source and config CI / secrets (pull_request) Successful in 24s
QRun-IO/ci-policy: Shared source and config CI / gate (pull_request) Successful in 14s
QRun-IO/ci-policy: ci / ci-result (pull_request) Successful in 6s
QRun-IO/ci-policy: ci / gradle-1 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-9 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-10 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (pull_request) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-13 (pull_request) Skipped
QRun-IO/ci-policy: ci / android-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / original-mcp (pull_request) Skipped
QRun-IO/ci-policy: ci / not-enrolled (pull_request) Skipped
QRun-IO/ci-policy: native / dotnet-0 (pull_request) Skipped
QRun-IO/ci-policy: native / native-result (pull_request) Successful in 9s
QRun-IO/ci-policy: ci / java-docker-3-head (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-14 (pull_request) Successful in 39s
Use the existing Docker PostgreSQL fixture instead of the removed MySQL caller. Regenerate the packed resource and preserve all source identity and coverage gates. Orb validation and all 56 generator regressions pass on Linux.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Co-Authored-By: Codex <noreply@openai.com>
Signed-off-by: James Maes <james@kof22.com>
2026-11-02 16:18:47 -06:00
forge-recovery 7d774113be Merge pull request 'ci: remove the completed one-shot credential recovery workflow' (#166) from cutover/remove-completed-release-recovery-20261102 into develop
QRun-IO/ci-policy: Shared source and config CI / gate (push) Successful in 10s
QRun-IO/ci-policy: ci / source-config-14 (push) Successful in 24s
QRun-IO/ci-policy: ci / ci-result (push) Successful in 5s
QRun-IO/ci-policy: ci / head-profile (push) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (push) Skipped
QRun-IO/ci-policy: ci / node-8 (push) Skipped
QRun-IO/ci-policy: ci / java-docker-3 (push) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (push) Skipped
QRun-IO/ci-policy: ci / node-10 (push) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (push) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (push) Skipped
QRun-IO/ci-policy: ci / source-config-13 (push) Skipped
QRun-IO/ci-policy: native / fork-deny (push) Skipped
QRun-IO/ci-policy: native / dotnet-0 (push) Skipped
QRun-IO/ci-policy: Shared source and config CI / verify (push) Successful in 9s
QRun-IO/ci-policy: ci / repository-policy (push) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (push) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (push) Skipped
QRun-IO/ci-policy: native / native-result (push) Successful in 5s
QRun-IO/ci-policy: ci / fork-guard (push) Skipped
QRun-IO/ci-policy: ci / application-template-0 (push) Skipped
QRun-IO/ci-policy: ci / gradle-1 (push) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (push) Skipped
QRun-IO/ci-policy: ci / java-maven-7 (push) Skipped
QRun-IO/ci-policy: ci / node-9 (push) Skipped
QRun-IO/ci-policy: ci / not-enrolled (push) Skipped
QRun-IO/ci-policy: ci / java-docker-3-head (push) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (push) Skipped
QRun-IO/ci-policy: Shared source and config CI / secrets (push) Successful in 12s
2026-11-02 17:17:38 +00:00
forge-recoveryandCodex 5b0fbc2a27 ci: remove the completed one-shot credential recovery workflow
QRun-IO/ci-policy: ci / fork-guard (pull_request) Skipped
QRun-IO/ci-policy: ci / head-profile (pull_request) Skipped
QRun-IO/ci-policy: ci / application-template-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-8 (pull_request) Skipped
QRun-IO/ci-policy: native / fork-deny (pull_request) Skipped
QRun-IO/ci-policy: ci / repository-policy (pull_request) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (pull_request) Skipped
QRun-IO/ci-policy: Shared source and config CI / verify (pull_request) Successful in 8s
QRun-IO/ci-policy: ci / java-maven-6-head (pull_request) Skipped
QRun-IO/ci-policy: Shared source and config CI / secrets (pull_request) Successful in 10s
QRun-IO/ci-policy: Shared source and config CI / gate (pull_request) Successful in 9s
QRun-IO/ci-policy: ci / ci-result (pull_request) Successful in 3s
QRun-IO/ci-policy: ci / gradle-1 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-9 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-10 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (pull_request) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-13 (pull_request) Skipped
QRun-IO/ci-policy: ci / not-enrolled (pull_request) Skipped
QRun-IO/ci-policy: native / dotnet-0 (pull_request) Skipped
QRun-IO/ci-policy: native / native-result (pull_request) Successful in 3s
QRun-IO/ci-policy: ci / java-docker-3-head (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-14 (pull_request) Successful in 25s
Co-Authored-By: Codex <noreply@openai.com>
2026-11-02 17:16:49 +00:00
forge-recovery b6829ffa7f Merge pull request 'ci: recover approved release credentials through one encrypted job' (#165) from cutover/encrypted-release-recovery-20261102 into develop
QRun-IO/ci-policy: ci / java-docker-4 (push) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (push) Skipped
QRun-IO/ci-policy: ci / node-8 (push) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (push) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (push) Skipped
QRun-IO/ci-policy: ci / source-config-13 (push) Skipped
QRun-IO/ci-policy: ci / node-10 (push) Skipped
QRun-IO/ci-policy: native / fork-deny (push) Skipped
QRun-IO/ci-policy: native / dotnet-0 (push) Skipped
QRun-IO/ci-policy: native / native-result (push) Successful in 4s
QRun-IO/ci-policy: Shared source and config CI / verify (push) Successful in 10s
QRun-IO/ci-policy: ci / java-core-2-head (push) Skipped
QRun-IO/ci-policy: ci / repository-policy (push) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (push) Skipped
QRun-IO/ci-policy: Shared source and config CI / gate (push) Successful in 8s
QRun-IO/ci-policy: ci / source-config-14 (push) Successful in 23s
QRun-IO/ci-policy: ci / ci-result (push) Successful in 3s
QRun-IO/ci-policy: ci / head-profile (push) Skipped
QRun-IO/ci-policy: ci / java-docker-3 (push) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (push) Skipped
QRun-IO/ci-policy: ci / java-maven-7 (push) Skipped
QRun-IO/ci-policy: ci / node-9 (push) Skipped
QRun-IO/ci-policy: ci / not-enrolled (push) Skipped
QRun-IO/ci-policy: ci / java-docker-3-head (push) Skipped
QRun-IO/ci-policy: Shared source and config CI / secrets (push) Successful in 11s
QRun-IO/ci-policy: ci / java-maven-6-head (push) Skipped
QRun-IO/ci-policy: ci / fork-guard (push) Skipped
QRun-IO/ci-policy: ci / application-template-0 (push) Skipped
QRun-IO/ci-policy: ci / gradle-1 (push) Skipped
2026-11-02 17:09:02 +00:00
forge-recoveryandCodex 6863530dc7 ci: recover approved release credentials through one encrypted job
QRun-IO/ci-policy: ci / fork-guard (pull_request) Skipped
QRun-IO/ci-policy: ci / application-template-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / head-profile (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-8 (pull_request) Skipped
QRun-IO/ci-policy: native / fork-deny (pull_request) Skipped
QRun-IO/ci-policy: Shared source and config CI / verify (pull_request) Successful in 12s
QRun-IO/ci-policy: ci / repository-policy (pull_request) Skipped
QRun-IO/ci-policy: ci / java-core-2-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-6-head (pull_request) Skipped
QRun-IO/ci-policy: ci / java-maven-7-head (pull_request) Skipped
QRun-IO/ci-policy: Shared source and config CI / secrets (pull_request) Successful in 13s
QRun-IO/ci-policy: Shared source and config CI / gate (pull_request) Successful in 12s
QRun-IO/ci-policy: ci / ci-result (pull_request) Successful in 5s
QRun-IO/ci-policy: ci / node-9 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-10 (pull_request) Skipped
QRun-IO/ci-policy: ci / gradle-1 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-4 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-frontend-browser-5 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-playwright-11 (pull_request) Skipped
QRun-IO/ci-policy: ci / repository-policy-12 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-13 (pull_request) Skipped
QRun-IO/ci-policy: ci / not-enrolled (pull_request) Skipped
QRun-IO/ci-policy: native / dotnet-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-3-head (pull_request) Skipped
QRun-IO/ci-policy: native / native-result (pull_request) Successful in 5s
QRun-IO/ci-policy: ci / source-config-14 (pull_request) Successful in 31s
Co-Authored-By: Codex <noreply@openai.com>
2026-11-02 17:07:37 +00:00
james.maesandClaude Fable 5.1 06c86a93f7 feat: publish qqq-core and add opt-in CLI platform lanes (#165)
QRun-IO/ci-policy: ci / gradle-0 (push) Skipped
QRun-IO/ci-policy: ci / java-docker-1 (push) Skipped
QRun-IO/ci-policy: ci / node-3 (push) Skipped
QRun-IO/ci-policy: Shared source and config CI / verify (push) Successful in 12s
QRun-IO/ci-policy: Shared source and config CI / gate (push) Successful in 13s
QRun-IO/ci-policy: ci / ci-result (push) Successful in 5s
QRun-IO/ci-policy: ci / node-4 (push) Skipped
QRun-IO/ci-policy: ci / fork-guard (push) Skipped
QRun-IO/ci-policy: ci / not-enrolled (push) Skipped
QRun-IO/ci-policy: ci / java-maven-2 (push) Skipped
QRun-IO/ci-policy: Shared source and config CI / secrets (push) Successful in 17s
QRun-IO/ci-policy: ci / source-config-5 (push) Successful in 23m31s
The cli profile publishes @qrun-io/qqq-core between the client and the conformance package, shares one npm dist-tag across the four packages (latest only when every version is final, else rc), accepts an optional platforms: [macos-arm64, windows-x64] manifest key that adds cli_platform lanes, runs npm run lint in cli_verify.sh, diffs operations.ts in the drift check, and moves the Node image to cimg/node:22.23.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-01 04:13:21 -06:00
james.maesandCodex 9b48a14bce fix: preserve reviewed changes with verified identity (#163)
Replace paid Sonar-dependent quality paths with the reviewed free OSS checks, preserving security and test gates and the established release contracts.

Co-authored-by: Codex (GPT-6) <noreply@openai.com>
2026-10-30 15:53:39 -05:00
james.maesandCodex 1c389210e6 fix: deploy Voyage through the live shared GitOps updater (#157)
Co-authored-by: Codex <noreply@openai.com>
2026-10-22 13:33:37 -05:00
james.maesandCodex 9438ab0762 fix: pin Voyage CD image and validate release PRs (#155)
Co-authored-by: Codex <noreply@openai.com>
2026-10-22 13:03:14 -05:00
james.maesandCodex 7fed7eee82 fix: avoid CircleCI interpolation in Voyage checkout (#153)
Co-authored-by: Codex <noreply@openai.com>
2026-10-22 12:43:22 -05:00
james.maesandCodex ed880fcb77 fix: correct Voyage CD checkout and release target (#151)
Co-authored-by: Codex <noreply@openai.com>
2026-10-22 12:28:09 -05:00
james.maesandCodex 50fa564006 fix: preserve verified source heads during Node snapshots (#149)
Co-authored-by: Codex <noreply@openai.com>
2026-10-22 05:05:41 -05:00
james.maesandCodex 35e5312fc7 fix: accept CircleCI numeric publication booleans (#148)
Co-authored-by: Codex <noreply@openai.com>
2026-10-22 05:02:01 -05:00
james.maesandCodex 99ac8dec53 perf: avoid repeated analysis after publication verification (#146)
Co-authored-by: Codex <noreply@openai.com>
2026-10-22 04:34:11 -05:00
james.maesandCodex 859eb4badb perf: avoid duplicate analysis in Core dependency assembly (#144)
Co-authored-by: Codex <noreply@openai.com>
2026-10-22 03:27:35 -05:00
james.maesandCodex 357aba57bc fix: check every branch before enabling project cancellation (#142)
Co-authored-by: Codex <noreply@openai.com>
2026-10-22 02:02:23 -05:00
james.maesandCodex fb86d1a4a7 fix: avoid SIGPIPE in CLI capability checks (#140)
Co-authored-by: Codex <noreply@openai.com>
2026-10-22 01:39:24 -05:00
james.maesandCodex e9eb225480 feat: reconcile native CircleCI cost settings (#138)
Co-authored-by: Codex <noreply@openai.com>
2026-10-22 01:28:10 -05:00
james.maesandCodex 09dac40a1e feat: recognize and enforce shared native consumers (#136)
* feat: recognize and enforce shared native consumers

Co-Authored-By: Codex <noreply@openai.com>

* fix: keep qctl required gates appropriate for pull requests

Co-Authored-By: Codex <noreply@openai.com>

---------

Co-authored-by: Codex <noreply@openai.com>
2026-10-22 00:36:08 -05:00
james.maesandCodex 07a8f5cec2 fix: build the template renderer in its own directory (#134)
Co-authored-by: Codex <noreply@openai.com>
2026-10-22 00:13:12 -05:00
james.maesandCodex c4f7b5ba76 feat: verify generated applications through the orb (#132)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 23:57:19 -05:00
james.maesandCodex 3fd8baeda9 feat: validate Homebrew distribution through the orb (#130)
* feat: validate Homebrew distribution through the orb

Co-Authored-By: Codex <noreply@openai.com>

* test: declare Homebrew inputs in fleet fixtures

Co-Authored-By: Codex <noreply@openai.com>

---------

Co-authored-by: Codex <noreply@openai.com>
2026-10-21 23:32:41 -05:00
james.maesandCodex 1334ababf1 feat: validate repository shell automation centrally (#128)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 23:10:56 -05:00
james.maesandCodex 3ca2b71ffa fix: audit catalog as an enforced orb consumer (#127)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 23:04:14 -05:00
james.maesandCodex df9113296e feat: reconcile shared native GitOps consumers (#125)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 22:46:56 -05:00
james.maesandCodex 9b73a4ed5f feat: complete centralized marketing validation (#123)
* feat: complete centralized marketing validation

Co-Authored-By: Codex <noreply@openai.com>

* fix: declare shell fixtures and clean readiness loop lint

Co-Authored-By: Codex <noreply@openai.com>

---------

Co-authored-by: Codex <noreply@openai.com>
2026-10-21 22:23:30 -05:00
james.maesandCodex aa865fefd5 feat: expose Voyage through the shared verification gate (#121)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 21:59:52 -05:00
james.maesandCodex a5d10e8c1c fix: verify marketing PR branches and require concrete Node images (#119)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 21:51:20 -05:00
james.maesandCodex 4f1e5e663d fix: remove fabricated marketing coverage jobs (#117)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 21:35:10 -05:00
james.maesandCodex 898862a095 feat: centralize Node test and artifact pipelines (#115)
* feat: centralize Node test and artifact pipelines

Co-Authored-By: Codex <noreply@openai.com>

* test: supply artifact policy in fleet enrollment fixtures

Co-Authored-By: Codex <noreply@openai.com>

---------

Co-authored-by: Codex <noreply@openai.com>
2026-10-21 21:30:11 -05:00
james.maesandCodex 21403d2287 feat: recognize orb-owned native Next verification (#114)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 21:20:58 -05:00
james.maesandCodex 2675bb7a36 feat: enforce shared branch workflows across five more profiles (#112)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 21:09:13 -05:00
james.maesandCodex 12eccc9e7d feat: preserve combined hotfix and integration test filter (#110)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 20:55:00 -05:00
james.maesandCodex 9e2652d735 fix: pin a compatible GitHub CLI for reconciliation (#108)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 20:38:20 -05:00
james.maesandCodex c4e41dea6b ci: add bounded central enrollment runner (#106)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 20:27:54 -05:00
james.maesandCodex 4562d5c2d2 fix: compare required checks independently of API order (#105)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 20:24:18 -05:00
james.maesandCodex 322a194c05 ci: submit enrollment with GitHub-signed API commits (#104)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 20:18:40 -05:00
james.maes a92d6d13bb Merge pull request #102 from QRun-IO/feat/preserve-restricted-branch-access
feat: enforce CI without changing branch access
2026-10-21 19:55:58 -05:00
james.maesandCodex 9772090684 feat: enforce CI without changing branch access
Co-Authored-By: Codex <noreply@openai.com>
2026-10-21 19:52:42 -05:00
james.maes ab666bb785 Merge pull request #101 from QRun-IO/feat/verify-existing-rulesets
feat: verify existing orb gate rulesets
2026-10-21 19:50:26 -05:00
james.maesandCodex fc39293b9d feat: verify existing orb gate rulesets
Co-Authored-By: Codex <noreply@openai.com>
2026-10-21 19:47:45 -05:00
james.maes e83b8481b9 Merge pull request #100 from QRun-IO/feat/finish-consumer-enrollment
feat: qualify and finish shared enrollment
2026-10-21 19:45:49 -05:00
james.maesandCodex e4ecae6294 feat: qualify and finish shared enrollment
Co-Authored-By: Codex <noreply@openai.com>
2026-10-21 19:40:48 -05:00
james.maes 37b91db07b Merge pull request #99 from QRun-IO/feat/discover-enrollment-targets
feat: discover current consumer enrollment targets
2026-10-21 19:34:22 -05:00
james.maesandCodex c30d821f7e feat: discover current consumer enrollment targets
Co-Authored-By: Codex <noreply@openai.com>
2026-10-21 19:30:56 -05:00
james.maes 6ae688dcf4 Merge pull request #98 from QRun-IO/feat/remote-consumer-enrollment
feat: reconcile signed remote enrollment submissions
2026-10-21 19:30:20 -05:00
james.maesandCodex 78207c16be feat: reconcile signed remote enrollment submissions
Co-Authored-By: Codex <noreply@openai.com>
2026-10-21 19:25:53 -05:00
james.maes efd50aee2f Merge pull request #97 from QRun-IO/feat/batch-consumer-enrollment
feat: enroll consumers with one validated batch
2026-10-21 19:19:12 -05:00
james.maesandCodex 6dd473be25 feat: enroll consumers with one validated batch
Co-Authored-By: Codex <noreply@openai.com>
2026-10-21 19:15:56 -05:00
james.maes 1c8a7c57e5 Merge pull request #95 from QRun-IO/fix/static-analysis-exit-status
fix(ci): propagate Maven static-analysis failures
2026-10-21 19:06:49 -05:00
james.maesandCodex abaebf50ff fix(ci): propagate Maven static-analysis failures
Co-Authored-By: Codex <noreply@openai.com>
2026-10-21 19:02:28 -05:00
james.maes c56e52d4cb Merge pull request #94 from QRun-IO/ci/shared-orb-enforcement
feat(ci): centralize orb branch-check enforcement
2026-10-21 18:58:01 -05:00
james.maesandCodex 09046d45b0 feat(ci): centralize orb branch-check enforcement
Co-Authored-By: Codex <noreply@openai.com>
2026-10-21 18:55:40 -05:00
james.maesandCodex 9e9e6c1fa5 fix(ci): verify frontend maintenance without publishing (#92)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 17:30:16 -05:00
james.maesandCodex 45aaccd2a9 fix(ci): gate core snapshots on all acceptance checks (#90)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 17:14:44 -05:00
james.maesandCodex ab77962b6a fix(audit): discover current organization repositories (#89)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 16:59:04 -05:00
james.maesandCodex d0792d60d6 fix(ci): verify maintenance on nonpublishing branches (#87)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 16:46:05 -05:00
james.maesandCodex 72f5f4d4e7 fix: allow managed orb tracks during QBit onboarding (#85)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 16:26:12 -05:00
james.maesandCodex 00af9aae31 perf: reuse React build before frontend tests (#84)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 15:55:47 -05:00
james.maesandCodex 7e60372948 fix: isolate browser package repositories (#82)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 15:29:28 -05:00
james.maesandCodex 45bab9d960 feat: support managed patch tracks [minor] (#80)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 15:06:44 -05:00
james.maesandCodex f304afb0be fix: isolate Ubuntu bootstrap from image PPAs (#78)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 14:27:11 -05:00
james.maesandCodex f76b9f7a7c fix: refresh only the newly added Temurin repository (#76)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 13:51:50 -05:00
james.maesandCodex fdf62a2f5a fix: align effective Maven versions before publication (#75)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 13:15:09 -05:00
james.maesandCodex 94341ef481 fix(ci): retain verification for schema caller migrations (#73)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 12:57:36 -05:00
james.maesandCodex 2debeada5d feat(ci): centralize opt-in QBit feature tag publication (#72)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 12:52:18 -05:00
james.maesandCodex 6febeff590 fix(audit): verify release and hotfix branch enforcement (#71)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 12:30:59 -05:00
james.maesandCodex 8b58a45f35 ci: include shared RC caller updates in maintenance verification (#70)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 11:59:07 -05:00
james.maesandCodex fbe36d683d ci: verify maintenance changes without publishing applications (#68)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 11:53:20 -05:00
james.maesandCodex bd5ee3bec5 ci: centralize policy-only branches and shared scanner enforcement (#65)
Add the repository-policy profile, validate actual legacy policy trees, normalize packed resource line endings, and scope maintenance requirements to branch source. Preserve canonical scanner enforcement for qqq-all and policy-only main branches.

Validation: 32 audit tests, 7 policy tests, all four target source trees, and Linux packed-generator check pass. Replaces this PR's unrecognized-email signatures using the established verified identity; signature enforcement remains enabled.

Co-authored-by: Codex <noreply@openai.com>
2026-10-21 11:21:15 -05:00
james.maesandCodex d4d6e97df0 fix: retry transient package downloads during CI bootstrap (#66)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 10:56:34 -05:00
james.maesandCodex c288a8864f ci: centralize branch-aware QBit source scanning (#63)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 09:36:07 -05:00
james.maesandCodex 9906c8f120 fix: audit explicitly selected repository branches (#62)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 09:15:33 -05:00
james.maesandCodex 4dcf2c1891 fix: preserve legacy qbit hotfix publication policies (#61)
* fix: preserve legacy qbit hotfix publication policies

Co-Authored-By: Codex <noreply@openai.com>

* fix: regenerate packed profiles with Linux zlib

Co-Authored-By: Codex <noreply@openai.com>

---------

Co-authored-by: Codex <noreply@openai.com>
2026-10-21 09:00:43 -05:00
james.maesandCodex cc30f599e6 fix(ci): provide a stable verification gate across branches (#59)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 03:12:12 -05:00
james.maesandCodex 05a2a5217a fix: audit rc worker pins independently of native workers (#58)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 02:23:51 -05:00
james.maesandCodex 7d73ac90b6 fix: distinguish missing RC refs from GitHub error bodies (#57)
* fix: distinguish missing rc refs from github error bodies

Co-Authored-By: Codex <noreply@openai.com>

* fix: reject empty ref responses across jq versions

Co-Authored-By: Codex <noreply@openai.com>

---------

Co-authored-by: Codex <noreply@openai.com>
2026-10-21 02:15:32 -05:00
james.maesandCodex edc1365ac9 fix: recover verified rc uploads after publisher timeout (#56)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 02:02:14 -05:00
james.maesandCodex 0f33ddadf8 ci: run business E2E on changes and preserve main validation (#55)
Co-authored-by: Codex <noreply@openai.com>
2026-10-21 01:19:08 -05:00
james.maesandCodex 5e9bbb54ec ci: add batch version rollout for canonical consumers (#54)
Validate every checkout before updating its orb pin. Preserve publication policy, filters, credentials contexts and forwarded parameters; reject custom callers and mismatched declarations. Cover all 12 profiles, dry runs, no-op repeats, invalid batches and duplicate input with six new tests in the existing contract job. Existing migration and standard tests pass; Linux packed generator check passes.

Co-authored-by: Codex <noreply@openai.com>
2026-10-21 00:45:50 -05:00
james.maesandCodex 5bcec90e33 ci: report the shared database gate on every pull request (#53)
Preserve migration verification, avoid duplicate feature push builds, and cancel superseded pull request runs so the gate can be required safely.

Co-authored-by: Codex <noreply@openai.com>
2026-10-20 22:25:38 -05:00
james.maesandCodex a50b07d927 fix: escape Android heredoc in continued Circle configuration (#51)
Circle accepts the continuation request before reporting an unescaped heredoc as a pipeline configuration error. Escape the template marker and emulate Circle unescaping in executable publisher tests. Validate the actual continued config with CircleCI.

Co-authored-by: Codex <noreply@openai.com>
2026-10-20 22:00:56 -05:00
james.maesandCodex 6318d90e96 feat: centralize lightweight GitOps rendering validation (#50)
Add a read-only native worker and canonical consumer bridge. Verify the pinned Kustomize binary, render every configuration without logging resources, and audit adoption. Behavioral and audit tests pass; all five marketing GitOps configurations render successfully.

Co-authored-by: Codex <noreply@openai.com>
2026-10-20 21:54:25 -05:00
james.maesandCodex a6fea661ff fix: authenticate Android publishing with GitHub package token (#47)
* fix: authenticate Android publishing with GitHub package token

Use the shared GitHub Packages token and verify its identity and registry repository access before Gradle starts. Preserve unit and emulator gates; package write success still requires hosted publication.

Co-Authored-By: Codex <noreply@openai.com>

* fix: keep embedded JSON resources consistent across checkouts

Co-Authored-By: Codex <noreply@openai.com>

---------

Co-authored-by: Codex <noreply@openai.com>
2026-10-20 21:40:01 -05:00
james.maesandCodex 2894bae29a test: retain All release shell behavior in shared owner (#46)
Move the consumer publication regression to the reusable worker; existing test discovery executes it. Verify exact RC1 prerelease/non-latest flags, GA behavior and rejection of other RC versions.

Co-authored-by: Codex <noreply@openai.com>
2026-10-20 21:19:09 -05:00
james.maesandCodex a14e8f9b24 fix: default All releases to shared Circle smoke evidence (#35)
Co-authored-by: Codex <noreply@openai.com>
2026-10-20 21:12:58 -05:00
james.maesandCodex 83611872a3 fix: verify public All smoke evidence without secret export (#44)
Allow unauthenticated Circle API reads for public projects, preserve optional authentication and all fail-closed provenance checks.

Co-authored-by: Codex <noreply@openai.com>
2026-10-20 21:12:00 -05:00
james.maesandCodex 30c4e0e85c fix: use shared Maven credentials for Android publication (#42)
Use the existing organization context and Gradle environment properties. Fail before publishing if either credential is absent and avoid writing secrets to gradle.properties.

Co-authored-by: Codex <noreply@openai.com>
2026-10-20 21:07:21 -05:00
james.maesandCodex f429d9f3c4 fix: build marketing site before browser checks (#40)
Run lint and one production build in every shared marketing workflow before Playwright and Lighthouse. Preserve the delegated delivery contracts.

Co-authored-by: Codex <noreply@openai.com>
2026-10-20 20:56:32 -05:00
54 changed files with 1597 additions and 440 deletions

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
schema: 1
scoped_delegation: true
components:
source:
toolchains:
node: 22.20.0
build:
tool: source
commands:
- - tracked-files
verification:
push:
branches:
- dev
- develop
- hotfix/**
- main
- master
- qualification/**
- rc
- release/**
tags: []
+1 -1
View File
@@ -83,7 +83,7 @@ workflows:
when: << pipeline.parameters.run_enrollment_reconcile >>
jobs:
- enrollment-reconcile:
context: qqq-maven-registry-credentials
context: [qqq-maven-registry-credentials, orb-publishing]
filters:
branches:
only: main
+3
View File
@@ -60,11 +60,14 @@ jobs:
python3 tests/test_enforce_orb_checks.py
python3 tests/test_native_next_gates.py
python3 tests/test_native_gitops_gates.py
python3 tests/test_native_specialist_gates.py
python3 tests/test_enroll_consumers.py
python3 tests/test_reconcile_enrollment.py
python3 tests/test_discover_enrollment.py
python3 tests/test_finish_enrollment.py
python3 tests/test_run_enrollment.py
python3 tests/test_install_reconcile_gh.py
python3 tests/test_circle_project_settings.py
python3 tests/test_static_analysis_exit.py
python3 tests/test_validate_standard.py
python3 tests/test_voyage_profile.py
+146
View File
@@ -0,0 +1,146 @@
# DRAFT ONLY - NOT INSTALLED, NOT EXECUTED. Public, review-only.
# ONE-KEY NPM_TOKEN recovery variant of the reviewed qrun-secret-export workflow.
# Target path (after a new explicit owner decision): .github/workflows/qrun-secret-export.yml
# Delivery: normal Gitea PR onto develop, mirrored only by the existing dedicated shadow worker.
# Fails closed until the three PLACEHOLDER values below are replaced:
# NONCE, RECIPIENT_FPR, RECIPIENT_PUBLIC_PEM.
name: qrun-secret-export (one-shot, one-key NPM recovery only)
on:
workflow_dispatch:
inputs:
expected_head:
description: "Full 40-hex SHA of develop HEAD; must equal github.sha"
required: true
type: string
permissions: {} # artifact upload uses the runtime token, not GITHUB_TOKEN
env:
# Non-sensitive, reviewed constants (replaced at approval time).
NONCE: "6281c98f7a28fef56930c368dc19b97d"
RECIPIENT_FPR: "ed79db8053ad8b1c910994e71d07c4c914c76ebeda2eae9db6f38ecdae4fef6e"
concurrency:
group: qrun-secret-export
cancel-in-progress: false
jobs:
export:
if: >-
github.repository == 'QRun-IO/qqq-orb' &&
github.ref == format('refs/heads/{0}', github.event.repository.default_branch) &&
github.ref_name == 'develop' &&
github.sha == inputs.expected_head &&
github.run_attempt == 1
runs-on: ubuntu-24.04 # GitHub-hosted; never self-hosted
timeout-minutes: 10
permissions: {}
steps:
# No checkout. No repo code. No network install. Node built-in crypto only.
- name: Encrypt NPM_TOKEN to recipient
env:
# Exactly this one, on this step only.
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# Non-secret context.
EXPECTED_HEAD: ${{ inputs.expected_head }}
RUN_ATTEMPT: ${{ github.run_attempt }}
RECIPIENT_PUBLIC_PEM: |
-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEApnXE0AUAvxG+UO+lBbcl
eH+3MSgyGKo4xb78Z2ObhtwrgQXkzHhsvzH90APyx/Yh4IAlQ1e1G9P59b4Is6Mh
yaZ7zyu+KPP5vCeE3uO7CLd8M9EAp5i+1us9VyOoHhkM/klMXDITac/6Z6rMozAC
0wPhauwF4T/nsJqX1BFycL0p4FdFTHoSqfHNjiaKpN5ov43ho8E6MHVCsc2CEt1X
I99olcXFTybbCjHm8vjDrd/CepTHn26GQkwmxY2mKm43prcSC3uzHyL3nWg4uyKa
QzTjx9ff7fgcoOXO9/exZv3r5GDdFzGwBHE49PklCEAvbiu6y0smO4UhjEz4r/DN
6ratnC6UUqT3SQ3Zh+MkMIUAXi5AJfPELgUv5idSafPcOkjVd25VKP2LmqFvNecj
0LWX5HSVhDYb3LZiHqR1KY/+fBamyArfhEhHghLL5nhUN+EV/ba5wQgpUeG+STg8
NmBcvN1zhblS+KrhOJ7HZrthOfdck6GqgXQX0YSeFYSGdDG+pUI5XqJwJ6rOMLKD
iTpxB1JWgGpQxx4WX3/rFL9NJk5vfSUeAHFUzvyC3b8YGTIjfe6R08IDJK8nMLU3
gqSzFDkCldSq7nzr/psKmrw+6/+dYVEQ2ZD506+S3JGfcw3PzajYIWI65yAx7EIg
qNefU2CCRfPthnjw4WJhXbECAwEAAQ==
-----END PUBLIC KEY-----
run: |
node --input-type=commonjs - <<'NODE'
const c = require('crypto');
const fs = require('fs');
const E = process.env;
const NAMES = ['NPM_TOKEN'];
const bad = (m) => { const e = new Error(m); e.safe = true; throw e; };
let pt = null, aes = null;
try {
if (E.GITHUB_REPOSITORY !== 'QRun-IO/qqq-orb') bad('repository guard');
if (E.RUN_ATTEMPT !== '1') bad('attempt guard');
if (!/^[0-9a-f]{40}$/.test(E.EXPECTED_HEAD || '') || E.EXPECTED_HEAD !== E.GITHUB_SHA) bad('head guard');
if (!/^[0-9a-f]{32}$/.test(E.NONCE || '')) bad('nonce unset');
if (!/^[0-9a-f]{64}$/.test(E.RECIPIENT_FPR || '')) bad('recipient fingerprint unset');
let pub;
try { pub = c.createPublicKey(E.RECIPIENT_PUBLIC_PEM); } catch { bad('recipient key unset'); }
if (pub.asymmetricKeyType !== 'rsa' || pub.asymmetricKeyDetails.modulusLength !== 4096) bad('recipient key type');
const spki = pub.export({ type: 'spki', format: 'der' });
const spkiSha = c.createHash('sha256').update(spki).digest('hex');
if (spkiSha !== E.RECIPIENT_FPR) bad('recipient fingerprint mismatch');
const body = {};
for (const n of NAMES) {
if (!Object.prototype.hasOwnProperty.call(E, n) || typeof E[n] !== 'string') bad('missing secret field');
body[n] = E[n];
}
const prov = {
repository: E.GITHUB_REPOSITORY,
source_sha: E.GITHUB_SHA,
run_id: E.GITHUB_RUN_ID,
run_attempt: E.RUN_ATTEMPT,
operation_nonce: E.NONCE,
};
pt = Buffer.from(JSON.stringify({ ...prov, secrets: body }), 'utf8');
for (const n of NAMES) delete body[n];
aes = c.randomBytes(32);
const iv = c.randomBytes(12);
const aad = Buffer.from(`qrun-secret-export/v1|${spkiSha}|${E.NONCE}`, 'utf8');
const cipher = c.createCipheriv('aes-256-gcm', aes, iv);
cipher.setAAD(aad);
const ct = Buffer.concat([cipher.update(pt), cipher.final()]);
const tag = cipher.getAuthTag();
// oaepHash sets both the OAEP digest and the MGF1 digest (SHA-256 each).
const wrapped = c.publicEncrypt(
{ key: pub, padding: c.constants.RSA_PKCS1_OAEP_PADDING, oaepHash: 'sha256' }, aes);
const envelope = {
version: 1,
alg: 'RSA-OAEP-SHA256-MGF1SHA256+AES-256-GCM',
recipient_fingerprint: spkiSha,
provenance: prov,
wrapped_key: wrapped.toString('base64'),
iv: iv.toString('base64'),
tag: tag.toString('base64'),
ciphertext: ct.toString('base64'),
};
// Only file written: ciphertext, owner-only, create-exclusive.
fs.writeFileSync(`${E.RUNNER_TEMP}/${E.NONCE}.envelope.json`,
JSON.stringify(envelope), { mode: 0o600, flag: 'wx' });
console.log('envelope: written');
} catch (e) {
console.error('envelope: failed' + (e && e.safe ? ` (${e.message})` : ''));
process.exitCode = 1;
} finally {
if (pt) pt.fill(0);
if (aes) aes.fill(0);
for (const n of NAMES) delete process.env[n];
}
NODE
- name: Upload ciphertext artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: qrun-envelope-${{ env.NONCE }}
path: ${{ runner.temp }}/${{ env.NONCE }}.envelope.json # single explicit file
retention-days: 1
compression-level: 0
if-no-files-found: error
- name: Remove local ciphertext
if: always()
run: rm -f -- "${RUNNER_TEMP}/${NONCE}.envelope.json"
+6
View File
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- `cli` profile: publishes `@qrun-io/qqq-core` between the client and the conformance package on tag publishes, and refuses to publish when core's version differs from the CLI's or from the CLI's exact core dependency
- `cli` profile: one shared npm dist-tag for the four packages, `latest` when every version is final and `rc` when any has a prerelease part
- `cli` profile: optional `platforms: [macos-arm64, windows-x64]` manifest key that adds `cli_platform` lanes (new `cli_macos_arm64` and `cli_windows_x64` executors); a publishing tag's `cli_verify_publish` requires them. Off by default; other profiles reject the key
- `cli_verify.sh` runs `npm run lint` and diffs `packages/core/src/api/operations.ts` in the drift check; Node image `cimg/node:22.23`
### Fixed
- Maven compile, verify and frontend test steps pass `--update-snapshots`, so SNAPSHOT dependencies restored from the pom-checksum-keyed `~/.m2` cache are re-checked against the remote on every build instead of going stale
+9
View File
@@ -146,6 +146,15 @@ The orb auto-publishes via CircleCI:
Version bumps on main default to patch. Include `[minor]` or `[major]` in a commit message to bump accordingly.
## Voyage quality checks
The Voyage profile requires no Sonar service, account or token. Its existing
`mvn clean verify` runs the application's Checkstyle, PMD, SpotBugs and JaCoCo
checks alongside unit and integration tests. The profile retains those failures
as build failures and publishes their XML reports and `target/site` as artifacts.
The separate secret, SAST, dependency and image scans remain unchanged, as do
the dependencies that gate image publication and production GitOps updates.
## Project Status
**Maturity:** Stable, used across all QQQ repositories
+258 -238
View File
@@ -1,238 +1,258 @@
# Standardized QQQ pipelines
The orb owns workflow selection and job configuration. A consumer declares a
small manifest; it does not copy pipeline jobs. The initial supported profile is
`qbit`; `core` owns the framework's complete acceptance/release graph. Frontend
and CLI profiles described below retain their own publication contracts. Additional
profiles belong in reviewed `PROFILE_TEMPLATES` renderers in
`src/scripts/generate_pipeline.py`, with profile-specific schema and tests. There
is no arbitrary script or job-YAML passthrough.
Use the same **published** orb version in all three positions below. `0.7.0` is
an illustrative version, not a claim that this change is published. A development
orb version can be used for a controlled canary.
`.circleci/config.yml`:
```yaml
version: 2.1
setup: true
orbs:
qqq-orb: kingsrook/qqq-orb@0.7.0
workflows:
setup:
jobs:
- qqq-orb/generate_pipeline:
orb_version: "0.7.0"
filters:
branches:
ignore: automation/qbit-rc-pending
tags:
only: /.*/
```
`.qqq-ci.yml`:
```yaml
profile: qbit
orb_version: "0.7.0"
default_branch: develop
java_version: "21"
browsers: false
api_checks: false
docs_only: false
publish:
snapshot: true
release_candidate: true
release: true
asciidoc: false
```
Only `profile`, `orb_version` and `default_branch` are required. `default_branch`
must be `develop` or `main`; Java must be the string `17` or `21`. Browsers default
to **true** for compatibility: opt out only after verifying that the consumer has
no browser tests. API checks and docs-only default to false. Publication defaults
to true for snapshots, RCs and tagged releases; AsciiDoc publication defaults to
false. Unknown/duplicate keys, unexpected types, unsupported profiles and a setup
parameter/manifest version mismatch fail before continuation. The canonical-caller
validator also verifies the setup import, filters and profile-specific parameter
declarations; additional jobs, commands, workflows or orbs fail validation. The
parser is pinned to PyYAML 6.0.3 and uses its safe loader.
| Event | Workflow | Job contract |
| --- | --- | --- |
| develop | verify | existing mvn_publish, snapshot |
| release/* | verify | existing mvn_publish, release_candidate |
| vX.Y.Z tag resolving to the checkout | verify | existing mvn_publish, release |
| main, feature/*, hotfix/*, other/unknown branch | verify | existing mvn_test_only |
| Disabled publication or unrecognized/unproven tag | verify | full verification, no publication |
Generated `qbit`, `core`, `frontend-core`, and `frontend-material` pipelines use
the stable workflow name `verify`. All selected jobs, dependencies and filters
remain intact; this adds no executor or duplicate build. Other profiles retain
their existing workflow names and native checks.
When upgrading from legacy workflow names, upgrade the immutable RC worker pin
alongside the orb so finalization recognizes both names. Confirm the CircleCI
app's successful `verify` check on the exact migration commit before replacing
legacy required contexts. Require `setup` and `verify` on managed branches,
preserving other required checks and controls. Human approval is not required;
automated checks authorize the migration.
The pipeline SHA must match the checkout when Circle supplies it. A tagged release
must resolve to that checkout; missing local tags are fetched individually. A main
push does **not** publish a release. Migrating a legacy main-publishing consumer
therefore requires explicit review of its release contract. Existing direct orb
callers remain supported.
The setup filter and generated jobs exclude `automation/qbit-rc-pending`, the
shared RC orchestrator's persistent release lock. Lock updates must not trigger
Maven test or publication work.
The shared jobs keep the `qqq-maven-registry-credentials` context, complete verify,
coverage and configured API checks. Publishing retains version management, signed
artifact deployment, Git operations and release handling. Generated calls disable
the redundant preliminary compile; they do not skip tests or verification. Existing
callers retain the compatibility defaults in the jobs.
## Core profile
QBit alone accepts `release_completion: true` (default false). It enables the
shared Maven RC job's `notify_rc_published` only for RC publication, including
fail-closed verification that the bumped version was pushed before dispatching
the completion event. Enable this on a consumer only after its default branch
contains the shared completion caller. Snapshot and GA jobs never receive this
opt-in; other profiles reject the key.
Use `profile: core` for the QQQ framework. The orb owns the complete baseline
acceptance, broker conformance, cold bootstrap, coverage, diagnostics, static
analysis and publication graph. Core scripts remain in the core source repository.
The independent baseline fixture pins job sets, dependency edges, contexts,
coverage requirements and actual verification commands across all six workflows.
Core additionally supports `publish.feature` and `publish.hotfix` (both true by
default), preserving `publish*` tag and hotfix branch publication. QBit supports
both keys as explicit opt-ins (false by default). QBit feature publishing requires
a `publish*` tag resolving to the checked-out commit; feature branch pushes remain
test-only. Snapshot, RC and GA behavior remains distinct; RC/GA/hotfix
publication still requires the complete source coverage gate. Cold bootstrap and
fresh consumer Maven repositories remain uncached. Shared installer policy replaces
local package preparation; preliminary compilation is disabled before clean
lifecycles and the dependency cache is saved after successful verification.
Lambda XML copies remain in sample coverage evidence. The sample JUnit collector
excludes those two copied reports because their original module directories are
already uploaded, avoiding duplicate test identities without dropping evidence.
External core API triggers require these declarations in the tiny **setup** config:
```yaml
parameters:
mongo_bind_diagnostics:
type: boolean
default: false
next_acceptance_bundle_url:
type: string
default: ""
next_acceptance_bundle_sha256:
type: string
default: ""
next_acceptance_receipt_sha256:
type: string
default: ""
```
Forward each value on `qqq-orb/generate_pipeline`, for example
`mongo_bind_diagnostics: << pipeline.parameters.mongo_bind_diagnostics >>`, and
likewise for the three bundle parameters. Requested values become defaults in the
continued configuration; the continuation POST deliberately omits `parameters` to
avoid CircleCI's setup/continuation/API parameter conflict. Verify both default and
explicit API-triggered parameter values in the hosted canary before migrating
triggering consumers. Other profiles reject non-default core parameters.
## Frontend profiles
`frontend-material` preserves the Maven frontend build/test/package/publication
jobs, Java21/Node20 defaults, registry context, feature-tag, RC, GA and hotfix
contracts. Declare setup pipeline parameter `run_playwright` (boolean, default
false) and forward `run_playwright: << pipeline.parameters.run_playwright >>` on
the generator job. Test/snapshot events select exactly one base or Playwright graph,
so enabling visual tests cannot publish twice. Visual testing retains the pinned
Playwright image, npm ci with legacy peer dependencies and report uploads; only
npm downloads (`~/.npm`) are cached, never node_modules.
`frontend-core` preserves Node24.21, npm trusted publishing and both existing
registry/build-sample contexts. Unlike QBit, its existing main-push **and v-tag**
release contract remains intentional. Both frontend profiles support explicit
numeric-string `node_version` and publication toggles including feature/hotfix.
Material also supports `java_version`. Browser/API/AsciiDoc flags are rejected
rather than silently ignored on these profiles. Existing direct jobs remain usable.
## CLI profile
`cli` owns npm install, generated-client drift, build, unit tests and the real
Prism smoke contract through `cli_verify_publish`. Publication is **disabled by
default**. To enable the existing v-tag publication, declare `publish.release:
true` plus `publish_context: VERIFIED_CONTEXT_NAME`, after verifying that an
existing trusted CircleCI context grants the required GitHub Packages permission.
No context name or credential availability is inferred from the former Actions
GITHUB_TOKEN. A tag must resolve to the current checkout; the job additionally
checks the client version before publishing its three fixed workspaces with the
existing rc dist-tag. Main pushes never publish. CLI docs-only is currently
rejected because generated-client verification remains mandatory.
## Conservative documentation routing
With `docs_only: true`, only feature/hotfix and main changes can take the light
route. Feature/hotfix branches fetch the declared default branch without tags and
compare its merge base with HEAD, covering the whole branch. Main compares its first
parent. Develop, release branches and all tags remain full. Shallow repositories,
missing ancestry, fetch/diff errors, empty diffs and unknown paths remain full.
Only root README.md, CHANGELOG.md, CONTRIBUTING.md and Markdown files below docs/
are eligible. Renames are treated as deletion plus addition, so moving code into
docs cannot hide it. The lightweight job checks whitespace over the proven diff;
manifest validation already ran in setup. It adds no new security scanner and
makes no security-scanning claim. Keep docs-only disabled if those paths are build
inputs or packaged application content.
The light route keeps workflow `verify` and names its job
`qqq-orb/mvn_test_only`. Verify actual CircleCI/GitHub status contexts on the canary
before changing any protection rule; workflow/job identity alone is not proof of
the hosted context name. Current protections must not be removed speculatively.
## Implementation and verification
The setup job checks out source, installs the pinned parser, runs the embedded
Python resource and invokes CircleCI's native continuation API once. JSON output
is valid CircleCI configuration YAML; it is saved at
`/tmp/qqq-generated-config.json`. No external framework or per-consumer generator
installation is required. Readable templates live in src/scripts/templates. scripts/pack_pipeline.py embeds
them as base64 into packed_generate_pipeline.py before orb packing, preventing
CircleCI from interpolating template expressions during setup. The orb includes
the complete generated resource; no runtime source-tree template access is needed.
make pack regenerates it and CI rejects a stale generated resource.
Continuation credentials and response bodies are never printed.
Run `make test-pipelines` with CircleCI CLI, Python3/PyYAML and Bash available.
Tests use offline temporary Git repositories and a bare origin to cover selection,
whole-branch changes, tags, errors, defaults and source/packed parity. The hosted
pipeline-contract-test runs the source suite and shared Maven behavioral tests;
the full local target additionally extracts and executes the actual packed command.
## Android and MCP policy profiles
`android` and `mcp-policy` accept only profile, orb_version and default_branch.
Android retains the audited Android/GCP orb versions and every active unit,
emulator and Maven-publication step. The emulator now runs on main as well as
feature branches so main publication cannot omit its required instrumentation
gate. Dormant Firebase benchmark and release-build definitions referencing absent
app/macrobenchmark modules are not scheduled or copied into the profile.
MCP policy validation remains a small Python container validating all visible YAML
and required pattern fields. Its existing PyYAML dependency is pinned to 6.0.3.
Neither profile introduces Maven/JUnit stand-ins for its actual tests.
`tests/test_mobile_policy_profiles.py` protects Android steps and dependency edges
and executes the policy validator with valid, incomplete and malformed documents.
The generator suite verifies source/packed parity for both profiles.
# Standardized QQQ pipelines
The orb owns workflow selection and job configuration. A consumer declares a
small manifest; it does not copy pipeline jobs. The initial supported profile is
`qbit`; `core` owns the framework's complete acceptance/release graph. Frontend
and CLI profiles described below retain their own publication contracts. Additional
profiles belong in reviewed `PROFILE_TEMPLATES` renderers in
`src/scripts/generate_pipeline.py`, with profile-specific schema and tests. There
is no arbitrary script or job-YAML passthrough.
Use the same **published** orb version in all three positions below. `0.7.0` is
an illustrative version, not a claim that this change is published. A development
orb version can be used for a controlled canary.
`.circleci/config.yml`:
```yaml
version: 2.1
setup: true
orbs:
qqq-orb: kingsrook/qqq-orb@0.7.0
workflows:
setup:
jobs:
- qqq-orb/generate_pipeline:
orb_version: "0.7.0"
filters:
branches:
ignore: automation/qbit-rc-pending
tags:
only: /.*/
```
`.qqq-ci.yml`:
```yaml
profile: qbit
orb_version: "0.7.0"
default_branch: develop
java_version: "21"
browsers: false
api_checks: false
docs_only: false
publish:
snapshot: true
release_candidate: true
release: true
asciidoc: false
```
Only `profile`, `orb_version` and `default_branch` are required. `default_branch`
must be `develop` or `main`; Java must be the string `17` or `21`. Browsers default
to **true** for compatibility: opt out only after verifying that the consumer has
no browser tests. API checks and docs-only default to false. Publication defaults
to true for snapshots, RCs and tagged releases; AsciiDoc publication defaults to
false. Unknown/duplicate keys, unexpected types, unsupported profiles and a setup
parameter/manifest version mismatch fail before continuation. The canonical-caller
validator also verifies the setup import, filters and profile-specific parameter
declarations; additional jobs, commands, workflows or orbs fail validation. The
parser is pinned to PyYAML 6.0.3 and uses its safe loader.
| Event | Workflow | Job contract |
| --- | --- | --- |
| develop | verify | existing mvn_publish, snapshot |
| release/* | verify | existing mvn_publish, release_candidate |
| vX.Y.Z tag resolving to the checkout | verify | existing mvn_publish, release |
| main, feature/*, hotfix/*, other/unknown branch | verify | existing mvn_test_only |
| Disabled publication or unrecognized/unproven tag | verify | full verification, no publication |
Generated `qbit`, `core`, `frontend-core`, and `frontend-material` pipelines use
the stable workflow name `verify`. All selected jobs, dependencies and filters
remain intact; this adds no executor or duplicate build. Other profiles retain
their existing workflow names and native checks.
When upgrading from legacy workflow names, upgrade the immutable RC worker pin
alongside the orb so finalization recognizes both names. Confirm the CircleCI
app's successful `verify` check on the exact migration commit before replacing
legacy required contexts. Require `setup` and `verify` on managed branches,
preserving other required checks and controls. Human approval is not required;
automated checks authorize the migration.
The pipeline SHA must match the checkout when Circle supplies it. A tagged release
must resolve to that checkout; missing local tags are fetched individually. A main
push does **not** publish a release. Migrating a legacy main-publishing consumer
therefore requires explicit review of its release contract. Existing direct orb
callers remain supported.
The setup filter and generated jobs exclude `automation/qbit-rc-pending`, the
shared RC orchestrator's persistent release lock. Lock updates must not trigger
Maven test or publication work.
The shared jobs keep the `qqq-maven-registry-credentials` context, complete verify,
coverage and configured API checks. Publishing retains version management, signed
artifact deployment, Git operations and release handling. Generated calls disable
the redundant preliminary compile; they do not skip tests or verification. Existing
callers retain the compatibility defaults in the jobs.
## Core profile
QBit alone accepts `release_completion: true` (default false). It enables the
shared Maven RC job's `notify_rc_published` only for RC publication, including
fail-closed verification that the bumped version was pushed before dispatching
the completion event. Enable this on a consumer only after its default branch
contains the shared completion caller. Snapshot and GA jobs never receive this
opt-in; other profiles reject the key.
Use `profile: core` for the QQQ framework. The orb owns the complete baseline
acceptance, broker conformance, cold bootstrap, coverage, diagnostics, static
analysis and publication graph. Core scripts remain in the core source repository.
The independent baseline fixture pins job sets, dependency edges, contexts,
coverage requirements and actual verification commands across all six workflows.
Core additionally supports `publish.feature` and `publish.hotfix` (both true by
default), preserving `publish*` tag and hotfix branch publication. QBit supports
both keys as explicit opt-ins (false by default). QBit feature publishing requires
a `publish*` tag resolving to the checked-out commit; feature branch pushes remain
test-only. Snapshot, RC and GA behavior remains distinct; RC/GA/hotfix
publication still requires the complete source coverage gate. Cold bootstrap and
fresh consumer Maven repositories remain uncached. Shared installer policy replaces
local package preparation; preliminary compilation is disabled before clean
lifecycles and the dependency cache is saved after successful verification.
Lambda XML copies remain in sample coverage evidence. The sample JUnit collector
excludes those two copied reports because their original module directories are
already uploaded, avoiding duplicate test identities without dropping evidence.
External core API triggers require these declarations in the tiny **setup** config:
```yaml
parameters:
mongo_bind_diagnostics:
type: boolean
default: false
next_acceptance_bundle_url:
type: string
default: ""
next_acceptance_bundle_sha256:
type: string
default: ""
next_acceptance_receipt_sha256:
type: string
default: ""
```
Forward each value on `qqq-orb/generate_pipeline`, for example
`mongo_bind_diagnostics: << pipeline.parameters.mongo_bind_diagnostics >>`, and
likewise for the three bundle parameters. Requested values become defaults in the
continued configuration; the continuation POST deliberately omits `parameters` to
avoid CircleCI's setup/continuation/API parameter conflict. Verify both default and
explicit API-triggered parameter values in the hosted canary before migrating
triggering consumers. Other profiles reject non-default core parameters.
## Frontend profiles
`frontend-material` preserves the Maven frontend build/test/package/publication
jobs, Java21/Node20 defaults, registry context, feature-tag, RC, GA and hotfix
contracts. Declare setup pipeline parameter `run_playwright` (boolean, default
false) and forward `run_playwright: << pipeline.parameters.run_playwright >>` on
the generator job. Test/snapshot events select exactly one base or Playwright graph,
so enabling visual tests cannot publish twice. Visual testing retains the pinned
Playwright image, npm ci with legacy peer dependencies and report uploads; only
npm downloads (`~/.npm`) are cached, never node_modules.
`frontend-core` preserves Node24.21, npm trusted publishing and both existing
registry/build-sample contexts. Unlike QBit, its existing main-push **and v-tag**
release contract remains intentional. Both frontend profiles support explicit
numeric-string `node_version` and publication toggles including feature/hotfix.
Material also supports `java_version`. Browser/API/AsciiDoc flags are rejected
rather than silently ignored on these profiles. Existing direct jobs remain usable.
## CLI profile
`cli` owns npm install, generated-client and operations drift, build, unit tests,
lint and the real Prism smoke contract through `cli_verify_publish`. Publication is **disabled by
default**. To enable the existing v-tag publication, declare `publish.release:
true` plus `publish_context: VERIFIED_CONTEXT_NAME`, after verifying that an
existing trusted CircleCI context grants the required GitHub Packages permission.
No context name or credential availability is inferred from the former Actions
GITHUB_TOKEN. A tag must resolve to the current checkout; the job additionally
checks the client version, and that core shares the CLI version and matches the
CLI's exact core dependency, before publishing its four fixed workspaces (client,
core, conformance, CLI) under one dist-tag: `rc` if any of the four versions has
a prerelease part, otherwise `latest`. Main pushes never publish.
CLI docs-only is currently rejected because generated-client verification remains
mandatory.
Optional platform lanes are **off by default**. `platforms: [macos-arm64,
windows-x64]` (either or both) adds one `cli_platform` job per entry (`npm ci`,
build, tests and lint on Node 20 via the image's nvm), named `cli-macos-arm64` /
`cli-windows-x64`. On a publishing tag `cli_verify_publish` requires them. The
lanes use the `m4pro.medium` macOS and `windows.medium` resource classes, which
the CircleCI plan must include.
## Conservative documentation routing
With `docs_only: true`, only feature/hotfix and main changes can take the light
route. Feature/hotfix branches fetch the declared default branch without tags and
compare its merge base with HEAD, covering the whole branch. Main compares its first
parent. Develop, release branches and all tags remain full. Shallow repositories,
missing ancestry, fetch/diff errors, empty diffs and unknown paths remain full.
Only root README.md, CHANGELOG.md, CONTRIBUTING.md and Markdown files below docs/
are eligible. Renames are treated as deletion plus addition, so moving code into
docs cannot hide it. The lightweight job checks whitespace over the proven diff;
manifest validation already ran in setup. It adds no new security scanner and
makes no security-scanning claim. Keep docs-only disabled if those paths are build
inputs or packaged application content.
The light route keeps workflow `verify` and names its job
`qqq-orb/mvn_test_only`. Verify actual CircleCI/GitHub status contexts on the canary
before changing any protection rule; workflow/job identity alone is not proof of
the hosted context name. Current protections must not be removed speculatively.
## Implementation and verification
The setup job checks out source, installs the pinned parser, runs the embedded
Python resource and invokes CircleCI's native continuation API once. JSON output
is valid CircleCI configuration YAML; it is saved at
`/tmp/qqq-generated-config.json`. No external framework or per-consumer generator
installation is required. Readable templates live in src/scripts/templates. scripts/pack_pipeline.py embeds
them as base64 into packed_generate_pipeline.py before orb packing, preventing
CircleCI from interpolating template expressions during setup. The orb includes
the complete generated resource; no runtime source-tree template access is needed.
make pack regenerates it and CI rejects a stale generated resource.
Continuation credentials and response bodies are never printed.
Run `make test-pipelines` with CircleCI CLI, Python3/PyYAML and Bash available.
Tests use offline temporary Git repositories and a bare origin to cover selection,
whole-branch changes, tags, errors, defaults and source/packed parity. The hosted
pipeline-contract-test runs the source suite and shared Maven behavioral tests;
the full local target additionally extracts and executes the actual packed command.
## Node snapshot versions
The shared Node publisher calculates develop snapshots as
`MAJOR.MINOR.NEXT_PATCH-SNAPSHOT.CIRCLE_BUILD_NUM`. A positive CircleCI job number
is required, so independent publication jobs receive distinct npm coordinates.
The package version is changed only in the build workspace and published under
the `snapshot` dist-tag. No snapshot version commit is pushed: the branch remains
at the source revision whose required checks ran, avoiding unchecked `[skip ci]`
heads and recursive publication. Stable, RC and hotfix version policies are unchanged.
## Android and MCP policy profiles
`android` and `mcp-policy` accept only profile, orb_version and default_branch.
Android retains the audited Android/GCP orb versions and every active unit,
emulator and Maven-publication step. The emulator now runs on main as well as
feature branches so main publication cannot omit its required instrumentation
gate. Dormant Firebase benchmark and release-build definitions referencing absent
app/macrobenchmark modules are not scheduled or copied into the profile.
MCP policy validation remains a small Python container validating all visible YAML
and required pattern fields. Its existing PyYAML dependency is pinned to 6.0.3.
Neither profile introduces Maven/JUnit stand-ins for its actual tests.
`tests/test_mobile_policy_profiles.py` protects Android steps and dependency edges
and executes the policy validator with valid, incomplete and malformed documents.
The generator suite verifies source/packed parity for both profiles.
+49 -10
View File
@@ -1,14 +1,14 @@
# GitOps validation
The orb owns `.github/workflows/gitops.yml`. The consumer keeps only the immutable caller generated by `generate_auxiliary_workflow.py gitops --ref <orb-commit>` at `.github/workflows/validate.yml`.
One native job downloads Kustomize 5.7.1 with its pinned official SHA-256 and renders every Kustomization, including bases, overlays and proxy declarations. Missing configurations or a failed render fail the job. Rendered resources are discarded rather than logged or uploaded because they may contain Secrets. This checks rendering, not Kubernetes schema compatibility or cluster health. No cluster access or publication credentials are required.
The caller runs on main pushes and pull requests without path filters, so a required check always reports. Superseded PR runs are canceled. Feature pushes do not create duplicate jobs. Remove the old Circle pipeline only after the native job passes on the consumer, then disable obsolete Circle build requests and require the observed native check with no human review.
For marketing-website-cd, the prior Circle job only printed Hello World. Its former production role moved to KofTwentyTwo/cluster-gitops; validation does not re-enable that retired deployment path.
# GitOps validation
The shared registry includes marketing-website-cd and voyage-cd. Daily enrollment recognizes their canonical main-branch caller without creating Circle configuration. Recognition requires a signed immutable worker pin matching the supported worker, a complete source tree, and no additional Circle or GitHub workflows. Enforcement requires the GitHub Actions app-bound gitops / validate gate and preserves existing branch rules. Unavailable private-repository protections remain an explicit enforcement failure; recognition alone is not enforcement.
The orb owns `.github/workflows/gitops.yml`. The consumer keeps only the immutable caller generated by `generate_auxiliary_workflow.py gitops --ref <orb-commit>` at `.github/workflows/validate.yml`.
One native job downloads Kustomize 5.7.1 with its pinned official SHA-256 and renders every Kustomization, including bases, overlays and proxy declarations. Missing configurations or a failed render fail the job. Rendered resources are discarded rather than logged or uploaded because they may contain Secrets. This checks rendering, not Kubernetes schema compatibility or cluster health. No cluster access or publication credentials are required.
The caller runs on main pushes and pull requests without path filters, so a required check always reports. Superseded PR runs are canceled. Feature pushes do not create duplicate jobs. Remove the old Circle pipeline only after the native job passes on the consumer, then disable obsolete Circle build requests and require the observed native check with no human review.
For marketing-website-cd, the prior Circle job only printed Hello World. Its former production role moved to KofTwentyTwo/cluster-gitops; validation does not re-enable that retired deployment path.
The shared registry includes marketing-website-cd and voyage-cd. Daily enrollment recognizes their canonical main-branch caller without creating Circle configuration. Recognition requires a signed immutable worker pin matching the supported worker, a complete source tree, and no additional Circle or GitHub workflows. Enforcement requires the GitHub Actions app-bound gitops / validate gate and preserves existing branch rules. Unavailable private-repository protections remain an explicit enforcement failure; recognition alone is not enforcement.
### Documentation repositories with shell automation
@@ -29,3 +29,42 @@ One small job in a digest-pinned Homebrew container validates the exact checkout
reads all OS/architecture variants, fetches their binaries with checksum verification,
then installs and tests the Linux formula. It does not publish or update formulae.
macOS downloads are verified, but this Linux job does not execute macOS binaries.
### Application template acceptance
The `application-template` profile renders the checked-out template through pinned
qctl code and a checksum-verified catalog. It runs transforms but never post-generation
hooks, then performs Maven verify on the generated application with all its tests.
The renderer and Maven dependencies are cached; test reports and the generated JAR
are retained. This is acceptance of a generated consumer, not Maven publication.
Only the standard profile, orb version, and default branch are consumer settings.
The coordinator also recognizes qctl on main/develop and the approved .github,
business-platform, MCP-RAG and IntelliJ callers on main. It verifies each complete
workflow inventory, canonical caller, signed immutable orb pin and matching shared
worker source before recognizing the repository. Native verification gates bind to
the GitHub Actions app; release-only jobs are not merge requirements. No CircleCI
caller is added to these native consumers. qctl requires its shared tests; the native binary job is push-only, and
full platform release builds retain their existing shared-worker policy.
Existing classic branch protections without a required-status-check section gain
an additive shared ruleset. Signing, reviews, history and access restrictions remain
unchanged, and a subsequent reconciliation verifies the effective ruleset.
The same daily pass manages CircleCI's native `autocancel-builds` setting for
canonical `repository-policy`, `homebrew-tap`, `application-template`, and
`marketing` consumers. Marketing must retain `main` as its default branch;
environment deployment remains main-only. CircleCI excludes default-branch,
scheduled and rerun workflows from automatic cancellation. This avoids a custom
cancellation job and does not add executions to consumer pipelines.
The pass uses the existing orb-publishing context on the trusted orb main branch.
It changes only the cancellation flag, checks for source movement before writing,
and verifies preservation of all other flags. Its separate
`result.circle-settings.json` artifact records missing credentials/API access,
unconverted sources and profiles needing cancellation-policy review explicitly.
Publication-heavy profiles are not changed until their non-default release
semantics are reviewed; a successful reconciliation pass does not certify them.
Because cancellation is project-wide, eligibility requires every discovered current main/develop branch to be canonical and use a reviewed profile. An unresolved branch or an unreviewed publishing profile prevents enabling the flag, regardless of branch order. The report lists all observed profiles.
+1 -1
View File
@@ -12,7 +12,7 @@ text = source.read_text(encoding="utf-8")
start = text.index("# BEGIN PROFILE RESOURCES")
end = text.index("# END PROFILE RESOURCES") + len("# END PROFILE RESOURCES")
embedded = ["# Generated by scripts/pack_pipeline.py; edit source/resources, then regenerate.", "import base64", "import zlib"]
for variable, name in (("CORE_TEMPLATE", "core"), ("MATERIAL_TEMPLATE", "frontend-material"), ("VOYAGE_TEMPLATE", "voyage"), ("NEXT_TEMPLATE", "frontend-next"), ("ALL_TEMPLATE", "all"), ("STARTER_TEMPLATE", "app-starter"), ("ANDROID_TEMPLATE", "android"), ("POLICY_TEMPLATE", "mcp-policy"), ("REPOSITORY_POLICY_TEMPLATE", "repository-policy"), ("MARKETING_TEMPLATE", "marketing"), ("HOMEBREW_TEMPLATE", "homebrew-tap")):
for variable, name in (("CORE_TEMPLATE", "core"), ("MATERIAL_TEMPLATE", "frontend-material"), ("VOYAGE_TEMPLATE", "voyage"), ("NEXT_TEMPLATE", "frontend-next"), ("ALL_TEMPLATE", "all"), ("STARTER_TEMPLATE", "app-starter"), ("ANDROID_TEMPLATE", "android"), ("POLICY_TEMPLATE", "mcp-policy"), ("REPOSITORY_POLICY_TEMPLATE", "repository-policy"), ("MARKETING_TEMPLATE", "marketing"), ("HOMEBREW_TEMPLATE", "homebrew-tap"), ("APPLICATION_TEMPLATE", "application-template")):
resource = (source.parent / "templates" / (name + ".json")).read_text(encoding="utf-8").encode("utf-8")
payload = base64.b64encode(zlib.compress(resource, level=9)).decode("ascii")
embedded.append(f'{variable} = json.loads(zlib.decompress(base64.b64decode("{payload}")))')
+8
View File
@@ -5,6 +5,12 @@ description: >
- Deploys signed artifacts and waits for confirmed Central release publication
- Saves Maven cache for future builds
parameters:
skip_verified_analysis:
type: boolean
default: false
description: "Skip repeated SpotBugs and PMD only after this job has completed mvn_verify"
steps:
- run:
name: Setup Maven Settings
@@ -17,6 +23,8 @@ steps:
# Central's native publication wait can be silent for its 30-minute limit.
# Let Maven return its real result before CircleCI's inactivity watchdog.
no_output_timeout: 35m
environment:
QQQ_SKIP_VERIFIED_ANALYSIS: << parameters.skip_verified_analysis >>
command: <<include(scripts/mvn_jar_deploy.sh)>>
- save_cache:
paths:
+1 -1
View File
@@ -3,7 +3,7 @@ description: >
- Adds SSH keys for Git operations
- Sets up Git identity for version commits
- Synchronizes NPM version
- Commits version changes if modified (skipped for feature branches)
- Commits version changes if modified (skipped for feature and snapshot builds)
parameters:
branch_type:
+6
View File
@@ -0,0 +1,6 @@
description: >
macOS arm64 executor for the opt-in CLI platform lane.
Requires the CircleCI plan to include the m4pro.medium resource class.
macos:
xcode: 16.4.0
resource_class: m4pro.medium
+7
View File
@@ -0,0 +1,7 @@
description: >
Windows x64 executor for the opt-in CLI platform lane. Steps run in Git Bash.
Requires the CircleCI plan to include the windows.medium resource class.
machine:
image: windows-server-2022-gui:current
resource_class: windows.medium
shell: bash.exe
+25
View File
@@ -0,0 +1,25 @@
description: >
Opt-in CLI platform lane: install, build, unit tests and lint on a non-Linux
executor. Rendered by the cli profile only for manifest platforms entries.
executor: << parameters.executor >>
parameters:
executor:
type: executor
description: "qqq-orb/cli_macos_arm64 or qqq-orb/cli_windows_x64"
node_version:
type: string
default: "20.20.2"
description: "Exact Node.js version installed with the image's nvm (the packages' engines floor)"
steps:
- checkout
- run:
name: Install Node.js << parameters.node_version >>
environment:
PARAM_NODE_VERSION: << parameters.node_version >>
command: <<include(scripts/cli_platform_node.sh)>>
- run:
name: Install locked CLI dependencies
command: npm ci
- run:
name: Build, tests and lint
command: npm run build && npm test && npm run lint
+3 -3
View File
@@ -1,13 +1,13 @@
description: >
Authoritative QQQ CLI validation, with optional tagged GitHub Packages publication.
Preserves generated-schema drift, build, tests and Prism smoke before publishing.
Preserves generated-schema drift, build, tests, lint and Prism smoke before publishing.
docker:
- image: cimg/node:22.12
- image: cimg/node:22.23
parameters:
publish:
type: boolean
default: false
description: "Publish three workspaces with rc dist-tag; requires matching version tag and GITHUB_TOKEN"
description: "Publish four workspaces (dist-tag rc for prereleases, latest for final versions); requires matching version tag and GITHUB_TOKEN"
steps:
- checkout
- restore_cache:
+2 -1
View File
@@ -57,7 +57,8 @@ steps:
steps:
- check_middleware_api_versions
- mvn_jar_deploy
- mvn_jar_deploy:
skip_verified_analysis: true
- when:
condition:
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
# nvm is a shell function on macOS and not nounset-safe, so no -u here.
set -eo pipefail
# Install the exact Node.js version with the image's nvm (macOS login shell, nvm-windows in Git Bash).
nvm install "$PARAM_NODE_VERSION"
if [[ "$OSTYPE" == darwin* ]]; then
# Later steps start new login shells: make the version their default.
nvm alias default "$PARAM_NODE_VERSION"
else
# nvm-windows switches the global symlink, which later steps inherit.
nvm use "$PARAM_NODE_VERSION"
fi
node --version
npm --version
+18 -4
View File
@@ -2,10 +2,12 @@
set -euo pipefail
# Validate tag and fixed package destinations before asking for credentials.
node --input-type=commonjs - <<'NODE'
# Prints the npm dist-tag shared by all four packages.
dist_tag=$(node --input-type=commonjs - <<'NODE'
const fs = require('node:fs');
const packages = [
['packages/ui-api-client/package.json', '@qrun-io/qqq-ui-api-client'],
['packages/core/package.json', '@qrun-io/qqq-core'],
['packages/conformance/package.json', '@qrun-io/qqq-ui-api-conformance'],
['packages/cli/package.json', '@qrun-io/qqq-cli'],
];
@@ -19,7 +21,18 @@ const client = JSON.parse(fs.readFileSync(packages[0][0], 'utf8'));
if (!process.env.CIRCLE_TAG || process.env.CIRCLE_TAG !== 'v' + client.version) {
throw new Error('Version tag must match the client package version');
}
// The CLI pins core exactly and shares its version: publish only that pair.
const core = JSON.parse(fs.readFileSync(packages[1][0], 'utf8'));
const cli = JSON.parse(fs.readFileSync(packages[3][0], 'utf8'));
if (core.version !== cli.version || cli.dependencies?.['@qrun-io/qqq-core'] !== core.version) {
throw new Error('Core package version must match the CLI version and its exact core dependency');
}
// Final releases become latest; any prerelease part (e.g. -rc.1, -beta.2) in
// any of the four keeps every package on rc, so latest never points at an rc.
const versions = packages.map(([path]) => JSON.parse(fs.readFileSync(path, 'utf8')).version);
console.log(versions.some((version) => version.includes('-')) ? 'rc' : 'latest');
NODE
)
: "${GITHUB_TOKEN:?GitHub Packages write credential GITHUB_TOKEN is required}"
export NODE_AUTH_TOKEN="$GITHUB_TOKEN"
# Store only an environment substitution, never the token itself.
@@ -35,6 +48,7 @@ export NPM_CONFIG_USERCONFIG="$npm_config"
# Authentication alone is not proof of package write permission; hosted publish
# migration remains gated on verifying the actual context's package access.
npm whoami --registry https://npm.pkg.github.com >/dev/null
npm publish -w @qrun-io/qqq-ui-api-client --registry https://npm.pkg.github.com --tag rc
npm publish -w @qrun-io/qqq-ui-api-conformance --registry https://npm.pkg.github.com --tag rc
npm publish -w @qrun-io/qqq-cli --registry https://npm.pkg.github.com --tag rc
npm publish -w @qrun-io/qqq-ui-api-client --registry https://npm.pkg.github.com --tag "$dist_tag"
npm publish -w @qrun-io/qqq-core --registry https://npm.pkg.github.com --tag "$dist_tag"
npm publish -w @qrun-io/qqq-ui-api-conformance --registry https://npm.pkg.github.com --tag "$dist_tag"
npm publish -w @qrun-io/qqq-cli --registry https://npm.pkg.github.com --tag "$dist_tag"
+2 -1
View File
@@ -2,9 +2,10 @@
set -euo pipefail
npm run generate
git diff --exit-code -- packages/ui-api-client/src/schema.ts
git diff --exit-code -- packages/ui-api-client/src/schema.ts packages/core/src/api/operations.ts
npm run build
npm test
npm run lint
# Use the locked local executable; never download an unpinned npx fallback.
./node_modules/.bin/prism mock --port 4010 packages/ui-api-client/openapi/qqq-v1.json > prism.log 2>&1 &
+27 -7
View File
@@ -26,6 +26,7 @@ POLICY_TEMPLATE = json.loads((_TEMPLATE_DIR / "mcp-policy.json").read_text(encod
REPOSITORY_POLICY_TEMPLATE = json.loads((_TEMPLATE_DIR / "repository-policy.json").read_text(encoding="utf-8"))
MARKETING_TEMPLATE = json.loads((_TEMPLATE_DIR / "marketing.json").read_text(encoding="utf-8"))
HOMEBREW_TEMPLATE = json.loads((_TEMPLATE_DIR / "homebrew-tap.json").read_text(encoding="utf-8"))
APPLICATION_TEMPLATE = json.loads((_TEMPLATE_DIR / "application-template.json").read_text(encoding="utf-8"))
# END PROFILE RESOURCES
@@ -63,6 +64,10 @@ def boolean(data, key, default):
return value
# Opt-in CLI platform lanes: manifest entry -> orb executor.
CLI_PLATFORMS = {"macos-arm64": "qqq-orb/cli_macos_arm64", "windows-x64": "qqq-orb/cli_windows_x64"}
def load_manifest(path, setup_version):
raw = Path(path).read_text(encoding="utf-8")
if len(raw) > 65536:
@@ -71,7 +76,7 @@ def load_manifest(path, setup_version):
if not isinstance(data, dict):
raise ManifestError("Manifest must be a mapping")
profile = data.get("profile")
if profile not in ("qbit", "core", "frontend-material", "frontend-core", "cli", "voyage", "frontend-next", "all", "app-starter", "android", "mcp-policy", "repository-policy", "marketing", "node-artifact", "homebrew-tap"):
if profile not in ("qbit", "core", "frontend-material", "frontend-core", "cli", "voyage", "frontend-next", "all", "app-starter", "android", "mcp-policy", "repository-policy", "marketing", "node-artifact", "homebrew-tap", "application-template"):
raise ManifestError("Unsupported profile")
allowed = ("profile", "orb_version", "default_branch", "docs_only", "publish")
if profile == "homebrew-tap":
@@ -83,8 +88,8 @@ def load_manifest(path, setup_version):
if profile == "qbit":
allowed += ("release_completion", "release_on_main", "release_tag_policy", "test_branch_policy")
elif profile == "cli":
allowed += ("publish_context",)
elif profile in ("voyage", "frontend-next", "app-starter", "android", "mcp-policy", "repository-policy", "marketing"):
allowed += ("publish_context", "platforms")
elif profile in ("voyage", "frontend-next", "app-starter", "android", "mcp-policy", "repository-policy", "marketing", "application-template"):
allowed = ("profile", "orb_version", "default_branch")
elif profile == "all":
allowed = ("profile", "orb_version", "default_branch", "publish", "publish_context")
@@ -158,6 +163,9 @@ def load_manifest(path, setup_version):
raise ManifestError("CLI publication requires an explicitly verified context")
if profile == "cli" and boolean(data, "docs_only", False):
raise ManifestError("CLI currently requires full generated-client verification")
platforms = data.get("platforms", [])
if not isinstance(platforms, list) or any(not isinstance(x, str) or x not in CLI_PLATFORMS for x in platforms) or len(platforms) != len(set(platforms)):
raise ManifestError("platforms must be distinct entries of " + ", ".join(CLI_PLATFORMS))
tag_policy = data.get("release_tag_policy", "stable")
if tag_policy not in ("stable", "v-prefix", "none"):
raise ManifestError("Unsupported QBit release tag policy")
@@ -173,8 +181,8 @@ def load_manifest(path, setup_version):
"release_on_main": boolean(data, "release_on_main", False),
"release_tag_policy": tag_policy, "test_branch_policy": test_policy,
"docs_only": boolean(data, "docs_only", False),
"publish_context": publish_context,
"publish": {key: boolean(publishing, key, key != "asciidoc" and profile not in ("cli", "all", "repository-policy")
"publish_context": publish_context, "platforms": platforms,
"publish": {key: boolean(publishing, key, key != "asciidoc" and profile not in ("cli", "all", "repository-policy", "application-template")
and not (profile == "qbit" and key in ("hotfix", "feature")))
for key in publish_keys}}
@@ -435,9 +443,16 @@ def cli_template(config, branch, tag):
options = {"publish": publish, "filters": filters}
if publish:
options["context"] = [config["publish_context"]]
platforms = config.get("platforms", [])
jobs = [{"qqq-orb/cli_platform": {"name": "cli-" + p, "executor": CLI_PLATFORMS[p], "filters": copy.deepcopy(filters)}}
for p in platforms]
if publish and platforms:
# Every opted-in platform must pass before packages are published.
options["requires"] = ["cli-" + p for p in platforms]
jobs.append({"qqq-orb/cli_verify_publish": options})
# CLI docs are still verified until its generated-client inputs get a dedicated policy.
return {"version": 2.1, "orbs": {"qqq-orb": "kingsrook/qqq-orb@" + config["orb_version"]},
"workflows": {"publish_release" if publish else "test_only": {"jobs": [{"qqq-orb/cli_verify_publish": options}]}}}
"workflows": {"publish_release" if publish else "test_only": {"jobs": jobs}}}
def marketing_template(config, branch, tag):
@@ -516,7 +531,12 @@ def homebrew_template(config, branch, tag):
return result
PROFILE_TEMPLATES = {"homebrew-tap": homebrew_template, "qbit": qbit_template, "core": core_template,
def application_template(config, branch, tag):
del config, branch, tag
return copy.deepcopy(APPLICATION_TEMPLATE)
PROFILE_TEMPLATES = {"application-template": application_template, "homebrew-tap": homebrew_template, "qbit": qbit_template, "core": core_template,
"repository-policy": repository_policy_template,
"frontend-material": frontend_template, "frontend-core": frontend_template,
"cli": cli_template, "voyage": voyage_template, "frontend-next": next_template, "all": all_template, "app-starter": starter_template, "android": android_template, "mcp-policy": policy_template, "marketing": marketing_template}
+8
View File
@@ -22,6 +22,13 @@
set -e
# The shared publish job already ran these checks in its verify lifecycle.
# Standalone command callers retain analysis unless explicitly opted in.
analysis_args=()
if [[ "${QQQ_SKIP_VERIFIED_ANALYSIS:-false}" == "true" || "${QQQ_SKIP_VERIFIED_ANALYSIS:-false}" == "1" ]]; then
analysis_args=(-Dspotbugs.skip=true -Dpmd.skip=true)
fi
##############################################
## Deploy signed artifacts to Maven Central ##
##############################################
@@ -30,6 +37,7 @@ set -e
# Central 0.8.x: this completion flag overrides inherited literal waitUntil=uploaded.
# Do not report a release as successful until Central confirms publication.
mvn -s /tmp/circleci/mvn-settings.xml -P release -B -DskipTests \
"${analysis_args[@]}" \
-Dgpg.keyname="$GPG_KEYNAME" -Dgpg.passphrase="$GPG_PASSPHRASE" \
-DwaitForPublishCompletion=true \
-Dflatten.mode=resolveCiFriendliesOnly -DupdatePomFile=true \
+1 -1
View File
@@ -64,7 +64,7 @@ echo "Publishing version: $VERSION"
if [[ "$VERSION" =~ -RC\.[0-9]+$ ]]; then
NPM_TAG="rc"
echo "Detected RC version - using tag: $NPM_TAG"
elif [[ "$VERSION" =~ -SNAPSHOT$ ]]; then
elif [[ "$VERSION" =~ -SNAPSHOT(\.[1-9][0-9]*)?$ ]]; then
NPM_TAG="snapshot"
echo "Detected SNAPSHOT version - using tag: $NPM_TAG"
elif [[ "$VERSION" =~ -(alpha|beta) ]]; then
+5 -5
View File
@@ -9,7 +9,7 @@
## It also pushes the changes back to the current branch.
##
## Process:
## 1. Skips for feature branches (ephemeral versions)
## 1. Skips for feature and snapshot builds (ephemeral versions)
## 2. Checks if package.json has been modified
## 3. Extracts the new version from package.json
## 4. Commits the changes with skip ci flag
@@ -22,12 +22,12 @@
set -e
################################################################
## Skip version commit for feature branches ##
## Feature versions are ephemeral and don't need to be ##
## Skip version commit for feature and snapshot builds ##
## These versions are ephemeral and don't need to be ##
## persisted back to the repository ##
################################################################
if [[ "$BRANCH_TYPE" == "feature" ]]; then
echo "Skipping version commit for feature branch (ephemeral versions)"
if [[ "$BRANCH_TYPE" == "feature" || "$BRANCH_TYPE" == "snapshot" ]]; then
echo "Skipping version commit for $BRANCH_TYPE build (ephemeral version)"
exit 0
fi
+29 -9
View File
@@ -16,9 +16,9 @@ import yaml
# Generated by scripts/pack_pipeline.py; edit source/resources, then regenerate.
import base64
import zlib
CORE_TEMPLATE = json.loads(zlib.decompress(base64.b64decode("eNrtPWt3m0iy3+dX9NVk13ZWgN+PJJ5zE9tz4908HWd39kS5Oi1oJMYIMI3s6CTe375V3Q1CCBDIsvyIM19k6K6urndVVzPffyGkccFC7vhe4xlZ19ea+CSgIe2zCJ7Dw+/wBJ71fa/rtzuOZ7Uth3Y9n0eOOXoPI6JhwODvRsf3XUa9RjN+YTGbDtwI3tnU5Uw8vpJvGx77FrWpabIgop7J2p2BZ7msPQjdPNA8Ch2vmwe50agClvfo+tb2XCGHzGROEF0L9C8KfMMPOymSn5+fa/AEB54BBB76/pmhHv7vqr6t7zWSmabf71PPSs3mEQ0jTbBNQ7ZpUUhNlkaQRyzACV/UAwTTY+aZP4gSbEkyXLwPB14KgnrogbAgkh9CBpLDiH/pMYu8xZUJ980zFpG0yDTHZyvMEYBjEz6wfEKDSOvCrEFg0YgR7fyc/PWv468cD/bnukQbitdcbA5GtTyAqUAS7YJ4nHkgyITzBEQyFQb0yc7WFjGifiAIm6JWCuMYrJitVtIYET/2cTDR/GkwjCBktut0e5Hu+l2YO2DPSdRjHkIOQEAimyyxb4EfRuTjx4/tt+/f/d/79unJy4Oj9snnd/t/OW+1vCXSajw5OD45eHPU/tf7k3/8/ub9v9p/f/+qfXzYapDffsPXr15+et0+evfPVqPlMdA2hM/M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BkYZwW3nIpXVMiLgkHOxgEFVnpUoBs87k0NtF+Ez81yZ6ekq3AJvme/OEDpPL/Wcly/xz9BYMn66JmwPhWZY7NhFADAhgFkj9aEtQorKMydRfr5C1vLOIdh8uroYX3y/jn1++vSk2EY3k1CjpQKYNqnvsayKBJhEyrHJu4PioH2qWLNkM+gur5NFJv0JH9CSSGStAbt3PCkmCcxKsyByEHkDBRM4cUn6Fe23AljBt1AISVxNhcqpMAjcuxa4hqQPrUEG3rS+i5MzHW8X5UuorO3qewf/DTp3nXKRlo3BgHE8IVqqMe6Y5iTLgPSUgfVsjqaXOSDVwJAiw7t8gA6GS5ZQ3ebfWUI52dRZcujqF1VefE69m8CjhFWU2y4CN88sXp6CFWtf3xp365uP63imznAp1d2CHK5O3t7da9tHza1iuEdM6LqXv+4wWOGzcXgJTE8MkWnIo5zd4JtFob3jYfxvSFmDTa7M5NnuCSUmx3ilkKxcWB8hr5w653z69PH4v/SabCcM1uHcHhJZel6sRGJhx68w6SAykIB1nwu6qH/f+V/9p+KsYvQ8+jt9FUb/1cRwML5rDyafu/nuvacD+2Hc2nT/snNGl")))
ALL_TEMPLATE = json.loads(zlib.decompress(base64.b64decode("eNq1T7EOgjAU3PmKpjNIdHQyJg4ukmDiYkwDUkxt4UkLEkP4dwsSUojootu7u/fu7lUWQvhOpWKQ4iVazOZ2w4AMlYaVnjXKsszRjCYwZ+lFSQDuduSKEM9fk8PG32+9HSFYn9StRwmSxwJKw0gHsfjhBGnkqAQ47RWtXaGNPHYY9YpZwQ2EIC8X47bbSYOkccRhwUTUhuRU5dhYqvu5rfglZ1xxFHMGSbE91G4SYiYmZUmzgkk6/LPTplsjdPrXD3EhxIcf3sk//sEy1QbVVm09Ad15mhY=")))
STARTER_TEMPLATE = json.loads(zlib.decompress(base64.b64decode("eNp1UMGKwkAMvc9XlDmKtejR0yJ42MsKCl5EQnUzZbbTiZ0ZqiL9d1OpWqt7y3t5eS/JRUSRrNB5TVZOo8loPGwYcjvP8MI1o7IsY2aYkLm2mXdEedKSXwCL5QzW8+Xqe/EDIHmkvnkcyeXK0LFjFNAHIGvOD4rJP7plbVocPTrd7KSoLHwab2V7Kg7aIOxQkUPgi7RqZCo1Hod9rQ14Ci+ZnbQirdDGDjPtgzvHe4e/aINmI/ki3/ZslTaBH/m2W3N3mn3iuaMzy/s2n01Gg0T2BLX4Dz3re7UVd1SLWlwByepyJQ==")))
@@ -27,6 +27,7 @@ POLICY_TEMPLATE = json.loads(zlib.decompress(base64.b64decode("eNqdVU1v2zAMvedXC
REPOSITORY_POLICY_TEMPLATE = json.loads(zlib.decompress(base64.b64decode("eNqlVttu4zYQfc9XEH6RDETM7gYoiuz6YbE1ugFSJ2ncFkEcGLQ0splQpEpSid3A/94Z6hLZi1zQ5iEmh6MzZ4aHQz4dMDZ4AOuk0YMT9ol/PCTLnVk4nD7hmNaFkpnwkJRGyXTTLeBSZtJ7sGi5aSysWwvrshBLwOVBKovlUbnxK6NPjvnHT4POa9uMbg9bUAvOVDaFeaqEIx4DVwilBp2D81C6naCDdAXpval857RHxFa6x7sxalEEcqfaeQzA/ArY9dffzlgprMO0DnfdU1MUQmf0RZ3JMUsKVsqSyQYgSTLpxEJhqWSZNHVNAjd2sSHo0egn/oEfD3rI2+dS/Bfyfza7E9iLssQtEp7C5haALazQ6eodmcxmX75EF9fT7+eTaKZlURrr2Z0zupsYN9O5NZix8CslF6yxX+C0c3LVorQmBec607pQHDyS4WMFBWg/JWLCsfG089mIQs0wFEE7NurB8FC9OW5tWfn4JlpKHx2ySLkklwocjZN/otshzyA1GcRR5fPk52jIHVbCx9Fs9iEaPgPfENuYajdkubGMRrh9rF6XeTDcIi8cGV+bT2aaqmaFdMCuNqi+Yrwm7Ilh3go8ARmrjwarOWE8gqF4T9HZ6bfx5GpMRCfnU5zQ6Nv5xfXp5Nd6+Mv4/K/J+PcrmnHMTy61sdDOhPdWLipPudZEwl/EIZPe2NToXC7JuXjQj+0vT4ss2s60W4FS81BCYmMcB/0grdF8CZjA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XYFfYqWsxOSEU9tG3CxVnqmagkIvV2lpUVg+wJ1O2BGYnBZs+ZqgYq5Yc0LyqYS2N3UUZm1kIMlYvoEsahjkhZF01XxDMByOP3MIY+hrwQQ6GYO1OT4LXRxUwx/YtoCmko8XwUQUz03QlVSsWm10bKDkFQZgkQ7bUoHGtIKko1QnOtX7u1K49Lm4nqdOCrbdmq0MxYO6v4JaVlzV4eCg/kTBlTvH6ljOxLcmSqPutPChq33+S9tlyKOJJAkUMlSKjrJqKJpTBCUy0D5ds5bnqmgny76UDhzpyz1doQRQ33XKyYi7B+8tXVfg1+Vawd1SJlTTp/AGaolGlDgM+z/dbNzBVMo3fUfeRgZ/P4bskiCjNA6iCjHJLTgxQDifz9UpFWYWcL1rhfIHZAuJoIFNGUMiM5iExrYIbqdXXjGtZDkd8KDnNTlblz1kOKWvIEWbjSYVer+lasHKRtq5gGcdbWK6ep18Jw3IddbYtJNVaXgG7StAGfHMPqdYAB80rq2Yr75S80/5iGq/s66OmPdE41/Dkkk3TkCiLPG4BbO5CwgWDHM6PBrVHwu9HbZK1UAWXq04W0JdayHXBsG13CWV2KP3xDtqAyJwhcAwZrsOCQHNuRD+tgvaT+TCdTuKKbN3T20NMDh8vXCe/gn7rVJqvDMvCv+mxRsJ0QMjzbeNbNR3aNw4vtaOHz5OW1GDuXzd4O1tTM3z++4l7cdGxp6V/7hT0yV60oSkTTBGz3ReCAodqilZl+7TTz/Zp83uOLn95Mn3ybQ9y94r/1nnT3faZ+xI4LidpqJNtx5vEMcL/fMjsLHeSVLEAMMszFigQ9R2qZKD8d/QoALm5ENn0HAVrubD5YsTliVTsISzf09SHaH/j2tSs9HdvSevb/th5G/vnRhptMDqKb5zhH3Ud+6w4a76sYyoGEoIQWv7Nm/Hihfjq5rxwL715e74t/dn9s/8DqAZZ8g==")))
class ManifestError(ValueError):
@@ -63,6 +64,10 @@ def boolean(data, key, default):
return value
# Opt-in CLI platform lanes: manifest entry -> orb executor.
CLI_PLATFORMS = {"macos-arm64": "qqq-orb/cli_macos_arm64", "windows-x64": "qqq-orb/cli_windows_x64"}
def load_manifest(path, setup_version):
raw = Path(path).read_text(encoding="utf-8")
if len(raw) > 65536:
@@ -71,7 +76,7 @@ def load_manifest(path, setup_version):
if not isinstance(data, dict):
raise ManifestError("Manifest must be a mapping")
profile = data.get("profile")
if profile not in ("qbit", "core", "frontend-material", "frontend-core", "cli", "voyage", "frontend-next", "all", "app-starter", "android", "mcp-policy", "repository-policy", "marketing", "node-artifact", "homebrew-tap"):
if profile not in ("qbit", "core", "frontend-material", "frontend-core", "cli", "voyage", "frontend-next", "all", "app-starter", "android", "mcp-policy", "repository-policy", "marketing", "node-artifact", "homebrew-tap", "application-template"):
raise ManifestError("Unsupported profile")
allowed = ("profile", "orb_version", "default_branch", "docs_only", "publish")
if profile == "homebrew-tap":
@@ -83,8 +88,8 @@ def load_manifest(path, setup_version):
if profile == "qbit":
allowed += ("release_completion", "release_on_main", "release_tag_policy", "test_branch_policy")
elif profile == "cli":
allowed += ("publish_context",)
elif profile in ("voyage", "frontend-next", "app-starter", "android", "mcp-policy", "repository-policy", "marketing"):
allowed += ("publish_context", "platforms")
elif profile in ("voyage", "frontend-next", "app-starter", "android", "mcp-policy", "repository-policy", "marketing", "application-template"):
allowed = ("profile", "orb_version", "default_branch")
elif profile == "all":
allowed = ("profile", "orb_version", "default_branch", "publish", "publish_context")
@@ -158,6 +163,9 @@ def load_manifest(path, setup_version):
raise ManifestError("CLI publication requires an explicitly verified context")
if profile == "cli" and boolean(data, "docs_only", False):
raise ManifestError("CLI currently requires full generated-client verification")
platforms = data.get("platforms", [])
if not isinstance(platforms, list) or any(not isinstance(x, str) or x not in CLI_PLATFORMS for x in platforms) or len(platforms) != len(set(platforms)):
raise ManifestError("platforms must be distinct entries of " + ", ".join(CLI_PLATFORMS))
tag_policy = data.get("release_tag_policy", "stable")
if tag_policy not in ("stable", "v-prefix", "none"):
raise ManifestError("Unsupported QBit release tag policy")
@@ -173,8 +181,8 @@ def load_manifest(path, setup_version):
"release_on_main": boolean(data, "release_on_main", False),
"release_tag_policy": tag_policy, "test_branch_policy": test_policy,
"docs_only": boolean(data, "docs_only", False),
"publish_context": publish_context,
"publish": {key: boolean(publishing, key, key != "asciidoc" and profile not in ("cli", "all", "repository-policy")
"publish_context": publish_context, "platforms": platforms,
"publish": {key: boolean(publishing, key, key != "asciidoc" and profile not in ("cli", "all", "repository-policy", "application-template")
and not (profile == "qbit" and key in ("hotfix", "feature")))
for key in publish_keys}}
@@ -435,9 +443,16 @@ def cli_template(config, branch, tag):
options = {"publish": publish, "filters": filters}
if publish:
options["context"] = [config["publish_context"]]
platforms = config.get("platforms", [])
jobs = [{"qqq-orb/cli_platform": {"name": "cli-" + p, "executor": CLI_PLATFORMS[p], "filters": copy.deepcopy(filters)}}
for p in platforms]
if publish and platforms:
# Every opted-in platform must pass before packages are published.
options["requires"] = ["cli-" + p for p in platforms]
jobs.append({"qqq-orb/cli_verify_publish": options})
# CLI docs are still verified until its generated-client inputs get a dedicated policy.
return {"version": 2.1, "orbs": {"qqq-orb": "kingsrook/qqq-orb@" + config["orb_version"]},
"workflows": {"publish_release" if publish else "test_only": {"jobs": [{"qqq-orb/cli_verify_publish": options}]}}}
"workflows": {"publish_release" if publish else "test_only": {"jobs": jobs}}}
def marketing_template(config, branch, tag):
@@ -516,7 +531,12 @@ def homebrew_template(config, branch, tag):
return result
PROFILE_TEMPLATES = {"homebrew-tap": homebrew_template, "qbit": qbit_template, "core": core_template,
def application_template(config, branch, tag):
del config, branch, tag
return copy.deepcopy(APPLICATION_TEMPLATE)
PROFILE_TEMPLATES = {"application-template": application_template, "homebrew-tap": homebrew_template, "qbit": qbit_template, "core": core_template,
"repository-policy": repository_policy_template,
"frontend-material": frontend_template, "frontend-core": frontend_template,
"cli": cli_template, "voyage": voyage_template, "frontend-next": next_template, "all": all_template, "app-starter": starter_template, "android": android_template, "mcp-policy": policy_template, "marketing": marketing_template}
+7 -3
View File
@@ -28,13 +28,17 @@ if [[ "$CURRENT_BRANCH" == "main" ]]; then
TARGET_VERSION="$MAJOR_MINOR.0"
echo "Main branch detected - targeting release version: $TARGET_VERSION"
elif [[ "$CURRENT_BRANCH" == "develop" ]]; then
# Develop branch - should be a snapshot version (e.g., 1.0.127-SNAPSHOT)
# Increment patch version for develop
# Snapshot coordinates are unique per CI job without pushing a version commit.
# The source head stays the head whose required checks are being reported.
if [[ ! "${CIRCLE_BUILD_NUM:-}" =~ ^[1-9][0-9]*$ ]]; then
echo "ERROR: Snapshot publication requires a positive CIRCLE_BUILD_NUM" >&2
exit 1
fi
MAJOR_MINOR_PATCH="${NPM_VERSION%-*}"
MAJOR_MINOR="${MAJOR_MINOR_PATCH%.*}"
PATCH="${MAJOR_MINOR_PATCH##*.}"
NEW_PATCH=$((PATCH + 1))
TARGET_VERSION="$MAJOR_MINOR.$NEW_PATCH-SNAPSHOT"
TARGET_VERSION="$MAJOR_MINOR.$NEW_PATCH-SNAPSHOT.$CIRCLE_BUILD_NUM"
echo "Develop branch detected - targeting snapshot version: $TARGET_VERSION"
elif [[ "$CURRENT_BRANCH" == release/* ]]; then
# Release branch - should be a release candidate (e.g., 1.0.0-RC.1, 1.0.0-RC.2, etc.)
@@ -0,0 +1,70 @@
{
"version": 2.1,
"jobs": {
"verify-template": {
"docker": [
{
"image": "cimg/openjdk:21.0"
}
],
"resource_class": "medium",
"steps": [
"checkout",
{
"restore_cache": {
"keys": [
"qqq-template-v1-java21-d84a5783bf09c58e42ba72203247f20bd5779302"
]
}
},
{
"run": {
"name": "Prepare pinned qctl renderer",
"command": "set -euo pipefail\ntool_dir=\"${QQQ_TEMPLATE_TOOL_DIR:-$HOME/.cache/qqq-template-renderer}\"\nmaven_repo=\"${QQQ_TEMPLATE_MAVEN_REPO:-$HOME/.m2/repository}\"\nif [[ ! -d \"$tool_dir/.git\" ]]; then\n git init \"$tool_dir\"\n git -C \"$tool_dir\" remote add origin https://github.com/QRun-IO/qctl.git\n git -C \"$tool_dir\" fetch --depth=1 origin d84a5783bf09c58e42ba72203247f20bd5779302\n git -C \"$tool_dir\" checkout --detach FETCH_HEAD\nfi\ntest \"$(git -C \"$tool_dir\" rev-parse HEAD)\" = d84a5783bf09c58e42ba72203247f20bd5779302\ncd \"$tool_dir\"\n# Build the immutable, already-qualified renderer, not another copy of the consumer.\nif [[ ! -f \"$tool_dir/qctl-qqq/target/qctl-qqq-0.2.1.jar\" || ! -f \"$maven_repo/io/qrun/qctl/qctl-qqq/0.2.1/qctl-qqq-0.2.1.pom\" ]]; then\n mvn -B -ntp -f \"$tool_dir/pom.xml\" -Dmaven.repo.local=\"$maven_repo\" -pl qctl-qqq -am install -DskipTests\nfi\nmvn -B -ntp -f \"$tool_dir/pom.xml\" -Dmaven.repo.local=\"$maven_repo\" -pl qctl-qqq dependency:build-classpath -Dmdep.outputFile=\"$tool_dir/classpath.txt\"\n",
"no_output_timeout": "10m"
}
},
{
"run": {
"name": "Render the exact template checkout without hooks",
"command": "set -euo pipefail\ntool_dir=\"${QQQ_TEMPLATE_TOOL_DIR:-$HOME/.cache/qqq-template-renderer}\"\noutput=\"${QQQ_TEMPLATE_OUTPUT:-$HOME/qqq-template-acceptance}\"\nwork=\"${QQQ_TEMPLATE_WORK:-/tmp/qqq-template-check}\"\nmkdir -p \"$work\"\ncurl --fail --silent --show-error --location --retry 2 --max-time 60 https://raw.githubusercontent.com/QRun-IO/qqq-templates-hub/4d22fc650967eee609107476d5dc3ac5dffeb071/templates.yaml -o \"$work/catalog.yaml\"\necho \"9342ef716f11ffea25a684fba6865e4daf303d968b5fa6a1ddcc6de43a6bb193 $work/catalog.yaml\" | sha256sum --check --status\ncat > \"$work/QqqTemplateCheck.java\" \\<<'JAVA'\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.LinkedHashMap;\nimport java.util.Map;\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.dataformat.yaml.YAMLFactory;\nimport io.qrun.qctl.qqq.template.TemplateEngine;\nimport io.qrun.qctl.qqq.template.TemplateManifest;\nimport io.qrun.qctl.qqq.template.TransformExecutor;\n\npublic class QqqTemplateCheck\n{\n public static void main(String[] args) throws Exception\n {\n if(args.length != 3)\n {\n throw new IllegalArgumentException(\"Expected catalog, checked-out template, fresh output directory\");\n }\n Path output = Path.of(args[2]);\n if(Files.exists(output))\n {\n throw new IllegalArgumentException(\"Output directory must not exist\");\n }\n ObjectMapper mapper = new ObjectMapper(new YAMLFactory());\n JsonNode index = mapper.readTree(Path.of(args[0]).toFile());\n TemplateManifest manifest = null;\n for(JsonNode entry : index.get(\"templates\"))\n {\n if(\"new-qqq-application\".equals(entry.path(\"id\").asText()))\n {\n if(manifest != null) throw new IllegalArgumentException(\"Duplicate template entry\");\n manifest = mapper.treeToValue(entry, TemplateManifest.class);\n }\n }\n if(manifest == null) throw new IllegalArgumentException(\"Template missing from catalog\");\n TemplateEngine engine = new TemplateEngine();\n Map<String, String> variables = new LinkedHashMap<>(Map.of(\n \"projectName\", \"ci-template\", \"groupId\", \"io.qrun.ci\",\n \"artifactId\", \"ci-template\", \"packageName\", \"io.qrun.ci\"));\n variables = engine.evaluateComputed(manifest.computed(), variables);\n Files.createDirectories(output);\n int count = engine.render(Path.of(args[1]), output, variables, manifest);\n if(manifest.transforms() != null)\n {\n new TransformExecutor().execute(output, manifest.transforms(), variables);\n }\n if(count == 0 || !Files.isRegularFile(output.resolve(\"pom.xml\")))\n {\n throw new IllegalStateException(\"Renderer did not create the application\");\n }\n System.out.println(\"Rendered \" + count + \" files from the exact local template; hooks not executed\");\n }\n}\nJAVA\njava -cp \"$(cat \"$tool_dir/classpath.txt\"):$tool_dir/qctl-qqq/target/classes\" \"$work/QqqTemplateCheck.java\" \"$work/catalog.yaml\" \"$PWD\" \"$output\"\n"
}
},
{
"run": {
"name": "Verify generated application and package",
"command": "set -euo pipefail\nmvn -B -ntp -f \"${QQQ_TEMPLATE_OUTPUT:-$HOME/qqq-template-acceptance}/pom.xml\" -Dmaven.repo.local=\"${QQQ_TEMPLATE_MAVEN_REPO:-$HOME/.m2/repository}\" verify\n",
"no_output_timeout": "10m"
}
},
{
"store_test_results": {
"path": "~/qqq-template-acceptance/target/surefire-reports"
}
},
{
"store_artifacts": {
"path": "~/qqq-template-acceptance/target/ci-template.jar",
"destination": "generated-application.jar"
}
},
{
"save_cache": {
"key": "qqq-template-v1-java21-d84a5783bf09c58e42ba72203247f20bd5779302",
"paths": [
"~/.m2/repository",
"~/.cache/qqq-template-renderer"
]
}
}
]
}
},
"workflows": {
"verify": {
"jobs": [
"verify-template"
]
}
}
}
+5 -5
View File
@@ -238,7 +238,7 @@
{
"run": {
"name": "Build framework dependencies for the sample",
"command": "mvn -B -s /tmp/circleci/mvn-settings.xml -Drevision=0.0.0-sample-acceptance -DskipTests clean install"
"command": "mvn -B -s /tmp/circleci/mvn-settings.xml -Drevision=0.0.0-sample-acceptance -DskipTests -Dspotbugs.skip=true -Dpmd.skip=true clean install"
}
},
{
@@ -308,7 +308,7 @@
{
"run": {
"name": "Build framework dependencies for the sample",
"command": "mvn -B -s /tmp/circleci/mvn-settings.xml -Drevision=0.0.0-sample-multinode -DskipTests clean install"
"command": "mvn -B -s /tmp/circleci/mvn-settings.xml -Drevision=0.0.0-sample-multinode -DskipTests -Dspotbugs.skip=true -Dpmd.skip=true clean install"
}
},
{
@@ -336,14 +336,14 @@
{
"run": {
"name": "Build framework dependencies for the consumers",
"command": "mvn -B -s /tmp/circleci/mvn-settings.xml -Drevision=0.0.0-sample-acceptance -DskipTests clean install"
"command": "mvn -B -s /tmp/circleci/mvn-settings.xml -Drevision=0.0.0-sample-acceptance -DskipTests -Dspotbugs.skip=true -Dpmd.skip=true clean install"
}
},
{
"run": {
"name": "Require source-generated starter and application acceptance with live MySQL",
"name": "Require source-generated starter and application acceptance with live PostgreSQL",
"no_output_timeout": "30m",
"command": "set -euo pipefail\nconsumer_root=$(mktemp -d /tmp/qqq-starter-acceptance-XXXXXX)\ntrap 'rm -rf \"$consumer_root\"' EXIT\ngit clone https://github.com/QRun-IO/qqq-app-starter.git \"$consumer_root/starter\"\ngit -C \"$consumer_root/starter\" checkout --detach 2fb62378fa76da1950dc9e67984c18fd0491ae3f\ntest \"$(git -C \"$consumer_root/starter\" rev-parse HEAD)\" = 2fb62378fa76da1950dc9e67984c18fd0491ae3f\ngit clone https://github.com/QRun-IO/qbit-template-application.git \"$consumer_root/template\"\ngit -C \"$consumer_root/template\" fetch origin refs/pull/5/head\ngit -C \"$consumer_root/template\" checkout --detach FETCH_HEAD\ntest \"$(git -C \"$consumer_root/template\" rev-parse HEAD)\" = 70a72a54f4a3024e39d07a7d86c5acf738283286\ndocker pull mysql:8.4\nQQQ_STARTER_SOURCE=\"$consumer_root/starter\" QQQ_TEMPLATE_SOURCE=\"$consumer_root/template\" \\\n python3 -m unittest discover -s qqq-sample-project/acceptance -p test_starter_application.py -v\npython3 qqq-sample-project/acceptance/run_starter_application.py \\\n --qqq-source . --starter-source \"$consumer_root/starter\" \\\n --template-source \"$consumer_root/template\" \\\n --candidate-version 0.0.0-sample-acceptance \\\n --maven-repo \"$consumer_root/m2\" --online \\\n --maven-settings /tmp/circleci/mvn-settings.xml --live-mysql \\\n --junit-dir qqq-sample-project/target/starter-application-junit\npython3 qqq-sample-project/verify-feature-coverage.py --stage source \\\n --require-feature train.starter --require-feature train.application\n"
"command": "set -euo pipefail\nconsumer_root=$(mktemp -d /tmp/qqq-starter-acceptance-XXXXXX)\ntrap 'rm -rf \"$consumer_root\"' EXIT\ngit clone https://github.com/QRun-IO/qqq-app-starter.git \"$consumer_root/starter\"\ngit -C \"$consumer_root/starter\" checkout --detach 2fb62378fa76da1950dc9e67984c18fd0491ae3f\ntest \"$(git -C \"$consumer_root/starter\" rev-parse HEAD)\" = 2fb62378fa76da1950dc9e67984c18fd0491ae3f\ngit clone https://github.com/QRun-IO/qbit-template-application.git \"$consumer_root/template\"\ngit -C \"$consumer_root/template\" fetch origin refs/pull/5/head\ngit -C \"$consumer_root/template\" checkout --detach FETCH_HEAD\ntest \"$(git -C \"$consumer_root/template\" rev-parse HEAD)\" = 70a72a54f4a3024e39d07a7d86c5acf738283286\ndocker pull postgres:17-alpine\nQQQ_STARTER_SOURCE=\"$consumer_root/starter\" QQQ_TEMPLATE_SOURCE=\"$consumer_root/template\" \\\n python3 -m unittest discover -s qqq-sample-project/acceptance -p test_starter_application.py -v\npython3 qqq-sample-project/acceptance/run_starter_application.py \\\n --qqq-source . --starter-source \"$consumer_root/starter\" \\\n --template-source \"$consumer_root/template\" \\\n --candidate-version 0.0.0-sample-acceptance \\\n --maven-repo \"$consumer_root/m2\" --online \\\n --maven-settings /tmp/circleci/mvn-settings.xml --live-postgres \\\n --junit-dir qqq-sample-project/target/starter-application-junit\npython3 qqq-sample-project/verify-feature-coverage.py --stage source \\\n --require-feature train.starter --require-feature train.application\n"
}
},
{
+39 -92
View File
@@ -46,6 +46,24 @@
"destination": "quality-and-coverage"
}
},
{
"store_artifacts": {
"path": "target/checkstyle-result.xml",
"destination": "quality-and-coverage/checkstyle-result.xml"
}
},
{
"store_artifacts": {
"path": "target/spotbugsXml.xml",
"destination": "quality-and-coverage/spotbugsXml.xml"
}
},
{
"store_artifacts": {
"path": "target/pmd.xml",
"destination": "quality-and-coverage/pmd.xml"
}
},
{
"persist_to_workspace": {
"root": ".",
@@ -59,8 +77,7 @@
"Dockerfile",
"pom.xml",
"src",
".config",
"sonar-project.properties"
".config"
]
}
}
@@ -159,32 +176,6 @@
}
]
},
"sonar-scan": {
"machine": {
"image": "ubuntu-2204:current"
},
"resource_class": "medium",
"steps": [
"checkout",
{
"attach_workspace": {
"at": "."
}
},
{
"qqq-orb/install_java": {
"java_version": "21"
}
},
"qqq-orb/mvn_cache_restore",
{
"run": {
"name": "SonarCloud Analysis",
"command": "mvn -B sonar:sonar \\\n -Dsonar.projectKey=qrun-io_voyage \\\n -Dsonar.organization=qrun-io \\\n -Dsonar.host.url=https://sonarcloud.io \\\n -Dsonar.token=${SONAR_TOKEN} \\\n -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml \\\n -Dsonar.scm.disabled=true\n"
}
}
]
},
"docker-build": {
"machine": {
"image": "ubuntu-2204:current"
@@ -241,27 +232,6 @@
}
]
},
"update-cd-repo": {
"docker": [
{
"image": "cimg/base:current"
}
],
"resource_class": "small",
"steps": [
{
"setup_remote_docker": {
"version": "default"
}
},
{
"run": {
"name": "Update CD repo with new image digest",
"command": "echo \"${GHCR_TOKEN}\" | docker login ghcr.io -u \"${GHCR_USERNAME}\" --password-stdin\n\nIMAGE_DIGEST=$(docker manifest inspect ghcr.io/qrun-io/voyage:${CIRCLE_SHA1:0:7} --verbose 2>/dev/null | jq -r '.Descriptor.digest // empty' || true)\n\nif [ -z \"${IMAGE_DIGEST}\" ]; then\n docker pull ghcr.io/qrun-io/voyage:${CIRCLE_SHA1:0:7}\n IMAGE_DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' ghcr.io/qrun-io/voyage:${CIRCLE_SHA1:0:7} | cut -d@ -f2)\nfi\n\necho \"Image digest: ${IMAGE_DIGEST}\"\n\nif [ -z \"${IMAGE_DIGEST}\" ]; then\n echo \"ERROR: Could not determine image digest\"\n exit 1\nfi\n\ngit clone --branch main https://${GITHUB_TOKEN}@github.com/QRun-IO/Voyage-CD-Pipeline.git\ncd Voyage-CD-Pipeline\n\nsed -i \"s|digest: sha256:.*|digest: ${IMAGE_DIGEST}|\" overlays/production/kustomization.yaml\n\nif git diff --quiet overlays/production/kustomization.yaml; then\n echo \"No changes to commit - digest already up to date\"\n exit 0\nfi\n\ngit config user.name \"CircleCI\"\ngit config user.email \"ci@qrun.io\"\ngit add overlays/production/kustomization.yaml\ngit commit -m \"chore(production): update voyage image to ${CIRCLE_SHA1:0:7}\"\ngit push origin main\n\necho \"Successfully updated CD repo with new image digest\"\n"
}
}
]
},
"release-please": {
"docker": [
{
@@ -274,7 +244,7 @@
{
"run": {
"name": "Run release-please",
"command": "npx release-please github-release \\\n --token=${GITHUB_TOKEN} \\\n --repo-url=QRun-IO/voyage \\\n --release-type=maven \\\n --package-name=voyage\nnpx release-please release-pr \\\n --token=${GITHUB_TOKEN} \\\n --repo-url=QRun-IO/voyage \\\n --release-type=maven \\\n --package-name=voyage\n"
"command": "set -euo pipefail\nnpx release-please github-release \\\n --token=${GITHUB_TOKEN} \\\n --target-branch=main \\\n --repo-url=QRun-IO/voyage \\\n --release-type=maven \\\n --package-name=voyage\nnpx release-please release-pr \\\n --token=${GITHUB_TOKEN} \\\n --target-branch=main \\\n --repo-url=QRun-IO/voyage \\\n --release-type=maven \\\n --package-name=voyage\n"
}
}
]
@@ -290,7 +260,6 @@
"ignore": [
"main",
"develop",
"/^release-please--.*/",
"/^release\\/.*/"
]
}
@@ -304,7 +273,6 @@
"ignore": [
"main",
"develop",
"/^release-please--.*/",
"/^release\\/.*/"
]
}
@@ -318,7 +286,6 @@
"ignore": [
"main",
"develop",
"/^release-please--.*/",
"/^release\\/.*/"
]
}
@@ -335,7 +302,6 @@
"ignore": [
"main",
"develop",
"/^release-please--.*/",
"/^release\\/.*/"
]
}
@@ -385,21 +351,6 @@
}
}
},
{
"sonar-scan": {
"context": [
"sonarcloud"
],
"requires": [
"build-and-test"
],
"filters": {
"branches": {
"only": "develop"
}
}
}
},
{
"sbom": {
"context": [
@@ -488,24 +439,6 @@
}
}
},
{
"sonar-scan": {
"context": [
"sonarcloud"
],
"requires": [
"build-and-test"
],
"filters": {
"branches": {
"only": [
"main",
"/^release\\/.*/"
]
}
}
}
},
{
"sbom": {
"context": [
@@ -546,10 +479,9 @@
}
},
{
"update-cd-repo": {
"munitor/update_cd_repo": {
"context": [
"github",
"ghcr"
"github"
],
"requires": [
"docker-build"
@@ -558,7 +490,21 @@
"branches": {
"only": "main"
}
}
},
"name": "update-cd-repo",
"cd_repo": "KofTwentyTwo/cluster-gitops",
"environment": "prod",
"cd_format": "kustomize",
"cd_image_name": "ghcr.io/qrun-io/voyage",
"cd_path": "tenants/voyage/kustomization.yaml",
"pre-steps": [
{
"run": {
"name": "Use the image published for this commit",
"command": "set -euo pipefail\n[[ \"$CIRCLE_SHA1\" =~ ^[0-9a-f]{40}$ ]]\nprintf \"export PROJECT_VERSION='%s'\\n\" \"${CIRCLE_SHA1:0:7}\" >> \"$BASH_ENV\"\n"
}
}
]
}
},
{
@@ -580,6 +526,7 @@
}
},
"orbs": {
"qqq-orb": "kingsrook/qqq-orb@__ORB_VERSION__"
"qqq-orb": "kingsrook/qqq-orb@__ORB_VERSION__",
"munitor": "kof22/munitor@0.3.11"
}
}
+2 -1
View File
@@ -49,6 +49,7 @@ PROFILE_PARAMETERS = {
"marketing": {},
"node-artifact": {},
"homebrew-tap": {},
"application-template": {},
}
@@ -68,7 +69,7 @@ def canonical_caller(profile, version, explicit_manifest=False, release_tag_poli
"orb_version": version,
"filters": {"branches": {"ignore": "automation/qbit-rc-pending"}, "tags": {"only": "/.*/"}},
}
if profile in ("node-artifact", "homebrew-tap"):
if profile in ("node-artifact", "homebrew-tap", "application-template"):
options["filters"]["tags"] = {"ignore": "/.*/"}
if profile == "frontend-next":
options["filters"]["branches"] = {"ignore": "/.*/"}
+3 -3
View File
@@ -313,7 +313,7 @@ jobs:
name: Build framework dependencies for the consumers
command: mvn -B -s /tmp/circleci/mvn-settings.xml -Drevision=0.0.0-sample-acceptance -DskipTests clean install
- run:
name: Require source-generated starter and application acceptance with live MySQL
name: Require source-generated starter and application acceptance with live PostgreSQL
no_output_timeout: 30m
command: |
set -euo pipefail
@@ -326,7 +326,7 @@ jobs:
git -C "$consumer_root/template" fetch origin refs/pull/5/head
git -C "$consumer_root/template" checkout --detach FETCH_HEAD
test "$(git -C "$consumer_root/template" rev-parse HEAD)" = 70a72a54f4a3024e39d07a7d86c5acf738283286
docker pull mysql:8.4
docker pull postgres:17-alpine
QQQ_STARTER_SOURCE="$consumer_root/starter" QQQ_TEMPLATE_SOURCE="$consumer_root/template" \
python3 -m unittest discover -s qqq-sample-project/acceptance -p test_starter_application.py -v
python3 qqq-sample-project/acceptance/run_starter_application.py \
@@ -334,7 +334,7 @@ jobs:
--template-source "$consumer_root/template" \
--candidate-version 0.0.0-sample-acceptance \
--maven-repo "$consumer_root/m2" --online \
--maven-settings /tmp/circleci/mvn-settings.xml --live-mysql \
--maven-settings /tmp/circleci/mvn-settings.xml --live-postgres \
--junit-dir qqq-sample-project/target/starter-application-junit
python3 qqq-sample-project/verify-feature-coverage.py --stage source \
--require-feature train.starter --require-feature train.application
+2 -2
View File
@@ -324,7 +324,7 @@ class AuditTests(unittest.TestCase):
self.assertIn('native_maintenance_bridge_drift', [f['code'] for f in report['findings']])
def test_new_circle_profile_mappings_require_actual_configuration(self):
for name, profile in [('qqq-android', 'android'), ('qqq-mcp-rag-standard-policies', 'mcp-policy'), ('marketing-website', 'marketing'), ('qqq-templates-hub', 'repository-policy'), ('qqq-meta-manager', 'repository-policy'), ('homebrew-qctl', 'homebrew-tap')]:
for name, profile in [('qqq-android', 'android'), ('qqq-mcp-rag-standard-policies', 'mcp-policy'), ('marketing-website', 'marketing'), ('qqq-templates-hub', 'repository-policy'), ('qqq-meta-manager', 'repository-policy'), ('homebrew-qctl', 'homebrew-tap'), ('new-qqq-application-template', 'application-template')]:
entry = dict(ENTRY, name=name, nameWithOwner='QRun-IO/' + name)
report = audit.audit(entry, Snapshot({}), VERSION, SHA, {})
self.assertEqual(profile, report['profile'])
@@ -359,7 +359,7 @@ class AuditTests(unittest.TestCase):
self.assertIn('missing_native_maintenance_bridge', [f['code'] for f in report['findings']])
def test_approved_no_ci_is_exact_allowlist_with_evidence_not_check_pass(self):
self.assertEqual(4, len(audit.NO_CI))
self.assertEqual(3, len(audit.NO_CI))
self.assertNotIn("QRun-IO/voyage-cd", audit.NO_CI)
for repository, policy in audit.NO_CI.items():
entry = dict(ENTRY, name=repository.split('/')[-1], nameWithOwner=repository)
+105
View File
@@ -0,0 +1,105 @@
"""Cost settings preserve source qualification and unrelated project controls."""
from pathlib import Path
import sys
import unittest
from unittest.mock import Mock
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'tools'))
import circle_project_settings as settings
class SettingsTests(unittest.TestCase):
def setUp(self):
self.plan = {'repository': 'QRun-IO/marketing-website', 'profile': 'marketing',
'branch': 'main', 'head': 'a' * 40, 'changed': False}
self.before = {'autocancel-builds': False, 'setup-workflows': True,
'build-fork-prs': False, 'drop-all-build-requests': False}
self.source = Mock(side_effect=[{'archived': False, 'default_branch': 'main'},
{'commit': {'sha': self.plan['head']}}])
def test_narrow_update_and_idempotent_readback(self):
request = Mock(side_effect=[{'feature_flags': self.before}, {},
{'feature_flags': {**self.before, 'autocancel-builds': True}}])
result = settings.reconcile(self.plan, self.source, True, request)
self.assertEqual({'state': 'enforced', 'changed': True}, result)
self.assertEqual({'feature_flags': {'autocancel-builds': True}}, request.call_args_list[1].args[1])
request = Mock(return_value={'feature_flags': {**self.before, 'autocancel-builds': True}})
source = Mock(return_value={'archived': False, 'default_branch': 'main'})
self.assertEqual({'state': 'enforced', 'changed': False},
settings.reconcile(self.plan, source, True, request))
self.assertEqual(1, request.call_count)
def test_dry_run_never_writes(self):
request = Mock(return_value={'feature_flags': self.before})
self.assertEqual({'state': 'inspected', 'changed': True},
settings.reconcile(self.plan, self.source, False, request))
request.assert_called_once_with(self.plan['repository'])
def test_unreviewed_profiles_and_unconverted_sources_never_call_api(self):
for change, expected in [({'profile': 'qbit'}, 'not-managed'),
({'profile': 'native-gitops'}, 'not-managed'),
({'changed': True}, 'waiting-source')]:
source, request = Mock(), Mock()
result = settings.reconcile({**self.plan, **change}, source, True, request)
self.assertEqual(expected, result['state'])
source.assert_not_called()
request.assert_not_called()
def test_changed_head_or_unexpected_default_branch_prevents_write(self):
for responses in [
[{'archived': False, 'default_branch': 'main'}, {'commit': {'sha': 'b' * 40}}],
[{'archived': False, 'default_branch': 'develop'}],
[{'archived': True, 'default_branch': 'main'}],
]:
request = Mock(return_value={'feature_flags': self.before})
result = settings.reconcile(self.plan, Mock(side_effect=responses), True, request)
self.assertEqual('unresolved', result['state'])
self.assertTrue(all(len(call.args) == 1 for call in request.call_args_list))
def test_unrelated_setting_drift_and_unavailable_api_are_not_success(self):
request = Mock(side_effect=[{'feature_flags': self.before}, {},
{'feature_flags': {**self.before, 'autocancel-builds': True,
'build-fork-prs': True}}])
self.assertEqual('unresolved', settings.reconcile(self.plan, self.source, True, request)['state'])
source = Mock(return_value={'archived': False, 'default_branch': 'main'})
for response in [Mock(side_effect=ValueError('Central CircleCI credential unavailable')),
Mock(return_value={'feature_flags': {}})]:
self.assertEqual('unresolved', settings.reconcile(self.plan, source, True, response)['state'])
def test_repository_policy_requires_every_current_branch(self):
main = {**self.plan, 'profile': 'repository-policy'}
develop = {**main, 'branch': 'develop', 'profile': 'qbit'}
for plans in ([main, develop], [develop, main]):
source, request = Mock(), Mock()
result = settings.reconcile_repository(plans, [], source, True, request)
self.assertEqual('not-managed', result['state'])
source.assert_not_called()
request.assert_not_called()
for plans, findings in [
([main, {**main, 'branch': 'develop', 'changed': True}], []),
([main], [{'repository': main['repository'], 'branch': 'develop', 'state': 'unresolved'}]),
]:
request = Mock()
self.assertEqual('waiting-source', settings.reconcile_repository(
plans, findings, Mock(), True, request)['state'])
request.assert_not_called()
def test_repository_policy_checks_all_heads_and_writes_once(self):
plans = [self.plan, {**self.plan, 'branch': 'develop', 'head': 'b' * 40}]
def source(path):
if '/branches/' in path:
return {'commit': {'sha': next(p['head'] for p in plans if path.endswith('/' + p['branch']))}}
return {'archived': False, 'default_branch': 'main'}
request = Mock(side_effect=[{'feature_flags': self.before}, {},
{'feature_flags': {**self.before, 'autocancel-builds': True}}])
self.assertEqual({'state': 'enforced', 'changed': True},
settings.reconcile_repository(plans, [], source, True, request))
self.assertEqual(1, sum(len(call.args) == 2 for call in request.call_args_list))
request = Mock()
stale = lambda path: {'commit': {'sha': self.plan['head']}}
self.assertEqual('unresolved', settings.reconcile_repository(plans, [], stale, True, request)['state'])
request.assert_not_called()
if __name__ == '__main__':
unittest.main()
+27 -10
View File
@@ -5,7 +5,7 @@ scripts=$(cd "$(dirname "${BASH_SOURCE[0]}")/../src/scripts" && pwd)
scratch=$(mktemp -d)
trap 'rm -rf "$scratch"' EXIT
cd "$scratch"
mkdir -p bin node_modules/.bin packages/{ui-api-client,conformance,cli}/src
mkdir -p bin node_modules/.bin packages/{ui-api-client,core,conformance,cli}/src
export CLI_LOG="$scratch/commands" PRISM_PID_FILE="$scratch/prism-pid" CONFIG_PATH_FILE="$scratch/npm-config-path"
cat > bin/npm <<'STUB'
#!/bin/bash
@@ -35,7 +35,7 @@ chmod +x bin/* node_modules/.bin/prism
export PATH="$scratch/bin:$PATH"
: > "$CLI_LOG"
bash "$scripts/cli_verify.sh"
[[ "$(cat "$CLI_LOG")" == $'run generate\nrun build\ntest' ]]
[[ "$(cat "$CLI_LOG")" == $'run generate\nrun build\ntest\nrun lint' ]]
if [[ -e "$PRISM_PID_FILE" ]] && kill -0 "$(cat "$PRISM_PID_FILE")" 2>/dev/null; then
echo 'Prism process survived cleanup' >&2
exit 1
@@ -51,20 +51,37 @@ if [[ -e "$PRISM_PID_FILE" ]] && kill -0 "$(cat "$PRISM_PID_FILE")" 2>/dev/null;
echo 'Prism process survived cleanup' >&2
exit 1
fi
for item in 'ui-api-client qqq-ui-api-client 1.6.0-rc.1' 'conformance qqq-ui-api-conformance 1.6.0-rc.1' 'cli qqq-cli 0.1.0-rc.1'; do
read -r dir name version <<< "$item"
printf '{"name":"@qrun-io/%s","version":"%s","publishConfig":{"registry":"https://npm.pkg.github.com"}}\n' "$name" "$version" > "packages/$dir/package.json"
done
write_packages() {
local core_version=$1 core_dependency=$2 client_version=${3:-1.6.0-rc.1} cli_version=${4:-0.1.0-rc.1} item dir name version
for item in "ui-api-client qqq-ui-api-client $client_version" "core qqq-core $core_version" "conformance qqq-ui-api-conformance $client_version" "cli qqq-cli $cli_version"; do
read -r dir name version <<< "$item"
printf '{"name":"@qrun-io/%s","version":"%s","publishConfig":{"registry":"https://npm.pkg.github.com"},"dependencies":{"@qrun-io/qqq-core":"%s"}}\n' "$name" "$version" "$core_dependency" > "packages/$dir/package.json"
done
}
write_packages 0.1.0-rc.1 0.1.0-rc.1
export CIRCLE_TAG=v1.6.0-rc.1 GITHUB_TOKEN=test-not-a-credential
: > "$CLI_LOG"
bash "$scripts/cli_publish.sh"
[[ $(grep -c '^publish ' "$CLI_LOG") -eq 3 ]]
[[ $(grep -c -- '--tag rc$' "$CLI_LOG") -eq 3 ]]
[[ "$(grep '^publish ' "$CLI_LOG" | cut -d' ' -f3)" == $'@qrun-io/qqq-ui-api-client\n@qrun-io/qqq-core\n@qrun-io/qqq-ui-api-conformance\n@qrun-io/qqq-cli' ]]
[[ $(grep -c -- '--tag rc$' "$CLI_LOG") -eq 4 ]]
# Final versions publish as latest; any prerelease among the four keeps rc.
write_packages 1.0.0 1.0.0 1.6.0 1.0.0
: > "$CLI_LOG"
CIRCLE_TAG=v1.6.0 bash "$scripts/cli_publish.sh"
[[ $(grep -c -- '--tag latest$' "$CLI_LOG") -eq 4 ]]
[[ $(grep -c '^publish ' "$CLI_LOG") -eq 4 ]]
write_packages 1.0.0 1.0.0 1.6.0-rc.3 1.0.0
: > "$CLI_LOG"
CIRCLE_TAG=v1.6.0-rc.3 bash "$scripts/cli_publish.sh"
[[ $(grep -c -- '--tag rc$' "$CLI_LOG") -eq 4 ]]
[[ $(grep -c '^test$' "$CLI_LOG" || true) -eq 0 ]]
[[ ! -e "$(cat "$CONFIG_PATH_FILE")" ]]
for condition in wrong-tag missing-token denied-auth; do
for condition in wrong-tag missing-token denied-auth core-version core-dependency; do
: > "$CLI_LOG"
write_packages 0.1.0-rc.1 0.1.0-rc.1
case "$condition" in
core-version) write_packages 0.1.0-rc.2 0.1.0-rc.2; if bash "$scripts/cli_publish.sh" >/dev/null 2>&1; then exit 1; fi ;;
core-dependency) write_packages 0.1.0-rc.1 0.1.0-rc.0; if bash "$scripts/cli_publish.sh" >/dev/null 2>&1; then exit 1; fi ;;
wrong-tag) if CIRCLE_TAG=v0.1.0 bash "$scripts/cli_publish.sh" >/dev/null 2>&1; then exit 1; fi ;;
missing-token) if GITHUB_TOKEN='' bash "$scripts/cli_publish.sh" >/dev/null 2>&1; then exit 1; fi ;;
denied-auth) if FAIL_AUTH=true bash "$scripts/cli_publish.sh" >/dev/null 2>&1; then exit 1; fi ;;
@@ -74,4 +91,4 @@ for condition in wrong-tag missing-token denied-auth; do
exit 1
fi
done
printf 'PASS: CLI validation once, drift/test/smoke failures, cleanup, tag/auth checks and three rc publishes (stubbed)\n'
printf 'PASS: CLI validation once, drift/test/smoke failures, cleanup, tag/core-version/auth checks and four rc/latest publishes (stubbed)\n'
+13 -1
View File
@@ -10,7 +10,7 @@ class CliContract(unittest.TestCase):
def test_single_full_validation_and_opt_in_publication(self):
config = yaml.safe_load((ROOT / "src/jobs/cli_verify_publish.yml").read_text())
self.assertIs(config["parameters"]["publish"]["default"], False)
self.assertEqual(config["docker"], [{"image": "cimg/node:22.12"}])
self.assertEqual(config["docker"], [{"image": "cimg/node:22.23"}])
steps = config["steps"]
ci = [i for i, s in enumerate(steps) if isinstance(s, dict) and s.get("run", {}).get("command") == "npm ci"]
verify = [i for i, s in enumerate(steps) if "scripts/cli_verify.sh" in str(s)]
@@ -24,6 +24,18 @@ class CliContract(unittest.TestCase):
cache = next(s["save_cache"] for s in steps if isinstance(s, dict) and "save_cache" in s)
self.assertEqual(cache["paths"], ["~/.npm"])
def test_platform_lane_runs_install_build_test_and_lint(self):
config = yaml.safe_load((ROOT / "src/jobs/cli_platform.yml").read_text())
self.assertEqual(config["executor"], "<< parameters.executor >>")
self.assertEqual(config["parameters"]["executor"]["type"], "executor")
commands = [s["run"]["command"] if isinstance(s["run"], dict) else s["run"]
for s in config["steps"] if isinstance(s, dict) and "run" in s]
self.assertIn("npm ci", commands)
self.assertEqual(commands[-1], "npm run build && npm test && npm run lint")
self.assertNotIn("publish", str(config))
for name in ("cli_macos_arm64", "cli_windows_x64"):
self.assertTrue((ROOT / "src/executors" / (name + ".yml")).exists())
if __name__ == "__main__":
unittest.main()
+15 -3
View File
@@ -203,8 +203,21 @@ class EnforcementTests(unittest.TestCase):
enforcement.verified_rulesets('QRun-IO/example', effective, lambda path: record)
def test_empty_push_allowlist_gains_ruleset_without_changing_access(self):
classic = {'restrictions': {'users': [], 'teams': [], 'apps': []},
'enforce_admins': {'enabled': False}, 'required_signatures': {'enabled': True}}
self.assert_ruleset_preserves_classic({
'restrictions': {'users': [], 'teams': [], 'apps': []},
'enforce_admins': {'enabled': False}, 'required_signatures': {'enabled': True}})
def test_existing_protection_without_status_section_gains_ruleset(self):
for admin in (False, True):
with self.subTest(enforce_admins=admin):
self.assert_ruleset_preserves_classic({
'enforce_admins': {'enabled': admin},
'required_signatures': {'enabled': True},
'required_linear_history': {'enabled': True},
'required_pull_request_reviews': {'required_approving_review_count': 2},
'required_conversation_resolution': {'enabled': True}})
def assert_ruleset_preserves_classic(self, classic):
state = {'ruleset': None, 'writes': []}
def request(path, method='GET', payload=None):
@@ -241,7 +254,6 @@ class EnforcementTests(unittest.TestCase):
self.assertEqual(1, len(state['writes']))
self.assertEqual([], state['writes'][0]['bypass_actors'])
self.assertEqual({'include': ['refs/heads/main'], 'exclude': []}, state['writes'][0]['conditions']['ref_name'])
self.assertFalse(plan['before']['enforce_admins']['enabled'])
self.assertEqual(classic, plan['before'])
repeat = enforcement.inspect('QRun-IO/example', 'main', '0.8', request)
self.assertFalse(repeat['changed'])
+90 -5
View File
@@ -378,6 +378,57 @@ class PipelineTests(unittest.TestCase):
for packed in ([False, True] if PACKED else [False]):
self.assert_full(self.render(packed=packed, CIRCLE_BRANCH="", CIRCLE_TAG="publish-test"))
def test_application_template_source_and_packed_is_exact_source_acceptance(self):
self.write_manifest(profile="application-template")
for packed in ([False, True] if PACKED else [False]):
result = self.render(packed=packed, CIRCLE_BRANCH="main")
self.assertEqual({"verify": {"jobs": ["verify-template"]}}, result["workflows"])
self.assertEqual({"verify-template"}, set(result["jobs"]))
job = result["jobs"]["verify-template"]
self.assertEqual("cimg/openjdk:21.0", job["docker"][0]["image"])
runs = [step["run"]["command"] for step in job["steps"] if isinstance(step, dict) and "run" in step]
self.assertEqual(3, len(runs))
self.assertIn('"$PWD" "$output"', runs[1])
self.assertIn('engine.render(Path.of(args[1])', runs[1])
self.assertNotIn('PostGenExecutor', runs[1])
self.assertIn(' verify', runs[2])
self.assertNotIn('skipTests', runs[2])
self.assertNotIn('deploy', runs[2])
for invalid in ({"publish": {"release": True}}, {"command": "true"}, {"renderer_sha": "main"}):
self.write_manifest(profile="application-template", **invalid)
self.render(ok=False)
def test_template_uncached_renderer_build_runs_in_renderer_directory(self):
self.write_manifest(profile="application-template")
tool = self.root / "renderer"
(tool / ".git").mkdir(parents=True)
binaries = self.root / "bin"
binaries.mkdir()
commands = {
"git": "#!/bin/bash\nprintf '%s\\n' d84a5783bf09c58e42ba72203247f20bd5779302\n",
"mvn": '#!/bin/bash\nset -eu\ntest "$PWD" = "$QQQ_TEMPLATE_TOOL_DIR"\nprintf "%s\\n" "$*" >> "$MAVEN_CALLS"\n',
}
for name, script in commands.items():
path = binaries / name
path.write_text(script, encoding="utf-8")
path.chmod(0o755)
for packed in ([False, True] if PACKED else [False]):
with self.subTest(packed=packed):
result = self.render(packed=packed, CIRCLE_BRANCH="main")
bootstrap = next(step["run"]["command"] for step in result["jobs"]["verify-template"]["steps"]
if isinstance(step, dict) and "run" in step)
calls = self.root / ("maven-packed.log" if packed else "maven-source.log")
env = {**self.env, "PATH": str(binaries) + os.pathsep + os.environ["PATH"],
"QQQ_TEMPLATE_TOOL_DIR": str(tool), "QQQ_TEMPLATE_MAVEN_REPO": str(self.root / "m2"),
"MAVEN_CALLS": str(calls)}
completed = subprocess.run(["bash", "-c", bootstrap], cwd=self.repo, env=env,
capture_output=True, text=True)
self.assertEqual(0, completed.returncode, completed.stderr)
invoked = calls.read_text().splitlines()
self.assertEqual(2, len(invoked))
self.assertIn(" install ", invoked[0])
self.assertIn("dependency:build-classpath", invoked[1])
def test_homebrew_source_and_packed_is_one_nonpublishing_job(self):
self.write_manifest(profile="homebrew-tap", tap="qrun-io/qctl", formula="qctl")
for packed in ([False, True] if PACKED else [False]):
@@ -562,6 +613,15 @@ class PipelineTests(unittest.TestCase):
for entry in baseline["workflows"]["publish_snapshot"]["jobs"]:
if "qqq-orb/mvn_publish" in entry:
entry["qqq-orb/mvn_publish"]["requires"] += ["snapshot_sample_coverage_gate", "qqq-orb/static_analysis"]
# Dependency assembly repeats neither analyzer; all acceptance commands stay exact.
assembly_jobs = ("sample_acceptance", "sample_multinode_acceptance", "sample_consumer_acceptance")
for name in assembly_jobs:
assemblies = [step["run"] for step in baseline["jobs"][name]["steps"]
if isinstance(step, dict) and "run" in step
and "-DskipTests clean install" in step["run"]["command"]]
self.assertEqual(len(assemblies), 1, name)
assemblies[0]["command"] = assemblies[0]["command"].replace(
"-DskipTests clean install", "-DskipTests -Dspotbugs.skip=true -Dpmd.skip=true clean install")
self.git("tag", "v1.0.0")
self.git("tag", "publish-fixture")
events = [("feature/test", "", "test_only"), ("develop", "", "publish_snapshot"),
@@ -706,6 +766,33 @@ class PipelineTests(unittest.TestCase):
if PACKED:
self.assertEqual(self.render(), self.render(packed=True))
def test_cli_platform_lanes_are_opt_in_and_gate_publication(self):
self.write_manifest(profile="cli", default_branch="main")
jobs = self.render(CIRCLE_BRANCH="main")["workflows"]["test_only"]["jobs"]
self.assertEqual([next(iter(job)) for job in jobs], ["qqq-orb/cli_verify_publish"])
for invalid in (["linux-x64"], ["macos-arm64", "macos-arm64"], "macos-arm64", [{"macos-arm64": True}]):
self.write_manifest(profile="cli", default_branch="main", platforms=invalid)
self.render(ok=False)
self.write_manifest(profile="qbit", platforms=["macos-arm64"])
self.render(ok=False)
self.write_manifest(profile="cli", default_branch="main", platforms=["macos-arm64", "windows-x64"])
jobs = self.render(CIRCLE_BRANCH="main")["workflows"]["test_only"]["jobs"]
lanes = [job["qqq-orb/cli_platform"] for job in jobs[:2]]
self.assertEqual([(lane["name"], lane["executor"]) for lane in lanes],
[("cli-macos-arm64", "qqq-orb/cli_macos_arm64"), ("cli-windows-x64", "qqq-orb/cli_windows_x64")])
verify = jobs[2]["qqq-orb/cli_verify_publish"]
self.assertNotIn("requires", verify)
self.assertTrue(all(lane["filters"] == verify["filters"] for lane in lanes))
self.write_manifest(profile="cli", default_branch="main", platforms=["windows-x64"],
publish={"release": True}, publish_context="verified-packages")
self.git("tag", "v1.0.0-RC.2")
jobs = self.render(CIRCLE_TAG="v1.0.0-RC.2")["workflows"]["publish_release"]["jobs"]
self.assertEqual(jobs[0]["qqq-orb/cli_platform"]["name"], "cli-windows-x64")
self.assertNotIn("context", jobs[0]["qqq-orb/cli_platform"])
self.assertEqual(jobs[1]["qqq-orb/cli_verify_publish"]["requires"], ["cli-windows-x64"])
if PACKED:
self.assertEqual(self.render(CIRCLE_TAG="v1.0.0-RC.2"), self.render(packed=True, CIRCLE_TAG="v1.0.0-RC.2"))
def test_voyage_selected_workflow_retains_all_filters_and_actions(self):
self.write_manifest(profile="voyage")
template = json.loads(json.dumps(pipeline.VOYAGE_TEMPLATE).replace("__ORB_VERSION__", "0.7.0"))
@@ -717,18 +804,16 @@ class PipelineTests(unittest.TestCase):
expected = copy.deepcopy(template)
expected["workflows"] = {"verify": expected["workflows"][selected]}
self.assertEqual(expected, result)
jobs = {next(iter(job)): next(iter(job.values())) for job in result["workflows"]["verify"]["jobs"]}
jobs = {next(iter(job.values())).get("name", next(iter(job))): next(iter(job.values())) for job in result["workflows"]["verify"]["jobs"]}
if selected == "release":
for name in ("update-cd-repo", "release-please"):
self.assertEqual({"branches": {"only": "main"}}, jobs[name]["filters"])
if selected in ("release", "develop"):
self.assertIn("sonar-scan", jobs)
self.assertEqual(["sonarcloud"], jobs["sonar-scan"]["context"])
self.assertNotIn("sonar", json.dumps(result).lower())
def test_voyage_owns_complete_template(self):
self.write_manifest(profile="voyage")
result = self.render(CIRCLE_BRANCH="release/1")
self.assertEqual(len(result["jobs"]), 9)
self.assertEqual(len(result["jobs"]), 7)
self.assertEqual(list(result["workflows"]), ["verify"])
self.assertNotIn("__ORB_VERSION__", json.dumps(result))
self.assertEqual(result["orbs"]["qqq-orb"], "kingsrook/qqq-orb@0.7.0")
+28
View File
@@ -0,0 +1,28 @@
"""Capability probes must drain help output while still rejecting missing options."""
from pathlib import Path
import shlex
import subprocess
import unittest
class InstallerTests(unittest.TestCase):
def probe(self, flags):
installer = Path(__file__).resolve().parents[1] / 'tools/install_reconcile_gh.sh'
checks = '\n'.join(line for line in installer.read_text().splitlines()
if line.startswith(('gh api --help', 'gh pr merge --help')))
self.assertEqual(2, len(checks.splitlines()))
producer = ("import signal,sys; signal.signal(signal.SIGPIPE,signal.SIG_DFL); "
f"print({flags!r},flush=True); sys.stdout.write('x'*1048576)")
script = 'set -euo pipefail\ngh() { python3 -c ' + shlex.quote(producer) + '; }\n' + checks
return subprocess.run(['bash', '-c', script], capture_output=True, timeout=10).returncode
def test_large_help_output_does_not_kill_producer(self):
self.assertEqual(0, self.probe('--slurp --match-head-commit'))
def test_missing_required_option_fails(self):
self.assertNotEqual(0, self.probe('--slurp'))
self.assertNotEqual(0, self.probe('--match-head-commit'))
if __name__ == '__main__':
unittest.main()
+3 -1
View File
@@ -43,7 +43,7 @@ class MavenCiContract(unittest.TestCase):
self.assertIs(job["parameters"]["notify_rc_published"]["default"], False)
self.assertIs(read("src/commands/git_operations.yml")["parameters"]["require_pushed_version"]["default"], False)
steps = job["steps"]
deploy = steps.index("mvn_jar_deploy")
deploy = next(i for i, s in enumerate(steps) if isinstance(s, dict) and "mvn_jar_deploy" in s)
pushed = next(i for i, s in enumerate(steps) if "git_operations" in str(s))
dispatch = next(i for i, s in enumerate(steps) if "notify_rc_published.sh" in str(s))
self.assertLess(deploy, pushed)
@@ -57,6 +57,8 @@ class MavenCiContract(unittest.TestCase):
return next(i for i, s in enumerate(steps) if s == name or isinstance(s, dict) and name in s)
self.assertLess(position("mvn_manage_version"), position("mvn_verify"))
self.assertLess(position("mvn_verify"), position("mvn_jar_deploy"))
self.assertEqual(steps[position("mvn_jar_deploy")], {"mvn_jar_deploy": {"skip_verified_analysis": True}})
self.assertIs(read("src/commands/mvn_jar_deploy.yml")["parameters"]["skip_verified_analysis"]["default"], False)
self.assertTrue(any("check_middleware_api_versions" in str(s) for s in steps[position("mvn_verify") + 1:position("mvn_jar_deploy")]))
deploy = (ROOT / "src/scripts/mvn_jar_deploy.sh").read_text()
self.assertIn("-P release", deploy)
+16 -1
View File
@@ -56,13 +56,28 @@ org.codehaus.mojo:flatten-maven-plugin:1.7.3:flatten
deploy
EOF
diff -u "$test_dir/expected-args" "$test_dir/mvn-args"
# The verified publishing job skips only duplicate analysis. Every signing,
# flattening and publication argument must remain identical to the default.
for mode in true 1 false 0; do
PATH="$test_dir/bin:$PATH" TEST_MVN_ARGS="$test_dir/verified-args" \
GPG_KEYNAME=test-key GPG_PASSPHRASE=test-passphrase QQQ_SKIP_VERIFIED_ANALYSIS="$mode" \
bash "$test_dir/deploy.sh" > "$test_dir/verified-output" 2>&1
if [[ "$mode" == true || "$mode" == 1 ]]; then
grep -Fxq -- '-Dspotbugs.skip=true' "$test_dir/verified-args"
grep -Fxq -- '-Dpmd.skip=true' "$test_dir/verified-args"
grep -Fxv -e '-Dspotbugs.skip=true' -e '-Dpmd.skip=true' "$test_dir/verified-args" > "$test_dir/verified-common-args"
diff -u "$test_dir/expected-args" "$test_dir/verified-common-args"
else
diff -u "$test_dir/expected-args" "$test_dir/verified-args"
fi
done
# A Central validation failure or publication timeout must fail this wrapper.
cat > "$test_dir/bin/mvn" <<'EOF'
#!/bin/bash
exit 42
EOF
set +e
PATH="$test_dir/bin:$PATH" GPG_KEYNAME=test-key GPG_PASSPHRASE=test-passphrase \
PATH="$test_dir/bin:$PATH" GPG_KEYNAME=test-key GPG_PASSPHRASE=test-passphrase QQQ_SKIP_VERIFIED_ANALYSIS=true \
bash "$test_dir/deploy.sh" > "$test_dir/failure-output" 2>&1
status=$?
set -e
+149
View File
@@ -0,0 +1,149 @@
"""Native recognition proves central ownership and app-bound verification gates."""
import base64
import copy
from pathlib import Path
import sys
import unittest
from unittest import mock
import yaml
ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT / 'tools'))
import native_specialist_gates as native
import reconcile_enrollment as remote
import enforce_orb_checks as enforcement
import finish_enrollment as finish
class NativeTests(unittest.TestCase):
def fixture(self, repo):
self.repo, self.pin, self.head = repo, 'a' * 40, 'b' * 40
self.profile, self.branches, kinds, _ = native.DEFINITIONS[repo]
self.callers = dict(native.caller(kind, self.pin) for kind in kinds)
self.paths = list(self.callers)
self.signed, self.drift, self.truncated = True, False, False
self.mode = '100644'
self.runs = [{'id': i, 'name': gate['context'], 'app': {'id': gate['app_id']},
'status': 'completed', 'conclusion': 'success'}
for i, gate in enumerate(native.gates(self.profile))]
self.before = {'required_status_checks': {'strict': True, 'checks': native.gates(self.profile)},
'enforce_admins': {'enabled': True}}
def request(self, path, method='GET', payload=None):
self.assertEqual('GET', method)
if '/contents/' in path:
self.assertNotIn('.circleci/', path)
file = path.split('/contents/')[1].split('?')[0]
if path.startswith('repos/QRun-IO/qqq-orb/'):
raw = (ROOT / file).read_text() + ('# changed' if self.drift else '')
else:
raw = yaml.safe_dump(self.callers[file], sort_keys=False)
return {'type': 'file', 'encoding': 'base64', 'content': base64.b64encode(raw.encode()).decode()}
if '/git/trees/' in path:
return {'truncated': self.truncated, 'tree': [{'path': p, 'type': 'blob', 'mode': self.mode} for p in self.paths]}
if path.endswith('/commits/' + self.pin):
return {'commit': {'verification': {'verified': self.signed}}}
if '/check-runs?' in path:
return {'check_runs': copy.deepcopy(self.runs)}
if '/status?' in path:
return {'statuses': []}
if path.endswith('/protection'):
return copy.deepcopy(self.before)
if '/rules/branches/' in path:
return []
if '/branches/' in path:
return {'commit': {'sha': self.head}}
return {'archived': False, 'default_branch': 'main'}
def test_all_approved_callers_discover_enforce_and_qualify_without_mutation(self):
for repo in native.DEFINITIONS:
self.fixture(repo)
for branch in self.branches:
with self.subTest(repo=repo, branch=branch), mock.patch.object(remote, 'api', side_effect=self.request):
plan = remote.inspect({'repository': repo, 'branch': branch}, '0.8')
self.assertEqual(self.profile, plan['profile'])
self.assertFalse(plan['changed'])
self.assertEqual(set(self.callers), set(plan['worker_pins']))
self.assertEqual({'state': 'unchanged'}, remote.apply(plan))
self.assertEqual({'state': 'unchanged'}, finish.merge_ready(plan, {'state': 'unchanged'}))
self.assertEqual([], finish.qualification(repo, self.head, self.profile))
protected = enforcement.inspect(repo, branch, '0.8', self.request)
self.assertFalse(protected['changed'])
enforcement.enforce(protected, self.request)
def test_failed_missing_wrong_app_and_newer_failed_gate_reject(self):
for repo in native.DEFINITIONS:
self.fixture(repo)
good = copy.deepcopy(self.runs)
for bad in [[], good[1:], [dict(x, app={'id': 18001}) for x in good],
good + [dict(good[0], id=99, conclusion='failure')]]:
self.runs = bad
with self.subTest(repo=repo), self.assertRaises(ValueError):
enforcement.inspect(repo, 'main', '0.8', self.request)
def test_custom_caller_unsigned_or_changed_worker_rejects(self):
for repo in native.DEFINITIONS:
for defect in ('caller', 'unsigned', 'worker', 'mutable'):
self.fixture(repo)
if defect == 'caller':
next(iter(self.callers.values()))['extra'] = True
elif defect == 'unsigned':
self.signed = False
elif defect == 'worker':
self.drift = True
else:
jobs = next(iter(self.callers.values()))['jobs']
job = next(iter(jobs.values()))
job['uses'] = job['uses'].replace(self.pin, 'main')
with self.subTest(repo=repo, defect=defect), self.assertRaises(ValueError):
native.validate(repo, self.head, 'main', self.request)
def test_complete_workflow_inventory_required(self):
self.fixture('QRun-IO/qqq-business-platform')
for path in ('.circleci/config.yml', '.github/workflows/custom.yml', '.github/workflows/extra.yaml'):
self.paths.append(path)
with self.assertRaisesRegex(ValueError, 'additional orchestration'):
native.validate(self.repo, self.head, 'main', self.request)
self.paths.pop()
self.truncated = True
with self.assertRaisesRegex(ValueError, 'complete source tree'):
native.validate(self.repo, self.head, 'main', self.request)
def test_symlinked_or_missing_caller_rejects(self):
self.fixture('QRun-IO/qctl')
self.mode = '120000'
with self.assertRaisesRegex(ValueError, 'regular source file'):
native.validate(self.repo, self.head, 'main', self.request)
self.paths = []
with self.assertRaisesRegex(ValueError, 'regular source file'):
native.validate(self.repo, self.head, 'main', self.request)
def test_unknown_repo_and_unapproved_branch_reject(self):
self.fixture('QRun-IO/qqq-mcp-rag')
for repo, branch in [('QRun-IO/unknown', 'main'), (self.repo, 'develop'), ('QRun-IO/qctl', 'release/old')]:
with self.assertRaises(ValueError):
native.validate(repo, self.head, branch, self.request)
def test_qctl_pr_gate_excludes_push_only_native_binary_job(self):
worker = native.load_workflow((ROOT / '.github/workflows/qctl-native.yml').read_text())
self.assertNotIn('if', worker['jobs']['test'])
self.assertEqual("github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.full_native)",
worker['jobs']['build-native']['if'])
self.assertEqual([{'context': 'native / test', 'app_id': 15368}], native.gates('qctl'))
def test_github_yaml_events_and_duplicate_keys(self):
self.assertEqual({'on': {'push': None}, 'enabled': True},
native.load_workflow('on:\n push:\nenabled: true\n'))
for raw in ('on: {}\non: {}\n', 'jobs: {build: {}, build: {}}\n', '1: value\n'):
with self.subTest(raw=raw), self.assertRaises(ValueError):
native.load_workflow(raw)
def test_native_enforcement_preserves_other_required_checks(self):
self.fixture('QRun-IO/qctl')
self.before['required_status_checks']['checks'].append({'context': 'security', 'app_id': 15368})
plan = enforcement.inspect(self.repo, 'main', '0.8', self.request)
self.assertIn({'context': 'security', 'app_id': 15368}, plan['required_status_checks']['checks'])
if __name__ == '__main__':
unittest.main()
+34
View File
@@ -76,6 +76,7 @@ sys.exit(subprocess.run([os.environ['TEST_REAL_NODE'], *sys.argv[1:]], input=sou
def test_tags_and_legacy_authentication(self):
for trusted in [True, False]:
for version, tag in [('1.0.0-RC.1', 'rc'), ('1.0.0-SNAPSHOT', 'snapshot'),
('1.0.0-SNAPSHOT.101', 'snapshot'),
('1.0.0-alpha.1', 'next'), ('1.0.0-beta.1', 'next'), ('1.0.0', 'latest')]:
with self.subTest(trusted=trusted, version=version):
result, args, oidc = self.run_publish(version, trusted)
@@ -133,5 +134,38 @@ sys.exit(subprocess.run([os.environ['TEST_REAL_NODE'], *sys.argv[1:]], input=sou
self.assertNotIn('Successfully published', result.stdout)
class SnapshotVersionTests(unittest.TestCase):
def test_snapshot_jobs_keep_source_head_and_publish_distinct_versions(self):
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
def git(*args):
return subprocess.check_output(['git', *args], cwd=root, text=True).strip()
git('init', '-q', '-b', 'develop')
source = '{"name": "snapshot-test", "version": "0.40.27-SNAPSHOT"}\n'
package = root / 'package.json'
package.write_text(source)
git('add', 'package.json')
git('-c', 'user.name=Test', '-c', 'user.email=test@example.invalid',
'-c', 'commit.gpgsign=false', 'commit', '-qm', 'initial source')
head = git('rev-parse', 'HEAD')
for number in ('101', '102'):
package.write_text(source)
env = dict(os.environ, CIRCLE_BUILD_NUM=number, BRANCH_TYPE='snapshot')
subprocess.run(['bash', str(SCRIPT.parent / 'sync-npm-version.sh')],
cwd=root, env=env, check=True, capture_output=True)
self.assertEqual(json.loads(package.read_text())['version'], '0.40.28-SNAPSHOT.' + number)
subprocess.run(['bash', str(SCRIPT.parent / 'node_version_commit.sh')],
cwd=root, env=env, check=True, capture_output=True)
self.assertEqual(git('rev-parse', 'HEAD'), head)
self.assertEqual(git('diff', '--cached', '--name-only'), '')
for number in ('', '0', '01', '-1', 'abc'):
package.write_text(source)
result = subprocess.run(['bash', str(SCRIPT.parent / 'sync-npm-version.sh')],
cwd=root, env=dict(os.environ, CIRCLE_BUILD_NUM=number),
capture_output=True)
self.assertNotEqual(result.returncode, 0)
self.assertEqual(package.read_text(), source)
if __name__ == '__main__':
unittest.main()
+1
View File
@@ -30,6 +30,7 @@ class RunnerTests(unittest.TestCase):
output = Path(args[args.index('--output') + 1])
output.write_text('[{"state":"unresolved"}]')
self.assertEqual(1200, kwargs['timeout'])
self.assertIn('--circle-settings', args)
self.assertEqual('test-only-secret', kwargs['env']['GH_TOKEN'])
raise subprocess.TimeoutExpired(args, 1200)
self.assertEqual(124, run_enrollment.run(self.environment(), execute, directory))
+45
View File
@@ -0,0 +1,45 @@
"""Voyage delegates live GitOps updates to the existing shared updater."""
import json
import os
from pathlib import Path
import subprocess
import tempfile
import unittest
TEMPLATE = json.loads((Path(__file__).resolve().parents[1] / "src/scripts/templates/voyage.json").read_text())
class VoyageGitOps(unittest.TestCase):
def test_live_target_uses_shared_updater_only_after_main_image_publication(self):
self.assertNotIn('update-cd-repo', TEMPLATE['jobs'])
self.assertEqual(TEMPLATE['orbs']['munitor'], 'kof22/munitor@0.3.11')
invocations = [(workflow, entry['munitor/update_cd_repo'])
for workflow, body in TEMPLATE['workflows'].items() for entry in body['jobs']
if 'munitor/update_cd_repo' in entry]
self.assertEqual(len(invocations), 1)
workflow, options = invocations[0]
self.assertEqual(workflow, 'release')
self.assertEqual(options['cd_repo'], 'KofTwentyTwo/cluster-gitops')
self.assertEqual(options['cd_path'], 'tenants/voyage/kustomization.yaml')
self.assertEqual(options['cd_image_name'], 'ghcr.io/qrun-io/voyage')
self.assertEqual(options['cd_format'], 'kustomize')
self.assertEqual(options['requires'], ['docker-build'])
self.assertEqual(options['context'], ['github'])
self.assertEqual(options['filters'], {'branches': {'only': 'main'}})
def test_updater_receives_published_commit_tag_and_rejects_invalid_revision(self):
options = next(entry['munitor/update_cd_repo'] for entry in TEMPLATE['workflows']['release']['jobs']
if 'munitor/update_cd_repo' in entry)
command = options['pre-steps'][0]['run']['command']
with tempfile.TemporaryDirectory() as directory:
env_file = Path(directory) / 'bash-env'
for revision in ('a' * 40, '', 'main', 'a' * 39):
env_file.write_text('')
env = {**os.environ, 'BASH_ENV': str(env_file), 'CIRCLE_SHA1': revision}
result = subprocess.run(['bash', '-c', command], env=env, capture_output=True)
if revision == 'a' * 40:
self.assertEqual(result.returncode, 0, result.stderr)
self.assertEqual(env_file.read_text(), "export PROJECT_VERSION='aaaaaaa'\n")
else:
self.assertNotEqual(result.returncode, 0)
self.assertEqual(env_file.read_text(), '')
+15 -8
View File
@@ -28,7 +28,7 @@ def selected(branch):
continue
if "ignore" in filters and matches(filters["ignore"], branch):
continue
found.append((workflow, name, options))
found.append((workflow, options.get("name", name), options))
return found
@@ -39,7 +39,8 @@ class VoyageContract(unittest.TestCase):
jobs = selected(branch)
self.assertEqual({w for w, _, _ in jobs}, {workflow})
self.assertEqual([n for _, n, _ in jobs].count("build-and-test"), 1)
self.assertEqual(selected("release-please--branches--main"), [])
self.assertEqual({n for _, n, _ in selected("release-please--branches--main")},
{"build-and-test", "secrets-scan", "sast-scan", "security-scan"})
def test_verify_owns_tests_quality_and_coverage_without_skips(self):
jobs = TEMPLATE["jobs"]
@@ -61,16 +62,22 @@ class VoyageContract(unittest.TestCase):
paths = next(s["persist_to_workspace"]["paths"] for s in steps if isinstance(s, dict) and "persist_to_workspace" in s)
for path in ("target/site", "target/jacoco.exec", "target/voyage.jar", "target/classes", "target/test-classes"):
self.assertIn(path, paths)
sonar = json.dumps(TEMPLATE["jobs"]["sonar-scan"])
self.assertIn("target/site/jacoco/jacoco.xml", sonar)
self.assertIn("attach_workspace", sonar)
artifacts = [s["store_artifacts"]["path"] for s in steps if isinstance(s, dict) and "store_artifacts" in s]
for path in ("target/site", "target/checkstyle-result.xml", "target/spotbugsXml.xml", "target/pmd.xml"):
self.assertIn(path, artifacts)
def test_quality_requires_no_sonar_service_or_credentials(self):
self.assertNotIn("sonar", json.dumps(TEMPLATE).lower())
for branch in ("main", "develop", "release/1.0", "feature/example"):
names = {name for _, name, _ in selected(branch)}
self.assertTrue({"build-and-test", "secrets-scan", "sast-scan", "security-scan"}.issubset(names))
def test_all_workflow_dependencies_exist_and_preserve_release_boundaries(self):
for workflow, body in TEMPLATE["workflows"].items():
names = {next(iter(entry)) for entry in body["jobs"]}
names = {next(iter(entry.values())).get("name", next(iter(entry))) for entry in body["jobs"]}
for entry in body["jobs"]:
name, options = next(iter(entry.items()))
self.assertIn(name, TEMPLATE["jobs"])
self.assertTrue(name in TEMPLATE["jobs"] or name == "munitor/update_cd_repo")
self.assertTrue(set(options.get("requires", [])).issubset(names))
for branch in ("feature/example", "release/1.0", "develop"):
self.assertNotIn("update-cd-repo", [n for _, n, _ in selected(branch)])
@@ -107,7 +114,7 @@ class VoyageContract(unittest.TestCase):
self.assertIn('--exit-code 1', json.dumps(jobs["docker-build"]))
self.assertIn('--severity CRITICAL,HIGH', json.dumps(jobs["docker-build"]))
self.assertIn('ghcr.io/qrun-io/voyage', json.dumps(jobs["docker-build"]))
self.assertIn('overlays/production/kustomization.yaml', json.dumps(jobs["update-cd-repo"]))
self.assertNotIn('update-cd-repo', jobs)
owasp = '\n'.join(s["run"]["command"] for s in jobs["security-scan"]["steps"] if isinstance(s, dict) and "run" in s)
self.assertIn('--severity HIGH,CRITICAL --exit-code 1', owasp)
self.assertIn('target/voyage.jar:/scan/voyage.jar:ro', owasp)
+42
View File
@@ -0,0 +1,42 @@
"""Execute Voyage release commands; CD implementation belongs to Munitor."""
import json
import os
from pathlib import Path
import subprocess
import tempfile
import unittest
ROOT = Path(__file__).resolve().parents[1]
TEMPLATE = json.loads((ROOT / "src/scripts/templates/voyage.json").read_text())
COMMAND = next(step["run"]["command"] for step in TEMPLATE["jobs"]["release-please"]["steps"]
if isinstance(step, dict) and "run" in step)
class VoyageRelease(unittest.TestCase):
def run_release(self, fail=False):
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
npx = root / "npx"
npx.write_text('''#!/usr/bin/env python3
import json, os, sys
with open(os.environ['EVENTS'], 'a') as output:
output.write(json.dumps(sys.argv[1:])+'\\n')
assert '--target-branch=main' in sys.argv
if os.environ['FAILURE']=='true' and 'github-release' in sys.argv: sys.exit(25)
''')
npx.chmod(0o755)
events = root / "events.jsonl"
env = {**os.environ, "PATH": str(root) + os.pathsep + os.environ["PATH"],
"EVENTS": str(events), "FAILURE": str(fail).lower(), "GITHUB_TOKEN": "fixture-token"}
result = subprocess.run(["bash", "-c", COMMAND], cwd=root, env=env, capture_output=True, text=True)
return result, [json.loads(line) for line in events.read_text().splitlines()]
def test_release_targets_main_for_both_commands(self):
result, rows = self.run_release()
self.assertEqual(result.returncode, 0, result.stderr)
self.assertEqual([args[1] for args in rows], ['github-release', 'release-pr'])
def test_release_failure_is_not_hidden_by_second_command(self):
result, rows = self.run_release(fail=True)
self.assertEqual(result.returncode, 25, result.stderr)
self.assertEqual(len(rows), 1)
+1 -1
View File
@@ -46,7 +46,7 @@ PROFILES = {'qqq': 'core', 'qqq-frontend-material-dashboard': 'frontend-material
'qqq-android': 'android', 'qqq-mcp-rag-standard-policies': 'mcp-policy',
'marketing-website': 'marketing', 'qqq-mcp-rag': 'native-mcp',
'qqq-business-platform': 'native-business', '.github': 'native-workflow-lint',
'homebrew-qctl': 'homebrew-tap', 'qqq-meta-manager': 'repository-policy', 'qqq-templates-hub': 'repository-policy', 'qqq-orb': 'owner-bootstrap', 'marketing-website-cd': 'native-gitops', 'voyage-cd': 'native-gitops'}
'new-qqq-application-template': 'application-template', 'homebrew-qctl': 'homebrew-tap', 'qqq-meta-manager': 'repository-policy', 'qqq-templates-hub': 'repository-policy', 'qqq-orb': 'owner-bootstrap', 'marketing-website-cd': 'native-gitops', 'voyage-cd': 'native-gitops'}
NO_CI = json.loads((ROOT / 'tools/no-ci-policy.json').read_text(encoding='utf-8'))
+78
View File
@@ -0,0 +1,78 @@
"""Manage native cost controls only for profiles with reviewed cancellation semantics."""
import json
import os
import re
from urllib.error import URLError
from urllib.request import Request, urlopen
AUTOCANCEL_PROFILES = {'repository-policy', 'homebrew-tap', 'application-template', 'marketing'}
def request(repository, payload=None):
"""Use existing central credentials; never expose authentication or error bodies."""
if not re.fullmatch(r'QRun-IO/[A-Za-z0-9_.-]+', repository):
raise ValueError('Only QRun-IO projects can be managed')
token = os.environ.get('CIRCLE_TOKEN')
if not token:
raise ValueError('Central CircleCI credential unavailable')
headers = {'Circle-Token': token, 'Accept': 'application/json'}
if payload is not None:
headers['Content-Type'] = 'application/json'
operation = Request('https://circleci.com/api/v1.1/project/github/' + repository + '/settings',
headers=headers, method='GET' if payload is None else 'PUT',
data=None if payload is None else json.dumps(payload).encode())
try:
with urlopen(operation, timeout=30) as response:
return json.load(response)
except (URLError, ValueError):
raise ValueError('CircleCI project settings unavailable') from None
def reconcile(plan, source_request, apply=False, settings_request=request):
"""Require a current canonical source and preserve every unrelated project flag."""
if plan['profile'] not in AUTOCANCEL_PROFILES:
return {'state': 'not-managed', 'reason': 'Profile cancellation policy not reviewed'}
if plan['changed']:
return {'state': 'waiting-source', 'reason': 'Canonical enrollment must land first'}
repo = plan['repository']
try:
info = source_request(f'repos/{repo}')
if info['archived'] or (plan['profile'] == 'marketing' and info['default_branch'] != 'main'):
raise ValueError('Repository default branch or archive state differs from policy')
before = settings_request(repo)['feature_flags']
if not isinstance(before, dict) or type(before.get('autocancel-builds')) is not bool:
raise ValueError('CircleCI cancellation flag is missing or invalid')
changed = not before['autocancel-builds']
if apply and changed:
if source_request(f'repos/{repo}/branches/{plan["branch"]}')['commit']['sha'] != plan['head']:
raise ValueError('Source changed after enrollment inspection')
settings_request(repo, {'feature_flags': {'autocancel-builds': True}})
after = settings_request(repo)['feature_flags']
if after != {**before, 'autocancel-builds': True}:
raise ValueError('CircleCI settings readback differs from the narrow update')
return {'state': 'enforced' if apply else 'inspected', 'changed': changed}
except (ValueError, KeyError, TypeError) as error:
return {'state': 'unresolved', 'reason': str(error)}
def reconcile_repository(plans, findings, source_request, apply=False, settings_request=request):
"""A project-wide flag requires agreement across all discovered current branches."""
repo = plans[0]['repository']
if any(plan['repository'] != repo for plan in plans):
raise ValueError('Expected one repository')
if any(row['repository'] == repo and row.get('state') == 'unresolved' for row in findings):
return {'state': 'waiting-source', 'reason': 'A current branch is unresolved'}
if any(plan['profile'] not in AUTOCANCEL_PROFILES for plan in plans):
return {'state': 'not-managed', 'reason': 'A current branch has an unreviewed cancellation policy'}
if any(plan['changed'] for plan in plans):
return {'state': 'waiting-source', 'reason': 'All current branches must have canonical enrollment'}
try:
for plan in plans:
if source_request(f'repos/{repo}/branches/{plan["branch"]}')['commit']['sha'] != plan['head']:
raise ValueError('Source changed after enrollment inspection')
except (ValueError, KeyError, TypeError) as error:
return {'state': 'unresolved', 'reason': str(error)}
# Preserve the marketing default-branch guard even in mixed eligible profiles.
plan = next((p for p in plans if p['profile'] == 'marketing'), plans[0])
return reconcile(plan, source_request, apply, settings_request)
+16 -3
View File
@@ -15,7 +15,7 @@ standard = importlib.util.module_from_spec(spec)
spec.loader.exec_module(standard)
DESIRED = [{'context': name, 'app_id': 18001} for name in ('setup', 'verify')]
PROFILE_GATES = {profile: 'verify' for profile in (
'qbit', 'core', 'frontend-core', 'frontend-material', 'repository-policy', 'node-artifact', 'homebrew-tap', 'marketing', 'voyage')}
'qbit', 'core', 'frontend-core', 'frontend-material', 'repository-policy', 'node-artifact', 'homebrew-tap', 'application-template', 'marketing', 'voyage')}
PROFILE_GATES.update({'all': 'verify-and-smoke', 'cli': 'test_only',
'app-starter': 'test_only', 'android': 'test-and-build',
'mcp-policy': 'validate'})
@@ -27,8 +27,15 @@ _gitops_spec = importlib.util.spec_from_file_location('native_gitops_gates', ROO
gitops = importlib.util.module_from_spec(_gitops_spec)
_gitops_spec.loader.exec_module(gitops)
_specialist_spec = importlib.util.spec_from_file_location('native_specialist_gates', ROOT / 'tools/native_specialist_gates.py')
specialists = importlib.util.module_from_spec(_specialist_spec)
_specialist_spec.loader.exec_module(specialists)
PROFILES |= specialists.PROFILES
def gates(profile):
if profile in specialists.PROFILES:
return specialists.gates(profile)
if profile == 'native-gitops':
return gitops.gates()
if profile == 'frontend-next':
@@ -115,7 +122,9 @@ def inspect(repo, branch, version, request=api):
raise ValueError('Archived repository')
prefix = root + '/branches/' + branch
head = request(prefix)['commit']['sha']
if repo in gitops.REPOSITORIES:
if repo in specialists.DEFINITIONS:
profile, _ = specialists.validate(repo, head, branch, request)
elif repo in gitops.REPOSITORIES:
gitops.validate(repo, head, branch, request, standard.load_yaml)
profile = 'native-gitops'
else:
@@ -138,9 +147,13 @@ def inspect(repo, branch, version, request=api):
rulesets, ruleset_strict = verified_rulesets(repo, rules, request, desired_gates) if rules else ([], False)
before = request(prefix + '/protection')
restrictions = (before or {}).get('restrictions')
use_ruleset = (not rulesets and restrictions is not None
missing_status_section = before is not None and before.get('required_status_checks') is None
empty_push_allowlist = (restrictions is not None
and not any(restrictions.get(kind) for kind in ('users', 'teams', 'apps'))
and not (before or {}).get('enforce_admins', {}).get('enabled'))
# GitHub cannot PATCH a missing status-check subresource. An additive ruleset
# preserves the existing signing, review, history and access policies.
use_ruleset = not rulesets and (missing_status_section or empty_push_allowlist)
runs = []
page = 1
while True:
+2
View File
@@ -50,6 +50,8 @@ def merge_ready(plan, result):
if pr['state'] != 'MERGED':
if pr['baseRefOid'] != plan['head'] or remote.api(f'repos/{repo}/branches/{plan["branch"]}')['commit']['sha'] != plan['head']:
return {'state': 'stale-base', 'url': result['url']}
if plan['profile'] in enforcement.specialists.PROFILES:
enforcement.specialists.validate(repo, head, plan['branch'], remote.api)
if plan['profile'] == 'native-gitops':
enforcement.gitops.validate(repo, head, plan['branch'], remote.api, enforcement.standard.load_yaml)
if plan['profile'] == 'frontend-next':
+3 -2
View File
@@ -14,5 +14,6 @@ printf '%s %s\n' "$checksum" "$archive" | sha256sum --check --status
tar -xOzf "$archive" "gh_${version}_linux_amd64/bin/gh" > "$binary"
sudo install -m 0755 "$binary" /usr/local/bin/gh
gh --version
gh api --help | grep -q -- --slurp
gh pr merge --help | grep -q -- --match-head-commit
# Drain help output: grep -q can SIGPIPE gh under pipefail.
gh api --help | grep -- --slurp >/dev/null
gh pr merge --help | grep -- --match-head-commit >/dev/null
+115
View File
@@ -0,0 +1,115 @@
"""Recognize reviewed native consumers and their shared immutable orb workers."""
import base64
import importlib.util
import re
from pathlib import Path
import yaml
ROOT = Path(__file__).resolve().parents[1]
def module(name):
spec = importlib.util.spec_from_file_location(name, ROOT / 'src/scripts' / (name + '.py'))
result = importlib.util.module_from_spec(spec)
spec.loader.exec_module(result)
return result
auxiliary = module('generate_auxiliary_workflow')
qctl = module('generate_qctl_workflow')
standard = module('validate_standard')
class WorkflowLoader(standard.UniqueLoader):
# GitHub uses YAML 1.2: unquoted "on" is an event key, not a boolean.
yaml_implicit_resolvers = {
key: [(tag, pattern) for tag, pattern in values if tag != 'tag:yaml.org,2002:bool']
for key, values in standard.UniqueLoader.yaml_implicit_resolvers.items()
}
WorkflowLoader.add_implicit_resolver('tag:yaml.org,2002:bool', re.compile(r'^(true|false)$', re.I), list('tTfF'))
def load_workflow(raw):
try:
return yaml.load(raw, Loader=WorkflowLoader)
except yaml.YAMLError as error:
raise ValueError('Invalid native workflow YAML') from error
# Only observed, mandatory verification gates; release-only jobs are not PR gates.
DEFINITIONS = {
'QRun-IO/qctl': ('qctl', ('main', 'develop'), ('qctl',),
('native / test',)),
'QRun-IO/.github': ('native-workflow-lint', ('main',), ('github-workflow-lint',),
('actionlint / actionlint',)),
'QRun-IO/qqq-business-platform': ('native-business', ('main',), ('business-db', 'business-e2e'),
('validate / empty-database-migration', 'validate / Deployment gate / E2E passed')),
'QRun-IO/qqq-mcp-rag': ('native-mcp', ('main',), ('mcp-rag',),
('validate / Build and Test',)),
'QRun-IO/qqq-app-developer-intellij-plugin': ('intellij-plugin', ('main',), ('intellij-plugin',),
('plugin / build',)),
}
PROFILES = {definition[0] for definition in DEFINITIONS.values()}
def gates(profile):
names = next(definition[3] for definition in DEFINITIONS.values() if definition[0] == profile)
return [{'context': name, 'app_id': 15368} for name in names]
def caller(kind, pin):
if kind == 'qctl':
return '.github/workflows/build.yml', load_workflow(qctl.generate(pin))
return auxiliary.BRIDGES[kind]['path'], auxiliary.canonical(kind, pin)
def validate(repo, head, branch, request):
if repo not in DEFINITIONS or branch not in DEFINITIONS[repo][1]:
raise ValueError('Native recognition requires an approved repository and branch')
profile, _, kinds, _ = DEFINITIONS[repo]
def content(owner, path, ref):
item = request(f'repos/{owner}/contents/{path}?ref={ref}')
if item.get('type') != 'file' or item.get('encoding') != 'base64':
raise ValueError('Native workflow must be a regular file')
return base64.b64decode(item['content']).decode('utf-8').replace('\r\n', '\n')
paths, pins, verified = set(), {}, set()
for kind in kinds:
path, _ = caller(kind, '0' * 40)
actual = load_workflow(content(repo, path, head))
try:
pin = next(iter(actual['jobs'].values()))['uses'].rsplit('@', 1)[1]
_, expected = caller(kind, pin)
except (KeyError, TypeError, IndexError, ValueError, AttributeError, StopIteration):
raise ValueError('Native caller has no immutable orb pin') from None
if actual != expected:
raise ValueError('Native caller differs from the canonical shared bridge')
if pin not in verified:
commit = request('repos/QRun-IO/qqq-orb/commits/' + pin)
if not commit['commit']['verification']['verified']:
raise ValueError('Native worker commit is not verified')
verified.add(pin)
for job in expected['jobs'].values():
worker = job['uses'].split('@')[0].removeprefix('QRun-IO/qqq-orb/')
if content('QRun-IO/qqq-orb', worker, pin) != (ROOT / worker).read_text(encoding='utf-8'):
raise ValueError('Pinned native worker differs from the supported contract')
paths.add(path)
pins[path] = pin
tree = request(f'repos/{repo}/git/trees/{head}?recursive=1')
if tree.get('truncated') is not False or not isinstance(tree.get('tree'), list):
raise ValueError('Native recognition requires the complete source tree')
entries = {entry['path']: entry for entry in tree['tree']}
for path in paths:
entry = entries.get(path, {})
if entry.get('type') != 'blob' or entry.get('mode') not in ('100644', '100755'):
raise ValueError('Native caller is missing or is not a regular source file')
for entry in tree['tree']:
path = entry['path']
if path == '.circleci/config.yml' or (path.startswith('.github/workflows/')
and path.endswith(('.yml', '.yaml')) and path not in paths):
raise ValueError('Native repository has additional orchestration: ' + path)
return profile, pins
-16
View File
@@ -1,20 +1,4 @@
{
"QRun-IO/new-qqq-application-template": {
"baseline_sha": "730a836a666535a361927d83f15720e91eb71541",
"required_paths": [
"README.md"
],
"forbidden_prefixes": [
".circleci/",
".github/workflows/"
],
"forbidden_paths": [
".qqq-ci.yml",
"Jenkinsfile",
".gitlab-ci.yml"
],
"rationale": "Template source; core generated-consumer acceptance owns validation."
},
"QRun-IO/qqq-maven-registry": {
"baseline_sha": "134576e4e701984635105f97c8f52aa1e27205b2",
"required_paths": [
+17
View File
@@ -12,6 +12,7 @@ import tempfile
import enroll_consumers
import native_gitops_gates as gitops
import native_specialist_gates as specialists
import yaml
PATHS = ('.circleci/config.yml', '.qqq-ci.yml')
@@ -109,6 +110,10 @@ def inspect(target, version):
if info['archived']:
raise ValueError('Archived repository')
head = api(f'repos/{repo}/branches/{branch}')['commit']['sha']
if repo in specialists.DEFINITIONS:
profile, pins = specialists.validate(repo, head, branch, api)
return {**target, 'head': head, 'profile': profile, 'version': version,
'changed': False, 'worker_pins': pins}
if repo in gitops.REPOSITORIES:
pin = gitops.validate(repo, head, branch, api, yaml.safe_load)
return {**target, 'head': head, 'profile': 'native-gitops', 'version': version,
@@ -182,6 +187,7 @@ def main():
parser.add_argument('--apply', action='store_true')
parser.add_argument('--merge-ready', action='store_true')
parser.add_argument('--enforce', action='store_true')
parser.add_argument('--circle-settings', action='store_true')
parser.add_argument('--output', type=Path, required=True)
args = parser.parse_args()
if (args.merge_ready or args.enforce) and not args.apply:
@@ -214,6 +220,17 @@ def main():
if args.enforce:
row['enforcement'] = finish_enrollment.enforce_current(plan)
args.output.write_text(json.dumps(report, indent=2), encoding='utf-8')
if args.circle_settings:
import circle_project_settings
settings = []
for repo in sorted({plan['repository'] for plan in plans}):
branches = [plan for plan in plans if plan['repository'] == repo]
settings.append({'repository': repo,
'profiles': sorted({plan['profile'] for plan in branches}),
**circle_project_settings.reconcile_repository(
branches, findings, api, apply=args.apply)})
args.output.with_suffix('.circle-settings.json').write_text(
json.dumps(settings, indent=2), encoding='utf-8')
print(json.dumps({'targets': len(plans), 'changed': sum(p['changed'] for p in plans),
'unresolved': sum(row['state'] == 'unresolved' for row in findings),
'applied': args.apply}))
+2 -1
View File
@@ -22,7 +22,8 @@ def run(environment=None, execute=subprocess.run, root=None):
output.mkdir(parents=True, exist_ok=True)
args = [sys.executable, str(root / 'tools/reconcile_enrollment.py'),
'--organization', 'QRun-IO', '--orb-version', '0.8',
'--output', str(output / 'result.json'), '--apply', '--merge-ready', '--enforce']
'--output', str(output / 'result.json'), '--apply', '--merge-ready', '--enforce',
'--circle-settings']
try:
result = execute(args, cwd=root, env=env, timeout=1200, check=False)
code = result.returncode