Skip to content

fix(release): promote exact beta image manifests - #929

Merged
frahlg merged 6 commits into
masterfrom
agent/exact-beta-stable-promotion-stacked
Aug 16, 2026
Merged

fix(release): promote exact beta image manifests#929
frahlg merged 6 commits into
masterfrom
agent/exact-beta-stable-promotion-stacked

Conversation

@frahlg

@frahlg frahlg commented Aug 16, 2026

Copy link
Copy Markdown
Member

Supersedes #925, which GitHub closed automatically when its stacked base #876 merged. This branch is now rebased directly on master.

What

  • Build Core and updater candidate images once, then record their exact multi-arch digests.
  • Bind the candidate tag, Git commit, product version, Core digest, and updater digest in release receipts.
  • Promote stable aliases from source@digest; do not rebuild the validated containers.
  • Fail closed on reruns, partial publication, moved candidate tags, mismatched platform labels, or a different source beta.
  • Carry the selected immutable tag into Core on Linux, macOS, migrated layouts, older variable-image layouts, and automatic rollback.
  • Serialize mutable beta and latest aliases.

Verification

  • make verify passes on exact head b667e9f9 after the rebase to master: 167 optimizer tests, all Go and end-to-end tests, Compose migration branches, container boundaries, vet, and build.
  • go test -race ./cmd/ftw-updater ./cmd/ftw passes.
  • scripts/test-exact-image-promotion.sh passes.
  • The workflow diff passed actionlint v1.7.12 before the mechanical chore(ci): bump actions/checkout from 5 to 7 #876 rebase; normal master-targeted GitHub CI must pass again here before merge.

This stays draft until fresh review and CI confirm the final master-based tree.

@frahlg
frahlg force-pushed the agent/exact-beta-stable-promotion-stacked branch 6 times, most recently from dc0bf66 to ebf9354 Compare August 16, 2026 18:40
@frahlg
frahlg marked this pull request as ready for review August 16, 2026 18:48
@frahlg

frahlg commented Aug 16, 2026

Copy link
Copy Markdown
Member Author

@codex review

@miravoss26 please review exact head ebf9354e. All GitHub checks, local make verify, actionlint, runtime version tests, exact-promotion contracts, migration branches, and updater races are green. An independent adversarial review found no remaining P0/P1/P2.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ebf9354efa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread go/cmd/ftw-updater/main.go
@frahlg
frahlg force-pushed the agent/exact-beta-stable-promotion-stacked branch from ebf9354 to 4977234 Compare August 16, 2026 19:17
@frahlg

frahlg commented Aug 16, 2026

Copy link
Copy Markdown
Member Author

@codex review

@miravoss26 please re-review exact head 49772343. The legacy Compose release-identity P2 is fixed and resolved. Local updater tests, updater race tests, both migration branches, exact-promotion contracts, actionlint, and make verify are green. GitHub checks are rerunning.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

"printf %%s '%s' | base64 -d > '%s' && mv '%s' '%s' || echo 'ftw: could not persist image tags to %s' >&2",

P2 Badge Preserve .env ownership and mode when pinning tags

When .env was created by the host operator with restrictive permissions or non-root ownership, the updater's root-run detached helper writes a new temporary file using its default umask and then replaces .env with mv. This commonly changes a 0600 operator-owned file to 0644 owned by root, exposing values such as FTW_API_TOKEN to other local users and preventing the operator from editing the file normally after any successful update. Preserve the original file's mode and ownership on the replacement before moving it into place.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@frahlg
frahlg force-pushed the agent/exact-beta-stable-promotion-stacked branch from 4977234 to 8922a61 Compare August 16, 2026 19:23
@frahlg

frahlg commented Aug 16, 2026

Copy link
Copy Markdown
Member Author

Addressed the Codex P2 from the review of 49772343 in exact head 8922a610: the helper now seeds an existing .env temporary file with cp -p before replacing its contents, so owner and mode survive the atomic move; a new .env starts at 0600. The same rule covers both the normal pin and the new legacy override path. A regression executes the helper and checks UID, GID, and mode. The final guard also refuses to persist a target runtime identity when the host image is still hard-coded. Local updater tests, race tests, actionlint, both migration branches, exact-promotion contracts, and make verify are green.

@codex review

@miravoss26 please re-review exact head 8922a610. GitHub checks are rerunning.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 8922a6101e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@frahlg
frahlg requested review from a team and miravoss26 August 16, 2026 19:36
@frahlg

