<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xml:base="https://docs.spec-kitty.ai/adr/4.x/2026-10-04-4-upgrade-writes-project-global-state-once/">
  <id>https://docs.spec-kitty.ai/adr/4.x/2026-10-04-4-upgrade-writes-project-global-state-once/</id>
  <title>ADR: upgrade writes project-global state once, in the repository root checkout</title>
  <updated>2026-11-05T00:00:00.000Z</updated>
  <author><name>Spec Kitty</name></author>
  <link rel="alternate" type="text/html" href="https://docs.spec-kitty.ai/adr/4.x/2026-10-04-4-upgrade-writes-project-global-state-once/"/>
  <summary>Upgrade writes project-global state once on the repository root checkout; integration merge sites resolve target-owned bookkeeping by one declared rule.</summary>
  <content type="html">&lt;p&gt;&lt;strong&gt;Status:&lt;/strong&gt; Accepted&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Date:&lt;/strong&gt; 2026-10-04&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Deciders:&lt;/strong&gt; Stijn Dejongh (owner). Operator brief for #5457.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Technical Story:&lt;/strong&gt; &lt;a href=&quot;https://github.com/spec-kitty/spec-kitty/issues/5457&quot;&gt;#5457&lt;/a&gt;, Mission &lt;code dir=&quot;auto&quot;&gt;upgrade-project-global-state-01M44538&lt;/code&gt;. Related: #2385, #2392, #4972, #4892.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&quot;context-and-problem-statement&quot;&gt;Context and Problem Statement&lt;/h2&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;spec-kitty upgrade&lt;/code&gt; run on a project with a Mission in flight wrote the project’s generated bookkeeping once per checkout: in the repository root checkout and again in every live lane and coordination worktree. Each copy was committed on that worktree’s own branch. &lt;code dir=&quot;auto&quot;&gt;MigrationRunner._upgrade_worktrees&lt;/code&gt; treated every directory under &lt;code dir=&quot;auto&quot;&gt;.worktrees/&lt;/code&gt; as a project of its own, kept a separate &lt;code dir=&quot;auto&quot;&gt;ProjectMetadata&lt;/code&gt; record per worktree, and stamped a fresh &lt;code dir=&quot;auto&quot;&gt;applied_at&lt;/code&gt; on every migration record in every copy. On 4.0.0rc5 and later the same run also committed an identical &lt;code dir=&quot;auto&quot;&gt;.gitattributes&lt;/code&gt; line on every branch.&lt;/p&gt;
