Skip to content

fix(ci): port upstream release version resolution and disable the fork release job - #25

Merged
rschlaefli merged 4 commits into
mainfrom
rs/fix-release-version-resolution
Sep 18, 2026
Merged

rschlaefli merged 4 commits into
mainfrom
rs/fix-release-version-resolution

Conversation

@rschlaefli

@rschlaefli rschlaefli commented Sep 18, 2026

Copy link
Copy Markdown
Member

Release has failed on every push to main since PR #24 merged — run 35266235871 dies in Resolve and validate version with a silent exit 1. The cause is inherited from upstream v1.1.0: git tag --points-at HEAD | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' exits 1 when nothing matches, and under set -euo pipefail that aborts the step on an untagged main. Upstream hit the same bugs as issues LibreChat-AI#228 and LibreChat-AI#229 and fixed them in PR LibreChat-AI#233 (fd9a4fa, released as v1.2.0), extracting version resolution into a tested script.

This branch ports that fix verbatim and, per the fork's release policy, disables the fork's release job outright.

Release policy

The fork tracks upstream releases and adds its own commits on top; deployments pin a commit SHA (df-cloud's Argo app at c1509a88, images by commit SHA from ghcr.io/uzh-bf/code-interpreter/*). The fork therefore never cuts a tag or publishes a GitHub release of its own.

release.yml stays vendored from upstream so release merges apply cleanly, but its job carries if: ${{ false }}. No trigger — automatic, dispatch, or a pushed v* tag — can create a tag or publish a release. GitHub requires the on key in a workflow file (verified against the published workflow schema), so upstream's trigger block stays byte-identical; the fork delta is the job condition plus a header note, and restoring upstream behavior is deleting that one condition.

Upstream port

Cherry-pick b67791e of upstream fd9a4fa, with the (cherry picked from commit fd9a4fa…) trailer retained. .github/scripts/resolve-release-version.sh, tests/release-version-resolution.sh, and every line of release.yml other than the two fork deltas are byte-identical to upstream v1.2.0, and the ci.yml step that runs the new suite matches upstream. The port also picks up upstream c688b30 (LibreChat-AI#225), the read-only git ls-remote tip check, which the fork's release.yml — byte-identical to v1.1.0 — had been missing as well. The ci.yml test steps from LibreChat-AI#222 and LibreChat-AI#227 are deliberately not ported; they test trees the fork does not have.

The vendored resolver stays tested, so a future upstream fix re-applies cleanly: it now reads exit 1 from grep as an empty answer (exit 2 and above still fail), and the rerun-resume path compares the tag's commit against the release commit instead of rejecting the tag it just chose.

The vendored docs/RELEASING.md still documents cutting a tag by hand, which a disabled job cannot prevent, so it and CONTRIBUTING.md carry a short fork note saying the fork does not cut tags or releases. Upstream text is otherwise unchanged.

docs/fork/patches.md records the policy as a fork patch (index row, required behavior, evidence, replay and drop condition).

Validation

  • tests/release-version-resolution.sh — upstream's 14 cases, each a throwaway repository with a stubbed gh — passes locally; tests/release-versioning.sh still passes.
  • release.yml parses as YAML, keeps its triggers, and reports the job condition if: ${{ false }}.
  • git diff fd9a4fa <head> -- .github/workflows/release.yml is 11 insertions / 5 deletions: the header note and the job condition, nothing else.
Verification receipts
  • Tested head: 046bf7f. CI was green 10/10 in run 35317111081 at f98a10a for the same code tree (the later commits are docs and the job condition), including Deployment Config Tests (which runs the new suite) and Lambda MicroVM Runner Image (arm64). CI re-runs on 046bf7f.
  • Commands: bash tests/release-version-resolution.sh → "release version resolution tests passed"; bash tests/release-versioning.sh → "release versioning tests passed".
  • Commits: b67791e (port), ef66fea (disable), 56e7ea2 (plan record), 046bf7f (release-doc notes and ledger).
  • No live release action was performed; the new suite runs fully offline.

Out of scope

Merging is the only remaining gate. Until this merges, main still runs the old workflow, so the Release runs there keep failing; nothing else is needed to make main green, since the disabled job reports no run at all.

…reChat-AI#233)

* ci: Fix Release Version Resolution for Untagged and Resumed Runs

The release workflow resolved its version in one inline shell block under
`set -euo pipefail`, where two paths could not succeed.

Filtering tags through `grep` made a no-match fatal. On the ordinary untagged
tip of `main`, `git tag --points-at HEAD | grep -E '^v[0-9]+...'` exits 1, and
the step died before reaching its skip handling or `next-release-version.sh`, so
a deployable commit could not obtain a release version (LibreChat-AI#228). Selecting stable
tags now reads exit 1 as an empty answer while exit 2 and above still fail the
release, which also lets the missing-previous-tag case report its own error.

The rerun-resume path then rejected the tag it had itself chosen. With a stable
tag already pointing at `HEAD` and no release published, the version comes from
that tag, and the following existence check failed merely because the ref
existed (LibreChat-AI#229). It now compares the tag's commit against the release commit, so
only a tag on some other commit is a collision; `Create tag` already tolerates
a tag that exists.

The block moved into `.github/scripts/resolve-release-version.sh`, beside the
`next-release-version.sh` it calls, so `tests/release-version-resolution.sh` can
cover every path: automatic, resumed, skipped, dispatched, pushed-tag, and the
runs that must be refused, each against a throwaway repository with a stubbed
`gh`.

* fix: harden release resolver execution

---------

Co-authored-by: Lia <lia@librechat.ai>
Co-authored-by: Danny Avila <danny@librechat.ai>
(cherry picked from commit fd9a4fa)
rschlaefli pushed a commit that referenced this pull request Sep 18, 2026
Records the post-merge Release failure on 55840f3, upstream's LibreChat-AI#228/LibreChat-AI#229 fix in
PR LibreChat-AI#233 (fd9a4fa, v1.2.0), the fork guard for the tagless fork, and the gated
dispositions left open (merging PR #25, cutting an initial stable tag). Also
adds PR #25 to the ledger's patch-index row.
trial added 2 commits September 18, 2026 12:27
The fork tracks upstream releases and adds its own commits on top, with
deployments pinned by commit SHA, so it never cuts a tag or publishes a release
of its own. release.yml is vendored from upstream for merge-sync, but its job
now carries if: ${{ false }}, so neither a dispatch nor a stray tag push can
create a tag or publish.

GitHub requires the on key, so upstream's triggers stay byte-identical; the fork
delta is the job condition plus a header note, and restoring upstream behavior
is deleting that one condition. docs/fork/patches.md records the policy, its
evidence, and the replay and drop condition.
Records the post-merge Release failure on 55840f3, upstream's LibreChat-AI#228/LibreChat-AI#229 fix in
PR LibreChat-AI#233 (fd9a4fa, v1.2.0), the never-publish policy for the tagless fork, and
the one remaining gate (merging PR #25).
@rschlaefli
rschlaefli force-pushed the rs/fix-release-version-resolution branch from f98a10a to 56e7ea2 Compare September 18, 2026 10:28
@rschlaefli rschlaefli changed the title fix(ci): port upstream release version resolution and disable automatic releases in the fork fix(ci): port upstream release version resolution and disable the fork release job Sep 18, 2026
docs/RELEASING.md documents cutting a tag by hand, which the disabled Release job
cannot prevent, and CONTRIBUTING.md points readers at it. Both now carry a short
fork note: the fork tracks upstream releases, pins deployments by commit SHA,
and does not cut its own tags or releases. Upstream text is otherwise unchanged.

The patch ledger records the note under the release-policy entry's owned paths
and evidence, and the integration plan notes the alignment.
@rschlaefli
rschlaefli force-pushed the rs/fix-release-version-resolution branch from e7c8e11 to 046bf7f Compare September 18, 2026 10:36
@rschlaefli
rschlaefli marked this pull request as ready for review September 18, 2026 11:16
@rschlaefli
rschlaefli merged commit 529d9c0 into main Sep 18, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant