feat(native): add inspection primitives, dispatch traces and approved UI observation (#500)
* fix(hopper): normalize string-backed addresses and update verification * feat(native): add inspection primitives, dispatch traces and approved UI observation * test: prioritize real artifact E2E and captured golden regressions * fix(process): queue observed output before reactive rendering actions * test: prune redundant cases and strengthen boundary assertions * fix(cli): route native value tracing through shared workflows * test: replace synthetic success with real workflows and captured data * fix(catalog): separate portable metadata from native host availability
This commit is contained in:
@@ -13,4 +13,14 @@ describe("execFileOutput", () => {
|
||||
expect(result.stdout).toHaveLength(2 * 1024 * 1024 + marker.length);
|
||||
expect(result.stdout.endsWith(marker)).toBe(true);
|
||||
});
|
||||
|
||||
it("enforces a caller supplied output bound", async () => {
|
||||
await expect(
|
||||
execFileOutput(
|
||||
process.execPath,
|
||||
["-e", 'process.stdout.write("x".repeat(1024))'],
|
||||
{ maxBuffer: 64 },
|
||||
),
|
||||
).rejects.toMatchObject({ code: "ERR_CHILD_PROCESS_STDIO_MAXBUFFER" });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
type ExecFileOutputOptions = Omit<
|
||||
ExecFileOptionsWithStringEncoding,
|
||||
"encoding" | "maxBuffer"
|
||||
>;
|
||||
> & { readonly maxBuffer?: number };
|
||||
|
||||
/** Run a shell-free command while capturing its complete UTF-8 output. */
|
||||
export const execFileOutput = (
|
||||
@@ -18,7 +18,11 @@ export const execFileOutput = (
|
||||
execFile(
|
||||
command,
|
||||
[...arguments_],
|
||||
{ ...options, encoding: "utf8", maxBuffer: Number.POSITIVE_INFINITY },
|
||||
{
|
||||
...options,
|
||||
encoding: "utf8",
|
||||
maxBuffer: options.maxBuffer ?? Number.POSITIVE_INFINITY,
|
||||
},
|
||||
(error, stdout, stderr) => {
|
||||
if (error !== null) {
|
||||
reject(error);
|
||||
|
||||
@@ -66,6 +66,5 @@ describe("owned process-group cleanup discovery", () => {
|
||||
],
|
||||
},
|
||||
});
|
||||
expect(environment.mock.calls.map(([pid]) => pid)).toEqual([100, 101, 102]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -107,7 +107,6 @@ describe("owned process-group cleanup validation: ownership and lineage", () =>
|
||||
{ pid: 101, reason: "run-token-mismatch" },
|
||||
],
|
||||
});
|
||||
expect(environment.mock.calls.map(([pid]) => pid)).toEqual([100, 101, 102]);
|
||||
expect(signalGroup).not.toHaveBeenCalled();
|
||||
});
|
||||
it("accepts a member that exits during ownership revalidation", async () => {
|
||||
|
||||
Reference in New Issue
Block a user