Author SHA1 Message Date
sneak 6a42c5a725 docs: RULES.md lists only the RPC endpoint as contacted by default (closes #755)
check / check (push) Successful in 8m11s
e2e / e2e-chrome (push) Successful in 14m19s
e2e / e2e-firefox (push) Successful in 2m42s
The External Communication checklist named CoinDesk and Blockscout as
always contacted. USD prices now come from Chainlink feeds read through
the RPC endpoint, and Blockscout and Etherscan stay off until the user
turns them on. Both lines now say so, in the wording sneak approved on
the issue.

Model: opus-5-5
2026-11-13 18:43:52 +00:00
clawbot 3a8b309d7e test: replace jest workers past 200 MB so they exit in time (closes #766)
check / check (push) Successful in 6m7s
e2e / e2e-chrome (push) Successful in 14m38s
e2e / e2e-firefox (push) Failing after 14m19s
On a starved CPU, jest force-stopped worker processes that could not exit
within the 500 ms it allows, and script/lib/jest.js failed the run although
every test passed. No test leaks a handle; exit time grows with what a
worker holds, 380 to 970 MB at the end of the run.

workerIdleMemoryLimit in package.json replaces a worker whose heap is over
200 MB after a test file with a fresh one.

tests/jestRunner.test.js runs script/lib/jest.js on a fixture that leaves
an interval running and expects the force-stop to fail the run.

Model: opus-5-5
2026-11-11 09:37:12 +01:00
5 changed files with 50 additions and 6 deletions

No files matched your search

+5 -3
View File
@@ -22,10 +22,12 @@ contradicts either, the originals govern.
## External Communication ## External Communication
- [ ] Extension contacts exactly three external services: configured RPC - [ ] Until the user changes a setting, the extension contacts only the
endpoint, CoinDesk price API, and Blockscout block-explorer API configured RPC endpoint
- [ ] No analytics, telemetry, or tracking - [ ] No analytics, telemetry, or tracking
- [ ] No user-specific data sent except to the configured RPC endpoint - [ ] No user-specific data sent except to the configured RPC endpoint, unless
the user turns on "Use Blockscout" or "Check recipients on Etherscan",
both off by default
- [ ] No Infura/Alchemy hard dependency - [ ] No Infura/Alchemy hard dependency
- [ ] No backend servers operated by the developer - [ ] No backend servers operated by the developer
- [ ] RPC endpoint is user-configurable (defaults to publicnode.com) - [ ] RPC endpoint is user-configurable (defaults to publicnode.com)
+7 -2
View File
@@ -135,9 +135,14 @@ module.exports = [
}, },
}, },
// Unit tests, and the helpers they require: jest on node. // Unit tests, the helpers they require, and the test files they hand to
// jest: jest on node.
{ {
files: ["tests/**/*.test.js", "tests/support/**/*.js"], files: [
"tests/**/*.test.js",
"tests/support/**/*.js",
"tests/fixtures/**/*.js",
],
languageOptions: { languageOptions: {
...commonjs, ...commonjs,
globals: { ...globals.node, ...globals.jest }, globals: { ...globals.node, ...globals.jest },
+2 -1
View File
@@ -16,7 +16,8 @@
"jest": { "jest": {
"setupFiles": [ "setupFiles": [
"<rootDir>/tests/support/navigatorLocks.js" "<rootDir>/tests/support/navigatorLocks.js"
] ],
"workerIdleMemoryLimit": "200MB"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "10.0.1", "@eslint/js": "10.0.1",
+7
View File
@@ -0,0 +1,7 @@
// A test file that starts an interval and never clears it.
// tests/jestRunner.test.js runs script/lib/jest.js on this file alone. The
// name does not end in .test.js, so the normal run never picks it up.
test("starts an interval and never clears it", () => {
setInterval(() => {}, 1000);
});
+29
View File
@@ -0,0 +1,29 @@
// script/lib/jest.js, which package.json's test scripts run, fails a run in
// which jest force-stopped a worker process because a test left an open
// handle.
const { spawnSync } = require("child_process");
const path = require("path");
const root = path.join(__dirname, "..");
test("a test that leaves an interval running fails the run", () => {
// The memory limit in package.json makes jest run even this one file in a
// worker process. The interval keeps that worker from exiting, so jest
// force-stops it after the run.
const result = spawnSync(
process.execPath,
[
"script/lib/jest.js",
"--maxWorkers=1",
"--testMatch",
"<rootDir>/tests/fixtures/leavesIntervalRunning.js",
],
{ cwd: root, encoding: "utf8", timeout: 20000 },
);
expect(result.signal).toBeNull();
expect(result.status).toBe(1);
expect(result.stderr).toContain("1 passed");
expect(result.stderr).toContain("jest force-stopped a worker process");
});