Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

chore(release): stop publishing the old name where a release can (#1016)

Ruben Lütkef275e7dec700
diff --git a/.github/workflows/desktop-installers.yml b/.github/workflows/desktop-installers.yml
index 2514d220be..75749f519e 100644
--- a/.github/workflows/desktop-installers.yml
+++ b/.github/workflows/desktop-installers.yml
@@ -18,9 +18,9 @@
# PersonalJarvis-Linux-x86_64.AppImage) with identical bytes: installs frozen
# before the rename only look for that name. The release job makes the copies
# after signing (scripts/ci/installer_aliases.py) and the checksum manifest
-# lists both names. The Windows setup is built and signed under the earlier
-# name, because the SignPath artifact configuration pins it
-# (docs/code-signing-policy.md); its current name is the copy.
+# lists both names. The earlier names are a compatibility measure with a
+# planned end and one switch (PUBLISH_EARLIER_INSTALLER_NAMES in
+# scripts/ci/release_assets.py, docs/rename/migration-plan.md).
#
# Each OS job runs the SAME script a maintainer runs locally
# (packaging/<os>/build.*), so a green run here means the documented command
@@ -107,6 +107,10 @@ jobs:
# SignPath Foundation (free OSS certificate). Needs the API token secret
# plus three repository variables; any one missing leaves the path dormant.
HAS_SIGNPATH_SIGNING: ${{ github.ref_type == 'tag' && secrets.SIGNPATH_API_TOKEN != '' && vars.SIGNPATH_ORGANIZATION_ID != '' && vars.SIGNPATH_PROJECT_SLUG != '' && vars.SIGNPATH_SIGNING_POLICY_SLUG != '' }}
+ # The setup's file name: SignedSetupBaseName in packaging/windows/Dodaios.iss
+ # and the path the SignPath artifact configuration pins
+ # (docs/code-signing-policy.md). All three change together.
+ SIGNED_SETUP_NAME: Dodaios-Setup-x64.exe
steps:
- name: Checkout
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
@@ -186,7 +190,7 @@ jobs:
# Deliberately outside the `installer-*` pattern the release job
# downloads: only the verified, signed file may ship.
name: signpath-unsigned-windows-x64
- path: dist/installers/PersonalJarvis-Setup-x64.exe
+ path: dist/installers/${{ env.SIGNED_SETUP_NAME }}
if-no-files-found: error
retention-days: 1
@@ -213,9 +217,9 @@ jobs:
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
- $signed = Join-Path $env:RUNNER_TEMP 'signpath-signed/PersonalJarvis-Setup-x64.exe'
+ $signed = Join-Path $env:RUNNER_TEMP "signpath-signed/$env:SIGNED_SETUP_NAME"
if (-not (Test-Path -LiteralPath $signed)) {
- Write-Host "::error::SignPath returned no PersonalJarvis-Setup-x64.exe"
+ Write-Host "::error::SignPath returned no $env:SIGNED_SETUP_NAME"
Get-ChildItem -Recurse (Split-Path $signed) | ForEach-Object { Write-Host $_.FullName }
exit 1
}
@@ -233,7 +237,7 @@ jobs:
Write-Host "::error::The signature carries no timestamp and would expire with the certificate"
exit 1
}
- Copy-Item -LiteralPath $signed -Destination dist/installers/PersonalJarvis-Setup-x64.exe -Force
+ Copy-Item -LiteralPath $signed -Destination "dist/installers/$env:SIGNED_SETUP_NAME" -Force
Write-Host "::notice::Installer signed by SignPath Foundation and verified."
- name: Sign the installer (Azure Trusted Signing)
@@ -260,12 +264,12 @@ jobs:
echo "::notice::Neither SignPath (SIGNPATH_API_TOKEN + SIGNPATH_ORGANIZATION_ID/PROJECT_SLUG/SIGNING_POLICY_SLUG) nor AZURE_* signing is configured - the installer is UNSIGNED."
# The signed setup under the name SignPath pins; the release job adds the
- # byte-identical Dodaios-Setup-x64.exe.
+ # byte-identical PersonalJarvis-Setup-x64.exe.
- name: Upload the installer
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: installer-windows-x64
- path: dist/installers/PersonalJarvis-Setup-x64.exe
+ path: dist/installers/${{ env.SIGNED_SETUP_NAME }}
if-no-files-found: error
retention-days: 14
@@ -537,16 +541,14 @@ jobs:
ls -la
# Every asset the download page and the updater promise must be here.
# A silently missing DMG would ship a release that only half works.
- required=(
- Dodaios-Setup-x64.exe
- Dodaios-macOS-arm64.dmg
- Dodaios-macOS-x64.dmg
- Dodaios-Linux-x86_64.AppImage
- PersonalJarvis-Setup-x64.exe
- PersonalJarvis-macOS-arm64.dmg
- PersonalJarvis-macOS-x64.dmg
- PersonalJarvis-Linux-x86_64.AppImage
- )
+ # The list comes from scripts/ci/release_assets.py (INSTALLERS), so
+ # the earlier names follow its PUBLISH_EARLIER_INSTALLER_NAMES switch.
+ names="$(python ../scripts/ci/installer_aliases.py --names)"
+ mapfile -t required <<< "$names"
+ if [ "${#required[@]}" -lt 4 ]; then
+ echo "::error::the installer name list is incomplete: ${required[*]}"
+ exit 1
+ fi
for asset in "${required[@]}"; do
if [ ! -f "$asset" ]; then
echo "::error::required release asset $asset is missing"
diff --git a/.github/workflows/release-smoke.yml b/.github/workflows/release-smoke.yml
index f9d6621f2f..3db26ead05 100644
--- a/.github/workflows/release-smoke.yml
+++ b/.github/workflows/release-smoke.yml
@@ -149,9 +149,13 @@ jobs:
done
# An AppImage is an executable ELF runtime with the squashfs appended.
# Both names are the same file; each is checked as users download it.
+ # The earlier name is absent once release_assets.py stops publishing it.
python - <<'PYEOF'
+ import os
import sys
for name in ("Dodaios-Linux-x86_64.AppImage", "PersonalJarvis-Linux-x86_64.AppImage"):
+ if name.startswith("PersonalJarvis-") and not os.path.exists(name):
+ continue
with open(name, "rb") as stream:
if stream.read(4) != b"\x7fELF":
sys.exit(f"::error::{name} is not an ELF executable")
@@ -164,6 +168,8 @@ jobs:
run: |
foreach ($name in @('Dodaios-Setup-x64.exe', 'PersonalJarvis-Setup-x64.exe')) {
$installer = Join-Path $env:RUNNER_TEMP "installers\$name"
+ # The earlier name is absent once release_assets.py stops publishing it.
+ if ($name -like 'PersonalJarvis-*' -and -not (Test-Path -LiteralPath $installer)) { continue }
$signature = Get-AuthenticodeSignature -FilePath $installer
Write-Host "${name} Authenticode: $($signature.Status) $($signature.SignerCertificate.Subject)"
if ($signature.Status -ne 'Valid') {
@@ -178,6 +184,8 @@ jobs:
set -euo pipefail
cd "$RUNNER_TEMP/installers"
for dmg in Dodaios-macOS-arm64.dmg Dodaios-macOS-x64.dmg PersonalJarvis-macOS-arm64.dmg PersonalJarvis-macOS-x64.dmg; do
+ # The earlier name is absent once release_assets.py stops publishing it.
+ case "$dmg" in PersonalJarvis-*) [ -e "$dmg" ] || continue ;; esac
hdiutil verify "$dmg"
if ! spctl --assess --type open --context context:primary-signature -v "$dmg" 2>&1; then
echo "::notice::$dmg is not accepted by Gatekeeper (unsigned or not notarized)"
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 24e4c50ccd..de9e456201 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -12,12 +12,14 @@
# Workflow release.yml
# Environment pypi
#
-# Two projects, one code base: the distribution is `dodaios` now, and every
-# release also publishes the same wheel and sdist as `personal-jarvis`, its
-# earlier name, so `pip install -U personal-jarvis` keeps updating until those
-# installs have moved (scripts/ci/build_distributions.py). Both own the same
-# package files, which is why install/installer.py removes `personal-jarvis`
-# before it installs `dodaios`.
+# Two projects, one code base: the distribution is `dodaios`, and every
+# release also publishes `personal-jarvis`, its earlier name, as a thin package
+# with no copy of the code: it depends on `dodaios==<this version>` and keeps
+# the earlier commands, so `pip install -U personal-jarvis` and a stored
+# `uvx --from personal-jarvis` keep getting this release
+# (scripts/ci/build_distributions.py). Releases up to 4.1.2 published it as a
+# full copy owning the same package files, which is why install/installer.py
+# removes `personal-jarvis` before it installs `dodaios`.
#
# The build and the publish are separate jobs on purpose. Only the tiny publish
# jobs hold `id-token: write` and enter a publishing environment, so the OIDC
@@ -183,7 +185,8 @@ jobs:
name: dist
path: dist/
- # Existing `pip install personal-jarvis` installs keep updating from it.
+ # The thin package: existing `pip install personal-jarvis` installs and
+ # stored `uvx --from personal-jarvis` commands follow it to `dodaios`.
- name: Publish personal-jarvis
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
with:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3ee780821f..57e166c2fb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,25 @@ versioning per [SemVer](https://semver.org/).
## [Unreleased]
+### Changed
+
+- The `personal-jarvis` package on PyPI is now a thin pointer to `dodaios`
+ instead of a second copy of the app: it installs `dodaios` at the same
+ version, maps every extra (`personal-jarvis[full]` installs `dodaios[full]`)
+ and keeps every earlier command (`jarvis`, `personal-jarvis`, `jarvisctl`, …)
+ working, including `uvx --from personal-jarvis`. To move an existing pip
+ install to the new name, run `pip uninstall -y personal-jarvis` and then
+ `pip install --force-reinstall dodaios`. If `pip install -U personal-jarvis`
+ leaves an install that no longer starts, the command prints the one-line
+ repair (`pip install --force-reinstall --no-deps dodaios==<version>`).
+- The Windows setup is built as `Dodaios-Setup-x64.exe` and shows the product
+ name Dodaios in its file properties. `PersonalJarvis-Setup-x64.exe` is still
+ published with identical bytes for installs from before the rename.
+- The Linux package file is named `dodaios_<version>_amd64.deb`, after the
+ package inside it.
+- The app identifies itself as Dodaios (User-Agent `Dodaios/1.0`,
+ `Dodaios-Updater`) to GitHub and the plugin services it calls.
+
---
## [4.1.2] — 2026-10-27
diff --git a/docs/ci-pipeline.md b/docs/ci-pipeline.md
index c3ed9711db..bdfda43227 100644
--- a/docs/ci-pipeline.md
+++ b/docs/ci-pipeline.md
@@ -487,22 +487,35 @@ A release happens **only** when the maintainer asks for one.
The in-app updater follows `releases/latest`; draft releases remain hidden.
* **Two names per installer.** Every native installer is published as
`Dodaios-*` and, with identical bytes, under its earlier `PersonalJarvis-*`
- name, the only one installs from before the rename look for. The macOS and
- Linux builds produce the `Dodaios-*` file; the Windows setup is built and
- signed as `PersonalJarvis-Setup-x64.exe`, because the SignPath artifact
- configuration pins that name (docs/code-signing-policy.md). After signing,
- the release job copies each file to its other name
+ name, the only one installs from before the rename look for. Every build
+ produces the `Dodaios-*` file; the Windows setup is built and signed as
+ `Dodaios-Setup-x64.exe` with the product name `Dodaios`, the values the
+ SignPath artifact configuration pins (docs/code-signing-policy.md). After
+ signing, the release job copies each file to its other name
(`scripts/ci/installer_aliases.py`), `installers-SHA256SUMS.txt` lists both,
and finalization refuses a release whose two names of one installer differ.
+ The copies have a planned end and one switch:
+ `PUBLISH_EARLIER_INSTALLER_NAMES` in `scripts/ci/release_assets.py` (the
+ checksum step reads the required names from `installer_aliases.py --names`,
+ so flipping it needs no workflow edit; see docs/rename/migration-plan.md).
+ The `.deb` is named after its package, `dodaios_<version>_amd64.deb`
+ (`personal-jarvis_<version>_amd64.deb` up to 4.1.2).
* **Two names on PyPI.** `release.yml` builds the wheel and sdist as `dodaios`
- and again as `personal-jarvis`, the earlier name, from a copy of
- `pyproject.toml` that differs only in the names
- (`scripts/ci/build_distributions.py`), and publishes `personal-jarvis` first,
- then `dodaios`. Both projects trust the same publisher (this repository,
- `release.yml`, environment `pypi`). The two distributions own the same
- files, so `install/installer.py` uninstalls `personal-jarvis` before it
- installs the checkout, and the app logs one warning when an environment
- holds both.
+ and publishes `personal-jarvis`, the earlier name, as a thin package
+ (`scripts/ci/build_distributions.py`): no copy of the code, one dependency
+ `dodaios==<same version>`, every extra mapped to the same `dodaios` extra,
+ and every `dodaios` console command re-declared through a small launcher
+ (`uv tool install personal-jarvis` only links the named package's commands).
+ Each project publishes from its own job and environment (`publish`/`pypi`
+ for `dodaios`, `publish-legacy`/`pypi-legacy` for `personal-jarvis`).
+ Releases up to 4.1.2 published `personal-jarvis` as a full copy owning the
+ same files: plain `pip install -U personal-jarvis` over such a copy installs
+ `dodaios` and then deletes its files while removing the old copy (uv is not
+ affected); the launcher then prints the repair command
+ (`pip install --force-reinstall --no-deps dodaios==<version>`).
+ `install/installer.py` uninstalls `personal-jarvis` before it installs the
+ checkout, and the app logs one warning when an environment holds a full copy
+ under both names.
* **Build provenance.** On a tag, `desktop-installers.yml` attests every
native installer listed in `installers-SHA256SUMS.txt` (`.exe`, both
`.dmg`, `.AppImage`, `.deb`, under both names) with
diff --git a/docs/code-signing-policy.md b/docs/code-signing-policy.md
index a947449bcf..2636da3105 100644
--- a/docs/code-signing-policy.md
+++ b/docs/code-signing-policy.md
@@ -13,12 +13,13 @@ Free code signing provided by [SignPath.io](https://signpath.io), certificate by
| Artifact | Platform | Signed by |
| --- | --- | --- |
-| `PersonalJarvis-Setup-x64.exe` | Windows 10/11 x64 | SignPath Foundation certificate, via SignPath.io |
+| `Dodaios-Setup-x64.exe` | Windows 10/11 x64 | SignPath Foundation certificate, via SignPath.io |
-The setup is signed under that name because the artifact configuration below
-pins it. After signing, the release publishes the same signed file a second
-time as `Dodaios-Setup-x64.exe`; the two downloads are byte-identical, so both
-carry this signature.
+The setup's product name is `Dodaios`. After signing, the release publishes
+the same signed file a second time as `PersonalJarvis-Setup-x64.exe`, the
+name installs from before the rename look for; the two downloads are
+byte-identical, so both carry this signature. That copy has a planned end
+(`PUBLISH_EARLIER_INSTALLER_NAMES` in `scripts/ci/release_assets.py`).
Only files built from this repository's source code by the
[`Desktop installers`](../.github/workflows/desktop-installers.yml) GitHub Actions
@@ -93,13 +94,23 @@ artifact configuration wraps the setup file in a ZIP and pins its metadata:
```xml
<artifact-configuration xmlns="http://signpath.io/artifact-configuration/v1">
<zip-file>
- <pe-file path="PersonalJarvis-Setup-x64.exe" product-name="Personal Jarvis">
+ <pe-file path="Dodaios-Setup-x64.exe" product-name="Dodaios">
<authenticode-sign />
</pe-file>
</zip-file>
</artifact-configuration>
```
+The file name and the product name are pinned in three places that must
+always agree: this configuration, `SignedSetupBaseName` and
+`SignedProductName` in `packaging/windows/Dodaios.iss`, and `SIGNED_SETUP_NAME`
+in the `windows` job of `.github/workflows/desktop-installers.yml`
+(`tests/unit/ci/test_installer_aliases.py` checks the repository side).
+Releases up to 4.1.2 built the setup as `PersonalJarvis-Setup-x64.exe` with
+the product name `Personal Jarvis`; no release was signed under that name, so
+a configuration entered in SignPath before this change must be updated to the
+values above before the first signed release.
+
Without these settings the workflow prints a notice and publishes an unsigned
installer. If both SignPath and Azure Trusted Signing are configured, SignPath
is used.
diff --git a/docs/desktop-installers.md b/docs/desktop-installers.md
index 299736281c..7d95de2ec1 100644
--- a/docs/desktop-installers.md
+++ b/docs/desktop-installers.md
@@ -26,9 +26,11 @@ Every installer is published a second time, with identical bytes, under its
earlier name (`PersonalJarvis-Setup-x64.exe`, `PersonalJarvis-macOS-arm64.dmg`,
`PersonalJarvis-macOS-x64.dmg`, `PersonalJarvis-Linux-x86_64.AppImage`):
installs from before the rename only look for those. The checksum manifest
-lists both names. The Windows setup is signed under its earlier name, which
-the SignPath configuration pins, and copied to `Dodaios-Setup-x64.exe` after
-signing (`scripts/ci/installer_aliases.py`).
+lists both names. Every build, the signed Windows setup included, produces the
+`Dodaios-*` file; the earlier name is copied after signing
+(`scripts/ci/installer_aliases.py`). The copies have a planned end and one
+switch, `PUBLISH_EARLIER_INSTALLER_NAMES` in `scripts/ci/release_assets.py`
+(docs/rename/migration-plan.md).
The terminal one-liner and `pipx install personal-jarvis` stay supported. They
produce a *managed* or *dev* install, which updates through git - see
@@ -98,7 +100,7 @@ All three scripts do the same three things: build the frontend if
```powershell
pwsh packaging/windows/build.ps1
-# -> dist/installers/PersonalJarvis-Setup-x64.exe
+# -> dist/installers/Dodaios-Setup-x64.exe
```
Needs Node 22+, Python 3.12 with `pip install -e ".[desktop,dev]"`, and Inno
@@ -425,9 +427,9 @@ dist/Jarvis/jarvis.exe serve
curl http://127.0.0.1:<admin_api_port>/api/health
# a full install / upgrade / uninstall cycle, unattended
-PersonalJarvis-Setup-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /DIR="C:\pj-test" /LOG=install.log
+Dodaios-Setup-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /DIR="C:\pj-test" /LOG=install.log
C:\pj-test\jarvis.exe --version
-PersonalJarvis-Setup-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /DIR="C:\pj-test" # upgrade in place
+Dodaios-Setup-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /DIR="C:\pj-test" # upgrade in place
C:\pj-test\unins000.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART
```
diff --git a/docs/os-parity.md b/docs/os-parity.md
index 1a66cc2ade..cd57cb9e1d 100644
--- a/docs/os-parity.md
+++ b/docs/os-parity.md
@@ -1445,7 +1445,7 @@ verifies against before it replaces anything.
|---|---|---|---|---|---|---|
| Windows 10/11 x64 | `Dodaios-Setup-x64.exe`, published with identical bytes as `PersonalJarvis-Setup-x64.exe` too, the name the build signs under because SignPath pins it (Inno Setup, per-user, no admin prompt, fixed AppId for in-place upgrades) | `packaging/windows/build.ps1`, `scripts/ci/installer_aliases.py` | Yes — WebView2, the shipping desktop window | Owned by the Windows packaging work; see `packaging/windows/` | The installer creates and removes the Start-Menu / Desktop entries | Owned by the Windows packaging work — not verified from here |
| macOS 12+, arm64 and x64 | `Dodaios-macOS-arm64.dmg`, `Dodaios-macOS-x64.dmg`, published with identical bytes under the earlier `PersonalJarvis-macOS-<arch>.dmg` names too (`Dodaios.app` + an `/Applications` symlink) | `packaging/macos/build.sh` | Yes — WKWebView through pywebview | Developer ID + Hardened Runtime + notarization when `APPLE_SIGNING_IDENTITY`/`APPLE_ID`/`APPLE_TEAM_ID`/`APPLE_APP_SPECIFIC_PASSWORD` are set; ad-hoc signing and a printed notice otherwise (as of v2.5.0 every published image is the ad-hoc one; the certificate itself comes from the `APPLE_CERTIFICATE_P12_BASE64` / `APPLE_CERTIFICATE_PASSWORD` secrets, which `build.sh` imports into a temporary keychain) | The user drags the app to `/Applications`; the app registers nothing | The ad-hoc path runs for real on the macOS runners (every published image comes from it). The signed/notarized path has **never run**: only `bash -n`, ShellCheck 0.11.0 `-S style` (zero findings), a `DRY_RUN=1` rehearsal of both paths and the certificate import against a stand-in `security` command. A Mac with the Apple secrets is the outstanding gate |
-| Linux x86_64 | `Dodaios-Linux-x86_64.AppImage` (published with identical bytes as `PersonalJarvis-Linux-x86_64.AppImage` too), `personal-jarvis_<version>_amd64.deb` | `packaging/linux/build.sh` | **No** — serves its interface over loopback HTTP and opens the default browser (P-38) | None. AppImage has no signing story in this project; the release's SHA-256 sums are the integrity check | `.deb` installs a `.desktop` entry, the hicolor icon, `/usr/bin/jarvis` and `/usr/bin/personal-jarvis`. The AppImage carries its `.desktop` inside itself for AppImageLauncher/`appimaged` | Full build proven in a `python:3.12-bookworm` container on 2026-08-25 (~2 min, 156 MB AppImage + 172 MB `.deb`): `appimagetool` digest check, `desktop-file-validate`, both executables out of one freeze, `--version` through the packaged AppImage and through `AppRun`, `AppRun serve` answering `/api/health` in 1-3 s, and the browser hand-off calling the opener with the right URL. Not run on a real desktop distribution or with FUSE |
+| Linux x86_64 | `Dodaios-Linux-x86_64.AppImage` (published with identical bytes as `PersonalJarvis-Linux-x86_64.AppImage` too), `dodaios_<version>_amd64.deb` (`personal-jarvis_<version>_amd64.deb` up to 4.1.2) | `packaging/linux/build.sh` | **No** — serves its interface over loopback HTTP and opens the default browser (P-38) | None. AppImage has no signing story in this project; the release's SHA-256 sums are the integrity check | `.deb` installs a `.desktop` entry, the hicolor icon, `/usr/bin/jarvis` and `/usr/bin/personal-jarvis`. The AppImage carries its `.desktop` inside itself for AppImageLauncher/`appimaged` | Full build proven in a `python:3.12-bookworm` container on 2026-08-25 (~2 min, 156 MB AppImage + 172 MB `.deb`): `appimagetool` digest check, `desktop-file-validate`, both executables out of one freeze, `--version` through the packaged AppImage and through `AppRun`, `AppRun serve` answering `/api/health` in 1-3 s, and the browser hand-off calling the opener with the right URL. Not run on a real desktop distribution or with FUSE |
**Frozen builds register nothing themselves.** For a native install the
installer owns every shell artifact, so `dodaios/setup/desktop_integration.py`
diff --git a/docs/rename/migration-plan.md b/docs/rename/migration-plan.md
index 6beccdb0cc..e1724cc332 100644
--- a/docs/rename/migration-plan.md
+++ b/docs/rename/migration-plan.md
@@ -1,8 +1,7 @@
# Retiring the Personal Jarvis names: migration plan (proposal)
-Status: **proposal only**. Nothing in this document is implemented by the pull
-request that adds it. Each step needs a maintainer decision and its own pull
-request.
+Status: **proposal**, partly implemented. Each step needs a maintainer
+decision and its own pull request; the steps marked done below have landed.
Dodaios was called Personal Jarvis until October 2026. Some old names are still
in use because existing installs, scripts and links depend on them. This plan
@@ -14,11 +13,12 @@ remaining mentions is in [old-name-leftovers.md](old-name-leftovers.md).
| Name | Today | Who depends on it |
|---|---|---|
| Release assets `PersonalJarvis-*` | Published next to `Dodaios-*` copies with identical bytes (`scripts/ci/installer_aliases.py`, `INSTALLER_NAME_PAIRS` in `scripts/ci/release_assets.py`) | `releases/latest/download/...` links, the in-app updater of older installs |
-| PyPI distribution | `dodaios` and `personal-jarvis` are both published as full packages at 4.0.1 | `pip install personal-jarvis`, pinned requirements |
+| PyPI distribution | `dodaios` is the package; after 4.1.2 `personal-jarvis` is a thin package that depends on `dodaios` at the same version (step 2) | `pip install personal-jarvis`, `uvx --from personal-jarvis`, pinned requirements |
| CLI command | `dodaios`, `jarvis` and `personal-jarvis` all start the app (`[project.scripts]` in `pyproject.toml`) | shell history, scripts, desktop launchers, docs |
| Control CLI | `dodaiosctl`, `jarvisctl`, `jctl` | scripts and other agents |
| Config file | `jarvis.toml` | every install |
-| Other sources | `personal-jarvis-src.tar.gz`, `personal-jarvis.intoto.jsonl`, `personal-jarvis_<version>_amd64.deb` | package managers, provenance checks |
+| Other sources | `personal-jarvis-src.tar.gz` (next to `dodaios-src.tar.gz`), `personal-jarvis.intoto.jsonl`; the `.deb` is `dodaios_<version>_amd64.deb` after 4.1.2 | install scripts, provenance checks |
+| Windows setup identity | After 4.1.2 built and signed as `Dodaios-Setup-x64.exe`, product name `Dodaios` (`docs/code-signing-policy.md`) | SmartScreen, file properties |
## Step 1: asset aliases (largely done)
@@ -27,28 +27,58 @@ remaining mentions is in [old-name-leftovers.md](old-name-leftovers.md).
2. Switch the README and website download links to the `Dodaios-*` names once
every currently supported release ships them. The `PersonalJarvis-*` links
keep working through the alias, so this needs no redirect.
-3. Add the same alias pattern for `personal-jarvis-src.tar.gz`,
- `personal-jarvis.intoto.jsonl` and the `.deb` package (`dodaios-src.tar.gz`
- already exists).
-4. Stop publishing the `PersonalJarvis-*` copies only after the updater
- telemetry-free check in step 4 shows that no supported release reads them,
- and never before 12 months after the rename.
+3. The `.deb` is named after its package (`dodaios_<version>_amd64.deb`,
+ done): nothing downloads it by name, and every check accepts both
+ spellings for older releases. `dodaios-src.tar.gz` already exists next to
+ `personal-jarvis-src.tar.gz`.
+4. Kept for now, each with a reason:
+ * `PersonalJarvis-*` installers: the in-app updater of frozen installs from
+ before the update contract (PR #567) asks for these names only.
+ * `personal-jarvis-src.tar.gz`: install scripts from releases before
+ `dodaios-src.tar.gz` existed fall back to it. It is published by
+ `release-cut.yml`, which other work is changing; retire it with the
+ installer copies.
+ * `personal-jarvis.intoto.jsonl`: `install/install-verify.sh` and `.ps1`
+ of every published release look the provenance up under this name. A
+ rename needs a release that publishes both names first (a change to
+ `sign-installer.yml` and both verify scripts), then the old name can go
+ with the installer copies.
+5. **Sunset (proposal for the maintainer):** stop publishing the
+ `PersonalJarvis-*` copies after two more minor releases or on 2027-01-31,
+ whichever comes later, and only once the download counts of step 4.5 show
+ they are no longer used. The switch is one line:
+ `PUBLISH_EARLIER_INSTALLER_NAMES = False` in `scripts/ci/release_assets.py`
+ (the alias script, the checksum manifest, release finalization and the
+ release smoke test all follow it). Releases already published keep their
+ assets. The 12-month floor this plan proposed earlier is the maintainer's
+ call; the date above is the earliest proposal.
## Step 2: PyPI `personal-jarvis` to `dodaios`
1. Today both names carry the full package. That doubles the upload and splits
the download numbers (pypistats, 2026-10-26: personal-jarvis 230 a week,
dodaios 111 a week).
-2. Proposal: from one release on, publish `personal-jarvis` as a thin
- transitional meta-package. It has no code, depends on `dodaios==<same
- version>`, and its long description says the project is now Dodaios.
-3. Keep the meta-package version in lock-step with `dodaios`, so
+2. Done after 4.1.2: `personal-jarvis` is a thin package
+ (`scripts/ci/build_distributions.py`). It depends on `dodaios==<same
+ version>`, maps every extra to the same `dodaios` extra, and its long
+ description says the project is now Dodaios.
+3. Its version moves in lock-step with `dodaios`, so
`pip install -U personal-jarvis` keeps updating real installs.
-4. The `personal-jarvis` console script must stay available. It already lives in
- `dodaios`'s own `[project.scripts]`, so the meta-package does not need to
- declare it again.
-5. Retire the meta-package (stop uploading, leave old versions up, never delete
- or yank them) after at least 12 months.
+4. It re-declares every `dodaios` console command (`jarvis`, `personal-jarvis`,
+ `dodaios`, `jarvisctl`, ...) through a small launcher, because
+ `uv tool install personal-jarvis` only links the commands of the package
+ it was asked for. Each command starts the same entry point as in `dodaios`.
+5. Known edge, measured with pip 24 and uv 0.11: plain
+ `pip install -U personal-jarvis` over a full copy (4.1.2 or older) installs
+ `dodaios` first and then uninstalls the old copy, which deletes the files
+ both owned. The launcher then prints the repair,
+ `python -m pip install --force-reinstall --no-deps dodaios==<version>`,
+ and the PyPI page says the same. uv uninstalls first and is not affected;
+ `install/installer.py` removes the old name first and is not affected. The
+ clean move is `pip uninstall -y personal-jarvis` then
+ `pip install --force-reinstall dodaios`.
+6. Retire the thin package (stop uploading, leave old versions up, never
+ delete or yank them) after at least 12 months.
## Step 3: a `dodaios` CLI next to `jarvis` (done)
diff --git a/docs/rename/old-name-leftovers.md b/docs/rename/old-name-leftovers.md
index 621e2841cc..c8294863a5 100644
--- a/docs/rename/old-name-leftovers.md
+++ b/docs/rename/old-name-leftovers.md
@@ -149,8 +149,8 @@ Consecutive hits of one file with the same category and action share a row.
| `docs/ci-pipeline.md` | 286 | 1 | (a) | Kept: Name of the registered "PersonalJarvis Merge Bot" GitHub App |
| `docs/ci-pipeline.md` | 475, 478 | 2 | (a) | Kept: release asset, executable, bundle or install-path name that must keep working |
| `docs/code-signing-policy.md` | 6 | 1 | (a) | Kept: one-time "(formerly Personal Jarvis)" note added in this PR |
-| `docs/code-signing-policy.md` | 16 | 1 | (a) | Kept: release asset, executable, bundle or install-path name that must keep working |
-| `docs/code-signing-policy.md` | 96 | 1 | (a) | Kept: SignPath artifact configuration pins this file and product name |
+| `docs/code-signing-policy.md` | 19 | 1 | (a) | Kept: release asset, executable, bundle or install-path name that must keep working |
+| `docs/code-signing-policy.md` | 109, 110 | 1 | (b) | Kept: history note; the setup is built and signed as Dodaios-Setup-x64.exe / product name Dodaios after 4.1.2 |
| `docs/desktop-installers.md` | 26, 27 | 2 | (a) | Kept: release asset, executable, bundle or install-path name that must keep working |
| `docs/desktop-installers.md` | 55 | 1 | (a) | Kept: table row for the legacy `PersonalJarvis` executable (the current one, `DodaiosApp`, is listed above it) |
| `docs/desktop-installers.md` | 66 | 1 | (a) | Kept: names `PersonalJarvis` as the earlier executable name |
diff --git a/dodaios/agent_runtimes/acp.py b/dodaios/agent_runtimes/acp.py
index 42943b50c2..7d29c47ea4 100644
--- a/dodaios/agent_runtimes/acp.py
+++ b/dodaios/agent_runtimes/acp.py
@@ -162,7 +162,7 @@ class AcpTurn:
auto_allow: bool = False
#: Refuse every permission request without asking (Plan mode: read only).
auto_deny: bool = False
- client_name: str = "personal-jarvis"
+ client_name: str = "dodaios"
client_version: str = ""
#: What the chat stores as its vendor session instead of the ACP session
#: id (OpenClaw addresses the conversation by a fixed session key).
@@ -690,7 +690,7 @@ def _request(rid: int, method: str, params: dict[str, Any]) -> dict[str, Any]:
def initialize_request(
- rid: int | str, client_version: str = "", client_name: str = "personal-jarvis"
+ rid: int | str, client_version: str = "", client_name: str = "dodaios"
) -> dict[str, Any]:
"""The ``initialize`` request (protocol version + client capabilities)."""
return {
diff --git a/dodaios/agentic_ide/github_link.py b/dodaios/agentic_ide/github_link.py
index 7f06bb2380..ed77151311 100644
--- a/dodaios/agentic_ide/github_link.py
+++ b/dodaios/agentic_ide/github_link.py
@@ -31,6 +31,7 @@ from typing import Any
from loguru import logger
+from dodaios.core.branding import HTTP_USER_AGENT
from dodaios.core.http_pool import SyncHttpClientPool
from dodaios.core.process_utils import NO_WINDOW_CREATIONFLAGS
@@ -122,7 +123,7 @@ def graphql(token: str, query: str, variables: dict[str, Any] | None = None) ->
headers={
"Authorization": f"Bearer {token}",
"Accept": "application/vnd.github+json",
- "User-Agent": "PersonalJarvis",
+ "User-Agent": HTTP_USER_AGENT,
},
)
except Exception as exc: # network down, DNS, TLS: one sentence for all
diff --git a/dodaios/brain/hf_gguf.py b/dodaios/brain/hf_gguf.py
index 5dcf7e18e2..52ca857bf2 100644
--- a/dodaios/brain/hf_gguf.py
+++ b/dodaios/brain/hf_gguf.py
@@ -136,7 +136,7 @@ async def _fetch_json(
) -> tuple[Any | None, str | None]:
"""``(payload, error)`` for one Hugging Face API call — exactly one is non-None."""
url = f"{_HF_ROOT}{path}"
- headers = {"User-Agent": "Jarvis-Agents local model browser"}
+ headers = {"User-Agent": "Dodaios local model browser"}
if token := _bearer():
headers["Authorization"] = f"Bearer {token}"
try:
diff --git a/dodaios/brain/ollama_library.py b/dodaios/brain/ollama_library.py
index c0235b11ff..588d2bde1a 100644
--- a/dodaios/brain/ollama_library.py
+++ b/dodaios/brain/ollama_library.py
@@ -173,7 +173,7 @@ async def _fetch_page(
async with httpx.AsyncClient(
timeout=_FETCH_TIMEOUT,
follow_redirects=True,
- headers={"User-Agent": "Jarvis-Agents local model browser"},
+ headers={"User-Agent": "Dodaios local model browser"},
) as client:
resp = await client.get(url, params=params or {})
except Exception as exc: # noqa: BLE001 — offline is a normal state here
diff --git a/dodaios/core/branding.py b/dodaios/core/branding.py
index 93d8c60d6a..c1d1f2e6ec 100644
--- a/dodaios/core/branding.py
+++ b/dodaios/core/branding.py
@@ -268,7 +268,10 @@ OFFICIAL_REPO_GIT_URL = f"{OFFICIAL_REPO_URL}.git"
OFFICIAL_RELEASES_LATEST_API_URL = (
f"https://api.github.com/repos/{OFFICIAL_REPO_SLUG}/releases/latest"
)
-UPDATER_USER_AGENT = f"{PERSISTENT_COMPACT_NAME}-Updater"
+# What the app sends as its HTTP User-Agent to GitHub and the plugin APIs.
+# Spelled as literals of their own; no server keys on either value.
+UPDATER_USER_AGENT = "Dodaios-Updater"
+HTTP_USER_AGENT = "Dodaios/1.0"
# --- MCP server names ---------------------------------------------------------
# What the app calls its own MCP servers when it registers them in another
@@ -368,6 +371,7 @@ __all__ = [
"SESSION_COOKIE_NAME",
"SHELL_PROFILE_MARKER",
"UPDATER_USER_AGENT",
+ "HTTP_USER_AGENT",
"WINDOWS_APP_USER_MODEL_ID",
"WINDOWS_AUTOSTART_DESCRIPTION",
"WINDOWS_AUTOSTART_TASK_NAME",
diff --git a/dodaios/core/distribution.py b/dodaios/core/distribution.py
index 1f0b7669b2..2365b17158 100644
--- a/dodaios/core/distribution.py
+++ b/dodaios/core/distribution.py
@@ -1,12 +1,15 @@
"""Warn once when one environment holds the app under both distribution names.
The Python distribution was renamed (``dodaios.core.branding``:
-``LEGACY_DISTRIBUTION_NAMES`` -> ``DISTRIBUTION_NAME``). For a transition the
-same code is published under both names, so both own the same package files.
+``LEGACY_DISTRIBUTION_NAMES`` -> ``DISTRIBUTION_NAME``). Up to 4.1.2 the same
+code was published under both names, so both own the same package files.
With both installed the app runs fine, but uninstalling either one later
deletes files the other still needs. ``install/installer.py`` never creates
that state (it uninstalls the earlier name first); a manual ``pip install``
-can, and this check names the fix.
+can, and this check names the fix. After 4.1.2 the earlier name is a thin
+package that only depends on the current one and owns no package files
+(``scripts/ci/build_distributions.py``); installed next to it, it is the
+expected state, not a duplicate.
Off the boot path (AP-26): :func:`schedule_duplicate_distribution_check`
starts one daemon thread a while after the server is up, once per process,
@@ -26,6 +29,9 @@ from importlib import metadata
from dodaios.core.branding import DISTRIBUTION_NAME, DISTRIBUTION_NAMES
+#: The import package both full distributions put on ``sys.path``.
+_PACKAGE_DIR = __name__.split(".", 1)[0] + "/"
+
log = logging.getLogger(__name__)
# The boot is long over by then: the check competes with nothing in use.
@@ -37,12 +43,24 @@ _scheduled = False
def _is_installed(name: str) -> bool:
+ """Installed under ``name`` and holding the app's package files.
+
+ The earlier name's compatibility package owns no file under the package
+ directory, so it does not count: uninstalling it deletes nothing the
+ current distribution needs to import.
+ """
try:
- metadata.distribution(name)
+ dist = metadata.distribution(name)
except metadata.PackageNotFoundError:
# Not installed under this name: that is the answer, not a failure.
return False
- return True
+ if name == DISTRIBUTION_NAME:
+ return True
+ files = getattr(dist, "files", None)
+ if files is None:
+ # No RECORD to read: assume the worst, a full copy.
+ return True
+ return any(str(path).replace("\\", "/").startswith(_PACKAGE_DIR) for path in files)
def installed_distribution_names(
diff --git a/dodaios/marketplace/auth/oauth_device.py b/dodaios/marketplace/auth/oauth_device.py
index c1116eb0b7..b0e47ec3d0 100644
--- a/dodaios/marketplace/auth/oauth_device.py
+++ b/dodaios/marketplace/auth/oauth_device.py
@@ -19,6 +19,7 @@ from datetime import UTC, datetime, timedelta
import httpx
+from dodaios.core.branding import HTTP_USER_AGENT
from dodaios.marketplace.auth.base import (
ERROR_DENIED,
ERROR_PROVIDER_UNREACHABLE,
@@ -89,7 +90,7 @@ class DeviceFlowHandler:
data=body,
headers={
"Accept": "application/json",
- "User-Agent": "Personal-Jarvis/1.0",
+ "User-Agent": HTTP_USER_AGENT,
},
)
except httpx.HTTPError as exc:
@@ -177,7 +178,7 @@ class DeviceFlowHandler:
},
headers={
"Accept": "application/json",
- "User-Agent": "Personal-Jarvis/1.0",
+ "User-Agent": HTTP_USER_AGENT,
},
)
except httpx.HTTPError as exc:
@@ -251,7 +252,7 @@ class DeviceFlowHandler:
},
headers={
"Accept": "application/json",
- "User-Agent": "Personal-Jarvis/1.0",
+ "User-Agent": HTTP_USER_AGENT,
},
)
except httpx.HTTPError:
diff --git a/dodaios/marketplace/auth/oauth_pkce_loopback.py b/dodaios/marketplace/auth/oauth_pkce_loopback.py
index 8af26861cd..f04cd74a7e 100644
--- a/dodaios/marketplace/auth/oauth_pkce_loopback.py
+++ b/dodaios/marketplace/auth/oauth_pkce_loopback.py
@@ -24,6 +24,7 @@ from urllib.parse import quote_plus, urlencode
import httpx
+from dodaios.core.branding import HTTP_USER_AGENT
from dodaios.marketplace.auth.base import (
ERROR_DENIED,
ERROR_MISCONFIGURED,
@@ -374,7 +375,7 @@ class PkceLoopbackHandler:
headers={
"Accept": "application/json",
"Content-Type": "application/x-www-form-urlencoded",
- "User-Agent": "Personal-Jarvis/1.0",
+ "User-Agent": HTTP_USER_AGENT,
**_basic_token_header(pending.config.client_id, client_secret, auth_method),
},
)
diff --git a/dodaios/marketplace/oauth_discord.py b/dodaios/marketplace/oauth_discord.py
index 2294e9d286..42d49e8769 100644
--- a/dodaios/marketplace/oauth_discord.py
+++ b/dodaios/marketplace/oauth_discord.py
@@ -40,6 +40,8 @@ from urllib.parse import urlencode
import httpx
+from dodaios.core.branding import HTTP_USER_AGENT
+
log = logging.getLogger(__name__)
AUTHORIZATION_URL = "https://discord.com/oauth2/authorize"
@@ -83,7 +85,7 @@ BROWSER_SCOPES: tuple[str, ...] = (
# Administrator. Server admins can narrow further per channel.
MINIMAL_BOT_PERMISSIONS = (1 << 10) | (1 << 11) | (1 << 16)
-USER_AGENT = "Personal-Jarvis/1.0"
+USER_AGENT = HTTP_USER_AGENT
REQUEST_TIMEOUT_SECONDS = 15.0
diff --git a/dodaios/marketplace/publish.py b/dodaios/marketplace/publish.py
index 069a22239f..6e5830c517 100644
--- a/dodaios/marketplace/publish.py
+++ b/dodaios/marketplace/publish.py
@@ -39,6 +39,7 @@ from typing import Any
import httpx
+from dodaios.core.branding import HTTP_USER_AGENT
from dodaios.marketplace.agent_plugins_loader import (
MAX_SKILL_MD_BYTES,
AgentPluginError,
@@ -75,7 +76,7 @@ _MAX_ISSUE_BODY = 65_536
#: (scripts/intake.py in Dodaios/marketplace — keep them identical).
INTAKE_TITLE_TAG = "[publish]"
INTAKE_BODY_MARKER = "<!-- jarvis-marketplace-submission -->"
-_UA = {"User-Agent": "Personal-Jarvis/1.0"}
+_UA = {"User-Agent": HTTP_USER_AGENT}
# ---------------------------------------------------------------------------
# The endpoint's rule set, mirrored (keep in sync with functions/_lib/
diff --git a/dodaios/marketplace/revoke.py b/dodaios/marketplace/revoke.py
index 0cc4d98cfc..8fb488b00c 100644
--- a/dodaios/marketplace/revoke.py
+++ b/dodaios/marketplace/revoke.py
@@ -21,6 +21,7 @@ from urllib.parse import urlparse
import httpx
+from dodaios.core.branding import HTTP_USER_AGENT
from dodaios.marketplace.catalog import (
OAuthDeviceFlowAuth,
OAuthPkceLoopbackAuth,
@@ -191,7 +192,7 @@ async def revoke_tokens(
auth=auth,
headers={
"Content-Type": "application/x-www-form-urlencoded",
- "User-Agent": "Personal-Jarvis/1.0",
+ "User-Agent": HTTP_USER_AGENT,
},
)
except Exception: # noqa: BLE001 - the local disconnect still stands
diff --git a/dodaios/plugins/tool/connected_server.py b/dodaios/plugins/tool/connected_server.py
index 8e794c81fe..8901d774bc 100644
--- a/dodaios/plugins/tool/connected_server.py
+++ b/dodaios/plugins/tool/connected_server.py
@@ -22,6 +22,8 @@ from urllib.parse import quote, urlsplit
import httpx
from jsonschema import Draft202012Validator # type: ignore[import-untyped]
+from dodaios.core.branding import HTTP_USER_AGENT
+
from .connected_operations import BASES, OPERATIONS, Operation
@@ -131,7 +133,7 @@ class ConnectedRestClient:
):
path = path.replace("/items/root:", "/root:", 1)
url = path if operation.path.startswith("https://") else BASES[self.plugin_id] + path
- headers = {"Authorization": f"Bearer {self._token}", "User-Agent": "Personal-Jarvis/1.0"}
+ headers = {"Authorization": f"Bearer {self._token}", "User-Agent": HTTP_USER_AGENT}
if self.plugin_id == "figma" and self._auth_type != "oauth":
headers.pop("Authorization")
headers["X-Figma-Token"] = self._token
diff --git a/dodaios/plugins/tool/drive_rest.py b/dodaios/plugins/tool/drive_rest.py
index 54ef25fa8c..f3efa9b868 100644
--- a/dodaios/plugins/tool/drive_rest.py
+++ b/dodaios/plugins/tool/drive_rest.py
@@ -27,6 +27,7 @@ import logging
from collections.abc import Awaitable, Callable
from typing import Any
+from dodaios.core.branding import HTTP_USER_AGENT
from dodaios.core.protocols import ExecutionContext, ToolResult
log = logging.getLogger(__name__)
@@ -215,7 +216,7 @@ class DriveRestTool:
token = self._token_provider()
if not token:
return None
- return {"Authorization": f"Bearer {token}", "User-Agent": "Personal-Jarvis/1.0"}
+ return {"Authorization": f"Bearer {token}", "User-Agent": HTTP_USER_AGENT}
async def _with_auth_retry(
self, do_call: Callable[[dict[str, str]], Awaitable[Any]]
diff --git a/dodaios/plugins/tool/gmail_rest.py b/dodaios/plugins/tool/gmail_rest.py
index d992eed4f5..d1940994ac 100644
--- a/dodaios/plugins/tool/gmail_rest.py
+++ b/dodaios/plugins/tool/gmail_rest.py
@@ -16,6 +16,7 @@ import logging
from collections.abc import Awaitable, Callable
from typing import Any
+from dodaios.core.branding import HTTP_USER_AGENT
from dodaios.core.protocols import ExecutionContext, ToolResult
log = logging.getLogger(__name__)
@@ -204,7 +205,7 @@ class GmailRestTool:
token = self._token_provider()
if not token:
return None
- return {"Authorization": f"Bearer {token}", "User-Agent": "Personal-Jarvis/1.0"}
+ return {"Authorization": f"Bearer {token}", "User-Agent": HTTP_USER_AGENT}
async def _with_auth_retry(
self, do_call: Callable[[dict[str, str]], Awaitable[Any]]
diff --git a/dodaios/plugins/tool/home_assistant_rest.py b/dodaios/plugins/tool/home_assistant_rest.py
index cee7bc234c..14c9750397 100644
--- a/dodaios/plugins/tool/home_assistant_rest.py
+++ b/dodaios/plugins/tool/home_assistant_rest.py
@@ -29,6 +29,7 @@ from __future__ import annotations
from collections.abc import Callable
from typing import Any
+from dodaios.core.branding import HTTP_USER_AGENT
from dodaios.core.protocols import ExecutionContext, ToolResult
_NOT_CONNECTED = (
@@ -137,7 +138,7 @@ class HomeAssistantRestTool:
return base, {
"Authorization": f"Bearer {token}",
"Content-Type": "application/json",
- "User-Agent": "Personal-Jarvis/1.0",
+ "User-Agent": HTTP_USER_AGENT,
}
# -- public actions (also directly unit-testable) -----------------------
diff --git a/dodaios/plugins/tool/slack_rest.py b/dodaios/plugins/tool/slack_rest.py
index 8f2acb38e7..d19ac3f800 100644
--- a/dodaios/plugins/tool/slack_rest.py
+++ b/dodaios/plugins/tool/slack_rest.py
@@ -37,6 +37,7 @@ import time
from collections.abc import Awaitable, Callable
from typing import Any
+from dodaios.core.branding import HTTP_USER_AGENT
from dodaios.core.protocols import ExecutionContext, ToolResult
log = logging.getLogger(__name__)
@@ -343,7 +344,7 @@ class SlackRestTool:
token = self._token_provider()
if not token:
return None
- return {"Authorization": f"Bearer {token}", "User-Agent": "Personal-Jarvis/1.0"}
+ return {"Authorization": f"Bearer {token}", "User-Agent": HTTP_USER_AGENT}
async def _api(
self,
diff --git a/dodaios/plugins/tool/spotify_rest.py b/dodaios/plugins/tool/spotify_rest.py
index acb9fbb710..95bc79aae7 100644
--- a/dodaios/plugins/tool/spotify_rest.py
+++ b/dodaios/plugins/tool/spotify_rest.py
@@ -28,6 +28,7 @@ from __future__ import annotations
from collections.abc import Awaitable, Callable
from typing import Any
+from dodaios.core.branding import HTTP_USER_AGENT
from dodaios.core.protocols import ExecutionContext, ToolResult
_API = "https://api.spotify.com/v1"
@@ -233,7 +234,7 @@ class SpotifyRestTool:
token = self._token_provider()
if not token:
return None
- return {"Authorization": f"Bearer {token}", "User-Agent": "Personal-Jarvis/1.0"}
+ return {"Authorization": f"Bearer {token}", "User-Agent": HTTP_USER_AGENT}
async def _with_auth_retry(
self, do_call: Callable[[dict[str, str]], Awaitable[Any]]
diff --git a/dodaios/plugins/tool/vercel_rest.py b/dodaios/plugins/tool/vercel_rest.py
index 02ac69c018..66b691e981 100644
--- a/dodaios/plugins/tool/vercel_rest.py
+++ b/dodaios/plugins/tool/vercel_rest.py
@@ -16,6 +16,7 @@ from __future__ import annotations
from collections.abc import Callable
from typing import Any
+from dodaios.core.branding import HTTP_USER_AGENT
from dodaios.core.protocols import ExecutionContext, ToolResult
_VERCEL_BASE = "https://api.vercel.com"
@@ -75,7 +76,7 @@ class VercelRestTool:
token = self._token_provider()
if not token:
return None
- return {"Authorization": f"Bearer {token}", "User-Agent": "Personal-Jarvis/1.0"}
+ return {"Authorization": f"Bearer {token}", "User-Agent": HTTP_USER_AGENT}
async def _get(self, path: str, params: dict[str, Any], headers: dict[str, str]):
client = self._pool.client()
diff --git a/dodaios/plugins/tool/youtube_music_rest.py b/dodaios/plugins/tool/youtube_music_rest.py
index 236466eb83..8603f4cd7c 100644
--- a/dodaios/plugins/tool/youtube_music_rest.py
+++ b/dodaios/plugins/tool/youtube_music_rest.py
@@ -42,6 +42,7 @@ from collections.abc import Awaitable, Callable
from typing import Any
from urllib.parse import urlsplit
+from dodaios.core.branding import HTTP_USER_AGENT
from dodaios.core.protocols import ExecutionContext, ToolResult
from ._playlist_match import is_liked_name, match_playlist
@@ -651,7 +652,7 @@ class YouTubeMusicRestTool:
token = self._token_provider()
if not token:
return None
- return {"Authorization": f"Bearer {token}", "User-Agent": "Personal-Jarvis/1.0"}
+ return {"Authorization": f"Bearer {token}", "User-Agent": HTTP_USER_AGENT}
async def _with_auth_retry(
self, do_call: Callable[[dict[str, str]], Awaitable[Any]]
diff --git a/dodaios/ui/web/feedback_routes.py b/dodaios/ui/web/feedback_routes.py
index 9e8a5517a6..4fb50403f2 100644
--- a/dodaios/ui/web/feedback_routes.py
+++ b/dodaios/ui/web/feedback_routes.py
@@ -73,7 +73,7 @@ import httpx
from fastapi import APIRouter, HTTPException
from pydantic import BaseModel, Field
-from dodaios.core.branding import OFFICIAL_REPO_SLUG, OFFICIAL_REPO_URL
+from dodaios.core.branding import OFFICIAL_REPO_SLUG, OFFICIAL_REPO_URL, PRODUCT_NAME
from dodaios.core.config import get_secret
log = logging.getLogger(__name__)
@@ -378,7 +378,7 @@ async def _fetch_label(client: httpx.AsyncClient, label: str) -> list[BoardEntry
"Accept": "application/vnd.github+json",
"X-GitHub-Api-Version": "2022-11-28",
# GitHub rejects an API request without a User-Agent.
- "User-Agent": f"PersonalJarvis/{_app_version()}",
+ "User-Agent": f"{PRODUCT_NAME}/{_app_version()}",
},
)
resp.raise_for_status()
diff --git a/dodaios/ui/web/marketplace_routes.py b/dodaios/ui/web/marketplace_routes.py
index 489e4b2609..cb6cc8ef9f 100644
--- a/dodaios/ui/web/marketplace_routes.py
+++ b/dodaios/ui/web/marketplace_routes.py
@@ -42,6 +42,7 @@ from fastapi import (
from fastapi.responses import HTMLResponse
from pydantic import BaseModel, Field
+from dodaios.core.branding import HTTP_USER_AGENT
from dodaios.core.events import MarketplaceItemInstalled
from dodaios.core.http_guard import https_only_async
from dodaios.core.process_utils import resolve_executable
@@ -282,7 +283,7 @@ def _make_validator(transport: httpx.AsyncBaseTransport | None = None):
auth: PatPasteAuth, token: str, instance_url: str | None = None
) -> tuple[bool, int]:
scheme = getattr(auth, "auth_scheme", "bearer")
- headers = {"User-Agent": "Personal-Jarvis/1.0"}
+ headers = {"User-Agent": HTTP_USER_AGENT}
if scheme == "telegram_path":
# Telegram puts the token in the URL path, no auth header.
url = auth.validation_endpoint.replace("{token}", token)
diff --git a/dodaios/voice_engine/models.py b/dodaios/voice_engine/models.py
index 7cc1e4969c..bb1d054e8b 100644
--- a/dodaios/voice_engine/models.py
+++ b/dodaios/voice_engine/models.py
@@ -26,7 +26,7 @@ from pathlib import Path
from dodaios.voice_engine.paths import models_dir
_CHUNK = 1 << 20
-_USER_AGENT = "jarvis-voice-engine/0.1 (+https://github.com/Dodaios/Dodaios)"
+_USER_AGENT = "dodaios-voice-engine/0.1 (+https://github.com/Dodaios/Dodaios)"
ProgressFn = Callable[[str, int, int], None]
diff --git a/packaging/README.md b/packaging/README.md
index 79513a1e8b..73540e2651 100644
--- a/packaging/README.md
+++ b/packaging/README.md
@@ -6,7 +6,7 @@ single build script that produces exactly one release asset.
| OS | Script | Produces |
| ------- | ----------------------------------------------------- | --------------------------------------- |
-| Windows | [`windows/build.ps1`](windows/build.ps1) | `PersonalJarvis-Setup-x64.exe` (the name SignPath pins) |
+| Windows | [`windows/build.ps1`](windows/build.ps1) | `Dodaios-Setup-x64.exe` (the name SignPath pins) |
| macOS | [`macos/build.sh`](macos/build.sh) | `Dodaios-macOS-<arm64\|x64>.dmg` |
| Linux | [`linux/build.sh`](linux/build.sh) | `Dodaios-Linux-x86_64.AppImage` |
diff --git a/packaging/linux/README.md b/packaging/linux/README.md
index 7a00e3cae4..098a3b56e0 100644
--- a/packaging/linux/README.md
+++ b/packaging/linux/README.md
@@ -5,7 +5,7 @@
| Artifact | Path | What it is |
|---|---|---|
| `Dodaios-Linux-x86_64.AppImage` (also published as `PersonalJarvis-Linux-x86_64.AppImage`) | `dist/installers/` | One executable file. No Python, no pip, no root. Download, `chmod +x`, run. |
-| `personal-jarvis_<version>_amd64.deb` | `dist/installers/` | The same tree as a normal Debian package named `dodaios`: `apt install ./personal-jarvis_*.deb` registers the app in the menu and puts `dodaios` on `PATH`. Built only when `dpkg-deb` is present. |
+| `dodaios_<version>_amd64.deb` | `dist/installers/` | The same tree as a normal Debian package named `dodaios`: `apt install ./dodaios_*.deb` registers the app in the menu and puts `dodaios` on `PATH`. Built only when `dpkg-deb` is present. |
Both are produced from one PyInstaller `onedir` freeze and one AppDir, so a bug
can only exist in both or in neither.
@@ -145,7 +145,7 @@ A `.deb` install updates through the package, not through the app.
The package was called `personal-jarvis` up to the rename. The current package
declares `Replaces`, `Conflicts` and `Provides: personal-jarvis`, so installing
-it over the earlier one (`apt install ./personal-jarvis_<version>_amd64.deb`)
+it over the earlier one (`apt install ./dodaios_<version>_amd64.deb`)
removes that package and its `/opt/PersonalJarvis` tree in the same step, and
anything that depends on the earlier name stays satisfied. The in-app updater
is not involved: it only replaces an AppImage, and the AppImage's asset name has
diff --git a/packaging/linux/build.sh b/packaging/linux/build.sh
index ed1c8e61d1..bf5af6f7d3 100755
--- a/packaging/linux/build.sh
+++ b/packaging/linux/build.sh
@@ -6,7 +6,7 @@
#
# Output (per the release contract):
# dist/installers/Dodaios-Linux-x86_64.AppImage
-# dist/installers/personal-jarvis_<version>_amd64.deb (when dpkg-deb exists)
+# dist/installers/dodaios_<version>_amd64.deb (when dpkg-deb exists)
#
# The installed names are already the current ones: the Debian package
# "dodaios" (it replaces the earlier "personal-jarvis" package), /opt/Dodaios,
@@ -296,9 +296,9 @@ elif ! command -v dpkg-deb >/dev/null 2>&1; then
else
VERSION="$("${PYTHON}" -c "import sys; sys.path.insert(0, '${REPO_ROOT}'); import dodaios; print(dodaios.__version__)")"
DEB_ROOT="${DIST_DIR}/deb-root"
- # The release asset keeps its earlier file name (see the header); the
- # package inside it is DEB_PACKAGE_NAME.
- DEB_PATH="${OUT_DIR}/personal-jarvis_${VERSION}_amd64.deb"
+ # Named after the package inside it, as Debian names its files. Releases
+ # up to 4.1.2 called the file personal-jarvis_<version>_amd64.deb.
+ DEB_PATH="${OUT_DIR}/${DEB_PACKAGE_NAME}_${VERSION}_amd64.deb"
log "building ${DEB_PATH}"
run rm -rf "${DEB_ROOT}"
run mkdir -p "${DEB_ROOT}/DEBIAN" \
diff --git a/packaging/windows/Dodaios.iss b/packaging/windows/Dodaios.iss
index 5605c4b596..d8848254ab 100644
--- a/packaging/windows/Dodaios.iss
+++ b/packaging/windows/Dodaios.iss
@@ -57,15 +57,15 @@
; The product's earlier name: the Start-menu group and the shortcuts an
; earlier release created are spelled this way.
#define LegacyAppName "Personal Jarvis"
-; TODO(signpath): the SignPath artifact configuration pins the setup file's
-; product name (docs/code-signing-policy.md). It keeps the earlier value until
-; the maintainer updates that configuration; then set it to the AppName.
-#define SignedProductName "Personal Jarvis"
-; The same SignPath configuration pins the setup's FILE name, so the setup is
-; built and signed under the earlier name. The release publishes a
-; byte-identical Dodaios-Setup-x64.exe next to it, copied after signing
-; (scripts/ci/installer_aliases.py).
-#define SignedSetupBaseName "PersonalJarvis-Setup-x64"
+; The setup's signed identity: the product name in its file properties (and
+; on a UAC prompt) and its file name. A SignPath artifact configuration pins
+; both (docs/code-signing-policy.md), so they must always equal its
+; product-name and path values, and the workflow's SIGNED_SETUP_NAME
+; (.github/workflows/desktop-installers.yml). The release publishes a
+; byte-identical PersonalJarvis-Setup-x64.exe next to it for installs from
+; before the rename (scripts/ci/installer_aliases.py).
+#define SignedProductName "Dodaios"
+#define SignedSetupBaseName "Dodaios-Setup-x64"
#define CliExeName "dodaios.exe"
; The command's earlier name. The bundle ships it beside CliExeName, in the
; same folder the PATH task adds, so both names work in a terminal.
@@ -79,7 +79,7 @@ AppName={#AppName}
AppVersion={#AppVersion}
AppVerName={#AppName} {#AppVersion}
VersionInfoVersion={#AppVersion}
-; Pinned rather than derived from AppName: see SignedProductName above.
+; What the signing configuration checks: see SignedProductName above.
VersionInfoProductName={#SignedProductName}
VersionInfoDescription={#SignedProductName} Setup
AppPublisher={#AppPublisher}
diff --git a/packaging/windows/build.ps1 b/packaging/windows/build.ps1
index 0a89a0b1a1..4cb3d17d06 100644
--- a/packaging/windows/build.ps1
+++ b/packaging/windows/build.ps1
@@ -10,7 +10,7 @@
2. freeze the app with PyInstaller (dodaios.spec, onedir),
3. wrap dist/Jarvis in an Inno Setup wizard.
- The result is dist/installers/PersonalJarvis-Setup-x64.exe - the name the
+ The result is dist/installers/Dodaios-Setup-x64.exe - the name the
SignPath artifact configuration pins (docs/code-signing-policy.md). A
release signs it under that name and then publishes it twice with identical
bytes: as Dodaios-Setup-x64.exe and as PersonalJarvis-Setup-x64.exe, the
@@ -214,7 +214,7 @@ $IsccArgs = @(
Invoke-Checked -Executable $Iscc -Arguments $IsccArgs -WorkingDirectory $RepoRoot -What "ISCC"
# The signed name (OutputBaseFilename = SignedSetupBaseName in the .iss).
-$Artifact = Join-Path $InstallerDir "PersonalJarvis-Setup-x64.exe"
+$Artifact = Join-Path $InstallerDir "Dodaios-Setup-x64.exe"
if (-not (Test-Path $Artifact)) {
Stop-WithError "ISCC reported success but $Artifact does not exist"
}
diff --git a/pyproject.toml b/pyproject.toml
index aeb4ed0d27..511c5e69b2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -8,9 +8,9 @@ requires = ["setuptools>=84.1.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
-# Releases also publish this wheel as "personal-jarvis", its earlier name, for a
-# transition (scripts/ci/build_distributions.py). Keep the self-references in
-# the extras below spelled with this name: that script rewrites them together.
+# Releases also publish "personal-jarvis", the earlier name, as a thin package
+# that depends on this one at the same version and re-declares its extras and
+# [project.scripts] (scripts/ci/build_distributions.py).
name = "dodaios"
version = "4.1.2"
description = "Turn your computer into an AI agent that coordinates apps, tools, models, and other agents"
diff --git a/scripts/ci/build_distributions.py b/scripts/ci/build_distributions.py
index 0feb155860..76eddba782 100644
--- a/scripts/ci/build_distributions.py
+++ b/scripts/ci/build_distributions.py
@@ -1,34 +1,48 @@
#!/usr/bin/env python3
-"""Build the sdist and wheel under the distribution name and under its earlier name.
+"""Build the ``dodaios`` sdist and wheel, and the ``personal-jarvis`` pointer to it.
python scripts/ci/build_distributions.py --outdir dist
-The project is ``dodaios`` on PyPI now; until existing installs have moved,
-every release also publishes the SAME code as ``personal-jarvis``, so
-``pip install -U personal-jarvis`` keeps updating. The second build runs on a
-rewritten ``pyproject.toml`` that differs only in the names: the project name,
-the self-references in the extras (``personal-jarvis[full]`` must never pull
-in ``dodaios``) and the ``share/<name>`` data-file directory. The original
-file is restored afterwards, whatever happens.
+The project is ``dodaios`` on PyPI. Its earlier name, ``personal-jarvis``, is
+published at every release as a thin compatibility package and no longer as a
+second copy of the code: it contains one small launcher module and depends on
+``dodaios==<the same version>``, so ``pip install -U personal-jarvis`` and a
+stored ``uvx --from personal-jarvis jarvis ...`` keep getting the current
+release. Its extras map one to one (``personal-jarvis[full]`` installs
+``dodaios[full]``), and it declares every console command ``dodaios`` declares,
+because ``uv tool install personal-jarvis`` only links the commands of the
+package it was asked for. Each command starts the same entry point the
+``dodaios`` command of that name starts.
+
+The launcher exists for one case. Releases up to 4.1.2 published
+``personal-jarvis`` as a full copy that owns the same files as ``dodaios``.
+Upgrading such an install with plain pip installs ``dodaios`` first and then
+uninstalls the old copy, which deletes the files ``dodaios`` just wrote (uv
+uninstalls first and is not affected). The launcher then prints the one
+command that repairs it instead of a bare ``ModuleNotFoundError``.
Output: ``<outdir>/<name>/`` per distribution, one wheel and one sdist each,
-so the publish job can upload them as two separate steps.
+so the publish jobs can upload them separately.
"""
from __future__ import annotations
import argparse
+import json
import re
import shutil
import subprocess
import sys
+import tempfile
import tomllib
-from collections.abc import Callable, Sequence
+from collections.abc import Callable, Mapping, Sequence
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
CURRENT = "dodaios"
LEGACY = "personal-jarvis"
+#: The only module the compatibility package ships.
+COMPAT_MODULE = "personal_jarvis_compat"
Runner = Callable[[Sequence[str], Path], None]
@@ -38,32 +52,150 @@ def _normalized(name: str) -> str:
return re.sub(r"[-_.]+", "_", name).lower()
-def renamed_pyproject(text: str, current: str = CURRENT, legacy: str = LEGACY) -> str:
- """``pyproject.toml`` text with every spelling of the project's name replaced."""
- project = tomllib.loads(text)["project"]
+def _toml(value: object) -> str:
+ """A TOML value for a string or a list of strings (JSON spells both validly)."""
+ return json.dumps(value)
+
+
+def compat_pyproject(project: Mapping, *, current: str = CURRENT, legacy: str = LEGACY) -> str:
+ """``pyproject.toml`` of the compatibility package for ``project`` (dodaios's table)."""
if project["name"] != current:
raise ValueError(f"pyproject names {project['name']!r}, expected {current!r}")
- text, count = re.subn(
- rf'(?m)^name = "{re.escape(current)}"(?=\r?$)', f'name = "{legacy}"', text, count=1
+ version = project["version"]
+ scripts = project.get("scripts", {})
+ if not scripts:
+ raise ValueError("the project declares no console commands to keep")
+ classifiers = [
+ item for item in project.get("classifiers", []) if not item.startswith("Development Status")
+ ]
+ description = f"Personal Jarvis is now Dodaios: this package installs {current}"
+ lines = [
+ "[build-system]",
+ 'requires = ["setuptools>=84.1.0"]',
+ 'build-backend = "setuptools.build_meta"',
+ "",
+ "[project]",
+ f"name = {_toml(legacy)}",
+ f"version = {_toml(version)}",
+ f"description = {_toml(description)}",
+ 'readme = "README.md"',
+ f"requires-python = {_toml(project['requires-python'])}",
+ f"license = {_toml(project['license'])}",
+ 'license-files = ["LICENSE"]',
+ ]
+ authors = ", ".join(
+ "{ " + ", ".join(f"{key} = {_toml(value)}" for key, value in author.items()) + " }"
+ for author in project.get("authors", [])
)
- if count != 1:
- raise ValueError("pyproject.toml has no top-level project name line")
- # Self-references in the extras: "dodaios[desktop,...]".
- text = text.replace(f'"{current}[', f'"{legacy}[')
- # Data files: "share/dodaios/docs" = [...].
- text = text.replace(f'"share/{current}/', f'"share/{legacy}/')
- renamed = tomllib.loads(text)
- if renamed["project"]["name"] != legacy:
- raise ValueError("the rewritten pyproject.toml does not name the earlier distribution")
- extras = renamed["project"].get("optional-dependencies", {})
- for requirement in (item for group in extras.values() for item in group):
- if re.match(rf"{re.escape(current)}\s*\[", requirement):
- raise ValueError(f"an extra still refers to {current}: {requirement}")
- data_files = renamed.get("tool", {}).get("setuptools", {}).get("data-files", {})
- for target in data_files:
- if not target.startswith(f"share/{legacy}/"):
- raise ValueError(f"a data file still installs outside share/{legacy}: {target}")
- return text
+ if authors:
+ lines.append(f"authors = [{authors}]")
+ lines += [
+ f"classifiers = {_toml(classifiers)}",
+ f"dependencies = {_toml([f'{current}=={version}'])}",
+ "",
+ "[project.optional-dependencies]",
+ ]
+ lines += [
+ f"{_toml(extra)} = {_toml([f'{current}[{extra}]=={version}'])}"
+ for extra in project.get("optional-dependencies", {})
+ ]
+ lines += ["", "[project.urls]"]
+ lines += [f"{_toml(key)} = {_toml(url)}" for key, url in project.get("urls", {}).items()]
+ lines += ["", "[project.scripts]"]
+ lines += [f"{_toml(name)} = {_toml(f'{COMPAT_MODULE}:main')}" for name in scripts]
+ lines += ["", "[tool.setuptools]", f"py-modules = {_toml([COMPAT_MODULE])}", ""]
+ return "\n".join(lines)
+
+
+def compat_module(project: Mapping, *, current: str = CURRENT) -> str:
+ """Source of the launcher every command of the compatibility package runs."""
+ version = project["version"]
+ targets = dict(project["scripts"])
+ default = targets.get(current, next(iter(targets.values())))
+ return f'''"""Personal Jarvis is now Dodaios: start the {current} command this one stands for.
+
+Generated by scripts/ci/build_distributions.py for the compatibility package.
+"""
+
+from __future__ import annotations
+
+import sys
+from importlib import import_module
+
+VERSION = {version!r}
+TARGETS = {targets!r}
+DEFAULT_TARGET = {default!r}
+REPAIR = (
+ "Dodaios (formerly Personal Jarvis) is installed incompletely: upgrading the "
+ "earlier personal-jarvis package with pip removed files the {current} package needs.\\n"
+ "Repair it with:\\n"
+ ' "{{python}}" -m pip install --force-reinstall --no-deps {current}=={{version}}\\n'
+)
+
+
+def command_name(argv0: str) -> str:
+ """The command this process was started as, without a launcher suffix."""
+ # Either separator: a Windows launcher path also reads right elsewhere.
+ name = argv0.replace("\\\\", "/").rsplit("/", 1)[-1].lower()
+ for suffix in ("-script.pyw", "-script.py", ".exe", ".py"):
+ if name.endswith(suffix):
+ return name[: -len(suffix)]
+ return name
+
+
+def main() -> object:
+ target = TARGETS.get(command_name(sys.argv[0] if sys.argv else ""), DEFAULT_TARGET)
+ module_name, _, attribute = target.partition(":")
+ try:
+ module = import_module(module_name)
+ except ModuleNotFoundError as exc:
+ missing = exc.name or ""
+ if missing != {current!r} and not missing.startswith({current + "."!r}):
+ raise
+ sys.stderr.write(REPAIR.format(python=sys.executable, version=VERSION))
+ return 1
+ return getattr(module, attribute)()
+'''
+
+
+def compat_readme(project: Mapping, *, current: str = CURRENT, legacy: str = LEGACY) -> str:
+ version = project["version"]
+ homepage = project.get("urls", {}).get("Homepage", "")
+ return f"""# {legacy} is now {current}
+
+Personal Jarvis was renamed to **Dodaios**. This package no longer contains the
+app: it installs [`{current}`](https://pypi.org/project/{current}/) at the same
+version ({version}) and keeps the earlier commands working
+(`{"`, `".join(project["scripts"])}`).
+
+New installs: `pip install {current}` or `uv tool install {current}`.
+
+To move an existing install to the new name:
+
+```
+pip uninstall -y {legacy}
+pip install --force-reinstall {current}
+```
+
+If `pip install -U {legacy}` left an install that no longer starts (a command
+prints a repair line, or Python reports `No module named '{current}'`), the
+upgrade removed files of the old full package that `{current}` needs. Repair it:
+
+```
+pip install --force-reinstall --no-deps {current}=={version}
+```
+
+Project: {homepage}
+"""
+
+
+def write_compat_project(directory: Path, project: Mapping, license_file: Path) -> None:
+ """Write the compatibility package's whole source tree into ``directory``."""
+ directory.mkdir(parents=True, exist_ok=True)
+ (directory / "pyproject.toml").write_text(compat_pyproject(project), encoding="utf-8")
+ (directory / f"{COMPAT_MODULE}.py").write_text(compat_module(project), encoding="utf-8")
+ (directory / "README.md").write_text(compat_readme(project), encoding="utf-8")
+ shutil.copyfile(license_file, directory / "LICENSE")
def _run(command: Sequence[str], cwd: Path) -> None:
@@ -95,11 +227,9 @@ def build_all(
runner: Runner = _run,
) -> dict[str, Path]:
"""Build both distributions; return ``{name: its output directory}``."""
- pyproject = root / "pyproject.toml"
- original = pyproject.read_bytes()
- text = original.decode("utf-8")
- version = tomllib.loads(text)["project"]["version"]
- legacy_text = renamed_pyproject(text)
+ project = tomllib.loads((root / "pyproject.toml").read_text(encoding="utf-8"))["project"]
+ version = project["version"]
+ compat_pyproject(project) # refuses a tree that is not dodaios before anything runs
outputs = {CURRENT: outdir / CURRENT, LEGACY: outdir / LEGACY}
for directory in outputs.values():
if directory.exists() and any(directory.iterdir()):
@@ -107,12 +237,12 @@ def build_all(
try:
_clean_build_state(root)
runner([*build_command, "--outdir", str(outputs[CURRENT])], root)
- _clean_build_state(root)
- pyproject.write_bytes(legacy_text.encode("utf-8"))
- runner([*build_command, "--outdir", str(outputs[LEGACY])], root)
finally:
- pyproject.write_bytes(original)
_clean_build_state(root)
+ with tempfile.TemporaryDirectory(prefix="compat-") as scratch:
+ compat_root = Path(scratch) / LEGACY
+ write_compat_project(compat_root, project, root / "LICENSE")
+ runner([*build_command, "--outdir", str(outputs[LEGACY])], compat_root)
for name, directory in outputs.items():
found = {path.name for path in directory.iterdir()} if directory.is_dir() else set()
expected = expected_artifacts(name, version)
diff --git a/scripts/ci/check_release_completeness.py b/scripts/ci/check_release_completeness.py
index 6dec23f02f..aaded17fca 100644
--- a/scripts/ci/check_release_completeness.py
+++ b/scripts/ci/check_release_completeness.py
@@ -218,7 +218,7 @@ def check_published_release(root: Path, *, slug: str) -> tuple[bool, str]:
url,
headers={
"Accept": "application/vnd.github+json",
- "User-Agent": "PersonalJarvis-ReleaseGate",
+ "User-Agent": "Dodaios-ReleaseGate",
},
)
try:
diff --git a/scripts/ci/installer_aliases.py b/scripts/ci/installer_aliases.py
index 4e05e25cb1..ff9c07025c 100644
--- a/scripts/ci/installer_aliases.py
+++ b/scripts/ci/installer_aliases.py
@@ -1,18 +1,24 @@
#!/usr/bin/env python3
"""Give every native installer both of its release names, with identical bytes.
-The build names most installers with the current prefix (``Dodaios-``), while
+The build names every installer with the current prefix (``Dodaios-``), while
installs frozen before the rename only look for the earlier one
-(``PersonalJarvis-``). The Windows setup goes the other way: its signing
-configuration pins the earlier name, so it is signed under that name and the
-current name is the copy. Either way, this runs AFTER signing, so both names
-always carry the same signed file.
+(``PersonalJarvis-``). This runs AFTER signing, so both names always carry the
+same signed file.
python scripts/ci/installer_aliases.py installers
+ python scripts/ci/installer_aliases.py --names # what a release must carry
For every pair in ``release_assets.INSTALLER_NAME_PAIRS`` exactly one file must
exist (it is copied to the other name), or both with identical content. A
pair with neither file, or with two different files, fails.
+
+Sunset: the earlier names are published only while
+``release_assets.PUBLISH_EARLIER_INSTALLER_NAMES`` is True (the one switch; its
+comment and docs/rename/migration-plan.md give the planned end). With the
+switch off this script writes no copies, only checks that every current name
+exists, and ``--names`` lists the current names alone, so the checksum
+manifest and the release follow without another edit.
"""
from __future__ import annotations
@@ -27,7 +33,11 @@ ROOT = Path(__file__).resolve().parents[2]
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
-from scripts.ci.release_assets import INSTALLER_NAME_PAIRS # noqa: E402
+from scripts.ci.release_assets import ( # noqa: E402
+ INSTALLER_NAME_PAIRS,
+ INSTALLERS,
+ PUBLISH_EARLIER_INSTALLER_NAMES,
+)
def _digest(path: Path) -> str:
@@ -35,12 +45,18 @@ def _digest(path: Path) -> str:
return hashlib.file_digest(stream, "sha256").hexdigest()
-def add_aliases(directory: Path) -> list[str]:
+def add_aliases(directory: Path, *, publish_earlier: bool | None = None) -> list[str]:
"""Copy each installer to its missing name; return the names it wrote."""
+ if publish_earlier is None:
+ publish_earlier = PUBLISH_EARLIER_INSTALLER_NAMES
written = []
for current, earlier in INSTALLER_NAME_PAIRS:
paths = (directory / current, directory / earlier)
present = [path for path in paths if path.is_file() and not path.is_symlink()]
+ if not publish_earlier:
+ if paths[0] not in present:
+ raise ValueError(f"no installer under its current name: {current}")
+ continue
if not present:
raise ValueError(f"no installer under either name: {current}, {earlier}")
if len(present) == 2:
@@ -60,8 +76,18 @@ def add_aliases(directory: Path) -> list[str]:
def main(argv: list[str] | None = None) -> int:
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
- parser.add_argument("directory", type=Path)
+ parser.add_argument("directory", type=Path, nargs="?")
+ parser.add_argument(
+ "--names",
+ action="store_true",
+ help="print every installer name a release must carry, one per line",
+ )
args = parser.parse_args(argv)
+ if args.names:
+ print("\n".join(sorted(INSTALLERS)))
+ return 0
+ if args.directory is None:
+ parser.error("the installer directory is required")
try:
written = add_aliases(args.directory)
except (OSError, ValueError) as exc:
diff --git a/scripts/ci/release_assets.py b/scripts/ci/release_assets.py
index cf0a0aa0da..f3a9f86ba3 100644
--- a/scripts/ci/release_assets.py
+++ b/scripts/ci/release_assets.py
@@ -30,19 +30,33 @@ PUBLISHER_JOBS = {
"desktop-installers.yml": "Checksums and GitHub Release",
"sign-installer.yml": "release",
}
-#: Every native installer as ``(current name, earlier name)``. A release
-#: publishes BOTH files with identical bytes: the build names its output with
-#: the current prefix, and installs frozen before the rename only look for the
-#: earlier one. The Windows setup is the exception on the build side: its
-#: signing configuration pins the earlier name, so the current name is the
-#: copy, made after signing (``installer_aliases.py``).
+#: Every native installer as ``(current name, earlier name)``. The build names
+#: its output with the current prefix; installs frozen before the rename only
+#: look for the earlier one, so a release publishes a byte-identical copy under
+#: that name, made after signing (``installer_aliases.py``).
INSTALLER_NAME_PAIRS = (
("Dodaios-Setup-x64.exe", "PersonalJarvis-Setup-x64.exe"),
("Dodaios-macOS-arm64.dmg", "PersonalJarvis-macOS-arm64.dmg"),
("Dodaios-macOS-x64.dmg", "PersonalJarvis-macOS-x64.dmg"),
("Dodaios-Linux-x86_64.AppImage", "PersonalJarvis-Linux-x86_64.AppImage"),
)
-INSTALLERS = {name for pair in INSTALLER_NAME_PAIRS for name in pair}
+#: THE switch for the earlier installer names. While it is True every release
+#: publishes, requires and checksums both names of each installer; set it to
+#: False and the release builds, requires and lists the current names only
+#: (the workflows read the names from here). Who still needs the copies:
+#: frozen installs from before the update contract (PR #567), whose in-app
+#: updater only asks for ``PersonalJarvis-*``, and old
+#: ``releases/latest/download/PersonalJarvis-*`` links. Planned end (a
+#: PROPOSAL for the maintainer, docs/rename/migration-plan.md): after two more
+#: minor releases or 2027-01-31, whichever comes later, and only once the
+#: ``PersonalJarvis-*`` downloads of the last three releases have dried up.
+#: Turning it off never touches releases that are already published.
+PUBLISH_EARLIER_INSTALLER_NAMES = True
+CURRENT_INSTALLERS = {current for current, _earlier in INSTALLER_NAME_PAIRS}
+EARLIER_INSTALLERS = {earlier for _current, earlier in INSTALLER_NAME_PAIRS}
+INSTALLERS = CURRENT_INSTALLERS | (
+ EARLIER_INSTALLERS if PUBLISH_EARLIER_INSTALLER_NAMES else set()
+)
SIGNED = {
"install.sh",
"install.ps1",
@@ -83,20 +97,26 @@ SIGNING_ASSETS = REQUIRED_ASSETS - DESKTOP_ASSETS
#: What a draft must carry before finalization publishes it.
FINALIZE_ASSETS = REQUIRED_ASSETS | set(UPDATE_MANIFEST_ASSETS)
PLATFORM_INSTALLERS = {
- "linux": {"Dodaios-Linux-x86_64.AppImage", "PersonalJarvis-Linux-x86_64.AppImage"},
- "windows": {"Dodaios-Setup-x64.exe", "PersonalJarvis-Setup-x64.exe"},
- "macos": {
- "Dodaios-macOS-arm64.dmg",
- "Dodaios-macOS-x64.dmg",
- "PersonalJarvis-macOS-arm64.dmg",
- "PersonalJarvis-macOS-x64.dmg",
- },
+ platform: names & INSTALLERS
+ for platform, names in {
+ "linux": {"Dodaios-Linux-x86_64.AppImage", "PersonalJarvis-Linux-x86_64.AppImage"},
+ "windows": {"Dodaios-Setup-x64.exe", "PersonalJarvis-Setup-x64.exe"},
+ "macos": {
+ "Dodaios-macOS-arm64.dmg",
+ "Dodaios-macOS-x64.dmg",
+ "PersonalJarvis-macOS-arm64.dmg",
+ "PersonalJarvis-macOS-x64.dmg",
+ },
+ }.items()
}
-# The optional Debian package is named after its package: the earlier name
-# until the package itself is renamed, the current one after.
+# The optional Debian package is named after its package (``dodaios``).
+# Releases up to 4.1.2 named the file after the package's earlier name;
+# the pattern accepts both so their assets still verify.
DEB_PATTERN = re.compile(r"(?:dodaios|personal-jarvis)_[0-9.]+_amd64\.deb")
#: The source archive under its current name and the name earlier installers
-#: fall back to; both are published.
+#: fall back to; both are published. ``personal-jarvis-src.tar.gz`` stays
+#: until the same planned end as the installer copies above: install scripts
+#: from releases before ``dodaios-src.tar.gz`` existed only know that name.
SOURCE_ARCHIVES = (
("dodaios-src.tar.gz", "dodaios/"),
("personal-jarvis-src.tar.gz", "personal-jarvis/"),
diff --git a/scripts/ci/update_contributors.py b/scripts/ci/update_contributors.py
index 4af6d48b2c..bbb37e202b 100644
--- a/scripts/ci/update_contributors.py
+++ b/scripts/ci/update_contributors.py
@@ -66,7 +66,7 @@ def fetch_contributors() -> list[dict]:
url,
headers={
"Accept": "application/vnd.github+json",
- "User-Agent": "personal-jarvis-contributors",
+ "User-Agent": "dodaios-contributors",
},
)
token = os.environ.get("GITHUB_TOKEN")
diff --git a/tests/integration/test_update_handover_real_os.py b/tests/integration/test_update_handover_real_os.py
index 6bb0905308..c4eb20add2 100644
--- a/tests/integration/test_update_handover_real_os.py
+++ b/tests/integration/test_update_handover_real_os.py
@@ -330,7 +330,7 @@ def _build_setup(iscc: Path, fake_exe: Path, version: str, work: Path) -> Path:
check=True,
timeout=600,
)
- setup = out / "PersonalJarvis-Setup-x64.exe"
+ setup = out / "Dodaios-Setup-x64.exe"
assert setup.is_file()
return setup
diff --git a/tests/unit/ci/test_build_distributions.py b/tests/unit/ci/test_build_distributions.py
index 4f76c2b6c9..8e2e6d142e 100644
--- a/tests/unit/ci/test_build_distributions.py
+++ b/tests/unit/ci/test_build_distributions.py
@@ -1,8 +1,11 @@
-"""The release builds the same code as ``dodaios`` and as ``personal-jarvis``."""
+"""The release builds ``dodaios`` and the thin ``personal-jarvis`` package pointing to it."""
from __future__ import annotations
+import importlib.util
+import sys
import tomllib
+import types
from pathlib import Path
import pytest
@@ -34,36 +37,112 @@ def test_build_setuptools_floor_and_lock_clear_the_advisory() -> None:
assert tuple(int(part) for part in version.split(".")) >= (84, 1, 0)
-def test_the_real_pyproject_renames_to_the_earlier_distribution() -> None:
- project = tomllib.loads(bd.renamed_pyproject(PYPROJECT))
- assert project["project"]["name"] == "personal-jarvis"
- extras = project["project"]["optional-dependencies"]
- # The earlier name's [full] must never pull in the current distribution:
- # two distributions owning the same files is what the transition avoids.
- assert extras["full"] == [
- "personal-jarvis[desktop,desktop-macos,telephony,channels,local-voice]"
- ]
- assert extras["dev"][0] == "personal-jarvis[desktop,local-voice]"
- assert all(not item.startswith("dodaios[") for group in extras.values() for item in group)
- data_files = project["tool"]["setuptools"]["data-files"]
- assert set(data_files) == {"share/personal-jarvis/docs", "share/personal-jarvis/docs/legal"}
+def _real_project() -> dict:
+ return tomllib.loads(PYPROJECT)["project"]
+
+def test_the_earlier_name_is_a_thin_package_pinned_to_the_same_release() -> None:
+ project = _real_project()
+ compat = tomllib.loads(bd.compat_pyproject(project))["project"]
+ version = project["version"]
+ assert compat["name"] == "personal-jarvis"
+ assert compat["version"] == version
+ # No second copy of the code: one dependency, the current distribution.
+ assert compat["dependencies"] == [f"dodaios=={version}"]
+ assert compat["requires-python"] == project["requires-python"]
+ # Every extra maps to the same extra of the current distribution.
+ assert compat["optional-dependencies"] == {
+ extra: [f"dodaios[{extra}]=={version}"] for extra in project["optional-dependencies"]
+ }
+ assert "Dodaios" in compat["description"]
-def test_only_the_names_change() -> None:
- original = tomllib.loads(PYPROJECT)
- renamed = tomllib.loads(bd.renamed_pyproject(PYPROJECT))
- for key in ("version", "dependencies", "scripts", "entry-points", "requires-python"):
- assert renamed["project"][key] == original["project"][key], key
- for key in ("package-data", "exclude-package-data"):
- assert renamed["tool"]["setuptools"][key] == original["tool"]["setuptools"][key], key
- # The package list lives in setup.py, which both builds share unchanged.
- assert "packages" not in renamed["tool"]["setuptools"]
- assert renamed["build-system"] == original["build-system"]
+
+def test_every_command_of_dodaios_keeps_working_under_the_earlier_name() -> None:
+ project = _real_project()
+ compat = tomllib.loads(bd.compat_pyproject(project))
+ # `uv tool install personal-jarvis` only links the named package's commands.
+ assert set(compat["project"]["scripts"]) == set(project["scripts"])
+ assert {"jarvis", "personal-jarvis", "dodaios"} <= set(compat["project"]["scripts"])
+ assert set(compat["project"]["scripts"].values()) == {f"{bd.COMPAT_MODULE}:main"}
+ assert compat["tool"]["setuptools"]["py-modules"] == [bd.COMPAT_MODULE]
+ assert project["scripts"]["jarvis"] == "dodaios.__main__:main"
+ assert project["scripts"]["personal-jarvis"] == "dodaios.__main__:main"
def test_a_pyproject_under_another_name_is_refused() -> None:
with pytest.raises(ValueError, match="expected"):
- bd.renamed_pyproject('[project]\nname = "something-else"\nversion = "1.0.0"\n')
+ bd.compat_pyproject({"name": "something-else", "version": "1.0.0"})
+
+
+def _load_launcher(tmp_path: Path, monkeypatch, project: dict):
+ source = bd.compat_module(project)
+ path = tmp_path / f"{bd.COMPAT_MODULE}.py"
+ path.write_text(source, encoding="utf-8")
+ spec = importlib.util.spec_from_file_location(bd.COMPAT_MODULE, path)
+ module = importlib.util.module_from_spec(spec)
+ spec.loader.exec_module(module)
+ return module
+
+
+def test_the_launcher_starts_the_entry_point_of_the_command_it_was_run_as(
+ tmp_path: Path, monkeypatch
+) -> None:
+ project = _real_project()
+ launcher = _load_launcher(tmp_path, monkeypatch, project)
+ assert launcher.command_name(r"C:\venv\Scripts\JarvisCtl.exe") == "jarvisctl"
+ assert launcher.command_name("/venv/bin/personal-jarvis") == "personal-jarvis"
+ assert launcher.command_name("jarvis-script.py") == "jarvis"
+
+ fake = types.ModuleType("fake_cli")
+ fake.main = lambda: "started"
+ monkeypatch.setitem(sys.modules, "fake_cli", fake)
+ monkeypatch.setattr(launcher, "TARGETS", {"jarvisctl": "fake_cli:main"})
+ monkeypatch.setattr(sys, "argv", ["/venv/bin/jarvisctl"])
+ assert launcher.main() == "started"
+ # Unknown spellings fall back to the main command.
+ assert launcher.DEFAULT_TARGET == project["scripts"]["dodaios"]
+
+
+def test_the_launcher_names_the_repair_when_pip_removed_the_package(
+ tmp_path: Path, monkeypatch, capsys
+) -> None:
+ launcher = _load_launcher(tmp_path, monkeypatch, _real_project())
+
+ def missing(name):
+ raise ModuleNotFoundError(f"No module named {name!r}", name="dodaios")
+
+ monkeypatch.setattr(launcher, "import_module", missing)
+ monkeypatch.setattr(sys, "argv", ["jarvis"])
+ assert launcher.main() == 1
+ err = capsys.readouterr().err
+ version = _real_project()["version"]
+ assert f"-m pip install --force-reinstall --no-deps dodaios=={version}" in err
+
+
+def test_the_launcher_does_not_hide_other_missing_modules(tmp_path: Path, monkeypatch) -> None:
+ launcher = _load_launcher(tmp_path, monkeypatch, _real_project())
+
+ def missing(name):
+ raise ModuleNotFoundError("No module named 'httpx'", name="httpx")
+
+ monkeypatch.setattr(launcher, "import_module", missing)
+ with pytest.raises(ModuleNotFoundError):
+ launcher.main()
+
+
+def test_the_readme_says_where_the_project_went(tmp_path: Path) -> None:
+ project = _real_project()
+ bd.write_compat_project(tmp_path / "compat", project, ROOT / "LICENSE")
+ readme = (tmp_path / "compat" / "README.md").read_text(encoding="utf-8")
+ assert readme.startswith("# personal-jarvis is now dodaios")
+ assert "pip install dodaios" in readme
+ assert f"--force-reinstall --no-deps dodaios=={project['version']}" in readme
+ assert sorted(p.name for p in (tmp_path / "compat").iterdir()) == [
+ "LICENSE",
+ "README.md",
+ f"{bd.COMPAT_MODULE}.py",
+ "pyproject.toml",
+ ]
def _project(tmp_path: Path) -> Path:
@@ -72,12 +151,16 @@ def _project(tmp_path: Path) -> Path:
"[project]\n"
'name = "dodaios"\n'
'version = "1.2.3"\n'
+ 'requires-python = ">=3.11"\n'
+ 'license = "Apache-2.0"\n'
+ "[project.scripts]\n"
+ 'dodaios = "dodaios.__main__:main"\n'
+ 'jarvis = "dodaios.__main__:main"\n'
"[project.optional-dependencies]\n"
- 'full = ["dodaios[desktop]"]\n'
- "[tool.setuptools.data-files]\n"
- '"share/dodaios/docs" = ["docs/*.md"]\n',
+ 'full = ["dodaios[desktop]"]\n',
encoding="utf-8",
)
+ (tmp_path / "LICENSE").write_text("license text", encoding="utf-8")
return tmp_path
@@ -98,7 +181,7 @@ def _fake_build(seen: list[tuple[str, str]]):
return runner
-def test_build_all_builds_both_names_and_restores_the_pyproject(tmp_path: Path) -> None:
+def test_build_all_builds_both_and_leaves_the_tree_as_it_was(tmp_path: Path) -> None:
root = _project(tmp_path / "tree")
original = (root / "pyproject.toml").read_bytes()
(root / "build" / "Jarvis").mkdir(parents=True) # a PyInstaller freeze
@@ -117,20 +200,19 @@ def test_build_all_builds_both_names_and_restores_the_pyproject(tmp_path: Path)
assert (root / "build" / "Jarvis").is_dir()
-def test_a_failed_second_build_still_restores_the_pyproject(tmp_path: Path) -> None:
+def test_the_thin_package_builds_outside_the_checkout(tmp_path: Path) -> None:
root = _project(tmp_path / "tree")
- original = (root / "pyproject.toml").read_bytes()
- seen: list[tuple[str, str]] = []
- build = _fake_build(seen)
+ places: list[Path] = []
+ build = _fake_build([])
def runner(command, cwd: Path) -> None:
- if seen:
- raise OSError("second build failed")
+ places.append(cwd)
build(command, cwd)
- with pytest.raises(OSError, match="second build"):
- bd.build_all(tmp_path / "dist", root=root, runner=runner)
- assert (root / "pyproject.toml").read_bytes() == original
+ bd.build_all(tmp_path / "dist", root=root, runner=runner)
+ assert places[0] == root
+ assert root not in places[1].parents and places[1] != root
+ assert not places[1].exists() # the scratch tree is gone afterwards
def test_a_missing_artifact_fails_the_build(tmp_path: Path) -> None:
diff --git a/tests/unit/ci/test_installer_aliases.py b/tests/unit/ci/test_installer_aliases.py
index 56d917a76c..93e4342f4e 100644
--- a/tests/unit/ci/test_installer_aliases.py
+++ b/tests/unit/ci/test_installer_aliases.py
@@ -19,16 +19,23 @@ def _stage(directory: Path, names: list[str]) -> None:
def test_the_build_names_are_copied_to_the_earlier_names(tmp_path: Path) -> None:
- # What the OS jobs upload: the setup under its signed (earlier) name, the
- # rest under the current name.
+ # What the OS jobs upload: every installer under its current name.
+ _stage(tmp_path, [current for current, _earlier in PAIRS])
+
+ written = installer_aliases.add_aliases(tmp_path, publish_earlier=True)
+
+ assert sorted(written) == sorted(earlier for _current, earlier in PAIRS)
+ for current, earlier in PAIRS:
+ assert (tmp_path / current).read_bytes() == (tmp_path / earlier).read_bytes()
+
+
+def test_an_installer_under_only_its_earlier_name_gets_the_current_one(tmp_path: Path) -> None:
windows, *others = PAIRS
_stage(tmp_path, [windows[1], *(current for current, _earlier in others)])
- written = installer_aliases.add_aliases(tmp_path)
+ written = installer_aliases.add_aliases(tmp_path, publish_earlier=True)
assert sorted(written) == sorted([windows[0], *(earlier for _current, earlier in others)])
- for current, earlier in PAIRS:
- assert (tmp_path / current).read_bytes() == (tmp_path / earlier).read_bytes()
def test_a_pair_already_complete_is_left_alone(tmp_path: Path) -> None:
@@ -65,8 +72,10 @@ def test_the_checksum_job_aliases_after_download_and_before_the_manifest() -> No
alias = next(i for i, run in enumerate(runs) if "installer_aliases.py installers" in run)
manifest = next(i for i, run in enumerate(runs) if "installers-SHA256SUMS.txt" in run)
assert download < alias < manifest
- for name in release_assets.INSTALLERS:
- assert name in runs[manifest], name
+ # The required names come from release_assets.py, so the sunset switch
+ # reaches the manifest without editing the workflow.
+ assert "installer_aliases.py --names" in runs[manifest]
+ assert "PersonalJarvis-" not in runs[manifest]
def test_the_release_job_uploads_only_what_the_manifest_vouches_for() -> None:
@@ -82,19 +91,48 @@ def test_the_release_job_uploads_only_what_the_manifest_vouches_for() -> None:
assert alias < check < upload
-def test_the_windows_setup_is_signed_under_the_pinned_name() -> None:
- """SignPath pins the setup's file name; the current name is copied later."""
+def test_the_windows_setup_is_built_and_signed_under_one_name() -> None:
+ """The .iss, the workflow and the SignPath configuration name one file."""
workflow = yaml.safe_load(
(ROOT / ".github/workflows/desktop-installers.yml").read_text(encoding="utf-8")
)
- windows = workflow["jobs"]["windows"]["steps"]
+ job = workflow["jobs"]["windows"]
+ name = job["env"]["SIGNED_SETUP_NAME"]
+ assert name == "Dodaios-Setup-x64.exe"
+ windows = job["steps"]
staged = next(s for s in windows if s.get("id") == "signpath-unsigned")
upload = next(s for s in windows if s.get("name") == "Upload the installer")
- assert staged["with"]["path"].endswith("/PersonalJarvis-Setup-x64.exe")
- assert upload["with"]["path"].endswith("/PersonalJarvis-Setup-x64.exe")
+ assert staged["with"]["path"] == "dist/installers/${{ env.SIGNED_SETUP_NAME }}"
+ assert upload["with"]["path"] == "dist/installers/${{ env.SIGNED_SETUP_NAME }}"
+ windows_text = yaml.safe_dump(windows)
+ assert "PersonalJarvis-Setup" not in windows_text
iss = (ROOT / "packaging/windows/Dodaios.iss").read_text(encoding="utf-8")
- assert '#define SignedSetupBaseName "PersonalJarvis-Setup-x64"' in iss
+ assert f'#define SignedSetupBaseName "{name.removesuffix(".exe")}"' in iss
assert "OutputBaseFilename={#SignedSetupBaseName}" in iss
+ assert '#define SignedProductName "Dodaios"' in iss
+ build = (ROOT / "packaging/windows/build.ps1").read_text(encoding="utf-8")
+ assert f'Join-Path $InstallerDir "{name}"' in build
+ policy = (ROOT / "docs/code-signing-policy.md").read_text(encoding="utf-8")
+ assert f'<pe-file path="{name}" product-name="Dodaios">' in policy
+
+
+def test_the_sunset_switch_drops_the_earlier_names(tmp_path: Path) -> None:
+ """With the switch off nothing is copied, and every current name must exist."""
+ for current, _earlier in PAIRS:
+ (tmp_path / current).write_bytes(b"signed")
+ assert installer_aliases.add_aliases(tmp_path, publish_earlier=False) == []
+ assert sorted(p.name for p in tmp_path.iterdir()) == sorted(c for c, _ in PAIRS)
+ (tmp_path / PAIRS[0][0]).unlink()
+ with pytest.raises(ValueError, match="current name"):
+ installer_aliases.add_aliases(tmp_path, publish_earlier=False)
+
+
+def test_the_names_option_lists_what_the_release_requires(capsys) -> None:
+ assert installer_aliases.main(["--names"]) == 0
+ assert set(capsys.readouterr().out.split()) == release_assets.INSTALLERS
+ assert release_assets.CURRENT_INSTALLERS <= release_assets.INSTALLERS
+ if release_assets.PUBLISH_EARLIER_INSTALLER_NAMES:
+ assert release_assets.EARLIER_INSTALLERS <= release_assets.INSTALLERS
@pytest.mark.parametrize(
diff --git a/tests/unit/core/test_branding.py b/tests/unit/core/test_branding.py
index 6d4a2c161d..e9ea8a2a6c 100644
--- a/tests/unit/core/test_branding.py
+++ b/tests/unit/core/test_branding.py
@@ -94,7 +94,8 @@ _CURRENT_IDENTITY = {
"OFFICIAL_RELEASES_LATEST_API_URL": (
"https://api.github.com/repos/Dodaios/Dodaios/releases/latest"
),
- "UPDATER_USER_AGENT": "PersonalJarvis-Updater",
+ "UPDATER_USER_AGENT": "Dodaios-Updater",
+ "HTTP_USER_AGENT": "Dodaios/1.0",
}
@@ -213,6 +214,9 @@ def test_display_name_is_separate_from_persistent_identity() -> None:
or name in _MIGRATED_TO_THE_PRODUCT_NAME
or name in _ALL_SPELLINGS_OF_A_MIGRATED_NAME
or name == "KEYRING_SERVICE_NAME"
+ # How the app names itself to GitHub and plugin APIs: outward
+ # display text no server keys on, spelled as literals of its own.
+ or name.endswith("_USER_AGENT")
):
# Spelled like the product by choice, as literals of their own: the
# next test shows they do not follow the display name, and each
diff --git a/tests/unit/core/test_distribution.py b/tests/unit/core/test_distribution.py
index 2514ca1056..1714ed261f 100644
--- a/tests/unit/core/test_distribution.py
+++ b/tests/unit/core/test_distribution.py
@@ -75,3 +75,32 @@ def test_a_failing_check_never_raises(monkeypatch) -> None:
monkeypatch.setattr(distribution, "check_duplicate_distributions", boom)
distribution._run(0)
+
+
+class _Dist:
+ def __init__(self, files):
+ self.files = files
+
+
+ ("legacy_files", "counted"),
+ [
+ # The compatibility package: a launcher module and its metadata only.
+ (["personal_jarvis_compat.py", "personal_jarvis-5.0.0.dist-info/RECORD"], False),
+ # A full copy from 4.1.2 or earlier owns the package files.
+ (["dodaios/__init__.py", "personal_jarvis-4.1.2.dist-info/RECORD"], True),
+ # Without a RECORD nothing proves it is the thin package.
+ (None, True),
+ ],
+)
+def test_only_a_full_copy_under_the_earlier_name_counts(
+ monkeypatch, legacy_files, counted
+) -> None:
+ monkeypatch.setattr(
+ distribution.metadata,
+ "distribution",
+ lambda name: _Dist(["dodaios/__init__.py"] if name == "dodaios" else legacy_files),
+ )
+ expected = ("dodaios", "personal-jarvis") if counted else ("dodaios",)
+ assert distribution.installed_distribution_names() == expected
+ assert (distribution.check_duplicate_distributions() is not None) is counted
diff --git a/tests/unit/packaging/test_linux_identity.py b/tests/unit/packaging/test_linux_identity.py
index 2021152617..9e88f83f72 100644
--- a/tests/unit/packaging/test_linux_identity.py
+++ b/tests/unit/packaging/test_linux_identity.py
@@ -219,14 +219,15 @@ def test_the_release_also_publishes_the_appimage_under_its_earlier_name(tmp_path
assert (tmp_path / earlier).read_bytes() == (tmp_path / current).read_bytes()
-def test_the_deb_keeps_its_earlier_asset_name_while_the_package_is_dodaios() -> None:
- """The .deb file name keeps the earlier spelling; the package inside it is
- dodaios and replaces the earlier package."""
+def test_the_deb_is_named_after_its_package_which_replaces_the_earlier_one() -> None:
+ """The .deb file carries the package's name (dodaios); the package replaces
+ the earlier package, and earlier releases' file names still verify."""
script = _BUILD_SH.read_text(encoding="utf-8")
values = _assignments(script)
assert values["DEB_PACKAGE_NAME"] == "dodaios"
assert values["LEGACY_DEB_PACKAGE_NAME"] == "personal-jarvis"
- assert 'DEB_PATH="${OUT_DIR}/personal-jarvis_${VERSION}_amd64.deb"' in script
+ assert 'DEB_PATH="${OUT_DIR}/${DEB_PACKAGE_NAME}_${VERSION}_amd64.deb"' in script
+ assert "personal-jarvis_${VERSION}" not in script
assert "Package: ${DEB_PACKAGE_NAME}\n" in script
from scripts.ci.release_assets import DEB_PATTERN