Skip to content

ci(cd): a bake-only reconcile recovers the release version from the promoted image - #2496

Merged
rbuergi merged 5 commits into
mainfrom
ci/reconcile-recovers-release-version
Aug 27, 2026
Merged

rbuergi merged 5 commits into
mainfrom
ci/reconcile-recovers-release-version

Conversation

@rbuergi

@rbuergi rbuergi commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

The first scheduled reconcile that ever fired (run 33063843072, once #2491 gave the cron its
own concurrency lane) published the platform bake correctly — sealed on all three targets —
and then died in "Assert the armed release is one an environment can be rolled to" on
${1:?usage}: RELEASE_VERSION came from needs.portal-image.outputs.version, and on a
bake-only run that job is skipped, so the string was empty. Quietly, the publish step before
it had written no release marker either, so the one thing a reconcile exists to heal —
"release X may be rolled to" — was the one thing it could not do.

The version (3.0.0-rc8.ci.<run#>) is per-run and not recomputable, but it is recorded:
promote's Phase C tags memex-portal-ai: on the same digest Phase A tagged
— the tags SelfUpdateHostedService rolls from. publish-bake now resolves the version once, in
a release step (this run's output, else the promoted image's tag set via
az acr manifest list-metadata), and both the publish and the assert read that step. A sha
with no version tag was never armed; the step exits 1 instead of publishing a marker for an
invented version or falling back to identity-only.

Pinned by PlatformBakeLaneGuard.PlatformBake_ResolvesTheReleaseVersionOnce_AndEveryConsumerReadsIt,
which caught a self-reference in the first draft of this very change. CiContentBake.md gains
the section. Refs #2491.

🤖 Generated with Claude Code

…romoted image

The first scheduled reconcile that ever fired (run 33063843072, once #2491 gave the cron its
own concurrency lane) published the platform bake correctly — sealed on all three targets —
and then died in "Assert the armed release is one an environment can be rolled to" on
`${1:?usage}`: RELEASE_VERSION came from `needs.portal-image.outputs.version`, and on a
bake-only run that job is skipped, so the string was empty. Quietly, the publish step before
it had written no release marker either, so the one thing a reconcile exists to heal —
"release X may be rolled to" — was the one thing it could not do.

The version (3.0.0-rc8.ci.<run#>) is per-run and not recomputable, but it is recorded:
promote's Phase C tags memex-portal-ai:<version> on the same digest Phase A tagged <short-sha>
— the tags SelfUpdateHostedService rolls from. publish-bake now resolves the version once, in
a `release` step (this run's output, else the promoted image's tag set via
`az acr manifest list-metadata`), and both the publish and the assert read that step. A sha
with no version tag was never armed; the step exits 1 instead of publishing a marker for an
invented version or falling back to identity-only.

Pinned by PlatformBakeLaneGuard.PlatformBake_ResolvesTheReleaseVersionOnce_AndEveryConsumerReadsIt,
which caught a self-reference in the first draft of this very change. CiContentBake.md gains
the section. Refs #2491.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 27, 2026 10:53
@rbuergi
rbuergi enabled auto-merge August 27, 2026 10:53
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the platform CD reconcile path so a bake-only run can still determine the release version it is healing, by recovering the version tag from the already-promoted portal image when portal-image is skipped.

Changes:

  • Add a release step to publish-bake that resolves RELEASE_VERSION either from this run (portal-image) or from the promoted memex-portal-ai image tags (bake-only reconcile).
  • Update bake publishing and release-availability assertion to consume steps.release.outputs.version instead of needs.portal-image.outputs.version.
  • Add/extend structural guard test coverage and documentation to pin the intended workflow invariants.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/main-cd.yml Introduces a release step to resolve the release version for bake-only reconciles and rewires downstream consumers to use it.
test/MeshWeaver.Documentation.Test/PlatformBakeLaneGuard.cs Adds a guard test that enforces “resolve version once” and ensures all consumers read the resolved output.
src/MeshWeaver.Documentation/Data/Architecture/CiContentBake.md Documents why bake-only reconcile must recover the release version and how the workflow does it.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +1503 to +1505
tags=$(az acr manifest list-metadata --registry meshweaver --name memex-portal-ai \
--query "[?contains(tags, '${SHORT_SHA}')].tags[]" -o tsv 2>/dev/null || true)
version=$(grep -E '^[0-9]+\.[0-9]+\.[0-9]+' <<<"$tags" | grep -vx "$SHORT_SHA" | head -1 || true)
@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 2)

1 087 tests  ±0   895 ✅ ±0   5m 14s ⏱️ -12s
    6 suites ±0   192 💤 ±0 
    6 files   ±0     0 ❌ ±0 

Results for commit 293486a. ± Comparison against base commit 48c3a14.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 4)

    8 files  ±0      8 suites  ±0   10m 59s ⏱️ -7s
4 407 tests ±0  4 404 ✅ ±0  3 💤 ±0  0 ❌ ±0 
5 004 runs  ±0  5 001 ✅ ±0  3 💤 ±0  0 ❌ ±0 

Results for commit 293486a. ± Comparison against base commit 48c3a14.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 0)

1 308 tests  ±0   1 308 ✅ ±0   6m 16s ⏱️ -1s
    6 suites ±0       0 💤 ±0 
    6 files   ±0       0 ❌ ±0 

Results for commit 293486a. ± Comparison against base commit 48c3a14.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 3)

1 080 tests  ±0   1 080 ✅ ±0   20m 4s ⏱️ + 5m 33s
    7 suites ±0       0 💤 ±0 
    7 files   ±0       0 ❌ ±0 

Results for commit 293486a. ± Comparison against base commit 48c3a14.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 5)

1 589 tests  +1   1 588 ✅ +1   10m 3s ⏱️ + 2m 6s
    9 suites ±0       1 💤 ±0 
    9 files   ±0       0 ❌ ±0 

Results for commit 293486a. ± Comparison against base commit 48c3a14.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 1)

739 tests  ±0   735 ✅ ±0   7m 17s ⏱️ +8s
  8 suites ±0     4 💤 ±0 
  8 files   ±0     0 ❌ ±0 

Results for commit 293486a. ± Comparison against base commit 48c3a14.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

    44 files  ±0      44 suites  ±0   59m 56s ⏱️ + 7m 29s
10 208 tests +1  10 008 ✅ +1  200 💤 ±0  0 ❌ ±0 
10 807 runs  +1  10 607 ✅ +1  200 💤 ±0  0 ❌ ±0 

Results for commit 293486a. ± Comparison against base commit 48c3a14.

♻️ This comment has been updated with latest results.

@rbuergi
rbuergi merged commit 8fd55fc into main Aug 27, 2026
23 checks passed
@rbuergi
rbuergi deleted the ci/reconcile-recovers-release-version branch August 28, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants