Repository navigation
Improve signal interruption handling and stale lock recovery - #6
Merged
Merged
Conversation
nhan7777
force-pushed
the
feature/improve-signal-interruption-handling
branch
5 times, most recently
from
September 11, 2026 18:15
170480e to
5bbb15d
Compare
- Add progress feedback during analysis: '(may take 30-60s on large projects)' suffix - Improve error messages: distinguish stale armed records from corruption - Provide clear recovery steps with exact commands when stale lock detected - Add comprehensive signal handling documentation - Add test for stale armed record detection logic
nhan7777
force-pushed
the
feature/improve-signal-interruption-handling
branch
from
September 11, 2026 18:33
5bbb15d to
9b8521d
Compare
- Emit 'Note: Analysis may take 30-60 seconds on large projects' before each adapter run - Register scan.progress.analysis-note in CLI surface inventory - Update transcript matrix fixtures for scan scenarios - Update scan_command_test assertion to include note line Reduces user impulse to interrupt thinking process is hung.
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.
Summary
Addresses user-reported issue where interrupting
flutter_pruner scanwith Ctrl+C during long operations leaves a stale lock that blocks subsequent runs with unclear "corrupt" error messages.Changes
1. Progress Feedback
lib/src/cli/commands/scan_command.dart:336-3392. Improved Error Messages
lib/src/core/project/project_operation_lock.dart:73-100ps aux | grep flutter_pruner→rm→ retry)test/core/project_operation_lock_test.dart:676-730verifying stale armed detection logic3. Documentation
doc/signal-handling.md(new)Root Cause
When user sends SIGINT/SIGTERM during long-running
dart analyze(~30s on large projects), if the Flutter Pruner process receives a second signal (or SIGKILL) during the 5-second termination cleanup window, the process terminates before writingunconfirmed/clearedrecords → lock file contains onlyarmedrecord → next run fails with "corrupt" error.Design Decisions
Verification
dart analyzeclean on modified filesRelated Issues
Fixes user-reported "Flutter Pruner process uncertainty evidence is corrupt" error when interrupting scans.