test: isolate user state during test runs - #613
Conversation
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
👋 这个 PR 开着 11 天没动了,还在推进吗?如果和 main 有冲突就 rebase 一下解掉,需要帮忙说一声;若已不需要也可以直接关掉 🙏 |
|
Sentinel 已审核此变更,并发现 1 个已核验问题。 无法定位到 diff 的已核验问题测试隔离依赖未在所有测试入口生效🔴 严重程度:高(P1) Finding:
开发 agent 查询详情: 调用 MCP 工具 由 Sentinel 审核 · 目标提交 b0f7097fec46 |
|
Still active. I addressed the Sentinel P1 finding in 8df5c15.
Verification:
|
|
Sentinel 已审核此变更,未发现需要报告的问题。 开发 agent 查询详情: 调用 MCP 工具 由 Sentinel 审核 · 目标提交 8df5c1574ec1 |
Summary
Isolate every Node test worker from the developer's real home directory so the suite cannot read or overwrite persistent EvoMap identities, credentials, mailbox state, or proxy settings. Replace the shell-interpolated npm test command with a cross-platform argv-based runner that always preloads the isolation setup.
What changed
How to test
npm test.node --test test/testHomeIsolation.test.js.Risk
Low -- this changes only the test entry point and test environment. Revert the commit to restore the previous runner.
Harness/evaluator governance
Upstream governance surface: N/A
Downstream EvoX impact: N/A
Rollout-local scope: N/A
Promotion boundary: N/A
Evaluator mismatch sets: N/A
Non-regression evidence: N/A
Fix-severity review: N/A
Owner approval: N/A
Security boundary: N/A
Rollback: N/A
Live promotion: no
Autonomous evaluator self-editing: no
Self-check
src/, it is registered inpublic.manifest.jsonconsistently with its sibling files (e.g. listedin
obfuscatewhen the rest of the directory is). Build verificationpassed:
node scripts/build_public.jssucceeded and the new file showsup in
dist-public/in the expected (obfuscated or plain) form.src/gep/schemas/,the corresponding
validate*function is invoked at every write andevery publish call site (not just defined).
Object.assign({}, DEFAULTS, partial)to build anobject, every reference-typed field (arrays, sub-objects) on the result
is sliced or cloned -- not held by reference to either source.
process.env.X, the owning module is loaded after the entry point'sdotenv configuration step (or the constant is migrated to the lazy
env helpers in
src/config.js)."What changed" section above.
locally (
npm test).Related
N/A