fix(native)!: preserve incomplete native UI captures (#991)

* fix(native): preserve unknown accessibility child counts

* fix(native): align helper buffer with capture budget

* fix(native): align Swift helper JSON wire size

* fix(native): bound raw helper output to scenario budget
This commit is contained in:
morluto
2026-10-07 23:44:41 +08:00
committed by GitHub
parent 5065fcd520
commit 9f496ef2d4
13 changed files with 178 additions and 21 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ import { fileURLToPath } from "node:url";
import { execFileOutput } from "../process/ExecFileOutput.js";
import { safeParseJson } from "../domain/safeJson.js";
import type { NativeUiHelper } from "./NativeUiObservation.js";
import { NATIVE_UI_HELPER_MAX_BUFFER } from "./NativeUiOutputBudget.js";
/** Lazily compile one owned helper per observation/scenario and remove its compiler cache. */
export const createNativeUiHelperRuntime = () => {
@@ -50,7 +51,7 @@ export const createNativeUiHelperRuntime = () => {
[JSON.stringify(parameters)],
{
timeout: 30_000,
maxBuffer: 16 * 1024 * 1024,
maxBuffer: NATIVE_UI_HELPER_MAX_BUFFER,
...(signal === undefined ? {} : { signal }),
},
);