From 9567bbf3aa678056772ed213397be1ab029ef3d8 Mon Sep 17 00:00:00 2001 From: bsodfather Date: Sun, 25 Oct 2026 09:27:55 +0000 Subject: [PATCH] fix(ci): pass the community scope guard and publish release artifacts before registry steps - the community scope guard rejected the innocuous English comment 'One timed resources/list' in the Story 3.8 discovery diagnostic (its 'one-time-token' marker matches any 'one time' phrase). Reword the comment; no behaviour change. - move the release artifact publication ahead of the registry/OpenBao steps, so a credential problem cannot leave the archives, checksums and SBOM unpublished. --- .gitea/workflows/release.yml | 97 ++++++++++--------- .../static_resources/discovery_diagnostic.rs | 4 +- 2 files changed, 51 insertions(+), 50 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 7be8033..4ee62bd 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -178,6 +178,55 @@ jobs: dir:/workspace -o spdx-json \ > dist/crank-community-${IMAGE_TAG}-sbom.spdx.json + - name: Write release notes + run: | + set -eu + tag="${{ gitea.ref_name }}" + { + echo "## Crank Community ${tag}" + echo + echo "Source commit: \`$(git rev-parse HEAD)\`" + echo + echo "### Changes" + echo + git log --oneline -25 | sed 's/^/- /' + echo + echo "### Artifacts and checksums" + echo + echo '```' + cat "dist/crank-community-${tag}-checksums.txt" + echo '```' + } > dist/RELEASE-NOTES.md + cat dist/RELEASE-NOTES.md + + # The archives, the checksums and the SBOM only exist inside the runner workspace until they are + # attached to the release entry: publish them so a released version keeps its artifacts, and do + # it before the registry steps so an image-credential problem cannot lose them. + - name: Publish artifacts to the Gitea release + env: + RELEASE_TOKEN: ${{ secrets.GITEA_TOKEN }} + FALLBACK_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -eu + tag="${{ gitea.ref_name }}" + token="${RELEASE_TOKEN:-${FALLBACK_TOKEN:-}}" + if [ -z "$token" ]; then + echo "No Gitea token is available to the workflow: the release artifacts stay in the runner workspace" >&2 + exit 1 + fi + prerelease="" + case "$tag" in + *-*) prerelease="--prerelease" ;; + esac + GITEA_TOKEN="$token" python3 scripts/publish-gitea-release.py \ + --api "${{ gitea.server_url }}/api/v1" \ + --repo "${{ gitea.repository }}" \ + --tag "$tag" \ + --title "Crank Community ${tag}" \ + --notes-file dist/RELEASE-NOTES.md \ + --dist dist \ + $prerelease + - name: Load deployment secrets from OpenBao env: BAO_ADDR: ${{ secrets.BAO_ADDR }} @@ -243,51 +292,3 @@ jobs: - name: Show release bundle summary run: | ls -lh dist - - - name: Write release notes - run: | - set -eu - tag="${{ gitea.ref_name }}" - { - echo "## Crank Community ${tag}" - echo - echo "Source commit: \`$(git rev-parse HEAD)\`" - echo - echo "### Changes" - echo - git log --oneline -25 | sed 's/^/- /' - echo - echo "### Artifacts and checksums" - echo - echo '```' - cat "dist/crank-community-${tag}-checksums.txt" - echo '```' - } > dist/RELEASE-NOTES.md - cat dist/RELEASE-NOTES.md - - # The archives, the checksums and the SBOM only exist inside the runner workspace until they are - # attached to the release entry: publish them so a released version keeps its artifacts. - - name: Publish artifacts to the Gitea release - env: - RELEASE_TOKEN: ${{ secrets.GITEA_TOKEN }} - FALLBACK_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - set -eu - tag="${{ gitea.ref_name }}" - token="${RELEASE_TOKEN:-${FALLBACK_TOKEN:-}}" - if [ -z "$token" ]; then - echo "No Gitea token is available to the workflow: the release artifacts stay in the runner workspace" >&2 - exit 1 - fi - prerelease="" - case "$tag" in - *-*) prerelease="--prerelease" ;; - esac - GITEA_TOKEN="$token" python3 scripts/publish-gitea-release.py \ - --api "${{ gitea.server_url }}/api/v1" \ - --repo "${{ gitea.repository }}" \ - --tag "$tag" \ - --title "Crank Community ${tag}" \ - --notes-file dist/RELEASE-NOTES.md \ - --dist dist \ - $prerelease diff --git a/apps/mcp-server/tests/integration/static_resources/discovery_diagnostic.rs b/apps/mcp-server/tests/integration/static_resources/discovery_diagnostic.rs index 0d0d4dd..0a67c69 100644 --- a/apps/mcp-server/tests/integration/static_resources/discovery_diagnostic.rs +++ b/apps/mcp-server/tests/integration/static_resources/discovery_diagnostic.rs @@ -114,8 +114,8 @@ fn now_rfc3339() -> String { .unwrap_or_else(|error| format!("unformatted-utc ({error})")) } -/// One timed `resources/list`, built directly on `reqwest` so transport/timeout/HTTP failures are -/// recorded as outcomes instead of aborting the run. +/// A single timed `resources/list` call, built directly on `reqwest` so transport/timeout/HTTP +/// failures are recorded as outcomes instead of aborting the run. async fn timed_list( endpoint: &ResourceEndpoint, revision: &'static str,