fix(batch-auth): confirm existing UUID row on skip; drop _slotMap cache#65
Merged
Conversation
When a device already has a valid auth code (Skipped result), the newly allocated Excel row is released and the row matching the device's existing UUID is found and confirmed as Used — preventing the same code from being issued to another device. Rust: BatchAuthSlotResult::Skipped now carries existing_uuid; added ExcelRowAllocator::find_and_confirm_by_uuid; lib.rs emits excelError on confirm failure. Frontend: removed the _slotMap port→slot cache (linear scan is correct and simpler); propagates excelError into slot state on skip. Also: add batch-flash-auth-extended.test.ts (extended test coverage).
- New store tests (removeSlot statuses, excelError field, retryFailed, isBusy, addBlockedPort, resetAuthStats, checkBatchCompletion gate, web-mode no-ops, dismissBanner, currentStats) → batch-flash-auth.test.ts - TC-061 downloadAuthFirmware web-mode guard → auth-firmware.test.ts - port-filter and filterByChip tests were already covered by their co-located test files; duplicate sections dropped - Delete batch-flash-auth-extended.test.ts (non-standard naming)
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.
When a device already has a valid auth code (Skipped result), the newly allocated Excel row is released and the row matching the device's existing UUID is found and confirmed as Used — preventing the same code from being issued to another device.
Rust: BatchAuthSlotResult::Skipped now carries existing_uuid; added ExcelRowAllocator::find_and_confirm_by_uuid; lib.rs emits excelError on confirm failure.
Frontend: removed the _slotMap port→slot cache (linear scan is correct and simpler); propagates excelError into slot state on skip.
Also: add batch-flash-auth-extended.test.ts (extended test coverage).