Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

test: opt Python pre-push fixtures into ECC_PREPUSH_RUN_CHECKS

Cursor Agent9c45149baede
diff --git a/scripts/lib/install/codex-user-config.js b/scripts/lib/install/codex-user-config.js
index 5b7aa612c..90b6c8c84 100644
--- a/scripts/lib/install/codex-user-config.js
+++ b/scripts/lib/install/codex-user-config.js
@@ -6,7 +6,7 @@ const path = require('path');
const { assertWithinTrustedRoot } = require('../path-safety');
function isCodexUserConfig(plan, operation) {
- if (plan.adapter.id !== 'codex-home' || operation.kind !== 'copy-file') {
+ if (!plan.adapter || plan.adapter.id !== 'codex-home' || operation.kind !== 'copy-file') {
return false;
}
const relativePath = path.relative(plan.targetRoot, operation.destinationPath);
diff --git a/tests/scripts/codex-hooks.test.js b/tests/scripts/codex-hooks.test.js
index c47f6d986..17efc10b4 100644
--- a/tests/scripts/codex-hooks.test.js
+++ b/tests/scripts/codex-hooks.test.js
@@ -406,6 +406,7 @@ function runHermeticPythonPrePush({
HOME: process.env.HOME ?? '',
ECC_SKIP_GIT_HOOKS: '0',
ECC_SKIP_PREPUSH: '0',
+ ECC_PREPUSH_RUN_CHECKS: '1',
MSYS_NO_PATHCONV: '1',
...(venvDir === null || trackVenv ? {} : { VIRTUAL_ENV: toBashPath(venvDir) }),
...(override === null ? {} : { ECC_PYTEST_CMD: override }),
@@ -452,7 +453,7 @@ else failed++;
// A case-folded spelling, because macOS resolves `$venv/bin/python` to a committed
// `Python` while git matches index pathspecs case-sensitively. Skipped where the
// filesystem is case-sensitive and the two names cannot collide.
-if (fs.existsSync(__filename.toUpperCase()) || fs.existsSync(__filename.toLowerCase())) {
+if (fs.existsSync(__filename.toUpperCase()) && fs.existsSync(__filename.toLowerCase())) {
if (
test('pre-push refuses a tracked interpreter committed under a folded case', () => {
const { result, calls } = runHermeticPythonPrePush({