Repository navigation
Conversation
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated paths touched without required approval.
This PR modifies and adds files under .github/workflows/**, which is a hard, path-based approval gate (gated_paths: true). The current review_decision is REVIEW_REQUIRED, not APPROVED, so the gate is not satisfied (decision table row 2).
No blocking or medium findings were raised. The reviewer verified the release-machinery changes thoroughly: release-freeze.cjs sweep/decide logic fails closed on unknown state; R2 retry/resume is bounded and uses conditional writes with byte-compare so lost writes resume safely; the start fence relaxes only when RELEASE_SHA commits the version's artifacts; the pull_request_target workflow checks out only trusted scripts from main with persist-credentials:false and metadata-only access; and the operational-only changeset omission is correct (touched paths are outside PROTOCOL_SCOPED_PATHS).
The diff looks clean on the merits — but because it edits workflow files under a hard approval gate and no human/CODEOWNERS approval is recorded, human review is required before merge.
Escalation reasons
.github/workflows/recover-protocol-cdn.yml(modified),.github/workflows/release-freeze.yml(added), and.github/workflows/release.yml(modified) fall under the.github/workflows/**hard approval gate;review_decisionis REVIEW_REQUIRED. Human/CODEOWNERS approval is required.
Why human review
- Gated paths touched (.github/workflows/recover-protocol-cdn.yml, .github/workflows/release-freeze.yml, .github/workflows/release.yml) under the .github/workflows/** hard approval gate; review_decision is REVIEW_REQUIRED (not APPROVED) — human/CODEOWNERS approval required.
- This PR touches a path under a hard, non-overridable approval gate (.github/workflows/recover-protocol-cdn.yml (modified) matches
.github/workflows/**; .github/workflows/release-freeze.yml (added) matches.github/workflows/**; .github/workflows/release.yml (modified) matches.github/workflows/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated path requires human/CODEOWNERS approval.
No blocking or medium findings. The reviewer's delta pass over 2 files (44 lines) found the markdown table-cell escaping change in scripts/release-freeze.cjs:1187 correct (single /[\\|]/g pass with proper ordering, plus CR/LF collapse) and the new test at tests/release-freeze.test.cjs:314-323 sound. The prior pass was clean and no new findings are introduced.
However, this PR modifies/adds files under .github/workflows/**, a hard, non-overridable approval gate (gated_paths: true), and review_decision is not APPROVED. Per decision rule row 2, the outcome must be escalate until a human/CODEOWNERS approval is recorded — regardless of how clean the diff is.
Escalation reasons
- Gated paths touched under the
.github/workflows/**hard approval gate;review_decisionis unknown/none (not APPROVED). Human/CODEOWNERS review required.
Gated files:
.github/workflows/recover-protocol-cdn.yml(modified).github/workflows/release-freeze.yml(added).github/workflows/release.yml(modified)
Why human review
- Gated paths touched (.github/workflows/recover-protocol-cdn.yml, .github/workflows/release-freeze.yml, .github/workflows/release.yml) under the .github/workflows/** hard approval gate; review_decision is not APPROVED — human/CODEOWNERS approval required.
- This PR touches a path under a hard, non-overridable approval gate (.github/workflows/recover-protocol-cdn.yml (modified) matches
.github/workflows/**; .github/workflows/release-freeze.yml (added) matches.github/workflows/**; .github/workflows/release.yml (modified) matches.github/workflows/**) and the current GitHub review decision is 'unknown', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
b6b1b01 to
278fc77
Compare
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated paths require human/CODEOWNERS approval.
This PR touches files under the .github/workflows/** hard approval gate (gated_paths: true) and review_decision is REVIEW_REQUIRED, not APPROVED. Per decision row 2, the outcome must be escalate until a human/CODEOWNERS approval is recorded.
Escalation reasons
- Touches gated paths under
.github/workflows/**:.github/workflows/recover-protocol-cdn.yml(modified),.github/workflows/release-freeze.yml(added),.github/workflows/release.yml(modified). Human/CODEOWNERS approval required before merge.
The reviewer returned a clean pass (no critical/high/medium findings) across all 16 delta files — the relax-vs-strict fence, bounded R2 transient-error resume, fail-closed release-freeze.cjs, and exhaustive tests all check out. The diff itself is sound; the only blocker is the unsatisfied path-based approval gate. This matches the prior escalate decision; the gate lifts automatically once review_decision becomes APPROVED.
Why human review
- Touches gated paths under .github/workflows/** (.github/workflows/recover-protocol-cdn.yml (modified), .github/workflows/release-freeze.yml (added), .github/workflows/release.yml (modified)); review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS approval required.
- This PR touches a path under a hard, non-overridable approval gate (.github/workflows/recover-protocol-cdn.yml (modified) matches
.github/workflows/**; .github/workflows/release-freeze.yml (added) matches.github/workflows/**; .github/workflows/release.yml (modified) matches.github/workflows/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
278fc77 to
998d9e5
Compare
…lated advances, resume transient R2 errors Hardens release publication against the failures that hit 3.3.0-rc.1 and rc.2: - Release freeze: .github/workflows/release-freeze.yml sets a "Release freeze" commit status on every open PR to a release branch. It fails while that branch has a release in flight (a ready Version Packages PR, a committed version without a published GitHub Release, or an incomplete release-commit run, Release dispatch or CDN recovery run). The Version Packages PR and PRs labelled `release` are exempt. Every run sweeps every release branch, triggered by PR events, Release/CDN recovery runs, release publication, a schedule and manual dispatch. It reads metadata only. - Start fence: a new `start` mode in check-release-state.cjs uses the publication-current rules when the run's release commit carries this version's artifacts, so an unrelated merge between a release merge and its run no longer strands it. Generation, the prepare_next supersession dispatch and every Changesets fence stay strict. - R2: AWS_MAX_ATTEMPTS=10 and AWS_RETRY_MODE=adaptive on the upload steps, plus a bounded per-object resume of the conditional write sequence on transient errors. Integrity and fence failures are never retried. No changeset: release machinery and CI only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CodeQL js/incomplete-sanitization: the summary table escaped pipes but not backslashes, so a cell ending in a backslash could still close early. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ladon cannot review this PR until merge conflicts are resolved. |
998d9e5 to
d3813d8
Compare
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated workflow paths require human/CODEOWNERS approval.
This PR modifies/adds files under .github/workflows/**, which are under a hard, non-overridable approval gate (gated_paths: true). The current review_decision is REVIEW_REQUIRED, not APPROVED, so the gate is not satisfied (decision table row 2).
Gated files requiring human/CODEOWNERS review:
.github/workflows/recover-protocol-cdn.yml(modified).github/workflows/release-freeze.yml(added).github/workflows/release.yml(modified)
The reviewer reported a clean pass with no critical/high/medium findings — the release machinery (scripts/release-freeze.cjs, scripts/check-release-state.cjs, R2 resume logic) is fail-closed, reads-only, and covered by new fault-injection tests. The ~3800 dist/compliance/3.3.0-rc.3/** files in the delta are base content pulled in by rebase, not this PR's changes. Despite the clean diff, the gate cannot lift until a human/CODEOWNERS approval is recorded.
This matches the prior escalate decision; the escalation persists solely because the deterministic gated-paths gate remains unsatisfied, not because of any new finding.
Why human review
- Touches gated paths under .github/workflows/** (.github/workflows/recover-protocol-cdn.yml (modified), .github/workflows/release-freeze.yml (added), .github/workflows/release.yml (modified)); review_decision is REVIEW_REQUIRED, not APPROVED — human/CODEOWNERS approval required before merge.
- This PR touches a path under a hard, non-overridable approval gate (.github/workflows/recover-protocol-cdn.yml (modified) matches
.github/workflows/**; .github/workflows/release-freeze.yml (added) matches.github/workflows/**; .github/workflows/release.yml (modified) matches.github/workflows/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.
Merge only between releases: not while a Version Packages PR is ready or a release run is in flight. This PR changes publication machinery (
release.yml,recover-protocol-cdn.yml,check-release-state.cjs,backfill-cdn-artifacts.sh,recover-cdn-version-trees.sh), whichRELEASING.mdtreats as release authority. It needs human review, and merging it mid-publication stops that run by design (those files are publication authority). Right now the rc.3 Version Packages PR #9141 is open as a Draft, so this is a between-releases window until someone marks it ready.What went wrong this week
main. Nothing pending changed, so the bot didn't regenerate the PR, and the reviewed head's parent was no longermain. Release run44300240363stopped at "Require human approval for committed release artifacts": Quarantined release: the reviewed generated head must have the merge's exact base parent and released tree. Recovery took the supersession PR fix(release): supersede unpublishable 3.3.0-rc.1 #9090 and rc.2.mainmid-release. Someone eventually added anrc2-publish-freezeruleset by hand; it has since been removed.35693967with correct provenance. Then fix(training-agent): retry durable reporting startup before failing the boot #9125, a training-agent-only fix, merged before the release job started. Run44711592865failed at "Require current release branch": Refusing stale tested SHA 3569…; origin/main is e2f384d. Recovery needed an explicit dispatch, run44726375353. fix(training-agent): retry durable reporting startup before failing the boot #9125 touched nothing release-relevant, andpublication-currentalready accepts exactly that kind of advance during publication. It just wasn't used at the start fence.44726375353, "Publish release artifacts to R2" ran about 38 minutes, then failed with An error occurred (ServiceUnavailable) when calling the PutObject operation (reached max retries: 2). That neededrecover-protocol-cdn.yml(run44758301588). 3.1.34's upload hit the same 503 twice and published on the third attempt.Fix 1: an enforced release freeze
A new workflow,
.github/workflows/release-freeze.yml, runsscripts/release-freeze.cjs. It sets aRelease freezecommit status on the head of every open PR tomain,3.2.x,3.1.xand3.0.x.In flight, per branch. The status is
failurewhen any of these holds:changeset-release/<branch>in this repository, so a fork branch with that name doesn't count) is open and not Draft. Changesets keeps a regenerated PR Draft, so the freeze starts when a maintainer marks it ready;package.jsonversion has no published GitHub Release. This covers a committed but unpublished release, including one stranded by a failed run (failure 3) or waiting for supersession (failure 1);prepare_next) and, onmain, anyrecover-protocol-cdn.ymlrun. This keeps the freeze through the ~38-minute R2 phase after the GitHub Release is published.Otherwise the status is
success. On an ordinary push the Release run only regenerates the Draft PR, so it doesn't freeze anything.Exempt PRs. These always get
success:release: supersession plans, release-machinery fixes needed to finish the release, and other recovery work. The label is documented in RELEASING.md "Release freeze". Applying it takes triage permission. The label doesn't exist yet; create it withgh label create release -R adcontextprotocol/adcp --description "Part of the release in flight; exempt from the Release freeze check". I didn't create it, because it's repository configuration.Updates without anyone pushing. Every run re-evaluates every open PR on every release branch. Runs are triggered by:
pull_request_target(opened, synchronize, ready_for_review, converted_to_draft, labeled, unlabeled, edited, closed, reopened);workflow_runforReleaseandRecover release artifacts on CDN(requested, completed);release: published;workflow_dispatch.Runs are serialized in one concurrency group, so an older evaluation can't overwrite a newer one. Each run sweeps everything, so it's harmless when GitHub cancels a superseded pending run. Statuses are written only where they change. One GraphQL query per branch lists PRs together with their current
Release freezestatus, which keeps it cheap with about 100 open PRs.Trust boundary.
pull_request_targetso fork PRs get a status too.scripts/release-freeze.cjsfrommain(sparse checkout,persist-credentials: false), never the PR head.{}. The job getsactions: read,contents: read,pull-requests: readandstatuses: write.GITHUB_TOKEN, not the release App token. A commit status needs no downstream events (the App token's reason to exist), and this keeps the release App's secrets out of apull_request_targetworkflow.Fail-closed behaviour.
erroron that branch's non-exempt PRs and the run fails.Maintenance branches are included, and each branch's freeze is about its own release. One limit:
pull_request_targetfires only for PRs whose base branch has the workflow file, which today ismainonly. PRs to3.2.x,3.1.xand3.0.xget their status from the next sweep (a Release run, a published release or the schedule), not on push. Until then a new head has no status, so a required check holds it rather than letting it through. Cherry-picking the workflow to those branches would make maintenance PRs update on push too.Remaining race. A PR merged in the seconds between a Version Packages PR becoming ready and the next sweep can still land. The check closes the gap between Slack messages, not the race itself.
Admin step: make it required (I have not changed any setting)
In Settings → Rules → Rulesets, open the ruleset that protects
main(or the branch protection rule, ifmainstill uses one). Under Require status checks to pass, choose Add checks and addRelease freeze. Set its source to GitHub Actions, which is the app that posts statuses created withGITHUB_TOKEN. Repeat for3.2.x,3.1.xand3.0.xif you want the freeze enforced there; see the latency note above. Notes:Release freeze, not the job named "Evaluate release freeze".gh workflow run release-freeze.yml -R adcontextprotocol/adcp), or wait for the next schedule, so every open PR has a status before the check becomes required.Fix 2: the start fence accepts publication-current advances
A new
startmode incheck-release-state.cjsdecides which fence a run gets before artifact detection.Where it's used:
recovery.What it does. When the run's release commit (
RELEASE_SHA: the pushed release merge, or a recovery dispatch'srelease_commit) adds this version's artifacts in its first-parent diff,startappliespublication-current. That is the same test release.yml uses to sethas_release_artifacts, and it is exactly the existing rule set:It logs which mode it chose, and
publication-currentlogs the accepted advance. Under this rule, #9125's advance would have been accepted.Approval, provenance, signature and immutability checks are unchanged.
What stays strict, and why
has_release_artifacts=trueskips every Changesets step. The generation branch of artifact detection now runs strictcurrentright beforehas_release_artifacts=false.fence-changesets.cjsand its pre-push hook are untouched and strict. A regenerated Version Packages PR must still build on exactmain.current.prepare_nextsupersession dispatch. RELEASING.md requires it to run on the exact current SHA because it generates the next candidate.startrelaxes aworkflow_dispatchonly whenPREPARE_NEXTis exactly"false". An absent or other value stays strict, so a forgotten env line fails safe.pending/ "Detect stranded committed release", anddeploy.yml. These are generation-time checks and are unchanged.recover-protocol-cdn.ymlandrecover-cdn-version-trees.shinitial gates. They stay strict, as before; this PR doesn't change them.pre.json, supersession, withdrawal or release-status files, or publication machinery still stops the run, as do rewritten history and remote failures. Tests cover each case.Recovery dispatches are relaxed, deliberately. A recovery target without artifacts already errors before Changesets, so a recovery can only publish. This means an unrelated merge during a recovery dispatch's ~2h storyboard verification no longer forces another dispatch.
RELEASING.md is updated: the freshness-level list, the verified-merge fallback note, explicit recovery, and the supersession dispatch.
Fix 3: R2 resilience
CLI retries.
AWS_MAX_ATTEMPTS: '10'andAWS_RETRY_MODE: adaptiveare set on "Publish release artifacts to R2" (release.yml) and on both upload steps inrecover-protocol-cdn.yml. A test pins that no other step carries them.Bounded resume. If an object still fails with a recognised transient error (5xx/ServiceUnavailable, SlowDown/throttling, a dropped connection or timeout, or a 412), the scripts re-run that one object's whole conditional sequence up to twice more, after 30 s and 120 s, before failing the step. This is in
backfill-cdn-artifacts.sh(put_immutable),recover-cdn-version-trees.sh(the upload loop) and the inline protocol-tuple upload inrecover-protocol-cdn.yml. The step then fails with exit 75 and a message pointing atrecover-protocol-cdn.yml. The resume is per object rather than a re-run of the step, because a step re-run re-downloads and byte-compares every object already published, which took about 38 minutes for rc.2.Why retrying is safe, verified for each path. All three paths still:
If-None-Match: *;A write whose response was lost comes back from the CLI's own retry as a 412, and resumes as "exists, byte-compare", never as an overwrite. A racing writer's 412 resumes the same way.
Never retried: byte or content-type mismatches, fence refusals, a 403 or any other unrecognised error, and local body-digest changes. Each attempt runs in a
set -esubshell. Only an explicittransient_r2_error && exit 75after a failedawscall can request a resume.Fences per object are unchanged on the success path: one preflight plus three per object. A test pins the count, including the extra fences of resumed attempts.
Tests
Freeze state machine (
tests/release-freeze.test.cjs, new, 22 tests). It replays this week's sequences:44711592865;44726375353and CDN recovery44758301588.It also covers:
releaselabel exemption, and that similar labels don't count;changeset-release/mainheads, which are neither exempt nor freezing;errorwith exemptions preserved, and API failures;ghadapter against a stubbedgh: pagination, completed runs ignored, release-commit classification, draft or missing releases, and the exact status POST.Start fence (
tests/release-publication-freshness.test.cjs, 13 new tests):pre.json, withdrawal,release.yml, the fence itself;prepare_next=true, an unset value,""andTRUEall stay strict;Workflow structure (
tests/release-workflow-immutability.test.cjs,tests/release-publication-ordering.test.cjs):startwithPREPARE_NEXT;startonly after the generation_only tripwire, andcurrenton the Changesets branch;main, no PR-head references, no secrets or App token, and the singlerun.R2 resume (
tests/cdn-artifacts.test.cjs, 6 new;tests/recover-cdn-version-trees.test.cjs, 3 new):tests/maintenance-release-publication.test.cjs's phantom-412 race test now runs with a zero resume delay. It still fails closed with no write.Local results (macOS):
npm run test:release-workflow: all stages pass except twomaintenance-release-publicationtests ("schema root removed immediately…", "forwarded maintenance safeguards…"). I reproduced both on a pristineorigin/maincheckout; one reads/proc. CI on Linux is the gate for those.PATH, becausebackfill-cdn-artifacts.shusesstat -c.actionlinton the three workflows reports only the diagnosticsorigin/mainalready has: the documentedqueuekey and a pre-existing SC2155.shellcheckon both scripts is identical toorigin/main.npm run typecheckpasses.Changeset: none. This is release machinery and CI, and
check-changeset-protocol-scope.cjsreports no protocol-scoped changes. A changeset landing while a release is pending would change the pending set, which this PR avoids.🤖 Generated with Claude Code