Skip to content

fix(upgrade-spored): tags-only refusal names a real spored for non-spawn launchers (#1423) - #1424

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/1423-upgrade-spored-spawnts-hint
Oct 29, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/1423-upgrade-spored-spawnts-hint

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Fixes #1423

launchConfigUpgradeGuard's tags-only refusal (#1420) told the user to pin --version <spawn:version>. Only spawn writes its own version there: spawn-ts writes spawn:created-by=spawn-ts and its library version (e.g. 0.7.0), for which no spored exists.

New tagsReadingSpored(tags) picks the spored to name, and the message says which source it used:

  1. spawn:version, only when spawn:created-by is spawn (spored is versioned in lockstep with spawn). This is the same hint as before for spawn-launched instances.
  2. else spawn:spored-version, which spored reports itself.
  3. else sporedinstall.FrozenLatestVersion (0.149.0), the last spored that reads the settings from tags (spawn ≤ v0.148.x installs the latest spored, so v0.150.0's spored ignores the launch settings those CLIs write as tags (#1359) #1419).

A candidate that isn't a MAJOR.MINOR.PATCH release (e.g. a dev spawn:version), or that is at or above launchconfig.FirstSporedVersion (and so reads only the object), is skipped.

Values written to spawn:created-by. On instances spawn writes only spawn (pkg/aws/tags.go). spawn reaper deploy is written on the reaper Lambda, not on instances, and the IAM and bot values are on other resources. lagotto and spore-host-mcp launch through spawn's pkg/launcher and pkg/tasklaunch, so they write spawn, and they don't set CallerVersion, so they write no spawn:version at all. Those instances fall back to step 2 or step 3, where before the message said "--version its launching spawn's version". spawn-ts writes spawn-ts.

Other code that reads spawn:version. None of it derives a spored or bootstrap version from it:

  • spawn status and sporedUpgradeNotice use spawn:spored-version.
  • doctor reports its own binary's version.
  • reaper skew (cmd/reaper_skew.go, pkg/reaperdeploy) reads the Lambda's own spawn:version tag.
  • the sweep-orchestrator legacy log line only names the spawn that rendered the params.
  • pkg/aws/ami_mgmt.go reads the AMI's version tag, and image provenance copies the tag as provenance.
  • spored's provenance only records it.

spawn:created-by now has a reader, so TestSpawnTagContract required removing it from the readOutsideThisRepo allowlist.

Gates (TestUpgradeSporedTagsOnlyHintNamesARealSpored), each watched failing against a revert that compiles:

  • spawn-ts instance (created-by=spawn-ts, version=0.7.0, spored-version=0.149.0): names --version 0.149.0 and never --version 0.7.0. Against cmd/upgrade_spored.go reverted to main, the hint was --version 0.7.0, so it FAILED on both assertions. A second case uses spored-version 0.141.2 to show the tag is actually read.
  • spawn instance (created-by=spawn, version=0.142.0, spored-version=0.141.2): keeps --version 0.142.0. This passes on main, as a preservation gate should. Against a mutant fix that ignores the created-by == spawn branch, the hint was --version 0.141.2, so it FAILED.
  • neither version tag: falls back to --version 0.149.0. Against main the hint was "--version its launching spawn's version", so it FAILED. A dev spawn:version also falls back. Against main it was --version dev, which upgradeSporedTarget would reject.

Checks: make check and make lint pass from /private/tmp (0 issues in 10 modules). semgrep scan --config=auto --error . is clean.

…n-spawn launchers (#1423)

spawn:version is the launching spawn's version only when spawn:created-by is
spawn; spawn-ts writes its own library version there (e.g. 0.7.0), for which
no spored exists. Otherwise name spawn:spored-version, else the frozen
tags-reading spored 0.149.0 (#1419), and say which. spawn:created-by now has a
reader, so it leaves the tag contract's readOutsideThisRepo allowlist.
@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 82f4d25 into main Oct 29, 2026
9 checks passed
@scttfrdmn
scttfrdmn deleted the fix/1423-upgrade-spored-spawnts-hint branch October 29, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

upgrade-spored's tags-only hint points spawn-ts instances at a nonexistent spored version

1 participant