Repository navigation
Restore source choices when a GUI review ends without writing - #137
Merged
Merged
Conversation
Choosing a source for a refused file updates that row so the review can show it as ready. Rows survive between runs, and cancelling left the choice on them: the next Convert showed the file as ready with a source nobody chose in that review. The choices are saved when the review opens and restored when it ends without writing (cancelled, stale, not plannable, or cancelled before the write pass). Choices that existed before the review opened are kept; a completed or interrupted run keeps the choices it wrote with. Tests choose then cancel and run the same rows again, keep an earlier choice, and cover a stale review. Removing the restore, clearing every choice, or restoring only on cancellation each fails them. Backlog: BL-39. Co-Authored-By: Claude Opus 5.5 <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.
Problem
In the GUI review, choosing a source for a refused file updates that row (
CurrentCharsetLabel,SourceEncodingWasSpecified) so the plan shows it as ready. Rows survive between runs. Cancelling the review left the choice on them, so the next Convert on the same rows showed the file as ready to convert with a source nobody chose in that review, while the list still showed the detected encoding. No file was written. Found in the 2026-09-20 review (F1) and confirmed through the orchestration sequence.Change
ConversionOrchestrator.Runsaves each row's source choice when the review opens and restores it when the run ends without writing:Cancelled, including a source choice that matched no file;PlanWentStale;CouldNotPlan;Choices that existed before the review opened are what gets restored, so they are kept. A completed or interrupted run keeps the choices it wrote with. Stale and could-not-plan are included because nothing was written with the choice either; the next review starts from the files as they are.
Backlog entry BL-39.
Tests
In
ConversionOrchestrationTests, all on real files:PlanWentStalewith the choice restored and no backup.Mutation checks (each restored byte-for-byte afterwards)
CancelledVerification
masterafter Accept ASCII in -Validate wherever BOM-less UTF-8 is allowed #136. Release build, 0 warnings; 970/970 tests pass.docs/Test-DefectBacklog.ps1passes.gui-smoke(phases C and J exercise source choices). The full smoke run and the four-corpus audit will be on the final committed release candidate.🤖 Generated with Claude Code