Repository navigation
Conversation
…until their tokens move Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Settings saves now retain legacy Bitbucket and GitHub fields when token migration fails, allowing migration to retry without losing configuration. The change is narrowly scoped and retains existing atomic-write safeguards. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Reject host creation while its retired token migration remains pending, preserving the old migration marker and retry path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
A failed migration of legacy Bitbucket or GitHub credentials leaves the retired settings keys available for retry. A later settings write could strip those keys and lose the host configuration and token references. Creating a host with only an email could also discard the marker while the old token was still unreadable.
Change
The server retains pending legacy records alongside loaded settings and writes them back until that host has migrated. After the normal reload and migration retry, a guard rejects a requested patch that would create a host with a pending retired record, before that patch's secret-change and persistence phase. The reload itself may still migrate other readable secrets or settings.
Each save retries migration. Once the old token becomes readable and migration succeeds, the same patch can proceed. Existing hosts, hosts without pending retired records, and separate unrelated updates retain their existing behavior. A patch that includes a blocked host is rejected as a whole. Even explicit replacement credentials cannot create that host until the pending legacy migration is resolved; repairing the secret store or deliberately removing the old secret clears this restriction. The existing generic
write-secreterror is retained, without exposing credentials.Scope and approval
A focused data-preservation bug fix in one server module and its existing tests. The legacy migration already intends to retry after a failed credential copy. Related #27756 handles secret-provider tokens and #29786 changes observability parsing; neither implements this migration repair.
Verification
CI=true vp run check:changedpassed 77 tests in 2 files, typecheck of 3 packages, format, lint, knip twice and GraphQL in Linux Boat. The local and sandbox trees and both file hashes matched.Fresh independent read-only review of the complete two-file candidate by GPT-6.1 Sol (high), through Codex in T3 Code, found no actionable code findings. All 8 required CI checks on 2ef066f pass. CodeRabbit reviewed this head with no actionable comments; the reported migration thread is resolved.
Created with Claude Opus 5.5 in Claude Code through T3 Code. Publication by GPT-6.1 Sol (high) through Codex in T3 Code.