-
Notifications
You must be signed in to change notification settings - Fork 1
Fix PR #2 review follow-ups #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
72f0993
fix: address PR review follow-ups
keithah caa930c
fix: address xhigh code-review findings
keithah 2f90fd2
fix: apply CodeRabbit auto-fixes
coderabbitai[bot] 3eedaf1
docs: define optimization hardening design
keithah 81b7069
fix: apply optimization and quality hardening
keithah 9390a35
Fix lifecycle timing regressions
cursoragent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,6 @@ jobs: | |
| cache: npm | ||
|
|
||
| - run: npm ci | ||
| - run: npm run lint | ||
| - run: npm run build | ||
|
|
||
| test: | ||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ re/ | |
| node_modules/ | ||
| dist/ | ||
| coverage/ | ||
| *.tsbuildinfo | ||
| *.tgz | ||
| *.log | ||
| .DS_Store | ||
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
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
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
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
34 changes: 34 additions & 0 deletions
34
docs/superpowers/specs/2026-07-22-code-optimization-hardening-design.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Code Optimization and Hardening Design | ||
|
|
||
| **Date:** 2026-07-22 | ||
| **Status:** Approved for implementation | ||
|
|
||
| ## Goal | ||
|
|
||
| Reduce avoidable network, timer, and stream-resource work while making the | ||
| camera and pairing lifecycles explicit enough to prevent races. Preserve the | ||
| June wire contract and Homebridge behavior. | ||
|
|
||
| ## Design | ||
|
|
||
| - Extend HTTP request ownership through response-body consumption. Shared | ||
| response helpers will enforce size limits and cancel unread error bodies. | ||
| - Give camera frame downloads one source-level cache and in-flight request so | ||
| snapshots and live sessions share immutable still bytes. Keep stream teardown | ||
| idempotent and settle a pending HomeKit start exactly once. | ||
| - Replace pairing's deadline-as-liveness sentinel with explicit cancellation | ||
| ownership and listener checks so destroyed sessions cannot create eviction | ||
| timers or publish terminal state after removal. | ||
| - Add bounded, jittered reconnect/startup retry scheduling and clear command | ||
| acknowledgement timers when commands settle. | ||
| - Make the UI pairing poll self-scheduling, remove its duplicate timeout helper, | ||
| and retain the existing configuration behavior. | ||
| - Remove proven dead dependencies/exports and redundant release verification, | ||
| while retaining small bounded collection operations whose simpler form is | ||
| clearer. | ||
|
|
||
| ## Verification | ||
|
|
||
| Each behavior change gets a focused regression test. The final gate is the full | ||
| Vitest suite, TypeScript type-check, production build, diff check, and the | ||
| GitHub PR checks after pushing. |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Keep the camera accessory contract consistent.
Lines 92–94 correctly describe a separately published camera, but Lines 115–116 still say it is implemented as part of the same accessory as the doorbell. Update the later statement so users are not given conflicting pairing instructions.
🤖 Prompt for AI Agents