diff --git a/.github/workflows/j5-release.yml b/.github/workflows/j5-release.yml index 920fae5d2d72d..42657b48d68d1 100644 --- a/.github/workflows/j5-release.yml +++ b/.github/workflows/j5-release.yml @@ -4,11 +4,15 @@ name: J5 Release # - the signed and notarized macOS desktop build from a successful # "J5 Signed macOS Build" run (DMG, ZIP, blockmaps, updater metadata); # - self-contained CLI archives for darwin-arm64 (Developer ID signed and -# notarized) and linux-x64, built here from the same source commit with -# upstream's scripts/build-cli-archive.ts; -# - SHA256SUMS over the CLI archives and scripts/install.sh, which +# notarized), linux-x64 and win32-x64, built here from the same source +# commit with upstream's scripts/build-cli-archive.ts; +# - the unsigned Windows x64 installer and its update feed, from +# j5-windows-build.yml in this run; +# - SHA256SUMS over the CLI archives, scripts/install.sh and +# scripts/install.ps1, which # `curl -fsSL https://github.com/Jacksondr5/j5code/releases/latest/download/install.sh | sh` -# fetches. packages/shared/src/cliRelease.ts, the installer, `j5 update`, +# and `irm https://github.com/Jacksondr5/j5code/releases/latest/download/install.ps1 | iex` +# fetch. packages/shared/src/cliRelease.ts, the installers, `j5 update`, # the background service, and SSH remote launch all download from here. # J5 no longer publishes to npm (FORK.md release-archive case). # @@ -414,8 +418,17 @@ jobs: subprocess.run(["git", "update-index", "--force-remove", "-z", "--stdin"], input=b"\0".join(paths) + b"\0", check=True) PYTHON + # Embeds the linux-x64 archive above as its WSL runtime. + windows: + needs: [resolve, monitors, cli_archive] + if: needs.resolve.outputs.published != 'true' + uses: ./.github/workflows/j5-windows-build.yml + with: + ref: ${{ needs.resolve.outputs.ref }} + version: ${{ needs.resolve.outputs.version }} + release: - needs: [resolve, cli_archive] + needs: [resolve, cli_archive, windows] if: needs.resolve.outputs.published != 'true' runs-on: ubuntu-24.04 permissions: @@ -431,7 +444,9 @@ jobs: - uses: actions/checkout@v6 with: ref: ${{ needs.resolve.outputs.ref }} - sparse-checkout: scripts/install.sh + sparse-checkout: | + scripts/install.sh + scripts/install.ps1 sparse-checkout-cone-mode: false - uses: actions/download-artifact@v8 @@ -442,6 +457,11 @@ jobs: github-token: ${{ github.token }} path: release-assets + - uses: actions/download-artifact@v8 + with: + name: j5-code-windows-x64 + path: release-assets + - uses: actions/download-artifact@v8 with: pattern: j5-cli-* @@ -453,17 +473,18 @@ jobs: set -euo pipefail test -f "release-assets/J5-Code-$RELEASE_VERSION-arm64.dmg" test -f "release-assets/J5-Code-$RELEASE_VERSION-arm64.zip" - # Each channel carries its own update feed and no other: a stray - # `latest-mac.yml` or `nightly-mac.yml` is what would let an install on - # another track update onto this release. A preview has no feed at all. + test -f "release-assets/J5-Code-$RELEASE_VERSION-x64.exe" + # Each channel carries its own update feeds and no others: a stray + # stable or nightly feed is what would let an install on another + # track update onto this release. A preview has no feed at all. case "$RELEASE_CHANNEL" in - stable) feed=latest-mac.yml ;; - nightly) feed=nightly-mac.yml ;; - preview) feed= ;; + stable) feeds=(latest-mac.yml latest.yml) ;; + nightly) feeds=(nightly-mac.yml nightly.yml) ;; + preview) feeds=() ;; *) echo "Unknown release channel: $RELEASE_CHANNEL" >&2; exit 1 ;; esac - for candidate in latest-mac.yml nightly-mac.yml; do - if [[ "$candidate" == "$feed" ]]; then + for candidate in latest-mac.yml nightly-mac.yml latest.yml nightly.yml; do + if [[ " ${feeds[*]} " == *" $candidate "* ]]; then grep -Fx "version: $RELEASE_VERSION" "release-assets/$candidate" else test ! -e "release-assets/$candidate" @@ -472,13 +493,14 @@ jobs: archives=( "t3-$RELEASE_VERSION-darwin-arm64.tar.gz" "t3-$RELEASE_VERSION-linux-x64.tar.gz" + "t3-$RELEASE_VERSION-win32-x64.zip" ) for archive in "${archives[@]}"; do test -f "release-assets/$archive" done - cp scripts/install.sh release-assets/install.sh + cp scripts/install.sh scripts/install.ps1 release-assets/ # Checksums come from the exact bytes being uploaded. - (cd release-assets && sha256sum "${archives[@]}" install.sh > SHA256SUMS) + (cd release-assets && sha256sum "${archives[@]}" install.sh install.ps1 > SHA256SUMS) cat release-assets/SHA256SUMS - name: Publish GitHub release @@ -497,8 +519,11 @@ jobs: - Command-line server, fresh install: \`curl -fsSL https://github.com/$GH_REPO/releases/download/$tag/install.sh | T3CODE_CHANNEL=nightly sh\` + - Command-line server on Windows x64, fresh install, in PowerShell: + \`\$env:T3CODE_CHANNEL = "nightly"; irm https://github.com/$GH_REPO/releases/download/$tag/install.ps1 | iex\` - Command-line server, from an installed \`j5\`: \`j5 update --channel nightly\`. It then follows nightlies. - macOS app: in an installed J5 Code, Settings, Update track, Nightly. Or install the DMG below. It installs as "J5 Code (Nightly)" beside "J5 Code" and follows nightlies. The two share one profile and one database, so run only one of them at a time. + - Windows x64 app: the installer below. It follows nightlies. It is not code-signed yet, so Windows warns before it runs. Built from $RELEASE_SHA. EOF @@ -510,8 +535,11 @@ jobs: - Command-line server, fresh install: \`curl -fsSL https://github.com/$GH_REPO/releases/download/$tag/install.sh | T3CODE_VERSION=$RELEASE_VERSION sh\` + - Command-line server on Windows x64, fresh install, in PowerShell: + \`\$env:T3CODE_VERSION = "$RELEASE_VERSION"; irm https://github.com/$GH_REPO/releases/download/$tag/install.ps1 | iex\` - Command-line server, from an installed \`j5\`: \`j5 update $RELEASE_VERSION\` in a terminal. - macOS app: the DMG below. It replaces an installed J5 Code and never updates itself; reinstall a stable DMG to go back. + - Windows x64 app: the installer below, unsigned. It never updates itself; reinstall a stable build to go back. Built from $RELEASE_SHA. EOF @@ -520,9 +548,14 @@ jobs: J5 Code $RELEASE_VERSION - macOS Apple Silicon app, Developer ID signed and notarized by Apple. + - Windows x64 app. It is not code-signed yet, so Windows warns before it runs. - Command-line server for macOS (Apple silicon, signed and notarized) and Linux x64: \`curl -fsSL https://github.com/Jacksondr5/j5code/releases/latest/download/install.sh | sh\`, - then \`j5\`. \`SHA256SUMS\` covers the archives and the installer. + then \`j5\`. + - Command-line server for Windows x64, in PowerShell: + \`irm https://github.com/Jacksondr5/j5code/releases/latest/download/install.ps1 | iex\`, + then \`j5\`. It has no background service on Windows. + - \`SHA256SUMS\` covers the archives and both installers. - Upgrading a server installed from npm (0.0.43 or earlier)? See docs/j5/user/migrating-to-release-archives.md. - ZIP, blockmaps, and update metadata support desktop updates. diff --git a/.github/workflows/j5-windows-build.yml b/.github/workflows/j5-windows-build.yml new file mode 100644 index 0000000000000..fb717e72e854f --- /dev/null +++ b/.github/workflows/j5-windows-build.yml @@ -0,0 +1,164 @@ +name: J5 Windows Build + +# Builds the Windows x64 CLI archive and the unsigned Windows x64 desktop +# installer at one version. Called by J5 Release, which first builds the +# win32-x64 resource monitor and the linux-x64 CLI archive in the same run: the +# installer embeds that Linux archive as the runtime for its WSL backend, as +# upstream's release-desktop.yml does. +# +# Unsigned until J5 has an Azure Artifact Signing (formerly Trusted Signing) +# account; upstream's release-desktop.yml shows the secrets and steps that turn +# signing on. +on: + workflow_call: + inputs: + ref: + description: Commit to build + type: string + required: true + version: + description: Version to stamp into the package manifests before building + type: string + required: true + +permissions: + contents: read + +jobs: + build: + name: Windows x64 CLI archive and installer + runs-on: windows-2025 + timeout-minutes: 75 + defaults: + run: + shell: bash + env: + RELEASE_VERSION: ${{ inputs.version }} + steps: + - uses: actions/checkout@v6 + with: + ref: ${{ inputs.ref }} + + # A global vp, as upstream's release-desktop.yml sets up. build-cli-archive.ts + # runs `vp install` in its staging directory, and through pnpm's vp shim + # that failed on Windows with "The system cannot find the path specified". + # No cache: upstream measured restoring one on Windows as slower than a + # plain install. + - uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1 + with: + node-version-file: package.json + cache: false + run-install: false + + - run: vp install + + - name: Stamp the release version + run: node scripts/update-release-package-versions.ts "$RELEASE_VERSION" + + # The desktop build reuses it in place of a cargo build, and the CLI + # archive takes it from its own directory. + - uses: actions/download-artifact@v8 + with: + name: j5-resource-monitor-win32-x64 + path: native/resource-monitor/target/x86_64-pc-windows-msvc/release + + - name: Stage resource monitor for the CLI archive + run: | + set -euo pipefail + mkdir -p "$RUNNER_TEMP/cli-resource-monitor/win32-x64" + cp native/resource-monitor/target/x86_64-pc-windows-msvc/release/t3-resource-monitor.exe "$RUNNER_TEMP/cli-resource-monitor/win32-x64/" + + # Server, web client and Electron main, as upstream's "Build JS bundle". + - name: Build server, web client and desktop main + run: vp run build:desktop + + # The build above stamps the development icons into dist/client, which + # the archive serves. The desktop build below applies its own channel's + # icons afterwards. + - name: Apply production web brand assets to the bundled client + run: node scripts/apply-web-brand-assets.ts production apps/server/dist/client + + # vp's node runs the Node this names, downloading it first. Keep in step + # with the Node in J5 Release's CLI archive job. + - name: Build CLI single-executable + env: + VP_NODE_VERSION: 26.8.2 + run: node apps/server/scripts/cli.ts build-exe --verbose + + - name: Build CLI archive + run: >- + node scripts/build-cli-archive.ts + --platform win + --arch x64 + --version "$RELEASE_VERSION" + --resource-monitor-dir "$RUNNER_TEMP/cli-resource-monitor" + --output-dir release-cli + + - name: Smoke-test CLI archive + run: node scripts/smoke-cli-archive.ts --archive "release-cli/t3-$RELEASE_VERSION-win32-x64.zip" --expect-version "$RELEASE_VERSION" + + - uses: actions/upload-artifact@v7 + with: + name: j5-cli-win32-x64 + path: release-cli/t3-*-win32-x64.zip + if-no-files-found: error + retention-days: 30 + + - uses: actions/download-artifact@v8 + with: + name: j5-cli-linux-x64 + path: wsl-runtime + + - name: Build installer + env: + T3CODE_DESKTOP_UPDATE_REPOSITORY: Jacksondr5/j5code + T3CODE_DESKTOP_REUSE_RESOURCE_MONITOR: "true" + run: >- + node scripts/build-desktop-artifact.ts + --platform win + --target nsis + --arch x64 + --skip-build + --wsl-runtime "wsl-runtime/t3-$RELEASE_VERSION-linux-x64.tar.gz" + --output-dir release-j5 + --verbose + + # A preview carries no update feed. Each other channel carries its own and + # no other, as J5 Release checks for macOS. + - name: Check the installer and its update feed + run: | + set -euo pipefail + test -f "release-j5/J5-Code-$RELEASE_VERSION-x64.exe" + if [[ "$RELEASE_VERSION" =~ -preview\. ]]; then + feed= + elif [[ "$RELEASE_VERSION" =~ -nightly\. ]]; then + feed=nightly.yml + else + feed=latest.yml + fi + for candidate in latest.yml nightly.yml; do + if [[ "$candidate" == "$feed" ]]; then + grep -Fx "version: $RELEASE_VERSION" "release-j5/$candidate" + else + test ! -e "release-j5/$candidate" + fi + done + + - uses: actions/upload-artifact@v7 + with: + name: j5-code-windows-x64 + path: | + release-j5/J5-Code-*-x64.exe + release-j5/J5-Code-*-x64.exe.blockmap + release-j5/latest.yml + release-j5/nightly.yml + if-no-files-found: error + retention-days: 30 + + # These gitlinks belong to vendored manifests, not this repository. + # Remove them only from the disposable index before checkout's cleanup. + # Git and awk, as in j5-resource-monitors.yml, on this Windows runner. + - name: Exclude vendored gitlinks from checkout cleanup + if: always() + run: | + git ls-files --stage .repos | awk '$1 == "160000" { print $4 }' | git update-index --force-remove --stdin diff --git a/FORK.md b/FORK.md index 0404fcc64f985..97c1d99d13dd6 100644 --- a/FORK.md +++ b/FORK.md @@ -315,7 +315,7 @@ migrations after upstream migrations. 39. The welcome wizard's "Providers" wording: `components/onboarding/WelcomeWizard.tsx` is upstream's file except for branding (case B: the app name and CLI command from `branding.ts`, and the plain header title in place of the T3 wordmark) and four wording edits that say providers where upstream says agents: the second stage's label in `ONBOARDING_STAGES` (`"Providers"`), the Connect stage's sentence ("We'll set up providers and projects on each"), and the file-header and step comments. J5 calls the runtimes providers and keeps "agent" for the threads a person directs. On every upstream advance, re-apply these four edits. The rest of this case is retired (2026-10-04, the Squadron fold, [#412](https://github.com/Jacksondr5/j5code/issues/412)): the wizard's fourth Squadron stage is removed, `apps/web/src/j5/onboarding/` is deleted, and `routes/welcome.tsx` carries only case 73's refusal of the wizard to anyone but a named Owner. Imported conversations register in their project like every other thread (case 10), and the server's assignment route is removed (case 9). -40. J5 release-archive distribution (Jackson's 2026-09-24 decision #3). J5 adopts upstream's self-contained CLI release archives and stops publishing `@jacksondr5/j5code` to npm (last npm version 0.0.43; first archive release 0.0.44 or later). `packages/shared/src/cliRelease.ts` sets `CLI_RELEASE_REPOSITORY = "Jacksondr5/j5code"`, so `j5 update`, `j5 service install`, server self-update, mobile update checks, and desktop SSH remote launch all download `t3--.tar.gz` + `SHA256SUMS` from J5's GitHub Releases. The archive's executable is `j5` (case 50); `scripts/install.sh` (hosted as a release asset, `https://github.com/Jacksondr5/j5code/releases/latest/download/install.sh`) installs into `$J5CODE_HOME` (default `~/.j5code`, never `T3CODE_HOME`) and links `~/.local/bin/j5`; it accepts only darwin-arm64 and linux-x64. `CLI_ARCHIVE_PLATFORM_KEYS` keeps upstream's five keys, so other hosts get "No release archive was published". `scripts/install.ps1` is repointed at J5 (`j5.cmd`) though no Windows archive ships; `apps/server/src/cli/update.ts` looks for `j5.cmd`. `packages/ssh/src/tunnel.ts` unpacks remote runtimes into `$HOME/.j5code/runtime/versions` (transport bookkeeping stays `~/.t3/ssh-launch`, case 15). `.github/workflows/j5-release.yml` builds, signs (Developer ID + hardened runtime), notarizes and smoke-tests darwin-arm64 and builds linux-x64 archives with upstream's `scripts/build-cli-archive.ts` / `smoke-cli-archive.ts`, and publishes them with SHA256SUMS, install.sh, and the signed desktop build from a `j5-macos-build.yml` run. User strings in `cli/update.ts`, `uninstall.ts`, `updateProgress.ts` and `service.ts` say `j5`/J5 Code. Upstream's `apps/server/src/cli/invocation.ts` looks up and renders the command as `j5`; its `resolveServerInstallation` still looks for an npm-global `t3` package, which never matches a J5 install, and is left as upstream. On web, `manualServerUpdateCommand` (`apps/web/src/versionSkew.ts`) keeps upstream's signature and always returns `j5 update `, and `ServerUpdateAction.tsx` shows only the update-command copy: upstream's "relaunch command" variant is collapsed because `j5 update` updates the install in place (the implementer's call at the 2026-10-08 advance). Upstream's "Update everything" (`apps/web/src/components/sidebar/useUpdateEverything.ts`) updates a server only once its target version is published, which upstream checks on npm; J5 publishes nothing there, so every J5 server would be skipped. Its import is aliased to J5-owned `useJ5ReleasePublished` (`apps/web/src/j5/updates/releasePublished.ts`), which asks `api.github.com` for the `v` release of `CLI_RELEASE_REPOSITORY` (now exported) and counts it published only when it is not a draft and carries `SHA256SUMS`, the rule `J5 Release` uses; its reason for a skipped server reads "J5 Code is not released yet". Those are the file's two lines, and upstream's `state/npmRelease.ts` is unused and unedited. Migration guide (decision #3b): `docs/j5/user/migrating-to-release-archives.md`. Proofs: `packages/shared/src/cliRelease.test.ts`, `scripts/install.test.ts` (J5 home, `bin/j5`, ambient `T3CODE_HOME` untouched), `packages/ssh/src/tunnel.test.ts` (J5 release URL and runtime dir). `J5 Release` fails in its resolve job when a release for the version already exists at a different commit (resolved like the publish job's `commits/` check), treats it as already published only when the commit matches and `SHA256SUMS` is attached, and refuses versions below 0.0.44 (the npm era owns v0.0.38–v0.0.43 tags; an older archive would be offered as a downgrade), tolerates an `@ref` suffix on the selected build run's workflow path, and runs `scripts/apply-web-brand-assets.ts production apps/server/dist/client` before `build-exe`, because upstream's `cli.ts build` stamps development icons into `dist/client` and the archive serves that directory (F's npm publish did the same swap in `preparePublishIcons`). A local linux-x64 dry run on 2026-09-24 (Node 26.8.2 host for `build-exe`) produced `t3-0.0.43-linux-x64.tar.gz` (81.7 MB) that passed `smoke-cli-archive.ts` and installed via `scripts/install.sh` from a local mirror into a scratch HOME (`j5 v0.0.43`). +40. J5 release-archive distribution (Jackson's 2026-09-24 decision #3). J5 adopts upstream's self-contained CLI release archives and stops publishing `@jacksondr5/j5code` to npm (last npm version 0.0.43; first archive release 0.0.44 or later). `packages/shared/src/cliRelease.ts` sets `CLI_RELEASE_REPOSITORY = "Jacksondr5/j5code"`, so `j5 update`, `j5 service install`, server self-update, mobile update checks, and desktop SSH remote launch all download `t3--.tar.gz` + `SHA256SUMS` from J5's GitHub Releases. The archive's executable is `j5` (case 50); `scripts/install.sh` (hosted as a release asset, `https://github.com/Jacksondr5/j5code/releases/latest/download/install.sh`) installs into `$J5CODE_HOME` (default `~/.j5code`, never `T3CODE_HOME`) and links `~/.local/bin/j5`; it accepts only darwin-arm64 and linux-x64. `CLI_ARCHIVE_PLATFORM_KEYS` keeps upstream's five keys, so other hosts get "No release archive was published". `scripts/install.ps1` is repointed at J5 (`j5.cmd`) and published beside `install.sh` (`https://github.com/Jacksondr5/j5code/releases/latest/download/install.ps1`); it installs the win32-x64 archive; `apps/server/src/cli/update.ts` looks for `j5.cmd`. `packages/ssh/src/tunnel.ts` unpacks remote runtimes into `$HOME/.j5code/runtime/versions` (transport bookkeeping stays `~/.t3/ssh-launch`, case 15). `.github/workflows/j5-release.yml` builds, signs (Developer ID + hardened runtime), notarizes and smoke-tests darwin-arm64 and builds linux-x64 archives with upstream's `scripts/build-cli-archive.ts` / `smoke-cli-archive.ts`; J5-owned `j5-windows-build.yml`, called from it, builds and smoke-tests the unsigned win32-x64 archive and the unsigned Windows x64 NSIS installer, which embeds the linux-x64 archive as its WSL runtime. The release publishes them with SHA256SUMS, both installers, and the signed desktop build from a `j5-macos-build.yml` run. User strings in `cli/update.ts`, `uninstall.ts`, `updateProgress.ts` and `service.ts` say `j5`/J5 Code. Upstream's `apps/server/src/cli/invocation.ts` looks up and renders the command as `j5`; its `resolveServerInstallation` still looks for an npm-global `t3` package, which never matches a J5 install, and is left as upstream. On web, `manualServerUpdateCommand` (`apps/web/src/versionSkew.ts`) keeps upstream's signature and always returns `j5 update `, and `ServerUpdateAction.tsx` shows only the update-command copy: upstream's "relaunch command" variant is collapsed because `j5 update` updates the install in place (the implementer's call at the 2026-10-08 advance). Upstream's "Update everything" (`apps/web/src/components/sidebar/useUpdateEverything.ts`) updates a server only once its target version is published, which upstream checks on npm; J5 publishes nothing there, so every J5 server would be skipped. Its import is aliased to J5-owned `useJ5ReleasePublished` (`apps/web/src/j5/updates/releasePublished.ts`), which asks `api.github.com` for the `v` release of `CLI_RELEASE_REPOSITORY` (now exported) and counts it published only when it is not a draft and carries `SHA256SUMS`, the rule `J5 Release` uses; its reason for a skipped server reads "J5 Code is not released yet". Those are the file's two lines, and upstream's `state/npmRelease.ts` is unused and unedited. Migration guide (decision #3b): `docs/j5/user/migrating-to-release-archives.md`. Proofs: `packages/shared/src/cliRelease.test.ts`, `scripts/install.test.ts` (J5 home, `bin/j5`, ambient `T3CODE_HOME` untouched), `packages/ssh/src/tunnel.test.ts` (J5 release URL and runtime dir). `J5 Release` fails in its resolve job when a release for the version already exists at a different commit (resolved like the publish job's `commits/` check), treats it as already published only when the commit matches and `SHA256SUMS` is attached, and refuses versions below 0.0.44 (the npm era owns v0.0.38–v0.0.43 tags; an older archive would be offered as a downgrade), tolerates an `@ref` suffix on the selected build run's workflow path, and runs `scripts/apply-web-brand-assets.ts production apps/server/dist/client` before `build-exe`, because upstream's `cli.ts build` stamps development icons into `dist/client` and the archive serves that directory (F's npm publish did the same swap in `preparePublishIcons`). A local linux-x64 dry run on 2026-09-24 (Node 26.8.2 host for `build-exe`) produced `t3-0.0.43-linux-x64.tar.gz` (81.7 MB) that passed `smoke-cli-archive.ts` and installed via `scripts/install.sh` from a local mirror into a scratch HOME (`j5 v0.0.43`). 41. Background-service rename and legacy J5 unit retirement (Jackson's 2026-09-24 decision #3a). `apps/server/src/cloud/bootService.ts` names the service `j5code.service` (systemd) / `codes.jackson.j5code.service` (launchd) and parses `J5CODE_HOME` in `bootServiceBaseDirOf` (restart/uninstall/update home detection). Fork-owned `apps/server/src/cloud/j5/legacyBootService.ts` describes the npm-era (0.0.43 and earlier) J5 unit (`t3code.service` / `com.t3tools.t3code.service`): `isLegacyJ5BootServiceUnit` means it names `J5CODE_HOME`, never `T3CODE_HOME`, and `legacyStopMeansNotRunning` sets the strict-stop rule (systemd exit 5 or "not loaded/does not exist/not found"; launchd exit 3/113 or "No such process/Could not find service"); every other stop failure is fatal. bootService's integration seam: `install` (start) writes the new unit and stops the legacy one strictly; on a real stop failure it restores the previous `service-state.json`, leaves the legacy unit untouched and never activates the new one. It then activates the new unit, verifies it is running, and only then removes the legacy file; if the new unit does not run, it deactivates it, restores the legacy unit and its state file, and never restarts the new unit alongside it. `install({start:false})` refuses with `legacy-service-present`; `restart` and `uninstall` also retire the legacy unit; `status` reports `legacy-service-present`. A T3 Code unit at the legacy path is never read as J5's, stopped, or removed. Upstream-file additions, all J5-marked: `BootServiceStep.acceptFailure`; `BootServiceManager.running` and `activateAndVerify`, which after every activation (install, handover, restart) polls `systemctl --user is-active` or `launchctl print … state = running` up to 10 × 500 ms and otherwise fails with `BootServiceNotRunningError`, because a condition-skipped start exits 0; `gatingDropIns`, so install refuses before any change and status reports `service-dropin-conditions` when `j5code.service.d/*.conf` carries `Condition*=`/`Assert*=` (other drop-ins are allowed); and `BootServicePrerequisiteError.paths`. Before any change, `install` also refuses with `foreign-service-present` when a unit already at the new J5 path lacks the renderer's `T3_BOOT_SERVICE_UNIT` marker (`isRenderedJ5BootServiceUnit`), so a hand-written unit such as an old checkout-based `j5code.service` is left for the owner. `apps/server/src/cli/update.ts` treats a server in the `j5code.service` or legacy `t3code.service` cgroup, or under either launcher, as service-supervised (`isBootServiceCgroup`, `isBootServiceLauncherCommand`), and prints the `j5 service install` hint when the legacy unit is present. Linux drop-ins under `t3code.service.d/` are not migrated automatically; `docs/j5/user/migrating-to-release-archives.md` copies them with `cp -n`, records what it copied for a precise rollback, and stops for the owner on a gating `j5code.service.d` drop-in. Proofs: `bootService.test.ts` "legacy J5 service handover" suite plus the install-suite verify, drop-in and "refuses to take over a j5code.service that J5 did not write" tests (temp HOME, fake ProcessRunner, TestClock), and `cli/update.test.ts` "recognises the J5 service's own server". Upstream's `withStopped`, which `j5 doctor` uses to pause the service while it repairs the database, is adopted unchanged: it stops `j5code.service` and not an npm-era legacy unit. A launcher that idles after its server exits with 78 (another server owns the home) counts as running to `activateAndVerify`, as upstream has it. On every advance check that no upstream change reintroduces `t3code.service`/`com.t3tools.t3code.service` as J5's own name, and that upstream activation paths still go through `activateAndVerify`. diff --git a/docs/j5/product/upstream.md b/docs/j5/product/upstream.md index ed9333c256813..3afd32c81aa10 100644 --- a/docs/j5/product/upstream.md +++ b/docs/j5/product/upstream.md @@ -236,9 +236,9 @@ Each advance checks for new upstream reads of `T3CODE_HOME` or `.t3` paths and n **Why:** J5 followed upstream from npm to archives rather than keep npm alone. It publishes from its own repository so it never installs or updates T3 Code, and it renames the service so both can be installed at once. -**Consequences:** only darwin-arm64 and linux-x64 get releases, where upstream ships five platforms, and no reason for that is recorded. Other hosts build from source and get no `j5 update` or service. A real service handover, signing and notarization weren't verified when this shipped. Migration steps are in `docs/j5/user/migrating-to-release-archives.md`. Without the release check, "Update everything" would skip every J5 server, since J5 publishes nothing to npm. Windows releases are wanted (#341). +**Consequences:** the CLI archive ships for darwin-arm64, linux-x64 and win32-x64, and the desktop app for macOS on Apple silicon and Windows x64, where upstream ships more of both. The Windows builds are not code-signed yet. Other hosts build from source and get no `j5 update` or service. Windows has no background service, as upstream. A real service handover, signing and notarization weren't verified when this shipped. Migration steps are in `docs/j5/user/migrating-to-release-archives.md`. Without the release check, "Update everything" would skip every J5 server, since J5 publishes nothing to npm. -**Decided:** Jackson, 2026-09-24 (#3, #3a). Recorded in FORK.md cases 40 and 41. +**Decided:** Jackson, 2026-09-24 (#3, #3a), and 2026-10-28 (Windows x64, unsigned until a signing account exists, without the background service). Recorded in FORK.md cases 40 and 41. #### D26. `j5 triage` investigates and files against J5's repository diff --git a/docs/j5/runbooks/macos-packaging.md b/docs/j5/runbooks/macos-packaging.md index 80a4a5b658bec..caa8e40ee343d 100644 --- a/docs/j5/runbooks/macos-packaging.md +++ b/docs/j5/runbooks/macos-packaging.md @@ -212,11 +212,13 @@ the time to repeat step 2. - the signed and notarized Apple Silicon DMG and ZIP, with their blockmaps and the update feed for the channel: `latest-mac.yml` for a stable release, `nightly-mac.yml` for a nightly, and none for a preview, which no install updates to; -- self-contained CLI archives `t3--darwin-arm64.tar.gz` (Developer ID signed and notarized) - and `t3--linux-x64.tar.gz`, built and smoke-tested in the release run from the same - commit. The executable embeds a newer Node than the one tests run on, so the run also runs the - database startup tests on that Node; -- `install.sh` and `SHA256SUMS` over the archives and the installer. +- the unsigned Windows x64 installer `J5-Code--x64.exe`, its blockmap, and its update feed: + `latest.yml` for a stable release, `nightly.yml` for a nightly, none for a preview; +- self-contained CLI archives `t3--darwin-arm64.tar.gz` (Developer ID signed and notarized), + `t3--linux-x64.tar.gz` and `t3--win32-x64.zip` (unsigned), built and + smoke-tested in the release run from the same commit. The executable embeds a newer Node than the + one tests run on, so the run also runs the database startup tests on that Node, on Linux and macOS; +- `install.sh`, `install.ps1`, and `SHA256SUMS` over the archives and both installers. Run by hand with a build's run ID, its resolve job reads the version from the build commit's four manifests, which must agree. Called by `J5 Nightly`, it is given the commit and the version, stamps @@ -244,6 +246,14 @@ commit and a version to stamp. The workflow uses the Apple signing secrets and `APPLE_TEAM_ID` repository variable; it converts the P12 export to a Keychain-compatible format. Clerk passkey provisioning is only required when Clerk/passkey configuration is supplied. +`J5 Windows Build` runs only when `J5 Release` calls it, at the commit and version of the release, +after the release run has built the win32-x64 resource monitor and the linux-x64 CLI archive. On a +GitHub-hosted Windows runner it builds and smoke-tests the win32-x64 CLI archive, then packages the +NSIS installer with that Linux archive embedded as the runtime for the app's WSL backend. Neither is +code-signed, so Windows SmartScreen warns before the installer runs. Signing needs an Azure Artifact +Signing account; upstream's `release-desktop.yml` shows the secrets and the `--signed` flag that +turn it on. + - `J5 CI` runs formatting, lint, typecheck, and unit-test gates on every PR, and on pushes to `j5/main`, `j5/release-`, and `j5/preview--`. - `J5 Weekly Full Build` runs Mondays at 08:23 UTC and on manual dispatch. It runs the full suite, diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 04fa6566c1ebb..0044549588217 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -3,8 +3,8 @@ # # irm https://github.com/Jacksondr5/j5code/releases/latest/download/install.ps1 | iex # -# J5 does not publish Windows archives yet (only darwin-arm64 and linux-x64); -# this script is kept pointed at J5 so it never installs upstream T3 Code. +# J5 publishes Windows archives for x64 only; this script points at J5 so it +# never installs upstream T3 Code. # # Environment: # T3CODE_CHANNEL release train to follow: stable, nightly, or preview @@ -175,7 +175,7 @@ if ((Test-Path $marker) -and ((Get-Content $marker -Raw).Trim() -eq $version)) { } catch { $status = $_.Exception.Response.StatusCode.value__ if ($status -eq 404) { - Fail "j5 $version has no release archive for win32-$arch; J5 publishes CLI archives for macOS (Apple silicon) and Linux x64 only" + Fail "j5 $version has no release archive for win32-$arch; J5 publishes CLI archives for macOS (Apple silicon), Linux x64 and Windows x64 only" } throw }