Skip to content

Canary: t3 update přes SSH obchází launcherův trial a snapshot DB a nevidí kanál služby #22

Closed

Description

@immakermatty

Co

Na Mašině pod launcherem jsou dvě cesty, jak změnit verzi T3 Code, a chovají se jinak:

Cesta Trial a návrat Snapshot SQLite Kanál
Tlačítko Update ve webové T3 (server → launcher přes IPC) ano: trial, commit až po prepared, jinak návrat ano, launcher před trialem z T3CODE_RELEASE_REPOSITORY služby
t3 update <verze> přes SSH (lokální příkaz) ne: zastaví službu, zapíše activeVersion a unit, spustí ne z prostředí shellu: bez exportu T3CODE_RELEASE_REPOSITORY=Lazurio/t3code hledá v pingdotgg/t3code

Upstream to tak navrhuje (docs/internals/server-updates.md: „Local service commands may replace the launcher and state while the service is stopped“, apps/server/src/cloud/bootService.ts install). Preview se ale nikdy nenabízí tlačítkem, takže canary přes preview jde jen lokální cestou.

Proč na tom záleží

v0.0.43 přidává DB migrace (např. 053_PullRequestFilesViewed, 054_…AutoSettleDisabledAt). Když preview na canary Mašině selže a vrátíme ji na 0.0.42-lazurio.1, starší server poběží nad novějším schématem bez down migrací. Proměnná repozitáře v drop-inu služby SSH shell nevidí.

Jak to teď obcházíme (postup, žádný mechanismus)

Na canary Mašině před t3 update <preview>:

  1. systemctl --user stop t3code.service a kopie ~/.t3/userdata/state.sqlite* do zálohy (služba stojí, kopie je konzistentní);
  2. export T3CODE_RELEASE_REPOSITORY=Lazurio/t3code, pak ~/.local/bin/t3 update <preview>;
  3. návrat: t3 update --channel stable --allow-downgrade (na vyšší stable, stejné migrace), v nouzi t3 update 0.0.42-lazurio.1 --allow-downgrade + obnova zálohy DB.

Trial → commit launcheru se ověřuje až tlačítkem Update na stable vydání (DEV-6633 M5).

Otevřené

  • Chceme, aby preview šlo instalovat přes launcher (trial + snapshot)? Dnes to upstream nenabízí; případně návrh upstreamu, ne vlastní overlay.

Kontext: DEV-6633 (mission-control-data), #20, #21.

🤖 Generated with Claude Code

Activity

  1. immakermatty commented on Oct 19, 2026

    @immakermatty
    Author

    On v0.1.0 the channel part of this issue has a sharper consequence than the canary case above, so I'm recording it here rather than in a new issue.

    What happens. A login shell on a Lazurio Environment (SSH, Codex Desktop over SSH) has no T3CODE_RELEASE_REPOSITORY; only the service's drop-in sets it. There, t3 update without a version infers the stable channel from 0.1.0-lazurio.N (cliReleaseChannelOf) and lists the releases of pingdotgg/t3code (apps/server/src/cli/update.ts:302, default in packages/shared/src/cliRelease.ts:10). Upstream 0.1.0 ranks above 0.1.0-lazurio.N in SemVer, so this is an ordinary update, not a downgrade. It repoints ~/.local/bin/t3 and rewrites the service unit even when the restart is declined (update.ts:487-488), so the next restart switches the Environment to upstream.

    Why it matters. The Environment silently loses the whole overlay: the managed Folder guards, sign-in through Lazurio, the Environment browser in the panel, self-pairing and the Update banner. Upstream hardcodes pingdotgg/t3code and has no T3CODE_RELEASE_REPOSITORY (the variable came with 13838ca), so nothing offers the way back, and a Machines pin does not either, because a pin is a minimum. The way back is T3CODE_RELEASE_REPOSITORY=Lazurio/t3code t3 update 0.1.0-lazurio.<N> --allow-downgrade.

    Proposal. The Lazurio distribution makes Lazurio/t3code its default release repository; an explicit T3CODE_RELEASE_REPOSITORY still overrides it. cliRelease.ts already carries the overlay's change from 13838ca, so this stays in the same seam and needs one more contract-test pin. Exporting the variable for login shells from Machines would work too, but it would be a second place for the same value.

    Acceptance. In an SSH session on an Environment, t3 update without a version offers only the newest Lazurio stable, and an explicit T3CODE_RELEASE_REPOSITORY still wins.

    After that, what stays in this issue is the missing trial and database snapshot on the local path, which is upstream design and covered by the runbook (Testování před vydáním, step 3).

  2. immakermatty commented on Oct 20, 2026

    @immakermatty
    Author

    Closing. The part that could do damage is fixed in 0.1.0-lazurio.4 (#89): the Lazurio build's default release repository is now Lazurio/t3code (packages/shared/src/cliRelease.ts, and the same default in scripts/install.sh and scripts/install.ps1). So t3 update in an SSH or Codex shell without T3CODE_RELEASE_REPOSITORY lists only our releases and can no longer move an Environment to upstream. An explicit variable still wins. The overlay contract test pins the default, and the CLI installed on an Environment carries CLI_RELEASE_DEFAULT_REPOSITORY = "Lazurio/t3code".

    What stays is upstream's design: a local t3 update doesn't go through the launcher's trial and database snapshot (docs/internals/server-updates.md). We don't add a mechanism of our own for that. The runbook covers it (docs/operations/lazurio-fork-release.md, Testování před vydáním, step 3): back up the database and settings first on a permanent Environment. Every t3 update over SSH in the 0.1.0 rollout of 2026-10-19/20 did that (~/.t3/backups/pre-t3-*, integrity-checked). Installing a preview through the launcher stays an upstream question, and we have no plan to change it in the overlay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions