Goal
Replicate the boj-server SonarCloud setup across the whole estate: 384 active hyperpolymath repos (1 archived + 3 forks excluded) + 3 Joshua-owned shared repos (paint-type, IDApTIK, IDApixiTIK).
Parked 2026-06-29 — resume later. Everything mechanical is built and proven; only the SonarCloud-side (token + provisioning) is outstanding.
Reference: boj-server (complete, working)
Four components per repo:
- Root
sonar-project.properties — sonar.organization + sonar.projectKey=hyperpolymath_<repo> + exclusions.
- A
sonarqube job (boj-server folds it into build.yml; the rollout uses a standalone .github/workflows/sonarcloud.yml — safer across varied repos). SonarSource/sonarqube-scan-action@7006c44… v8.1.0 (SHA-pinned), actions/checkout@34e1148… v4.3.1 fetch-depth:0.
- Quality-gate badge in README (
.md/.adoc) + EXPLAINME.adoc + site/index.html.
- The
SONAR_TOKEN repository secret.
Decisions (owner, 2026-06-26)
- SonarCloud: auto-provision projects + ONE global analysis token (not per-repo tokens).
- Include all 3 Joshua repos.
- All-at-once rollout: one PR per repo,
--auto --squash armed.
Key constraint
hyperpolymath and JoshuaJewell are GitHub user accounts, not orgs → there is no org-level secret. SONAR_TOKEN must be set per-repo (gh secret set SONAR_TOKEN --repo …). Automatable with one token value (owner has admin on own 384; Joshua's 3 need his admin to set the secret).
What's done
- Generator built + dry-run-validated, then live-tested on 2 repos:
- Generator + repo list preserved at
dev-notes/estate/sonarcloud-rollout-2026-06-26/ (sonar_rollout.py, myrepos.json). Idempotent: skips repos that already have the properties file or an in-flight chore/sonarcloud-setup branch; self-heals auto-merge.
- Workflow carries a guard (
if: env.SONAR_TOKEN != '') so the scan skips cleanly (green) until the token is added, then activates automatically — lets PRs merge now without red checks.
Blocked on (SonarCloud-side, owner-only)
- Confirm the SonarCloud GitHub App is installed on the
hyperpolymath account with access to all repos.
- Enable auto-provisioning so
hyperpolymath_<repo> projects auto-create on first analysis.
- Generate one Global Analysis Token → write to
~/.secrets/sonar-token (one line). Rollout reads it from there and sets the per-repo secret.
Heads-ups
- 22 private repos need a paid SonarCloud plan (public is free) — decide skip vs upgrade.
- Joshua's 3 repos: PRs can be opened, but
SONAR_TOKEN needs his admin, and their project key/org depends on how JoshuaJewell is bound on SonarCloud.
To resume
cd ~/developer/repos
# refresh repo list, then run for real once ~/.secrets/sonar-token exists:
SONAR_TOKEN="$(cat ~/.secrets/sonar-token)" \
python3 dev-notes/estate/sonarcloud-rollout-2026-06-26/sonar_rollout.py
# DRY_RUN=1 to preview; LIMIT=N to batch; ONLY=a,b,c to target specific repos.
Goal
Replicate the boj-server SonarCloud setup across the whole estate: 384 active
hyperpolymathrepos (1 archived + 3 forks excluded) + 3 Joshua-owned shared repos (paint-type,IDApTIK,IDApixiTIK).Parked 2026-06-29 — resume later. Everything mechanical is built and proven; only the SonarCloud-side (token + provisioning) is outstanding.
Reference: boj-server (complete, working)
Four components per repo:
sonar-project.properties—sonar.organization+sonar.projectKey=hyperpolymath_<repo>+ exclusions.sonarqubejob (boj-server folds it intobuild.yml; the rollout uses a standalone.github/workflows/sonarcloud.yml— safer across varied repos).SonarSource/sonarqube-scan-action@7006c44…v8.1.0 (SHA-pinned),actions/checkout@34e1148…v4.3.1fetch-depth:0..md/.adoc) +EXPLAINME.adoc+site/index.html.SONAR_TOKENrepository secret.Decisions (owner, 2026-06-26)
--auto --squasharmed.Key constraint
hyperpolymathandJoshuaJewellare GitHub user accounts, not orgs → there is no org-level secret.SONAR_TOKENmust be set per-repo (gh secret set SONAR_TOKEN --repo …). Automatable with one token value (owner has admin on own 384; Joshua's 3 need his admin to set the secret).What's done
resource-record-fluctuator→ PR rsr-antipattern.yml: BUILTIN_GLOBS bash block stranded outside Python heredoc (exit 127) #49 merged (files + badges landed; workflow guarded-green with no token yet).rsr-template-how-to→ already hadsonar-project.properties(skipped).dev-notes/estate/sonarcloud-rollout-2026-06-26/(sonar_rollout.py,myrepos.json). Idempotent: skips repos that already have the properties file or an in-flightchore/sonarcloud-setupbranch; self-heals auto-merge.if: env.SONAR_TOKEN != '') so the scan skips cleanly (green) until the token is added, then activates automatically — lets PRs merge now without red checks.Blocked on (SonarCloud-side, owner-only)
hyperpolymathaccount with access to all repos.hyperpolymath_<repo>projects auto-create on first analysis.~/.secrets/sonar-token(one line). Rollout reads it from there and sets the per-repo secret.Heads-ups
SONAR_TOKENneeds his admin, and their project key/org depends on howJoshuaJewellis bound on SonarCloud.To resume