Skip to content

fix(batch-auth): confirm existing UUID row on skip; drop _slotMap cache#65

Merged
shiliu-yang merged 5 commits into
refactor/v3from
yj/batch-flash-auth-v3
Jun 26, 2026
Merged

fix(batch-auth): confirm existing UUID row on skip; drop _slotMap cache#65
shiliu-yang merged 5 commits into
refactor/v3from
yj/batch-flash-auth-v3

Conversation

@shiliu-yang

Copy link
Copy Markdown
Contributor

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).

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)
@shiliu-yang shiliu-yang merged commit 88b7a7a into refactor/v3 Jun 26, 2026
3 checks passed
@shiliu-yang shiliu-yang deleted the yj/batch-flash-auth-v3 branch June 26, 2026 06:38
@shiliu-yang shiliu-yang restored the yj/batch-flash-auth-v3 branch June 26, 2026 06:41
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