feat(observability): report the post-copy verify pass as its own engine state - #964
Draft
aparajon wants to merge 1 commit into
Draft
feat(observability): report the post-copy verify pass as its own engine state#964aparajon wants to merge 1 commit into
aparajon wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves operator observability of long-running Spirit schema changes by surfacing the post-copy verify pass as a distinct engine state (checksumming) and fixing Spirit table progress projection so verify-phase counters and details are rendered correctly after row copy completes.
Changes:
- Add
engine.StateChecksummingand map Spirit’sstatus.Checksumphase to that state via an explicit phase→engine-state mapping. - Fix Spirit table progress rendering to treat
IsCompleteas “row copy complete” (not “table complete”), retire copy ETA after copy completion, and project runner-wide checksum counters/details during verify. - Extend tern state conversion + tests to persist
checksummingas a canonical task state and validate state aggregation behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/tern/state_converters.go | Persists the new engine checksumming state as canonical task state (state.Task.Checksumming). |
| pkg/tern/state_converters_test.go | Adds coverage asserting checksumming is in-flight and aggregates to an in-flight apply state. |
| pkg/engine/spirit/spirit.go | Projects Spirit verify phase into engine state and corrects table progress/detail behavior past row copy completion. |
| pkg/engine/spirit/spirit_test.go | Adds tests covering checksumming state surfacing and verify-pass table progress projection. |
| pkg/engine/engine.go | Introduces StateChecksumming as a first-class engine state (non-terminal). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
31
to
36
| return state.Task.Pending | ||
| case engine.StateRunning: | ||
| return state.Task.Running | ||
| case engine.StateChecksumming: | ||
| return state.Task.Checksumming | ||
| case engine.StateWaitingForDeploy: |
…ne state Spirit's verify pass compares the copied data against the source before cutover and runs for hours on a large table. It had no way to cross the engine interface: engine.State has no checksum member, and progressState returned the tracked state without consulting Spirit's phase at all, so every post-copy phase flattened to Running. The task state, its proto enum and every renderer are already in place — the state simply never arrived to populate them, so the operator watched a full copy bar with no ETA and nothing saying a verification was under way. progressState becomes an explicit Spirit-phase to engine-state mapping. Phases that flatten into the tracked state are listed rather than left to a default, so giving one of them its own vocabulary is a decision made in that mapping. The secondary-index rebuild is the next candidate: it is the same shape of invisible multi-hour phase. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
aparajon
force-pushed
the
armand/engine-checksum-state
branch
from
August 7, 2026 19:21
249545b to
22939d5
Compare
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 this matters
The post-copy verify pass compares the copied data against the source before cutover, and on a large table it runs for hours. It has no way to cross the engine interface:
engine.Statehas no checksum member, andprogressStatereturns the tracked state without consulting the engine's phase at all, so every post-copy phase flattens toRunning.Everything downstream is already built for it — the
checksummingtask state, its proto enum, the PR comment, the CLI, the aggregate counter and the previews all handle a verifying table. The state simply never arrives to populate them, so the operator watches a full copy bar with no ETA and nothing saying a verification is under way.What it does
Adds
StateChecksummingand turnsprogressStateinto an explicit engine-phase to engine-state mapping. Phases that flatten into the tracked state are listed rather than left to a default, so giving one of them its own vocabulary is a decision made in that mapping. The secondary-index rebuild is the next candidate: same shape of invisible multi-hour phase.Stacks on top of the display-side work — this is the producing half.
🤖 Generated with Claude Code