Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

test(gate): cover unreadable prototype and accessor options [C7]

Corey Olson4b3773952fd4
diff --git a/test/cpu-load-tests.test.js b/test/cpu-load-tests.test.js
index 2a430ba5..259eac72 100644
--- a/test/cpu-load-tests.test.js
+++ b/test/cpu-load-tests.test.js
@@ -122,3 +122,16 @@ for (const [kind, declaration, binding] of [
assert.equal(remote.executor?.runnerExecution, true);
assert.notEqual(remote.executor?.cwd, box.repo);
});
+
+
+for (const [kind, declaration] of [
+ ['escaped prototype', String.raw`{ "__pr\u006fto__": Object.fromEntries([[ ["cpu", "Load"].join(""), true ]]) }`],
+ ['computed accessor', '{ get ["cpuLoad"]() { return true; } }'],
+]) test(`unreadable ${kind} options cannot hide a CPU-load declaration [C7]`, async () => {
+ const box = cpuLoadFixture(e2e, { declaration });
+ const remote = await box.runGate();
+ assert.equal(remote.result.status, 0, remote.result.context);
+ assert.equal(box.requestsMade().length, 1, 'unreadable prototype or accessor options require the registered runner');
+ assert.equal(remote.executor?.runnerExecution, true);
+ assert.notEqual(remote.executor?.cwd, box.repo);
+});