Repository navigation
test(scaffold): fail Validate when the repo's own .taskless is behind the latest migration - #376
Conversation
… the latest migration Migrations run on init, demo, onboard, and rule delivery, and on nothing the development loop invokes: pnpm lint builds and runs check, which refuses a stale scaffold rather than migrating it. A pull request that adds a migration could therefore pass every check while leaving the dogfood tree behind; install.cliVersion sat at 0.11.0 from 2026-08-29 until migration 0008 made check refuse. Assert the scaffold version against LATEST_SCHEMA_VERSION so the pull request that adds a migration is the one that applies it. Not automated into lint on purpose: a tracked file rewritten as a side effect is the surprise the check wall exists to prevent.
|
@claude /review |
|
Claude finished @theCodeDrift's task in 1m 50s —— View job Review:
|
What
One vitest file,
packages/cli/test/dogfood-scaffold-current.test.ts: this repository's.taskless/taskless.jsonmust recordLATEST_SCHEMA_VERSION. Runs underValidate, so the pull request that adds a migration goes red until it also runspnpm build && pnpm cli initand commits the rewritten.taskless/. The failure message names that command.Why
Migrations run on
init,demo,onboard, and rule delivery — and on nothing the development loop invokes.pnpm lintbuilds and runscheck, which by design refuses a stale scaffold rather than migrating it (requireCurrentSchema,migrate.ts). So a migration PR could pass every check while leaving the dogfood tree behind, and the gap only surfaced whencheckhit the wall:install.cliVersionsat at 0.11.0 from 2026-08-29 until migration 0008 (#368) madecheckrefuse on 2026-09-21.Deliberately not automated into
lint. A tracked file rewritten as a side effect of a lint run is the surprise thecheckwall exists to prevent; a red test naming the command is the visible version.Only the schema version is pinned.
install.cliVersionis the nightly the installed skill was reconciled against and moves on its own schedule.Verified
main(7 = 7)."version": 6it fails:.taskless/taskless.json records scaffold version 6 but this CLI's latest migration is 7. Run \pnpm build && pnpm cli init` and commit the rewritten .taskless/.`pnpm --filter @taskless/cli typecheckclean.Ordering
If this lands before #368, it turns #368 red until that branch is rebased — #368 already carries
version: 8and the migrated tree, so it goes green on rebase with no other change. Landing #368 first avoids the interaction entirely.