Skip to content

Report whether the merge candidate's build could have been released - #401

Merged
n0rpan merged 2 commits into
mainfrom
ci/promote-queue-artifacts
Dec 3, 2026
Merged

n0rpan merged 2 commits into
mainfrom
ci/promote-queue-artifacts

Conversation

@n0rpan

@n0rpan n0rpan commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

First step toward releasing what the merge queue already built, so main stops building every commit a second time. This step observes only.

Why

The queue runs the full unsigned release matrix on every code candidate. main then fast-forwards to that commit and builds all of it again before signing and publishing. That second build is where today's releases stalled: a docs-only commit carried the outstanding release build and failed in APT (run 47153547435), though the code it would have released had already been built and tested in the queue.

Checked on 2026-12-03: the eight newest commits on main each have a green merge_group run of ci.yml with the same SHA. The run for 9276853 (47120928906) holds all eight ox-* artifacts a release needs, unexpired.

What changes

  • desktop/ci/candidate_build.py finds the newest commit after delivered/dev that changes what dev ships (the same rule delivery.py uses), looks up its queue run, accepts it only if it is this repository's green merge_group run of ci.yml on exactly that SHA, downloads its ox-* artifacts, reads the version from the Linux x86-64 file names, runs release-assets.sh --unsigned, and checks that the version is higher than the published dev version.
  • A job candidate-build in ci.yml runs it on main pushes that have dev work outstanding. It holds actions: read and contents: read, enters no environment, and always exits 0. No job depends on it.

Nothing is signed or published from the candidate's artifacts. release, sign-cli, desktop-release and publish-dev are unchanged, so this does not overlap #385 or #389 beyond adding one job to ci.yml.

Verified

  • python3 -m unittest discover -s desktop/ci -p 'test_*.py' passes, including six new cases. The run record in the tests is copied from a real one.
  • Against the real API for main at 57c3fbd: it chose 24494ae as the newest dev input (the four commits after it change only mobile and docs paths) and found queue run 47120591386, which lists all eight ox-* artifacts.

