Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@effect/vitest": "4.1.5",
"@types/node": "^26.1.2",
"@types/pngjs": "6.0.5",
"@uinaf/oxlint-config": "1.0.3",
"@uinaf/oxlint-config": "1.0.4",
"@uinaf/skillcheck": "1.7.7",
"@vitest/coverage-v8": "catalog:",
"jpeg-js": "0.4.4",
Expand Down
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ allowBuilds:
protobufjs: false
sharp: false
minimumReleaseAgeExclude:
# Exact versions or `pkg@v1 || v2` unions only; `pkg@^range` is rejected by design.
- "@uinaf/skillcheck@0.4.0"
- "@uinaf/oxlint-config"
- "@uinaf/oxlint-plugin-no-comments"
catalog:
Expand Down
1 change: 1 addition & 0 deletions src/scenegraph-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type SceneGraphPollState = {

const defaultPollIntervalMs = 500;

// SAFETY: Roku OS 11 can freeze and reboot when /query/sgnodes/all dumps the tree mid-build; app-ui and single-node queries skip that dump.
const sceneGraphPaths: Record<SceneGraphSource, string> = {
"app-ui": "/query/app-ui",
sgnodes: "/query/sgnodes/all",
Expand Down
2 changes: 2 additions & 0 deletions src/screenshot-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function validatePng(image: Buffer): void {
const width = image.readUInt32BE(16);
const height = image.readUInt32BE(20);

// SAFETY: pngjs keeps a Buffer per scanline, so cap each dimension as well as the pixel count.
if (width === 0 || height === 0 || width > 8192 || height > 8192 || width * height > maxPixels) {
throw new Error("PNG screenshot exceeds supported dimensions");
}
Expand Down Expand Up @@ -119,6 +120,7 @@ function validatePng(image: Buffer): void {
}
}

// SAFETY: pngjs's interlaced sync decoder has no inflate limit; bound and checksum the whole zlib stream before decoding.
const inflated = inflateSync(compressed.subarray(0, compressedLength), {
maxOutputLength: expectedBytes,
});
Expand Down