frahlg commented Aug 16, 2026

Copy link
Copy Markdown
Member Author

Formal human review requested for exact head 8922a6101e028a9da6879b1feccef18440a1a40f: @miravoss26 and @srcfl/developer.

Gate evidence: all required GitHub checks pass; local make verify, actionlint, updater focused and race tests, both migration branches, and the exact-promotion contracts pass. All review threads are resolved, and Codex found no major issue on this exact head. CODEOWNERS maps the changed .github/ files to @frahlg; an independent human approval remains the open gate. Please approve or leave exact change requests against this head. No merge is requested.

@frahlg
frahlg force-pushed the agent/exact-beta-stable-promotion-stacked branch from 8922a61 to 7ca3d11 Compare August 16, 2026 20:14
@frahlg

frahlg commented Aug 16, 2026

Copy link
Copy Markdown
Member Author

@codex review

Exact head 7ca3d11 is rebased on master 4b7ad49. It keeps the four promotion patches range-diff identical and adds the release-auth fix for checkout v7: persist-credentials is false and each push phase proves exactly one effective Authorization header. Independent review found no P0/P1/P2. Full make verify and the exact-promotion contract pass.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7ca3d116f0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/beta.yml Outdated
@frahlg

frahlg commented Aug 16, 2026

Copy link
Copy Markdown
Member Author

@codex review

@miravoss26 please re-review exact head 3d22d1110c465b315a104abae4484f3ded67671d. The beta channel now writes canonical aliases before the compatibility login, then mirrors the same tag-and-digest sources under the legacy credential. The new contract is old-red/new-green. actionlint, exact-promotion checks, full make verify, and an independent P0/P1/P2 review are green. No merge is requested.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 3d22d1110c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@frahlg
frahlg force-pushed the agent/exact-beta-stable-promotion-stacked branch from 3d22d11 to 742b2ad Compare August 16, 2026 20:45
@frahlg

frahlg commented Aug 16, 2026

Copy link
Copy Markdown
Member Author

@codex review

Exact head 742b2ad is now based on live master abb850d6289c032dff68437690e1b5f5ed753a29. All six #929 patches are range-diff identical to reviewed head 3d22d111; exact-promotion and updater/Core focused tests are green. This rebase contains no new product or workflow diff.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 742b2ad693

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 326 to 327
matrix:
include:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Publish paired stable aliases from one serialized job

When either matrix leg fails after the other reaches the alias loop, this workflow has already moved the successful component's stable/version/latest tags while the failed component remains on the previous release. Because lines 321-323 identify Core and updater as a paired control plane, a transient validation or registry failure can leave new installations pulling mismatched releases until someone notices and reruns the workflow. Validate both source manifests first and publish both components' aliases from one serialized job, as the beta channel does.

Useful? React with 👍 / 👎.

Comment on lines +191 to +195
var svc struct {
Environment map[string]string `yaml:"environment"`
}
if err := node.Decode(&svc); err != nil {
return false, fmt.Errorf("parse %s service %s: %w", path, service, err)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Accept list-form Compose environments when persisting tags

When a legacy or customized Compose service uses the supported list form, such as environment: [FTW_IMAGE_TAG=${FTW_IMAGE_TAG:-}], decoding that sequence into map[string]string returns a YAML type error. releaseIdentityPinStep consequently skips both the .env pin and override creation, so a successful beta update is undone or misreported by a later plain docker compose up. This is a fresh failure mode beyond the previously fixed missing-mapping case: the mapping exists, but this detector cannot read it. Parse both environment forms documented by Docker Compose.

Useful? React with 👍 / 👎.

@frahlg
frahlg force-pushed the agent/exact-beta-stable-promotion-stacked branch from 742b2ad to cc27431 Compare August 16, 2026 20:51
@frahlg

frahlg commented Aug 16, 2026

Copy link
Copy Markdown
Member Author

@codex review

Exact head cc27431 is based on live master f9794cfd9da692b23b59b5f2173cdf905eb60b49. All six #929 patches remain range-diff identical to reviewed head 3d22d111; the new base only adds the reviewed bundled-driver pin. No #929 product or workflow diff changed.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: cc2743131f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@frahlg
frahlg merged commit c3d3701 into master Aug 16, 2026
16 checks passed
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.

1 participant