Cover the assisted-update and release takeover panels - #982
Merged
Conversation
Both takeover components rendered only through updates-section.test.tsx, which asserted no more than "the settings controls went away". Everything the operator actually reads during an in-flight update — which source drives the headline, which phases the walk lists and in what order, what a terminal phase says, the migration/notes/check lists, the agent link — was unpinned, along with release-shared's DISPATCH_RESTARTING log filter and its restart placeholder. - assisted-update-card.test.tsx (26 tests) covers AssistedUpdateProgress's headline precedence (migrations over metadata over the generic fallback, with an empty array reading as "no manifests"), the assisted phase set asserted as one ordered string so a reordering is caught, the failed/rollback/blocked messages and the assisted-over-job error precedence, the detail lists, and the agent link's full-id href. It also covers both pre-launch gates, including that the required/recommended copy follows the `required` prop rather than metadata.mode — the two diverge whenever release-info raises assistedRequired for pending migrations. - release-operation-takeover.test.tsx (18 tests) covers the current-step card and its clamped progress bar, the standard phase walk, the restart spinner's current-phase guard, the log's sentinel filter and restart placeholder, and the Updated-to/Released split with its job.tag-then-status.tag fallback. - updates-section.test.tsx gains three lines pinning UPDATE_PHASES as what the standard takeover walks; nothing else in the suite caught swapping in the assisted list. 52 mutants run against the code under test; 51 killed. The survivor is the log auto-scroll effect, which jsdom cannot observe — scrollHeight is always 0 with no layout engine — so it was recorded rather than faked. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Both takeover components —
AssistedUpdateProgress(462 lines) andOperationTakeover(147) — rendered only throughupdates-section.test.tsx, which asserted no more than "the settings controls went away". Everything the operator actually reads during an in-flight update was unpinned, along withrelease-shared.tsx'sDISPATCH_RESTARTINGlog filter and its restart placeholder.What
assisted-update-card.test.tsx(26 tests) — headline precedence (migrations over metadata over the generic fallback, with an empty array reading as "no manifests"), the assisted phase set asserted as one ordered string so a reordering is caught, the failed/rollback/blocked messages and the assisted-over-job error precedence, the migration/notes/check lists, and the agent link's full-id href. Also both pre-launch gates, including that the required/recommended copy follows therequiredprop rather thanmetadata.mode— the two diverge wheneverrelease-inforaisesassistedRequiredfor pending migrations.release-operation-takeover.test.tsx(18 tests) — the current-step card and its clamped progress bar, the standard phase walk, the restart spinner's current-phase guard (isRestartingis true for any update job once post-restart polling starts, so it can be raised while the job is still deploying), the log's sentinel filter and restart placeholder, and the Updated-to/Released split with itsjob.tag ?? status.tagfallback.updates-section.test.tsx— three lines pinningUPDATE_PHASESas what the standard takeover walks. Nothing else in the suite caught swapping in the assisted list.No product code changed. No product bugs found.
Verification
52 mutants run against the code under test; 51 killed. The survivor is the log auto-scroll effect (
scrollTop = scrollHeight), which jsdom cannot observe — with no layout enginescrollHeightis always 0, so the mutant is indistinguishable. Recorded rather than faked.Four mutants initially survived and were fixed by sharpening the tests, not by accepting them: phase ordering, the
current &&guard on the restart spinner, the log sentinel'strim(), and the progress bar's clamp. A review pass then demonstrated two more assertions that passed for the wrong reason (a separator-only check that missed a lost null guard informatProgressLabel, and a gate test that flippedmodeandrequiredtogether so it could not tell which drove the copy); both were fixed and re-verified against the exact mutants.Local:
check,format,lint:web(0 errors),finalize:web, unit (server 2797, web 1000 → 1044, ext 60, scripts 4), E2E 181 passed/12 skipped, live tmux lane 11 passed with no leaked sessions.🤖 Generated with Claude Code