From df52b64f48ca0e3049a53c30aa00c51f01bef7f8 Mon Sep 17 00:00:00 2001 From: Bryant Date: Fri, 26 Jun 2026 17:52:31 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=94=A7=20(sonar):=20Set=20projectVers?= =?UTF-8?q?ion=20off=200.0.0=20to=20fix=20Not=20computed=20gate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A literal sonar.projectVersion=0.0.0 leaves the SonarCloud quality gate stuck at "Not computed". Use 0.0.1 as the local-scan fallback; CI overrides it dynamically with the live pyproject.toml version. Closes AAASM-3815 Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_019mSz31RysZF6DYToUoBWLf --- sonar-project.properties | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index bb757ad..7f1386b 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -6,7 +6,13 @@ sonar.issues.defaultAssigneeLogin=Bryant # This is the name and version displayed in the SonarCloud UI. sonar.projectName=python-sdk -sonar.projectVersion=0.0.0 +# A non-0.0.0 version is required for SonarCloud to compute the quality gate +# (a literal 0.0.0 leaves the gate stuck at "Not computed"; AAASM-3815). CI +# overrides this at scan time with the live pyproject.toml version via +# `-Dsonar.projectVersion=...` (see .github/workflows/rw_run_all_test_and_record.yaml), +# so it always tracks the current release; this static value is the local-scan +# fallback only. +sonar.projectVersion=0.0.1 # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. sonar.projectBaseDir=./ From 7c3c950634a0f7bac6ff1c1d4851ac2a9fb6ce4c Mon Sep 17 00:00:00 2001 From: Bryant Date: Fri, 26 Jun 2026 17:52:49 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=94=A7=20(ci):=20Pass=20live=20pyproj?= =?UTF-8?q?ect=20version=20to=20SonarCloud=20projectVersion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Derive sonar.projectVersion from pyproject.toml in the SonarCloud Scan job and pass it via the scanner args, so the quality gate always tracks the current release instead of the static fallback in sonar-project.properties. Refs AAASM-3815 Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_019mSz31RysZF6DYToUoBWLf --- .../workflows/rw_run_all_test_and_record.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/rw_run_all_test_and_record.yaml b/.github/workflows/rw_run_all_test_and_record.yaml index 52ff90a..6fdd26f 100644 --- a/.github/workflows/rw_run_all_test_and_record.yaml +++ b/.github/workflows/rw_run_all_test_and_record.yaml @@ -173,9 +173,27 @@ jobs: exit 1 fi + # Derive the analysis version from the package's own pyproject.toml so the + # SonarCloud quality gate always tracks the current release. A literal + # sonar.projectVersion=0.0.0 leaves the gate stuck at "Not computed" + # (AAASM-3815); passing the live version below overrides the static + # fallback in sonar-project.properties. + - name: Resolve project version + id: sonar_version + run: | + version="$(grep -m1 -E '^version = ' pyproject.toml | sed -E 's/^version = "(.*)"/\1/')" + if [ -z "$version" ]; then + echo "Could not parse version from pyproject.toml" >&2 + exit 1 + fi + echo "version=$version" >> "$GITHUB_OUTPUT" + - name: SonarCloud Scan uses: SonarSource/sonarqube-scan-action@v8.2.0 env: GITHUB_TOKEN: ${{ github.token }} SONAR_TOKEN: ${{ secrets.sonar_token }} SONAR_HOST_URL: https://sonarcloud.io + with: + args: > + -Dsonar.projectVersion=${{ steps.sonar_version.outputs.version }} From 3b2b7a11a5c9734ecba9f92f059cf0b400a4a2e3 Mon Sep 17 00:00:00 2001 From: Bryant Date: Fri, 26 Jun 2026 17:54:06 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=93=9D=20(skills):=20Note=20SonarClou?= =?UTF-8?q?d=20projectVersion=20auto-derivation=20in=20release=20skills?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Document in release-runbook and sdk-only-release that the SonarCloud Scan job derives sonar.projectVersion from pyproject.toml, so operators must not hand-bump the sonar-project.properties literal per release (it is the local-scan fallback only, kept off 0.0.0). Refs AAASM-3815 Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_019mSz31RysZF6DYToUoBWLf --- .claude/skills/release-runbook/SKILL.md | 8 ++++++++ .claude/skills/sdk-only-release/SKILL.md | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/.claude/skills/release-runbook/SKILL.md b/.claude/skills/release-runbook/SKILL.md index 5f154c1..da6b318 100644 --- a/.claude/skills/release-runbook/SKILL.md +++ b/.claude/skills/release-runbook/SKILL.md @@ -234,6 +234,14 @@ authoritative checker.) + `publish-release-tag`. - Cutting an `agent-assembly` core tag for an SDK-only change — that triggers the full coordinated pipeline and double-publishes. +- **`sonar.projectVersion`** — the SonarCloud Scan job in + `rw_run_all_test_and_record.yaml` derives it from `pyproject.toml`'s `version` + at scan time and passes it via the scanner `args`, so the SonarCloud quality + gate always tracks the current release. Do **not** hand-bump the + `sonar.projectVersion` literal in `sonar-project.properties` per release — that + literal is only the local-scan fallback and must stay off `0.0.0`, which + otherwise leaves the gate stuck at "Not computed" (AAASM-3815). (Contrast the + `agent-assembly` monorepo, where the literal is bumped statically.) ## What this runbook does not cover diff --git a/.claude/skills/sdk-only-release/SKILL.md b/.claude/skills/sdk-only-release/SKILL.md index a39e7e4..c8fd65a 100644 --- a/.claude/skills/sdk-only-release/SKILL.md +++ b/.claude/skills/sdk-only-release/SKILL.md @@ -132,6 +132,13 @@ or drifted wheels. `workflow_dispatch`. Dispatch the docs pipeline separately if needed. - **Yanking lower versions** — this skill does not yank; do it in the PyPI web UI after the fact if required. +- **`sonar.projectVersion`** — the SonarCloud Scan job in + `rw_run_all_test_and_record.yaml` derives it from `pyproject.toml`'s `version` + at scan time, so the quality gate tracks the current release automatically. Do + **not** hand-bump the `sonar.projectVersion` literal in + `sonar-project.properties` per release — it is only the local-scan fallback and + must stay off `0.0.0` (a literal `0.0.0` leaves the gate stuck at "Not + computed"; AAASM-3815). ## Do Not Assume From cc152875f8207f1bc12bedf13ddb2a256037c70e Mon Sep 17 00:00:00 2001 From: Bryant Date: Fri, 26 Jun 2026 18:19:27 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=94=A7=20(sonar):=20Align=20static=20?= =?UTF-8?q?fallback=20to=20real=20pyproject=20version=200.0.1rc1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_019mSz31RysZF6DYToUoBWLf --- sonar-project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index 7f1386b..2512ebc 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -12,7 +12,7 @@ sonar.projectName=python-sdk # `-Dsonar.projectVersion=...` (see .github/workflows/rw_run_all_test_and_record.yaml), # so it always tracks the current release; this static value is the local-scan # fallback only. -sonar.projectVersion=0.0.1 +sonar.projectVersion=0.0.1rc1 # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. sonar.projectBaseDir=./