v2.1.3#1113
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Coverage Report for CI Build 24964733939Coverage increased (+1.2%) to 64.646%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
This PR prepares the v2.1.3 release by hardening TLV parsing, fixing several pairing/datastream edge cases, improving crypto hot-path performance, and updating test/build tooling and dependencies.
Changes:
- Fixes DataStream parsing/writing correctness (Float64 reader index advance, Int32 range check, UTF-8 byte-length tags) and adds coverage.
- Hardens TLV parsing and pairing/stream handlers with additional validation and error handling.
- Improves crypto framing performance (avoid O(n²) buffer concatenation) and updates dependencies/tooling for Jest/TypeScript.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.spec.json | Adds a dedicated TS config for Jest/ts-jest compilation. |
| jest.config.ts | Configures ts-jest to use tsconfig.spec.json. |
| src/lib/util/tlv.ts | Adds TLV decode bounds validation for malformed/truncated buffers. |
| src/lib/util/tlv.spec.ts | Adds tests for TLV decode truncation/length validation and zero-length entries. |
| src/lib/util/hapCrypto.ts | Reworks encrypt/decrypt framing to accumulate chunks and Buffer.concat once. |
| src/lib/util/hapCrypto.spec.ts | Adds a multi-chunk encrypt/decrypt round-trip test for large messages. |
| src/lib/model/AccessoryInfo.ts | Defaults missing persisted category to Categories.OTHER (enum) rather than "". |
| src/lib/model/AccessoryInfo.spec.ts | Adds regression test for category defaulting behavior on load. |
| src/lib/datastream/DataStreamParser.ts | Fixes Float64 reader index advance, Int32 range bounds, and UTF-8 tag sizing. |
| src/lib/datastream/DataStreamParser.spec.ts | Adds tests covering the datastream fixes (Int32, Float64 advancement, UTF-8 byte length). |
| src/lib/camera/RTPStreamManagement.ts | Adds try/catch around stream start parsing and handles RTP proxy setup Promise rejections. |
| src/lib/HAPServer.ts | Adds missing TLV field validation, pairing encrypted-length checks, safer accessory ID parsing, constant-time pincode checks, and improved debug logging. |
| src/lib/Characteristic.ts | Prevents "undefined" error strings in characteristic warnings by using a fallback message. |
| src/lib/Accessory.ts | Removes unsafe non-null assertions in accessory/characteristic lookups and guards event parsing. |
| package.json | Updates dependencies/devDependencies (notably TypeScript, eslint, axios, ts-jest, etc.). |
| package-lock.json | Locks updated dependency graph consistent with package.json. |
| CHANGELOG.md | Adds pending v2.1.3 changelog entries matching the fixes in this PR. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DataStreamParserreadFloat64LEmissing reader index advancePromise.allrejection in RTP proxy setupSEQUENCE_NUMcheck in pair handlersaid.iidformat before parsing"undefined"string in characteristic error warningstypescript