fix(mship, desktop): fix bugs (#6572)

* fix bugs

* fix tests

* fix(tests): stabilize archive and client boundary coverage
This commit is contained in:
Siddharth Ganesan
2026-08-11 17:16:52 -07:00
committed by GitHub
parent 05de46357a
commit cb2809001e
26 changed files with 1260 additions and 477 deletions
+10 -10
View File
@@ -72,7 +72,7 @@ jobs:
# Detect shell-code changes on dev/staging pushes. Web-only changes never
# need a desktop build (installed shells load the web app live); changes to
# the Electron app or the bridge packages trigger a per-env prerelease build
# (dev → alpha channel, staging → beta) that the env's update feed
# (dev → dev stream, staging → staging) that the env's update feed
# (/api/desktop/update) starts offering automatically.
detect-desktop-changes:
name: Detect Desktop Changes
@@ -707,10 +707,10 @@ jobs:
secrets: inherit
# Per-env desktop prereleases: a dev/staging push that touches shell code
# publishes a channel-tagged GitHub prerelease (vX.Y.Z-alpha.N from dev,
# vX.Y.Z-beta.N from staging). Each environment's /api/desktop/update feed
# offers only its channel, so dev-pointed shells pick up alpha builds,
# staging-pointed shells beta builds, and prod-pointed shells stable
# publishes an environment-tagged GitHub prerelease (vX.Y.Z-dev.N from dev,
# vX.Y.Z-staging.N from staging). Each environment's /api/desktop/update feed
# offers only its stream, so dev-pointed shells pick up dev builds,
# staging-pointed shells staging builds, and prod-pointed shells stable
# releases — independently. Unlike stable releases, prereleases build even
# before the Apple signing secrets exist — unsigned, so the update pipeline
# is testable end to end; installed shells detect the missing Developer ID
@@ -738,7 +738,7 @@ jobs:
GH_REPO: ${{ github.repository }}
SIGNED: ${{ needs.check-desktop-signing.outputs.configured }}
run: |
if [ "$GITHUB_REF" = "refs/heads/dev" ]; then CHANNEL=alpha; APP_NAME="Sim Dev"; else CHANNEL=beta; APP_NAME="Sim Staging"; fi
if [ "$GITHUB_REF" = "refs/heads/dev" ]; then CHANNEL=dev; APP_NAME="Sim Dev"; else CHANNEL=staging; APP_NAME="Sim Staging"; fi
# Prerelease core = next patch after the latest stable release, so
# channel builds always outrank the stable they are built on top of
# and are always superseded by the next stable. The run-attempt
@@ -825,9 +825,9 @@ jobs:
steps:
- name: Delete stale prereleases
run: |
if [ "$GITHUB_REF" = "refs/heads/dev" ]; then CHANNEL=alpha; else CHANNEL=beta; fi
if [ "$GITHUB_REF" = "refs/heads/dev" ]; then CHANNELS='(dev|alpha)'; else CHANNELS='(staging|beta)'; fi
gh release list --limit 100 --json tagName,isPrerelease,isDraft,createdAt \
--jq "[.[] | select(.isPrerelease and (.isDraft | not) and (.tagName | test(\"-${CHANNEL}\\\\.\")))] | sort_by(.createdAt) | reverse | .[5:] | .[].tagName" |
--jq "[.[] | select(.isPrerelease and (.isDraft | not) and (.tagName | test(\"-${CHANNELS}\\\\.\")))] | sort_by(.createdAt) | reverse | .[5:] | .[].tagName" |
while read -r TAG; do
[ -n "$TAG" ] || continue
echo "Deleting stale prerelease $TAG"
@@ -836,11 +836,11 @@ jobs:
- name: Delete leftover draft prereleases
run: |
if [ "$GITHUB_REF" = "refs/heads/dev" ]; then CHANNEL=alpha; else CHANNEL=beta; fi
if [ "$GITHUB_REF" = "refs/heads/dev" ]; then CHANNELS='(dev|alpha)'; else CHANNELS='(staging|beta)'; fi
# Drafts have no tag ref, so delete by release id via the API
# (gh release delete resolves by tag, which is ambiguous for drafts).
gh api "repos/${GH_REPO}/releases?per_page=100" \
--jq ".[] | select(.draft and (.tag_name | test(\"-${CHANNEL}\\\\.\"))) | .id" |
--jq ".[] | select(.draft and (.tag_name | test(\"-${CHANNELS}\\\\.\"))) | .id" |
while read -r ID; do
[ -n "$ID" ] || continue
echo "Deleting leftover draft release $ID"
+5 -4
View File
@@ -91,8 +91,9 @@ jobs:
exit 1
fi
# Prerelease versions carry their environment in the tag: -alpha.N is a
# dev build, -beta.N a staging build. The channel decides the app's
# Prerelease versions carry their environment in the tag: -dev.N is a
# dev build, -staging.N a staging build. Legacy -alpha/-beta tags remain
# accepted while already-published builds age out. The channel decides the app's
# identity (name/bundle id — a separate app per environment, installable
# side by side) and the default origin baked into the bundle, which in
# turn selects the update feed the installed app polls.
@@ -102,9 +103,9 @@ jobs:
VERSION: ${{ inputs.version }}
run: |
case "$VERSION" in
*-alpha.*)
*-dev.*|*-alpha.*)
NAME='Sim Dev'; APP_ID=ai.sim.desktop.dev; ORIGIN=https://www.dev.sim.ai ;;
*-beta.*)
*-staging.*|*-beta.*)
NAME='Sim Staging'; APP_ID=ai.sim.desktop.staging; ORIGIN=https://www.staging.sim.ai ;;
*)
NAME='Sim'; APP_ID=ai.sim.desktop; ORIGIN='' ;;