Skip to content

Cover the assisted-update and release takeover panels - #982

Merged
selfcontained merged 1 commit into
mainfrom
agt_c27fbcf7d712/job-test-enforcer-fe5fcaa3
Aug 20, 2026
Merged

Cover the assisted-update and release takeover panels#982
selfcontained merged 1 commit into
mainfrom
agt_c27fbcf7d712/job-test-enforcer-fe5fcaa3

Conversation

@selfcontained

Copy link
Copy Markdown
Owner

Why

Both takeover components — AssistedUpdateProgress (462 lines) and OperationTakeover (147) — 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 was unpinned, along with release-shared.tsx's DISPATCH_RESTARTING log 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 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) — the current-step card and its clamped progress bar, the standard phase walk, the restart spinner's current-phase guard (isRestarting is 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 its job.tag ?? status.tag fallback.
  • updates-section.test.tsx — three lines pinning UPDATE_PHASES as 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 engine scrollHeight is 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's trim(), 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 in formatProgressLabel, and a gate test that flipped mode and required together 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

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>
@selfcontained
selfcontained merged commit 60fdf6d into main Aug 20, 2026
1 check passed
@selfcontained
selfcontained deleted the agt_c27fbcf7d712/job-test-enforcer-fe5fcaa3 branch August 20, 2026 02:38
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.

1 participant