Feat/per session logging#69
Merged
Merged
Conversation
…batch_auth_slot signature
…ow and direct Excel ops
…ailed mapping, existingUuid, lockFailed cleanup, auth_write error)
If a device was authorized without lock_otp, a second run with lock_otp=true now detects this via the Excel STEP/STATUS column (already_otp_locked from find_by_mac) and sends auth-otp-lock in the AlreadyDone branch instead of short-circuiting. Also fix DisclaimerModal confirm button class (ty-btn-primary-solid).
…te credentials When conflict_policy=Skip and a device already carries an auth code, the MAC-keyed flow no longer marked that code's Excel row as used (the old find_and_confirm_by_uuid was dropped). If that UUID still sat in an Available row (cross-Excel reuse, re-exported sheet, cleared MAC column), allocate_row could later hand the same code to a different device. Add ExcelRowAllocator::confirm_existing_uuid, which claims the matching Available row for this MAC (binds MAC, marks Done) and is a no-op for unknown or already-bound rows. The Skipped branch in batch_auth_start calls it. Restores the duplicate-credential guard under the new model.
…>-N.log Per-session log files previously had no in-session size limit: the CLI dropped its 5MB rotation and the GUI removed tauri-plugin-log's max_file_size, so a long-running session could grow one file without bound (prune only runs at startup and always keeps >=1 file). - CLI: new SessionLogWriter caps the active file at 10MB and rolls over to tyutool-<ts>-1.log, -2.log, ... (fern has no rotation of its own). - GUI: restore tauri-plugin-log max_file_size(10MB) + KeepAll; rolled files keep the tyutool- prefix so prune_log_files/list_log_files still manage them. Update the pick_active_log test to match the newest-by-mtime behavior.
The backend removed the LockFailed result/event, so slot.lockFailed was permanently undefined while the UI still rendered a "Lock failed" badge, gated retry on !lockFailed, and the disclaimer referenced "(lockFailed)". OTP-lock failure now surfaces as an ordinary failed step (with error text) and is retryable — a retry re-attempts the lock via the already-done supplement-lock path. Remove the lockFailed field, slot-row branches, store retry guards, the lockFailedLabel/Badge i18n keys, and the disclaimer mention; prune the tests that exercised the removed exclusion behavior.
….md, CLAUDE.md Logs are now tyutool-<timestamp>.log (capped at 10MB, rolling to -N.log), not tyutool.log. Update the bug-report template path, docs/cli.md log locations, and CLAUDE.md (routing table, Bounded-growth and active-filename rules) to match. Required by the CLAUDE.md rule that log file-location changes update the issue template.
find_by_mac returns the first matching row, so a MAC duplicated across rows (manual edit, copy/paste) would silently route a device to the wrong credential. Detect duplicate non-empty MACs in load() and emit a log::warn so the operator can spot it; loading is not blocked.
0cbdcc9 to
53da4af
Compare
- is_default_mac: use eq_ignore_ascii_case instead of comparing to_ascii_uppercase() (manual_ignore_case_cmp). - run_batch_auth_slot: allow too_many_arguments — the three row callbacks (find_by_mac / allocate_row / update_row) plus context are intentional. - session-writer test: assert the write() return count (unused_io_amount).
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.
No description provided.