&lt;p&gt;The Mission’s integration checks then refused a file the operator never touched (paths A, B and C of #5457):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Path A.&lt;/strong&gt; &lt;code dir=&quot;auto&quot;&gt;consolidate&lt;/code&gt; refused the second lane: &lt;code dir=&quot;auto&quot;&gt;Lane lane-b is stale: overlapping files [&apos;.gitattributes&apos;, &apos;.kittify/metadata.yaml&apos;]&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Path B.&lt;/strong&gt; &lt;code dir=&quot;auto&quot;&gt;consolidate&lt;/code&gt; refused the squash into a non-primary target: &lt;code dir=&quot;auto&quot;&gt;TARGET_BRANCH_CONTENT_CONFLICT&lt;/code&gt; with &lt;code dir=&quot;auto&quot;&gt;conflicting_path: .kittify/metadata.yaml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Path C.&lt;/strong&gt; On a coordination Mission, review start and implement resume failed with &lt;code dir=&quot;auto&quot;&gt;LANE_AUTO_REBASE_FAILED: no classifier rule matched .../.kittify/metadata.yaml&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The printed &lt;code dir=&quot;auto&quot;&gt;git merge&lt;/code&gt; remedy was a no-op: &lt;code dir=&quot;auto&quot;&gt;consolidate&lt;/code&gt; rolls the Mission branch back to its pre-run tip after the refusal, so the lane already contains that tip.&lt;/p&gt;
&lt;p&gt;The earlier per-worktree design could not converge. #2385 and #2392 ensured that every upgrade write ends in a commit, so no checkout is left dirty. #4972 aligned &lt;code dir=&quot;auto&quot;&gt;last_upgraded_at&lt;/code&gt; for a version-only bump. Neither could make two copies byte-identical, because the per-record &lt;code dir=&quot;auto&quot;&gt;applied_at&lt;/code&gt;, the set of recorded migrations and the notes still differ between checkouts.&lt;/p&gt;
&lt;h2 id=&quot;decision&quot;&gt;Decision&lt;/h2&gt;
&lt;p&gt;Upgrade writes project-global state in the repository root checkout and no longer in any integrating worktree. A lane’s own copy is not brought forward while the Mission is in flight: no step merges the merge target branch into the Mission branch, so a lane keeps its pre-upgrade copy until consolidation, where the merge target branch’s copy survives.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Write placement.&lt;/strong&gt; &lt;code dir=&quot;auto&quot;&gt;spec-kitty upgrade&lt;/code&gt; skips integrating worktrees. &lt;code dir=&quot;auto&quot;&gt;_is_integrating_worktree&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;src/specify_cli/upgrade/runner.py&lt;/code&gt;) is true for a worktree whose checked-out branch the branch-naming authority recognises as a &lt;code dir=&quot;auto&quot;&gt;kitty/mission-…&lt;/code&gt; mission, lane or coordination branch, and for a worktree whose branch cannot be read (detached HEAD fails safe). &lt;code dir=&quot;auto&quot;&gt;_worktrees_to_upgrade&lt;/code&gt; leaves those worktrees out, so nothing is written, stamped or committed in them. A directory without a &lt;code dir=&quot;auto&quot;&gt;.git&lt;/code&gt; entry, and a worktree on any other branch, keep today’s behaviour: upgrade still writes, stamps and commits there (see Residuals).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;A declared set of target-owned bookkeeping.&lt;/strong&gt; (“Target-owned” is defined in the &lt;a href=&quot;/context/orchestration/#target-owned-bookkeeping&quot;&gt;glossary&lt;/a&gt;: the copy on the merge target branch is the authoritative one. The identifiers were first named &lt;code dir=&quot;auto&quot;&gt;primary_owned&lt;/code&gt;; they were renamed before release because that read as the PRIMARY partition or the primary branch, and it meant neither.) The state contract (&lt;code dir=&quot;auto&quot;&gt;src/specify_cli/state/contract.py&lt;/code&gt;) carries &lt;code dir=&quot;auto&quot;&gt;StateSurface.target_owned&lt;/code&gt;, true only for a tracked, project-root surface that Spec Kitty fully generates and marks “do not edit”. &lt;code dir=&quot;auto&quot;&gt;target_owned_paths()&lt;/code&gt; derives the path set and &lt;code dir=&quot;auto&quot;&gt;is_target_owned_path&lt;/code&gt; matches an exact, normalised path relative to the repository root, never a basename. Today exactly one surface is target-owned: &lt;code dir=&quot;auto&quot;&gt;.kittify/metadata.yaml&lt;/code&gt;. &lt;code dir=&quot;auto&quot;&gt;.gitattributes&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;.gitignore&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;.kittify/config.yaml&lt;/code&gt; are operator-editable, so a work package may legitimately change them and they are not in the set (the #4933 and #4978 lesson: basename exemptions lost data).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;A fixed resolution side per integration merge site.&lt;/strong&gt; A conflict confined to a target-owned path resolves as follows. No site uses &lt;code dir=&quot;auto&quot;&gt;-X ours&lt;/code&gt; or &lt;code dir=&quot;auto&quot;&gt;-X theirs&lt;/code&gt; (#4892).&lt;/p&gt;








































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Site&lt;/th&gt;&lt;th&gt;Code&lt;/th&gt;&lt;th&gt;Side for a target-owned conflict&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Stale-lane check&lt;/td&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;check_lane_staleness&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;lanes/stale_check.py&lt;/code&gt;)&lt;/td&gt;&lt;td&gt;not counted (no merge)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Lane → mission merge&lt;/td&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;_merge_branch_into&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;lanes/consolidation.py&lt;/code&gt;), via &lt;code dir=&quot;auto&quot;&gt;resolve_target_owned_conflicts&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;_complete_merge_after_target_owned_resolution&lt;/code&gt;&lt;/td&gt;&lt;td&gt;stage 2: the mission branch&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Mission → target&lt;/td&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;_run_squash_merge&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;_merge_branch_into&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;lanes/consolidation.py&lt;/code&gt;)&lt;/td&gt;&lt;td&gt;stage 2: the target&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Lane sync (auto-rebase)&lt;/td&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;_resolve_managed_artifact_conflicts&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;lanes/auto_rebase.py&lt;/code&gt;), rule &lt;code dir=&quot;auto&quot;&gt;RULE_ID_TARGET_OWNED&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;R-TARGET-OWNED-BOOKKEEPING&lt;/code&gt;)&lt;/td&gt;&lt;td&gt;stage 3: the incoming coordination or mission branch&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dependency-lane merge&lt;/td&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;_merge_dependency_lane_tips&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;lanes/worktree_allocator.py&lt;/code&gt;), via &lt;code dir=&quot;auto&quot;&gt;_complete_merge_after_target_owned_resolution&lt;/code&gt;&lt;/td&gt;&lt;td&gt;stage 2: the dependent lane&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Recorded planning-commit merge on implement resume&lt;/td&gt;&lt;td&gt;&lt;code dir=&quot;auto&quot;&gt;_merge_recorded_planning_commit&lt;/code&gt; (&lt;code dir=&quot;auto&quot;&gt;lanes/worktree_allocator.py&lt;/code&gt;)&lt;/td&gt;&lt;td&gt;stage 2: the lane&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Every resolved side is either the copy closer to the merge target branch, or a lane copy that is never authored and is resolved again at the next integration. The Mission → target &lt;code dir=&quot;auto&quot;&gt;--strategy merge&lt;/code&gt; leg reconciles the derived &lt;code dir=&quot;auto&quot;&gt;status.json&lt;/code&gt; only when it also resolved a target-owned path; a conflict on &lt;code dir=&quot;auto&quot;&gt;status.json&lt;/code&gt; alone still refuses there.&lt;/p&gt;
&lt;p&gt;The resolver breaks ties; it is not an ownership invariant. A lane’s upgraded copy still merges cleanly onto a Mission branch or target that did not change the file.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The stale check ignores content-identical overlaps.&lt;/strong&gt; &lt;code dir=&quot;auto&quot;&gt;_filter_benign_overlaps&lt;/code&gt; drops target-owned paths and any overlapping path whose tree entry (mode and object id, or absence) is identical at the lane tip and the Mission tip. Equal end states merge trivially. A failed probe cannot prove identity, so every candidate stays stale.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A Mission already caught in the broken state heals on its next &lt;code dir=&quot;auto&quot;&gt;consolidate&lt;/code&gt;, review or implement, with no manual edit, history rewrite or destructive command. The operator runbook is &lt;a href=&quot;/operations/upgrade-with-live-lanes-recovery/&quot;&gt;&lt;code dir=&quot;auto&quot;&gt;docs/operations/upgrade-with-live-lanes-recovery.md&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;considered-options&quot;&gt;Considered Options&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Align the per-worktree copies.&lt;/strong&gt; Rejected. This is the #2385, #2392 and #4972 design. The per-record &lt;code dir=&quot;auto&quot;&gt;applied_at&lt;/code&gt;, the migration record set and the notes cannot be made byte-identical across checkouts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Refuse upgrade while lanes are live.&lt;/strong&gt; Rejected. It blocks the main 3.2.x to 4.0 route for every team that upgrades mid-Mission.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A git merge driver for &lt;code dir=&quot;auto&quot;&gt;.kittify/metadata.yaml&lt;/code&gt;.&lt;/strong&gt; Rejected. The refusals are raised by Spec Kitty’s own checks (stale check, squash gate, classifier), which a driver does not reach, and a driver needs per-clone configuration.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Per-hunk classifier rules.&lt;/strong&gt; Rejected. The file is wholly generated, so a whole-file resolution side is correct and a hunk-level rule adds no safety.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Skip every linked worktree.&lt;/strong&gt; Not chosen here. Commands in any linked worktree read &lt;code dir=&quot;auto&quot;&gt;.kittify&lt;/code&gt; from the repository root checkout, so the argument for skipping applies to all of them, but it changes behaviour for worktrees on ordinary branches (#2385, #4972). Follow-up: &lt;a href=&quot;https://github.com/spec-kitty/spec-kitty/issues/5747&quot;&gt;#5747&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Declare the fact in the dirty-churn classifier (&lt;code dir=&quot;auto&quot;&gt;coherence&lt;/code&gt;) instead of the state contract.&lt;/strong&gt; Rejected. That classifier answers “may this dirty file be ignored”, a different question, and a dirty copy must still block.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Skip integrating worktrees, declare target-owned bookkeeping, fix the resolution side per site (chosen).&lt;/strong&gt; It removes the defect at its source for Mission worktrees and recovers Missions already affected.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;consequences&quot;&gt;Consequences&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Upgrade leaves no integrating worktree dirty and adds no upgrade commit to a lane, mission or coordination branch (the #2385 and #2392 invariant holds trivially).&lt;/li&gt;
&lt;li&gt;Commands run inside a worktree resolve &lt;code dir=&quot;auto&quot;&gt;.kittify&lt;/code&gt; from the repository root checkout, so a lane that keeps its pre-upgrade copy is harmless at runtime.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Residuals:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Lanes keep their pre-upgrade &lt;code dir=&quot;auto&quot;&gt;.gitignore&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;.gitattributes&lt;/code&gt; until they integrate. See the amendment to &lt;a href=&quot;/adr/3.x/2026-07-07-1-ignored-surface-backfill-migration-pattern/&quot;&gt;ADR 2026-07-07-1&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Ignored per-checkout surfaces are no longer refreshed in integrating worktrees.&lt;/li&gt;
&lt;li&gt;A pre-&lt;code dir=&quot;auto&quot;&gt;kitty/&lt;/code&gt; legacy branch (&lt;code dir=&quot;auto&quot;&gt;NNN-slug[-WP##]&lt;/code&gt;) is not recognised as integrating, so its worktree keeps today’s behaviour.&lt;/li&gt;
&lt;li&gt;&lt;code dir=&quot;auto&quot;&gt;--strategy rebase&lt;/code&gt; is not covered by the merge-site resolution above.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Worktrees on other branches are still upgraded.&lt;/strong&gt; A linked worktree whose branch is not a &lt;code dir=&quot;auto&quot;&gt;kitty/mission-…&lt;/code&gt; branch (a feature or landing branch) still gets its own &lt;code dir=&quot;auto&quot;&gt;.kittify/metadata.yaml&lt;/code&gt; commit and every worktree-running migration. When that branch reaches the merge target branch through a pull request, no Spec Kitty resolver is on the path. Follow-up: &lt;a href=&quot;https://github.com/spec-kitty/spec-kitty/issues/5747&quot;&gt;#5747&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Upgrade run from inside a lane worktree.&lt;/strong&gt; The skip covers the sibling worktrees of the checkout upgrade runs in. Run with a lane worktree as the current directory, upgrade still treats it as the project and commits &lt;code dir=&quot;auto&quot;&gt;.kittify/metadata.yaml&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;.gitattributes&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;.kittify/config.yaml&lt;/code&gt; on the lane branch. Follow-up: &lt;a href=&quot;https://github.com/spec-kitty/spec-kitty/issues/5747&quot;&gt;#5747&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Skipped worktrees are not listed.&lt;/strong&gt; Upgrade does not name the integrating worktrees it left alone.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code dir=&quot;auto&quot;&gt;.gitattributes&lt;/code&gt; on an already-affected Mission.&lt;/strong&gt; When the merge target branch’s &lt;code dir=&quot;auto&quot;&gt;.gitattributes&lt;/code&gt; differs from the lanes’ (any edit on the target after the Mission was cut, plus the line the earlier upgrade appended on each branch), &lt;code dir=&quot;auto&quot;&gt;consolidate&lt;/code&gt; still refuses with &lt;code dir=&quot;auto&quot;&gt;TARGET_BRANCH_CONTENT_CONFLICT&lt;/code&gt; on &lt;code dir=&quot;auto&quot;&gt;.gitattributes&lt;/code&gt;. The file is operator-editable, so it is deliberately not target-owned.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tracked generated tool files in lanes.&lt;/strong&gt; Generated command and skill copies in a lane worktree are no longer refreshed by upgrade until the lane integrates.&lt;/li&gt;
&lt;li&gt;A project nested below the repository root (&lt;code dir=&quot;auto&quot;&gt;sub/.kittify/metadata.yaml&lt;/code&gt;) is not matched and gets no recovery.&lt;/li&gt;
&lt;li&gt;For a genuine overlap between two lanes on an operator-editable file, the printed stale remedy is still a no-op after the in-run rollback. This Mission removes the upgrade-induced trigger only. The general stale-remedy wording is a defect. Follow-up: &lt;a href=&quot;https://github.com/spec-kitty/spec-kitty/issues/5711&quot;&gt;#5711&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Migrations with &lt;code dir=&quot;auto&quot;&gt;runs_on_worktrees=True&lt;/code&gt; that rewrite tracked Mission state no longer reach coordination or lane branches. For example, &lt;code dir=&quot;auto&quot;&gt;m_3_1_1_normalize_status_json&lt;/code&gt; rewrites &lt;code dir=&quot;auto&quot;&gt;kitty-specs/*/status.json&lt;/code&gt;, and now does so only in the repository root checkout and in worktrees that upgrade still visits. &lt;code dir=&quot;auto&quot;&gt;status.json&lt;/code&gt; is a derived snapshot that is re-materialized from the event log, so the impact is low today. A future migration of tracked Mission state must not rely on the worktree pass to reach in-flight branches. Follow-up: &lt;a href=&quot;https://github.com/spec-kitty/spec-kitty/issues/5712&quot;&gt;#5712&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;This decision adds no writer of &lt;code dir=&quot;auto&quot;&gt;.kittify/metadata.yaml&lt;/code&gt;. The file already has several (&lt;code dir=&quot;auto&quot;&gt;ProjectMetadata.save()&lt;/code&gt;, the schema stamp in &lt;code dir=&quot;auto&quot;&gt;upgrade/runner.py&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;migration/runner.py&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;migration/backfill_identity.py&lt;/code&gt; and &lt;code dir=&quot;auto&quot;&gt;init&lt;/code&gt;; see #5229), and nothing ties the state contract’s path to them: if the file moved, the target-owned declaration would go inert without a failing test.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;amendment-2026-11-05-7173-non-mission-worktrees-are-opt-in&quot;&gt;Amendment 2026-11-05 (#7173): non-Mission worktrees are opt-in&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Decision item 1 changes for worktrees on other branches.&lt;/strong&gt; Item 1 said a worktree on any other branch keeps the earlier behaviour: upgrade writes, stamps and commits there. Since &lt;a href=&quot;https://github.com/spec-kitty/spec-kitty/issues/7173&quot;&gt;#7173&lt;/a&gt;, &lt;code dir=&quot;auto&quot;&gt;spec-kitty upgrade&lt;/code&gt; skips every non-Mission worktree under &lt;code dir=&quot;auto&quot;&gt;.worktrees/&lt;/code&gt; by default. The operator opts in with &lt;code dir=&quot;auto&quot;&gt;--include-worktree &amp;#x3C;path&gt;&lt;/code&gt; (repeatable) or &lt;code dir=&quot;auto&quot;&gt;--all-worktrees&lt;/code&gt;. Integrating (Mission) and detached worktrees stay skipped even when named or when &lt;code dir=&quot;auto&quot;&gt;--all-worktrees&lt;/code&gt; is passed.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Mission check moved from &lt;code dir=&quot;auto&quot;&gt;_is_integrating_worktree&lt;/code&gt; in &lt;code dir=&quot;auto&quot;&gt;upgrade/runner.py&lt;/code&gt; to &lt;code dir=&quot;auto&quot;&gt;is_integrating_worktree&lt;/code&gt; in &lt;code dir=&quot;auto&quot;&gt;src/specify_cli/upgrade/worktree_selection.py&lt;/code&gt;, unchanged. &lt;code dir=&quot;auto&quot;&gt;_worktrees_to_upgrade&lt;/code&gt; is replaced by &lt;code dir=&quot;auto&quot;&gt;worktree_dispositions&lt;/code&gt;, which gives every worktree a disposition: selected, skipped as Mission-owned, or skipped as not selected.&lt;/li&gt;
&lt;li&gt;The preview and the run output now list every worktree with its disposition and outcome, which closes the residual “Skipped worktrees are not listed”.&lt;/li&gt;
&lt;li&gt;The residual “Worktrees on other branches are still upgraded” now applies only to worktrees the operator selected.&lt;/li&gt;
&lt;li&gt;In &lt;code dir=&quot;auto&quot;&gt;--plan-json&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;commit_policy.worktrees_enabled&lt;/code&gt; now means at least one worktree is selected, so a plain run reports &lt;code dir=&quot;auto&quot;&gt;false&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The original decision text above is unchanged.&lt;/p&gt;</content>
</entry>
