mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-15 11:22:15 +03:00
Landed with the design call resolved per the owner's pick — **option 1**: the synced store is now endpoint-agnostic (persistDiscoveredModels and managedModelImport no longer drop non-chat models at write time), and chat selectability moved to read time (auto-pool expansion in autoStrategy applies filterChatSelectableModels; the models-route projection already had its chatOnly filter). Your discovery test now passes end-to-end (3/3): /api/show capabilities persist per connection and image/embedding requests route through the advertising host. Reconciliation notes: conflicted areas merged onto the current tip (adobe discovery import, requestedModel preflight signature, resolvedProvider fast-path coexists with the synced-route override — explicit resolution wins); carried base-red drains (#10055 memoization, #11071 test variants) dropped as already-landed; the managed-model-import exclusion test was propagated to the new contract (image/video models persist; the read filter still hides them from chat pickers — pinned by a new assertion). Full battery: 205/206 focused (the one red is a confirmed periodic-timer timing flake on the loaded devbox — 20/20 isolated), autoCombo vitest 30/30, combo suites 46/46, gates + typecheck clean. Thank you @yourspraveen — the capability probe + routing design was right; it just needed the store contract opened up. Fixes #11087.
50 lines
1.9 KiB
Bash
Executable File
50 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
||
# Decide whether the just-built release VERSION should also move the Docker
|
||
# `:latest` / `:latest-web` tags.
|
||
#
|
||
# Promote ONLY when VERSION is the highest STABLE semver among the union of
|
||
# {existing git tags} ∪ {VERSION}. Folding VERSION into the candidate set makes
|
||
# the decision independent of git-tag sync timing: on a `release: released`
|
||
# event the freshly-created tag is often not yet visible to `git fetch --tags`
|
||
# when this job runs, so a candidate set built purely from `git tag -l` would
|
||
# resolve HIGHEST to the *previous* version and skip the `:latest` promotion —
|
||
# leaving `latest` one release behind (#5301).
|
||
#
|
||
# Usage:
|
||
# git tag -l 'v[0-9]*' | sed 's/^v//' | scripts/ci/should-promote-latest.sh "$VERSION"
|
||
#
|
||
# - $1 : the version being published (no leading `v`, e.g. 3.8.40).
|
||
# - stdin : newline-separated candidate tags (a leading `v` is stripped;
|
||
# pre-release tags — anything containing `-`, e.g. 3.9.0-rc.1 —
|
||
# are ignored). May be empty (first release).
|
||
# Prints "true" if VERSION should move :latest, "false" otherwise.
|
||
set -euo pipefail
|
||
|
||
VERSION="${1:?version required}"
|
||
|
||
# Only a stable x.y.z release may ever grab :latest. Floating channels such as
|
||
# `main` and `next`, plus every pre-release identifier, fail closed here even if
|
||
# a caller forgets to short-circuit them first.
|
||
if ! printf '%s' "$VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then
|
||
# Consume the caller's tag stream before exiting. A pre-release decision is
|
||
# immediate, but closing stdin early can give a piped producer EPIPE.
|
||
cat >/dev/null
|
||
echo "false"
|
||
exit 0
|
||
fi
|
||
|
||
# Build the stable candidate set: incoming tags (v-stripped, pre-releases
|
||
# dropped) plus VERSION itself, then pick the numerically highest.
|
||
HIGHEST="$(
|
||
{
|
||
sed 's/^v//' | grep -vE -- '-' || true
|
||
printf '%s\n' "$VERSION"
|
||
} | sort -V | tail -1
|
||
)"
|
||
|
||
if [ "$VERSION" = "$HIGHEST" ]; then
|
||
echo "true"
|
||
else
|
||
echo "false"
|
||
fi
|