Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.
fix(ci): pass push checks after rewritten history; build desktop from native-deps (#6)
NightRain23348d8c26ea826
diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.ymlindex 799a161d..f94e1185 100644--- a/.github/actions/setup/action.yml+++ b/.github/actions/setup/action.yml@@ -1,9 +1,19 @@name: Set up the toolchain-description: Node, pnpm and Go at the repository's pinned versions, with workspace dependencies installed.+description: Node, pnpm and Go at the repository's pinned versions, with workspace dependencies installed, and a BASE that shares history with HEAD.runs:using: compositesteps:+ # A push's `before` shares no history with HEAD after a branch's first push+ # (all zeros) or a force push that replaced the history. The checks then+ # compare HEAD with itself: the changed-file checks have nothing to check and+ # every whole-tree check still runs.+ - shell: bash+ run: |+ if ! git merge-base "$BASE" HEAD >/dev/null 2>&1; then+ echo "::notice::BASE $BASE shares no history with HEAD; the changed-file checks compare HEAD with itself."+ echo "BASE=$(git rev-parse HEAD)" >>"$GITHUB_ENV"+ fi# Reads the version from packageManager in package.json.- uses: pnpm/action-setup@v4- uses: actions/setup-node@v4diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 4205c4fe..26cd1fb0 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -70,9 +70,7 @@ jobs:with:fetch-depth: 0- uses: ./.github/actions/setup- # A branch's first push has no earlier commit to compare against.- - if: env.BASE != '0000000000000000000000000000000000000000'- run: make check-repository-gate BASE="$BASE"+ - run: make check-repository-gate BASE="$BASE"check:needs: changesdiff --git a/.github/workflows/desktop-release.yml b/.github/workflows/desktop-release.ymlindex dd5819e5..c72be6c8 100644--- a/.github/workflows/desktop-release.yml+++ b/.github/workflows/desktop-release.yml@@ -32,9 +32,9 @@ env:# owner/name of the repository that receives the release.RELEASE_REPO: ${{ vars.RELEASE_REPO || 'simplexai-labs/linger' }}# https folder serving the PostgreSQL and voice tools archives that- # apps/desktop/distribution/*.json pin. As a secret it stays out of the- # public log; a variable also works.- LINGER_NATIVE_DEPS_URL: ${{ secrets.LINGER_NATIVE_DEPS_URL || vars.LINGER_NATIVE_DEPS_URL }}+ # apps/desktop/distribution/*.json pin: the assets of the native-deps+ # prerelease, unless a secret or variable names another folder.+ LINGER_NATIVE_DEPS_URL: ${{ secrets.LINGER_NATIVE_DEPS_URL || vars.LINGER_NATIVE_DEPS_URL || 'https://github.com/simplexai-labs/linger/releases/download/native-deps' }}# rcodesign reads RCODESIGN_* variables as its configuration, so these# carry another prefix.APPLE_CODESIGN_VERSION: 0.29.0@@ -60,10 +60,6 @@ jobs:set -euo pipefailscripts/ci/desktop-release.sh version "$INPUT" | tee -a "$GITHUB_OUTPUT"echo "publish=$PUBLISH" >>"$GITHUB_OUTPUT"- if [ -z "$LINGER_NATIVE_DEPS_URL" ]; then- echo "::error::Set the LINGER_NATIVE_DEPS_URL secret or variable (see docs/desktop-release.md)."- exit 1- fi# Stop before an hour of building when the release could not be published.if [ "$PUBLISH" = true ] && [ "$RELEASE_REPO" != "$GITHUB_REPOSITORY" ] && [ "$HAS_RELEASE_TOKEN" != true ]; thenecho "::error::Publishing to $RELEASE_REPO from $GITHUB_REPOSITORY needs the LINGER_RELEASE_TOKEN secret, a token with contents write access to $RELEASE_REPO (see docs/desktop-release.md)."diff --git a/apps/desktop/AGENTS.md b/apps/desktop/AGENTS.mdindex f62dbde5..b31fc13a 100644--- a/apps/desktop/AGENTS.md+++ b/apps/desktop/AGENTS.md@@ -276,9 +276,9 @@ Official releases come from the public simplexai-labs/linger repository: a`darwin-arm64`, `linux-x64` and `win32-x64` in GitHub Actions and publishes alinger GitHub Release with `SHA256SUMS.txt`; see[`docs/desktop-release.md`](../../docs/desktop-release.md). The workflow-fetches the bundled archives from `LINGER_NATIVE_DEPS_URL`, so upload a new-pinned archive there before tagging. The GitLab manual dry run builds test-packages only and publishes nothing.+fetches the bundled archives from the assets of the `native-deps` prerelease+there, so upload a new pinned archive to it before tagging. The GitLab manual+dry run builds test packages only and publishes nothing.Windows, Linux x64 and Apple silicon bundle PostgreSQL in the app instead(`file` in `distribution/<target>.json`; 35 MB on Windows, 10–12 MBdiff --git a/docs/desktop-release.md b/docs/desktop-release.mdindex 5325c90d..e0fe52a9 100644--- a/docs/desktop-release.md+++ b/docs/desktop-release.md@@ -60,9 +60,11 @@ The release goes to `RELEASE_REPO`, `simplexai-labs/linger` by default:name only the version.simplexai-labs/linger is public, and so are its workflow logs and release-notes. The workflow prints no internal address: `LINGER_NATIVE_DEPS_URL`-comes from settings and is left out of messages, and keeping it as a secret-also masks it. Signing keys are written to files under the runner's temporary+notes. The bundled archives come from the assets of the+[`native-deps`](https://github.com/simplexai-labs/linger/releases/tag/native-deps)+prerelease, which is public too; a `LINGER_NATIVE_DEPS_URL` secret or variable+points the build at another folder, and a secret keeps that address masked in+the log. Signing keys are written to files under the runner's temporaryfolder, read only by the signing tools and removed after the build.Set these under Settings → Secrets and variables → Actions of the repository@@ -70,7 +72,7 @@ that runs the workflow:| Name | Kind | Required | Purpose || ------------------------------- | -------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |-| `LINGER_NATIVE_DEPS_URL` | secret (or variable) | yes | Public HTTPS folder serving the archives that `apps/desktop/distribution/*.json` pin, under their file names. Each download is checked against its pin. |+| `LINGER_NATIVE_DEPS_URL` | secret (or variable) | no | Folder serving the archives `apps/desktop/distribution/*.json` pins; the `native-deps` prerelease when unset. Each download is checked against its pin. || `RELEASE_REPO` | variable | no | `owner/name` that receives the release; `simplexai-labs/linger` when unset. || `LINGER_RELEASE_TOKEN` | secret | when `RELEASE_REPO` is another repository | Fine-grained token for `RELEASE_REPO` only, with Contents: read and write. Not needed in simplexai-labs/linger itself. || `MACOS_DEVELOPER_ID_P12_BASE64` | secret | no | Base64 of the Developer ID `.p12`. Without it the app is signed ad hoc. |@@ -80,13 +82,20 @@ that runs the workflow:| `WINDOWS_SIGNING_P12_BASE64` | secret | no | Base64 of an Authenticode `.p12`. Without it the setup program is unsigned. || `WINDOWS_SIGNING_PASSWORD` | secret | with the `.p12` | Password of that `.p12`. |+### Bundled archives++The `native-deps` prerelease in simplexai-labs/linger holds every archive that+`apps/desktop/distribution/*.json` pins, under its file name; being a+prerelease, it never becomes the latest release. When a pin changes, upload the+new archive there before tagging:++```sh+gh release upload native-deps <archive> --repo simplexai-labs/linger+```+### First release in simplexai-labs/linger-1. Put the archives that `apps/desktop/distribution/*.json` pin, under their- file names, in a public HTTPS folder (for example the assets of a- `native-deps` prerelease in simplexai-labs/linger, which keeps it from- becoming the latest release), and set- `LINGER_NATIVE_DEPS_URL` to it.+1. Check that the `native-deps` prerelease has every pinned archive.2. With the source in simplexai-labs/linger, push a prerelease tag first, thenthe release:diff --git a/scripts/ci/check-repository-gate.sh b/scripts/ci/check-repository-gate.shindex 2131700e..5bfe1275 100755--- a/scripts/ci/check-repository-gate.sh+++ b/scripts/ci/check-repository-gate.sh@@ -28,7 +28,10 @@ if ! git diff --quiet "$base" "$head_sha" -- 'apps/teamhub/migrations/*.sql'; th"$base_tip" "$head_sha"fi-pnpm exec commitlint --from "$base" --to "$head_sha" --verbose+# commitlint rejects an empty range, which a base equal to HEAD gives.+if [[ "$base" != "$head_sha" ]]; then+ pnpm exec commitlint --from "$base" --to "$head_sha" --verbose+fi# Every variable runtime code reads is documented in .env.example or the inventory.pnpm env:inventory:check