Repository navigation
fix(install): take the release channel from the build, not the version - #631
Conversation
|
@claude /review |
|
Claude finished @theCodeDrift's task in 6m 11s —— View job Review mode: incremental — read 0 prior review thread(s) before reviewing.
SummaryThe core fix is sound. [New] One concrete issue, posted inline on [New, minor] Test coverage gap: no test exercises the self-build + migration → Everything else — the Note: this session's tooling didn't expose the Actions run ID, so I'm omitting the job-run link rather than guess at it. |
Both findings are addressed in 5c8dbd9. The self-build wording is fixed in the — AI Coding Agent |
5c8dbd9 to
e7dc416
Compare
|
@claude /review |
|
Claude finished @theCodeDrift's task in 3m 2s —— View job Review mode: incremental — read 1 prior review thread(s) before reviewing.
Previously raised, now addressedThe one prior inline thread ( What's new since that reviewThe PR grew substantially since the last pass — two more commits added scaffold migration 13 and removed the legacy
I found nothing NEW to raise — the migration and the legacy-path removal are both correct and consistent with the rest of the codebase's " |
|
Thanks, nothing new to act on from this pass. Rebasing onto the current |
A self build reports <next>-self, which the dash rule read as a nightly, so after a self install the version gate refused nightly and release builds, and pin advice named a nightly version that does not exist. The channel now comes from the build target. install.launchers is the only record once it holds a version; cliVersion is read only for a legacy manifest, where a -self version belongs to no package. The launcher template applies the same rule.
…e fallback Scaffold migration 13 moves a version recorded only as install.cliVersion into install.launchers under the package that published it (a -self version records nothing). The version gate, the install carry-forward, the cache prune and the launcher template then read install.launchers alone, so recordedLauncherVersion and legacyChannel are deleted. Refs #625
e7dc416 to
05bc9a6
Compare
A self build reports
<next>-self. Several places decided which package a recorded version belongs to by whether it contains a dash, so a self install'sinstall.cliVersion: "0.13.0-self"read as a nightly. Afterwards the version gate refused a nightly ("this project runs @taskless/cli-nightly 0.13.0-self") and a release, the launcher cache kept an entry for it, and pin advice suggested@taskless/cli-nightly@0.13.0-self, which was never published.What changed
install/launcher.tsgainsChannel(release | nightly | self) andbuildChannel(), read from__TASKLESS_BUILD_TARGET__.buildLauncherPackage()derives from it.install/pinned-cli.tsjudges pins and names bump targets by channel instead ofisNightly(version), which is deleted. A self build publishes no package, so it reports no command pin to move and names no bump target. The exception is theunreleasedwarning after a migration, which it keeps.install.launchersis the only record. The version gate, the install carry-forward, the cache prune and the launcher template readlaunchersalone.cliVersionis display only.recordedLauncherVersionand the legacy classifier are deleted.includes("-")channel inference remains ininstall/or the template. The one place a channel is still read off a version string is the migration below, and it only reads values written beforelaunchersexisted.explicit-release-channelandmigrate-legacy-cli-version(both archived in this PR) restate the launcher, version-gate, init and pin requirements and add migration 13. I checked every prior scenario is still present after each archive.Scaffold migration 13
Step 3 of the issue.
filesystem/migrations/0013-launchers-from-cli-version.tsmoves a version recorded only asinstall.cliVersionintoinstall.launchers, under the package that published it:@taskless/cli-self: no package, records nothing@taskless/cli-nightly, which covers published nightlies andbuild:next(<next>-next-<sha>)A value that is not a version records nothing.
cliVersionis kept, and every other field ininstalland outside it is preserved. A manifest whoselaunchersalready records a version is left untouched, so the migration is idempotent and a crash replays it as a no-op.The scaffold version advances to 13, and this repository's own
.taskless/taskless.jsonis migrated. A CLI older than this release refuses a migrated project with the "scaffold newer than this CLI" message. That is accepted.Launcher template. I removed its fallback too. The template is only written by
init, which runs migrations first. Every CLI sincelaunchersexisted keeps the field when it rewrites the manifest. So does every CLI before it:writeInstallStatehas shallow-merged over the rawinstallobject since May. A template therefore only meets acliVersion-only manifest after a hand edit. In that case it fails plainly and namesinit, which applies the migration.Tests
migrate-launchers-from-cli-version.test.ts: release, nightly andbuild:nextversions move.-selfand non-versions do not. An existing record is left alone. Unknown fields survive. A rerun is byte-identical. A version-12 scaffold reaches 13 throughensureTasklessDirectory.version-gate.test.ts:launchersis the only source. AcliVersion-only manifest (release, nightly,build:next, self) refuses neither channel. Gate fixtures now recordlaunchers.launcher.test.ts: the template never readscliVersionand fails plainly without alaunchersentry.pinned-cli.test.ts: a self build reports no command pin anddescribePinnames no target.applyInstallPlan, now useLATEST_SCHEMA_VERSIONor go through the migration.pnpm typecheck,pnpm lint, andpnpm --filter @taskless/cli testpass locally.Fixes #625