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:
@@ -0,0 +1,15 @@
|
||||
const HELPER_SUCCESS_WRAPPER = Buffer.from(
|
||||
JSON.stringify({ ok: true, result: {} }),
|
||||
);
|
||||
|
||||
/** Scenario output is charged at twice the encoded result size before return. */
|
||||
export const NATIVE_UI_OUTPUT_BUDGET_BYTES = 64 * 1024 * 1024;
|
||||
export const NATIVE_UI_OUTPUT_WEIGHT = 2;
|
||||
|
||||
/** Bytes added around a result by the helper's success JSON response. */
|
||||
export const NATIVE_UI_HELPER_ENVELOPE_BYTES =
|
||||
HELPER_SUCCESS_WRAPPER.byteLength - Buffer.byteLength("{}");
|
||||
|
||||
/** Raw helper output is bounded by the scenario's existing unweighted byte budget. */
|
||||
export const NATIVE_UI_HELPER_MAX_BUFFER =
|
||||
NATIVE_UI_OUTPUT_BUDGET_BYTES + NATIVE_UI_HELPER_ENVELOPE_BYTES;
|
||||
Reference in New Issue
Block a user