Compare commits

..
Author SHA1 Message Date
James MaesandCodex 04a929aae9 ci: retain Ruby coverage in shared CodeQL selection
Select Ruby for tracked .rb files alongside existing language detection. Covers qctl Java/Ruby/Actions, Ruby-only repositories and untracked-file exclusion.

Validation: red/green regression, seven selector tests, actionlint and two workflow contracts passed; actual qctl branch inventories select the expected languages. Consumer repins and scanner setup changes are outside this PR.

Co-Authored-By: Codex (GPT-6) <noreply@openai.com>
2026-10-29 16:05:19 -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
8 changed files with 990 additions and 1015 deletions

No files matched your search

+2
View File
@@ -31,6 +31,8 @@ jobs:
languages.append('javascript-typescript')
if '.py' in extensions:
languages.append('python')
if '.rb' in extensions:
languages.append('ruby')
if any((name.startswith('.github/workflows/') and PurePosixPath(name).suffix in {'.yml', '.yaml'})
or PurePosixPath(name).name in {'action.yml', 'action.yaml'} for name in files if name):
languages.append('actions')
+1 -1
View File
@@ -18,7 +18,7 @@ import base64
import zlib
CORE_TEMPLATE = json.loads(zlib.decompress(base64.b64decode("eNrtPdl22ziy7/0VuOrM2M6YpPclifvcxHbfeCar48z0nChXByJBiW1uJig7Ponn26cKACmKIilSluUlTr/IJFAo1F6FAvv7L4S0zlnEncBvPSNr+uoyPglpRD0Ww3N4+B2ewDMv8HtBp+v4VsdyaM8PeOyYw/cwIr4MGfzd6gaBy6jfWk5eWMymAzeGdzZ1OROPr+Tbls++xR1qmiyMqW+yTnfgWy7rDCK3CDSPI8fvFUFuteqA5X26trk1U8gRM5kTxtcC/YsC3wqibobkZ2dnGjzBgacAgUdBcGqoh/+7om/pu610phl4HvWtzGwe0yjWBNs0ZJsWR9RkWQR5zEKc8EU9QDB9Zp4GgzjFlqTDxfto4GcgqIc+CAsi+SFiIDmMBBc+s8hbXJnwwDxlMcmKzPLobIU5AnBswgdWQGgYaz2YNQgtGjOinZ2Rv/519JXjw/5cl2iX4jUXm4NRbR9gKpBEOyc+Zz4IMuE8BZFOhQEe2d7cJEbshYKwGWplME7AitlqJY0R8WMPBxMtmATDCCNmu06vH+tu0IO5A/acxH3mI+QQBCS2yQL7FgZRTD5+/Nh5+/7d/73vnBy/3D/sHH9+t/eXs3bbXyDt1pP9o+P9N4edf70//sfvb97/q/P39686RwftFvntN3z96uWn153Dd/9st9o+A21D+MzsB2RBMgSxBmEiKT5k4NNz6ri06wJKZuDHjj8AJkZOz/GpS97Sc+YTIRhcX2j7ttP2WxkWXqW/r6YRmvddzqJzWM93L4EgDid/Bt0FTgAf5rqpHNnOt3gQsTHp6VLztBcFAyFASNVy6YoZj4nmI5G+F5D4mXYFRPzxg7BvTkxW2r5gt6YBoQSGGvPP9yTx94+Wi7mwXACXhJdxP/DXiW46keky0zGE5GQERQ8vS2mqfn0dMUI8DsKGql2fI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s0WjnubhqCRS0gsipYkQ7KJEONmg9iFzGo7848spFbJQsmcgM63sodC+oV7XSiSknpACtYnGBgGEFyHDksOMmaPOhzzHslwGDgJ0XiC5jE8HseM68aV6xHPEqVFOy1dWhMMoXK+6FjN6ViLXomGofxK/JFkPHB4KP5ruDkV/QhFnbLkUw9zer4PfpzP+WUK7Lm4T5bG4n25GNY7aTLvZU5SanJmqaFXR6pJrbFElCWB9xKaoZHiwTweLBPOuadzi6fwdqUakpL87xQgR0QDigJ1ATF25ki0CAl/5fPH1y6V6fmOWVGroWEm7jcVvFRcrEyg29w7AHaitnYjs5yDRWh1925H9LvgUApq2wyzBliQjOnBiPQPuLSKH0I5O4F1a3e5TN37v/w6QAGpBU8NsHXrS1hDEfRRlN7jEQ3jiAVqcQJDXh2gec6v5NjVIazja01DoX9JuBmkvl4nn+I4H2QG2NeCR+jSerpDNskKwTLaWluUxftE/WLH4RKV6xYwkJMusri4lzRflDRKKTIba/VivRARCs4fB+qLsjJC9D0K+sQ4AHMu/G7YgLI00KyCk3/YS6sq2BLnoFcgWvL0iUm3g5zLk8SD/mOJ/VxOucr0P+WVtKe0Sq709siJsRn4Uw3sMwzHLats1mx6Ko4oq92aq4tSjdxv1bgld+M9Wbk+spcqOe8wHk41yrtpbhdRmWlwzXk7UMYmL93HeXn76+CZPOj/oAEPDQdyJHY8hb2G99RWvWVaVSixagb0ni94pXrLine truncated
MATERIAL_TEMPLATE = json.loads(zlib.decompress(base64.b64decode("eNq1lMtugzAQRfd8heV1TNRKlar8QXdVt02EXDMhDthGfqRBiH/vQAmPvKRU6g7PjH3PXI+pI0IoHEEEb6yjK1JjAENlwatvK7OdH2IYTY3IwWLks4+QIdflpeIZYJoqYWMlhTXObH0sjFqOB64OT/HLa/zM9lypig77m/5rE51WzaKl25uvq2CJB+fdFO/UR0swaWBxyjsPpZvRU7EDkZswFp11ZFHDWEgEx8qJVp/OoZof2Md1qViKYqyuSSfhgiJrWnKRo0OsQB/jvTN6TUnTTLTPt9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9BYMn66JmwPhWZY7NhFADAhgFkj9aEtQorKMydRfr5C1vLOIdh8uroYX3y/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==")))
+19 -32
View File
@@ -241,33 +241,6 @@
}
]
},
"update-cd-repo": {
"docker": [
{
"image": "cimg/python:3.12"
}
],
"resource_class": "small",
"steps": [
{
"setup_remote_docker": {
"version": "default"
}
},
{
"run": {
"name": "Install manifest parser",
"command": "python3 -m pip install --disable-pip-version-check PyYAML==6.0.3"
}
},
{
"run": {
"name": "Update CD repo with new image digest",
"command": "set -euo pipefail\necho \"${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\n# Keep credentials out of the clone URL and persisted Git configuration.\nGIT_ASKPASS=$(mktemp)\nexport GIT_ASKPASS GIT_TERMINAL_PROMPT=0\ntrap 'rm -f \"$GIT_ASKPASS\"' EXIT\nprintf '%s\\n' '#!/bin/sh' 'case \"$1\" in' ' *Username*) printf '\"'\"'%s\\n'\"'\"' '\"'\"'x-access-token'\"'\"' ;;' ' *Password*) printf '\"'\"'%s\\n'\"'\"' \"$GITHUB_TOKEN\" ;;' ' *) exit 1 ;;' esac > \"$GIT_ASKPASS\"\nchmod 700 \"$GIT_ASKPASS\"\ngit clone --branch main https://github.com/QRun-IO/voyage-cd.git\ncd voyage-cd\n\npython3 -c 'import re, sys\nfrom pathlib import Path\nimport yaml\ndigest = sys.argv[1]\nif not re.fullmatch(r\"sha256:[0-9a-f]{64}\", digest):\n raise SystemExit(\"Invalid image digest\")\npath = Path(\"overlays/production/kustomization.yaml\")\ndata = yaml.safe_load(path.read_text())\nimages = [image for image in data.get(\"images\", []) if image.get(\"name\") == \"ghcr.io/qrun-io/voyage\"]\nif len(images) != 1:\n raise SystemExit(\"Expected exactly one Voyage image in production overlay\")\nimages[0].pop(\"newTag\", None)\nimages[0][\"digest\"] = digest\npath.write_text(yaml.safe_dump(data, sort_keys=False))\n' \"$IMAGE_DIGEST\"\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": [
{
@@ -548,10 +521,9 @@
}
},
{
"update-cd-repo": {
"munitor/update_cd_repo": {
"context": [
"github",
"ghcr"
"github"
],
"requires": [
"docker-build"
@@ -560,7 +532,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"
}
}
]
}
},
{
@@ -582,6 +568,7 @@
}
},
"orbs": {
"qqq-orb": "kingsrook/qqq-orb@__ORB_VERSION__"
"qqq-orb": "kingsrook/qqq-orb@__ORB_VERSION__",
"munitor": "kof22/munitor@0.3.11"
}
}
File diff suppressed because it is too large. Load diff
+13 -1
View File
@@ -44,8 +44,20 @@ class BranchLanguages(unittest.TestCase):
self.assertEqual(0, result.returncode, result.stderr)
self.assertIn('build-mode=autobuild\n', output)
def test_java_cli_preserves_homebrew_ruby_coverage(self):
result, output = self.select(['src/Main.java', 'packaging/homebrew/qctl.rb', '.github/workflows/build.yml'])
self.assertEqual(0, result.returncode, result.stderr)
self.assertIn('languages=java-kotlin,ruby,actions\n', output)
self.assertIn('build-mode=none\n', output)
def test_ruby_only_source_is_supported(self):
result, output = self.select(['Formula/qctl.rb'])
self.assertEqual(0, result.returncode, result.stderr)
self.assertIn('languages=ruby\n', output)
self.assertIn('build-mode=none\n', output)
def test_untracked_files_do_not_select_languages(self):
result, output = self.select(['src/Example.java'], ['web/generated.js', '.github/workflows/untracked.yml'])
result, output = self.select(['src/Example.java'], ['web/generated.js', 'generated/formula.rb', '.github/workflows/untracked.yml'])
self.assertEqual(0, result.returncode, result.stderr)
self.assertIn('languages=java-kotlin\n', output)
+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(), '')
+4 -4
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
@@ -68,10 +68,10 @@ class VoyageContract(unittest.TestCase):
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)])
@@ -108,7 +108,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)
+41 -112
View File
@@ -1,113 +1,42 @@
"""Execute shared Voyage release commands against isolated service doubles."""
import json
import os
from pathlib import Path
import subprocess
import tempfile
import unittest
import yaml
ROOT = Path(__file__).resolve().parents[1]
TEMPLATE = json.loads((ROOT / "src/scripts/templates/voyage.json").read_text())
def command(job):
return [step["run"]["command"] for step in TEMPLATE["jobs"][job]["steps"]
if isinstance(step, dict) and "run" in step][-1]
class VoyageRelease(unittest.TestCase):
def run_job(self, job, failure="", manifest=None):
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)
bin_dir = root / "bin"
bin_dir.mkdir()
fake = bin_dir / "fake"
fake.write_text("""#!/usr/bin/env python3
import json, os, pathlib, subprocess, sys
name=pathlib.Path(sys.argv[0]).name
args=sys.argv[1:]
with open(os.environ['EVENTS'], 'a') as output:
output.write(json.dumps([name, args])+'\\n')
if name=='docker':
if args[0]=='login': sys.stdin.read()
if args[0]=='manifest': print('{}')
elif name=='jq':
sys.stdin.read(); print('sha256:'+'a'*64)
elif name=='git':
if args[0]=='clone':
assert args==['clone','--branch','main','https://github.com/QRun-IO/voyage-cd.git']
assert os.environ['GIT_TERMINAL_PROMPT']=='0'
askpass=os.environ['GIT_ASKPASS']
assert subprocess.check_output([askpass, 'Username for https://github.com']).strip()==b'x-access-token'
assert subprocess.check_output([askpass, 'Password for https://github.com']).strip()==b'fixture-token'
if os.environ['FAILURE']=='clone': sys.exit(23)
p=pathlib.Path('voyage-cd/overlays/production'); p.mkdir(parents=True)
(p/'kustomization.yaml').write_text(os.environ['MANIFEST_FIXTURE'])
elif args[0]=='diff': sys.exit(1)
elif args[0]=='push' and os.environ['FAILURE']=='push': sys.exit(24)
elif name=='npx':
assert '--target-branch=main' in args
if os.environ['FAILURE']=='release' and 'github-release' in args: sys.exit(25)
""")
fake.chmod(0o755)
for name in ("docker", "jq", "git", "npx"):
(bin_dir / name).symlink_to(fake)
events = root / "events.jsonl"
env = {**os.environ, "PATH": str(bin_dir) + os.pathsep + os.environ["PATH"],
"MANIFEST_FIXTURE": yaml.safe_dump(manifest if manifest is not None else {"images": [{"name": "ghcr.io/qrun-io/voyage", "newTag": "main"}]}),
"EVENTS": str(events), "FAILURE": failure, "GITHUB_TOKEN": "fixture-token",
"GHCR_TOKEN": "fixture-ghcr", "GHCR_USERNAME": "fixture-user",
"CIRCLE_SHA1": "1" * 40, "CIRCLE_BRANCH": "main"}
result = subprocess.run(["bash", "-eo", "pipefail", "-c", command(job)],
cwd=root, env=env, capture_output=True, text=True)
rows = [json.loads(line) for line in events.read_text().splitlines()] if events.exists() else []
content = root / "voyage-cd/overlays/production/kustomization.yaml"
return result, rows, content.read_text() if content.exists() else None
def test_cd_uses_canonical_authenticated_checkout_and_publishes_digest(self):
result, rows, content = self.run_job("update-cd-repo")
self.assertEqual(result.returncode, 0, result.stderr)
self.assertEqual(yaml.safe_load(content)['images'], [{'name': 'ghcr.io/qrun-io/voyage', 'digest': 'sha256:' + 'a' * 64}])
self.assertIn(['git', ['push', 'origin', 'main']], rows)
self.assertNotIn('fixture-token', json.dumps(rows))
self.assertNotIn('fixture-token', result.stdout + result.stderr)
def test_cd_failure_stops_publication(self):
for failure, code in (("clone", 23), ("push", 24)):
result, rows, _ = self.run_job("update-cd-repo", failure)
self.assertEqual(result.returncode, code, result.stderr)
if failure == "clone":
self.assertFalse(any(name == 'git' and args[0] == 'push' for name, args in rows))
def test_release_targets_main_for_both_commands(self):
result, rows, _ = self.run_job("release-please")
self.assertEqual(result.returncode, 0, result.stderr)
self.assertEqual([args[1] for name, args in rows if name == 'npx'], ['github-release', 'release-pr'])
def test_release_failure_is_not_hidden_by_second_command(self):
result, rows, _ = self.run_job("release-please", 'release')
self.assertEqual(result.returncode, 25, result.stderr)
"""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)
def test_release_commands_do_not_contain_unescaped_circleci_tags(self):
# CircleCI parses shell text before execution; bare heredocs are invalid.
for job in ("update-cd-repo", "release-please"):
self.assertNotRegex(command(job), r"(?<!\\)<<")
def test_cd_replaces_existing_digest_and_preserves_other_images(self):
other = {"name": "other/image", "newTag": "keep"}
manifest = {"namespace": "voyage-prod", "images": [other, {"name": "ghcr.io/qrun-io/voyage", "digest": "sha256:" + "b" * 64}]}
result, _, content = self.run_job("update-cd-repo", manifest=manifest)
self.assertEqual(result.returncode, 0, result.stderr)
actual = yaml.safe_load(content)
self.assertEqual(actual['namespace'], 'voyage-prod')
self.assertEqual(actual['images'][0], other)
self.assertEqual(actual['images'][1]['digest'], 'sha256:' + 'a' * 64)
def test_cd_rejects_missing_or_ambiguous_image_target(self):
image = {"name": "ghcr.io/qrun-io/voyage", "newTag": "main"}
for images in ([], [image, image]):
result, rows, _ = self.run_job("update-cd-repo", manifest={"images": images})
self.assertNotEqual(result.returncode, 0)
self.assertFalse(any(name == 'git' and args[0] == 'push' for name, args in rows))