Not verified

  • The download, the version read and the asset-list check. This session cannot reach artifact storage, so gh run download failed here. They run for the first time on the first main release run after merge; read that job's summary line.
  • How often a candidate's version fails to advance dev. It can: run numbers are shared by pull request, queue and main runs, and on 2026-12-03 main built 57c3fbd as 0.0.1-dev.2145 while the queue built its descendant 618a526 as 0.0.1-dev.2143. The observation compares the candidate's version with the published one (read from the dev release's assets, 0.0.1-dev.2060 today) and reports REUSABLE only when it is higher. The promotion follow-up must fall back to main's own build in that case, or take the version from something ordered like the commits.

Next, in a separate pull request

Once this reports REUSABLE on real release runs: sign and publish from the candidate's artifacts and build on main only when there is none. That one changes sign-cli, desktop.yml and publish-dev and has to be sequenced with #385 and #389.

Checked against main at 57c3fbd.

https://claude.ai/code/session_01NazrMMqBKWzYjLU4xFBcbz


Generated by Claude Code

The merge queue builds every code candidate with the full unsigned release
matrix. main then fast-forwards to that same commit and builds it again
before it signs and publishes. On 2026-12-03 the eight newest commits on
main each matched a green queue run of ci.yml on the same SHA.

Each main release run now looks up that queue run for the newest commit
that changes what dev ships, downloads its ox-* artifacts and runs the
release asset list on them. It signs and publishes nothing and cannot turn
main red. It exists to show, on real main runs, that the lookup and the
artifacts hold before any release is taken from them.

Co-Authored-By: Claude Mythos 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NazrMMqBKWzYjLU4xFBcbz
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T18:05:01.246520Z c2dcc71 Manual request
🔒 Security Review ✅ Completed 2026-12-03T17:01:25.699892Z 0e854c5 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

n0rpan commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator Author

/queue 0e854c5


Generated by Claude Code

@n0rpan

n0rpan commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator Author

Not in line to merge yet: no answer yet to the security review request for c2dcc71. Nothing to do; this updates when Codex has answered.

n0rpan commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator Author

Useful read-only split. One acceptance case before promotion is wired: main resolved 0.0.1-dev.2145 for 57c3fbd (version job), while its direct descendant 618a526 resolved 0.0.1-dev.2143 in the queue (version job). Exact SHA provenance does not guarantee that the embedded version advances the public dev channel. No release regression observed. Please keep this an observer and carry the case into the promotion follow-up with #388/#389: reject non-advancing versions for a different source SHA and fall back to a verified rebuild.

Run numbers are shared by pull request, queue and main runs. On 2026-12-03
main built 57c3fbd as 0.0.1-dev.2145 while the queue built its descendant
618a526 as 0.0.1-dev.2143. An installed dev build only takes a higher
version, so releasing that candidate after main's build would reach nobody.

The observation now reads the published dev version from the release's
assets and says so when the candidate's version does not advance it.

Co-Authored-By: Claude Mythos 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NazrMMqBKWzYjLU4xFBcbz

n0rpan commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator Author

Agreed, and I had that wrong: I assumed queue run numbers followed landing order, but main runs draw from the same counter. c2dcc71 carries the case into the observer itself. It reads the published dev version from the dev release's assets and reports REUSABLE only when the candidate's version is higher; otherwise it says main's own build is needed. It stays an observer. The promotion follow-up will reject a non-advancing version and fall back to a verified rebuild, as you say.


Generated by Claude Code

@n0rpan

n0rpan commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator Author

/queue c2dcc71

@n0rpan

n0rpan commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator Author

@codex security review

Asked for by the maintainer’s queue request, for commit c2dcc71.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: c2dcc71528

ℹ️ 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".

n0rpan commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator Author

@codex security review

The earlier request was answered with a code review of c2dcc71; the security row still names an older commit. Please run the security review on c2dcc71.


Generated by Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: c2dcc71528

ℹ️ 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".

@n0rpan
n0rpan enabled auto-merge December 3, 2026 18:16
@n0rpan
n0rpan disabled auto-merge December 3, 2026 18:24
@n0rpan
n0rpan merged commit 873c567 into main Dec 3, 2026
80 of 84 checks passed
@n0rpan
n0rpan deleted the ci/promote-queue-artifacts branch December 3, 2026 18:25
n0rpan pushed a commit that referenced this pull request Dec 3, 2026
#401 added a sentence to the paragraph of docs/verification.md that this
branch also extends, so the queue could no longer build this candidate.
Both stay: main's sentence about the candidate-build observation, then
this branch's two paragraphs on the scoped-gate comparison.

Checked against main at 97f609a.

Co-Authored-By: Claude Mythos 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NazrMMqBKWzYjLU4xFBcbz
n0rpan added a commit that referenced this pull request Dec 3, 2026
* Start the security review of a requested head from the merge gate

The gate asks for a security review of the head with a comment. Codex
answers that comment with a code review and leaves its security entry at
an older commit, so the gate waits for an answer that does not come. On
2026-12-03, #394, #388 and #401 each waited about an hour that way, with
consent given, checks green and no findings, until the maintainer merged
around the gate.

Codex starts its security review when a pull request opens or a draft is
marked ready. Every pull request the gate admitted that day carried the
trigger "Draft marked ready" on both reviews, and #388 received both for
its head within two minutes of being made a draft and ready again.

After recording the request in its comment, the gate now does that itself,
once per head commit. If it cannot mark the pull request ready again it
retries once and fails the run.

Co-Authored-By: Claude Mythos 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NazrMMqBKWzYjLU4xFBcbz

* Keep the queue request when the merge gate removes a held pull request

A pull request that is in the queue while the gate holds it is taken out
by the gate. The gate then read its own removal as the end of the
maintainer's request: #388 was queued by hand at 18:16 UTC on 2026-12-03
while its security review was missing, removed by the gate at 18:32, and
answered "previous queue request expired after removal" once the reviews
were in.

GitHub records the gate's removal and one made by hand identically (reason
"manual", the maintainer's account), and its own as "failed_checks" by
github-merge-queue. So the gate notes the time of a removal it made in its
status comment, and only that removal leaves the request standing. A
removal GitHub made first is not recorded.

Co-Authored-By: Claude Mythos 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NazrMMqBKWzYjLU4xFBcbz

---------

Co-authored-by: Claude <[email protected]>
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