Skip to content

Keep publication candidates usable across develop merges - #2411

Merged
joeharris76 merged 12 commits into
developfrom
fix/publication-candidate-freshness-decouple-develop-tip
Oct 1, 2026
Merged

joeharris76 merged 12 commits into
developfrom
fix/publication-candidate-freshness-decouple-develop-tip

Conversation

@joeharris76

@joeharris76 joeharris76 commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Unrelated develop merges can invalidate a publication candidate while its environment approval is queued. Accept candidates built from the protected tip or a reachable ancestor at most 50 commits behind, then refetch the tip and revalidate the exact selected artifact after approval. Preserve the exact published-results, generation and parent constraints.

Keep the existing manual promotion flow. Remove the proposed automatic release handoff and its release hook: its fallback could select an unrelated candidate, dispatch errors could be swallowed, and observation windows exceeded the job budget. The replacement site deployment still owns automatic package-release publication, with exact run identity and bounded failure reporting; that requirement remains open until acceptance.

Validation: 31 focused candidate and transaction tests, Ruff, type checks and required local preflight passed. No archive content or active publisher was retired.

Soundness review:

External reviewer: muse
Review output: #2411 (comment)
All Critical/High findings resolved.

Replace the exact-tip equality check with an ancestry-plus-bound rule: a
candidate stays promotable while its develop commit is reachable from the
protected tip and trails it by at most 50 commits. The post-approval
validation re-resolves the tip after the approval wait instead of reusing
the permit value, so queued approvals survive merge-queue landings. The
published-results pin keeps its existing exact-match semantics.
Add publication-release-handoff.yml, triggered by published GitHub
releases: it dispatches a candidate-only publication build, waits for the
successful candidate bundle, then dispatches the promotion transaction
(which waits for the github-pages approval). Any failure opens a tracked
fallback issue with the manual promotion steps. The workflow never writes
Pages itself, keeping the five-write-path inventory unchanged.
Document the ancestry-plus-bound candidate freshness rule, the
post-approval tip revalidation, and the automatic release-to-publication
handoff with its tracked-issue fallback.
gh issue create fails when the label does not exist, which would lose the
tracked notification the handoff promises. Create the label idempotently
first.
The freshness acceptance criteria require a unit test for each rejection,
including a candidate whose parent generation is stale.
@joeharris76
joeharris76 force-pushed the fix/publication-candidate-freshness-decouple-develop-tip branch from 1ba3e04 to 4603e53 Compare September 26, 2026 19:27
@joeharris76

Copy link
Copy Markdown
Collaborator Author

CI is fully green (all four required contexts SUCCESS) and review threads are clear, but this PR is still marked draft, so the merge queue refuses it ("Pull request is in draft"). Mark ready for review when the branch is final, then it can join the queue.

@joeharris76
joeharris76 marked this pull request as ready for review September 27, 2026 12:38
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T12:41:18.776821Z 4603e53 Draft marked ready
ℹ️ 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.

@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: 4603e531ff

ℹ️ 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/publication-release-handoff.yml Outdated
Comment thread .github/workflows/publication-release-handoff.yml Outdated
Comment thread .github/workflows/publication-release-handoff.yml Outdated
Comment thread .github/workflows/publication-release-handoff.yml Outdated
@github-actions
github-actions Bot disabled auto-merge September 27, 2026 12:48
Dispatch the handoff explicitly from release.yml since GITHUB_TOKEN
releases never trigger the published listener. Observe the promotion
run to conclusion with failure propagation instead of finishing green
at dispatch. Correlate the candidate by dispatch run URL with
timestamp fallback. Measure wait deadlines with the monotonic SECONDS
clock.
gh workflow run requires the actions scope; without it the explicit
dispatch added for GITHUB_TOKEN releases fails with 403. Pin the
permission and the dispatch with a contract test.
@github-actions
github-actions Bot disabled auto-merge September 27, 2026 14:25
@joeharris76
joeharris76 added this pull request to the merge queue Sep 27, 2026
@joeharris76
joeharris76 removed this pull request from the merge queue due to a manual request Sep 27, 2026
@joeharris76

Copy link
Copy Markdown
Collaborator Author

Maintainer review (soundness path: release.yml publishes to PyPI, handoff holds deployment correlation). Verified the diff directly: release.yml dispatches the handoff explicitly (GITHUB_TOKEN releases never fire the published listener; listener stays as backstop); the handoff observes the dispatched promotion run to conclusion with failure propagation; correlation uses the captured dispatch run URL/ID with timestamp query only as fallback; wait deadlines use the monotonic SECONDS clock with wall time as audit timestamp only. All four threads carry owner fix replies in ccf5472 and the live thread is resolved. Required checks green on head b55c966. Enqueuing.

@joeharris76
joeharris76 added this pull request to the merge queue Sep 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 28, 2026
@joeharris76
joeharris76 added this pull request to the merge queue Sep 28, 2026
@joeharris76
joeharris76 removed this pull request from the merge queue due to the queue being cleared Sep 28, 2026
@github-actions github-actions Bot added the awaiting-owner Green, gated on owner review, parked >24h (see docs/operations/soundness-drain.md) label Sep 29, 2026
@joeharris76

Copy link
Copy Markdown
Collaborator Author

Independent external Muse review of a4c951c: SHIP. No Critical or Required defects.

The retained manual transaction validates reachable develop ancestry within the 50-commit bound before approval, then refetches the protected tip and revalidates the same artifact after approval. Exact corpus, generation, parent, producer-run, artifact and route identities remain enforced. The undeployed automatic handoff, release hook and automatic-publication claims are absent. The runbook preserves manual operator ownership and states the automatic package-to-site requirement remains pending replacement acceptance. Optional suggestions concerned bound documentation and diagnostics, without a required change.

@joeharris76 joeharris76 changed the title Decouple site publication from the develop merge queue and trigger it on release Keep publication candidates usable across develop merges Sep 30, 2026
@joeharris76
joeharris76 added this pull request to the merge queue Oct 1, 2026
Merged via the queue into develop with commit cdc2446 Oct 1, 2026
40 checks passed
@joeharris76
joeharris76 deleted the fix/publication-candidate-freshness-decouple-develop-tip branch October 1, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-owner Green, gated on owner review, parked >24h (see docs/operations/soundness-drain.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant