docs: add polish, stability & performance sprint plan#56
Merged
Conversation
Comprehensive audit-driven plan covering 24 work items across 5 tracks: stability (thread safety, resource cleanup), performance (latency, CPU), polish (error handling, user feedback), security (input validation), and code health (refactoring, lint rules, types). https://claude.ai/code/session_014aF5Xm3tzbcYRkxrZasxCc
|
|
||
| ### 3.5 Log first dropped audio chunk, not just every 50th | ||
|
|
||
| **Files**: `shuvoice/audio.py:133-138` |
There was a problem hiding this comment.
Redundant condition in proposed fix
The == 0 guard in the suggested condition is redundant: when _dropped_chunks is 0, 0 % 50 == 0 is already True, so the == 0 branch never contributes an additional match. The simpler equivalent is:
Suggested change
| **Files**: `shuvoice/audio.py:133-138` | |
| **Fix**: Change to `if self._dropped_chunks % 50 == 0`. |
Using the shorter form avoids confusion when the item is implemented.
Prompt To Fix With AI
This is a comment left during a code review.
Path: SPRINT-POLISH-STABILITY-PERFORMANCE.md
Line: 207
Comment:
**Redundant condition in proposed fix**
The `== 0` guard in the suggested condition is redundant: when `_dropped_chunks` is `0`, `0 % 50 == 0` is already `True`, so the `== 0` branch never contributes an additional match. The simpler equivalent is:
```suggestion
**Fix**: Change to `if self._dropped_chunks % 50 == 0`.
```
Using the shorter form avoids confusion when the item is implemented.
How can I resolve this? If you propose a fix, please make it concise.
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.
Comprehensive audit-driven plan covering 24 work items across 5 tracks:
stability (thread safety, resource cleanup), performance (latency, CPU),
polish (error handling, user feedback), security (input validation),
and code health (refactoring, lint rules, types).
https://claude.ai/code/session_014aF5Xm3tzbcYRkxrZasxCc
Greptile Summary
This PR adds
SPRINT-POLISH-STABILITY-PERFORMANCE.md, a comprehensive audit-driven sprint plan covering 24 work items across stability, performance, polish, security, and code-health tracks. The document is well-structured with concrete problem statements, proposed fixes with code examples, a prioritized execution table, and a definition of done.Confidence Score: 5/5
Documentation-only change; safe to merge.
No code is modified — this is a planning document. The single P2 finding is a redundant boolean condition in a proposed code snippet inside the doc, which is a cosmetic clarification with no production impact.
No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A([Audio chunk received]) --> B{Circuit state?} B -- CLOSED --> C[Send to ASR backend] C --> D{ASR success?} D -- Yes --> E[Reset failure counter] E --> B D -- No --> F[Increment failure counter] F --> G{counter >= MAX_FAILURES?} G -- No --> B G -- Yes --> H[Enter OPEN state\nNotify user via overlay/waybar] H --> I{Cooldown elapsed?} I -- No --> J[Drop audio chunk] J --> I I -- Yes --> K[Enter HALF-OPEN state] K --> L[Allow one inference attempt] L --> M{ASR success?} M -- Yes --> N[Reset counter\nEnter CLOSED state\nNotify user: recovered] N --> B M -- No --> HPrompt To Fix All With AI
Reviews (1): Last reviewed commit: "docs: add polish, stability & performanc..." | Re-trigger Greptile