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.

fix: resolve all CI test failures (19 fixes across 6 files) (#519)

Affaan Mustafab48930974b7b
diff --git a/scripts/ecc.js b/scripts/ecc.js
index 033d80424..472ba6162 100644
--- a/scripts/ecc.js
+++ b/scripts/ecc.js
@@ -150,6 +150,7 @@ function runCommand(commandName, args) {
cwd: process.cwd(),
env: process.env,
encoding: 'utf8',
+ maxBuffer: 10 * 1024 * 1024,
}
);
diff --git a/scripts/lib/install-executor.js b/scripts/lib/install-executor.js
index c2b31e9d5..63be38445 100644
--- a/scripts/lib/install-executor.js
+++ b/scripts/lib/install-executor.js
@@ -83,6 +83,11 @@ function validateLegacyTarget(target) {
}
}
+const IGNORED_DIRECTORY_NAMES = new Set([
+ 'node_modules',
+ '.git',
+]);
+
function listFilesRecursive(dirPath) {
if (!fs.existsSync(dirPath)) {
return [];
@@ -94,6 +99,9 @@ function listFilesRecursive(dirPath) {
for (const entry of entries) {
const absolutePath = path.join(dirPath, entry.name);
if (entry.isDirectory()) {
+ if (IGNORED_DIRECTORY_NAMES.has(entry.name)) {
+ continue;
+ }
const childFiles = listFilesRecursive(absolutePath);
for (const childFile of childFiles) {
files.push(path.join(entry.name, childFile));
diff --git a/scripts/lib/session-adapters/canonical-session.js b/scripts/lib/session-adapters/canonical-session.js
index 4e87aa7ef..ae50afc90 100644
--- a/scripts/lib/session-adapters/canonical-session.js
+++ b/scripts/lib/session-adapters/canonical-session.js
@@ -348,7 +348,10 @@ function persistCanonicalSnapshot(snapshot, options = {}) {
const writer = resolveStateStoreWriter(stateStore);
if (stateStore && !writer) {
- throw new Error('State store does not expose a supported session snapshot writer');
+ // The loaded object is a factory module (e.g. has createStateStore but no
+ // writer methods). Treat it the same as a missing state store and fall
+ // through to the JSON-file recording path below.
+ return writeFallbackSessionRecording(snapshot, options);
}
if (writer) {
diff --git a/scripts/orchestrate-codex-worker.sh b/scripts/orchestrate-codex-worker.sh
index 5461596b1..d73ad0cf2 100755
--- a/scripts/orchestrate-codex-worker.sh
+++ b/scripts/orchestrate-codex-worker.sh
@@ -31,6 +31,21 @@ EOF
}
mkdir -p "$(dirname "$handoff_file")" "$(dirname "$status_file")"
+
+if [[ ! -r "$task_file" ]]; then
+ write_status "failed" "- Error: task file is missing or unreadable (\`$task_file\`)"
+ {
+ echo "# Handoff"
+ echo
+ echo "- Failed: $(timestamp)"
+ echo "- Branch: \`$(git rev-parse --abbrev-ref HEAD)\`"
+ echo "- Worktree: \`$(pwd)\`"
+ echo
+ echo "Task file is missing or unreadable: \`$task_file\`"
+ } > "$handoff_file"
+ exit 1
+fi
+
write_status "running" "- Task file: \`$task_file\`"
prompt_file="$(mktemp)"
diff --git a/tests/scripts/ecc.test.js b/tests/scripts/ecc.test.js
index 9d515bcea..1f92b3a9f 100644
--- a/tests/scripts/ecc.test.js
+++ b/tests/scripts/ecc.test.js
@@ -14,6 +14,7 @@ function runCli(args, options = {}) {
return spawnSync('node', [SCRIPT, ...args], {
encoding: 'utf8',
cwd: options.cwd || process.cwd(),
+ maxBuffer: 10 * 1024 * 1024,
env: {
...process.env,
...(options.env || {}),
diff --git a/tests/scripts/install-apply.test.js b/tests/scripts/install-apply.test.js
index 3e7193e33..257a29ffc 100644
--- a/tests/scripts/install-apply.test.js
+++ b/tests/scripts/install-apply.test.js
@@ -126,8 +126,8 @@ function runTests() {
const result = run(['--target', 'cursor', 'typescript'], { cwd: projectDir, homeDir });
assert.strictEqual(result.code, 0, result.stderr);
- assert.ok(fs.existsSync(path.join(projectDir, '.cursor', 'rules', 'common', 'coding-style.md')));
- assert.ok(fs.existsSync(path.join(projectDir, '.cursor', 'rules', 'typescript', 'testing.md')));
+ assert.ok(fs.existsSync(path.join(projectDir, '.cursor', 'rules', 'common-coding-style.md')));
+ assert.ok(fs.existsSync(path.join(projectDir, '.cursor', 'rules', 'typescript-testing.md')));
assert.ok(fs.existsSync(path.join(projectDir, '.cursor', 'agents', 'architect.md')));
assert.ok(fs.existsSync(path.join(projectDir, '.cursor', 'commands', 'plan.md')));
assert.ok(fs.existsSync(path.join(projectDir, '.cursor', 'hooks.json')));
@@ -163,10 +163,10 @@ function runTests() {
const result = run(['--target', 'antigravity', 'typescript'], { cwd: projectDir, homeDir });
assert.strictEqual(result.code, 0, result.stderr);
- assert.ok(fs.existsSync(path.join(projectDir, '.agent', 'rules', 'common', 'coding-style.md')));
- assert.ok(fs.existsSync(path.join(projectDir, '.agent', 'rules', 'typescript', 'testing.md')));
- assert.ok(fs.existsSync(path.join(projectDir, '.agent', 'commands', 'plan.md')));
- assert.ok(fs.existsSync(path.join(projectDir, '.agent', 'agents', 'architect.md')));
+ assert.ok(fs.existsSync(path.join(projectDir, '.agent', 'rules', 'common-coding-style.md')));
+ assert.ok(fs.existsSync(path.join(projectDir, '.agent', 'rules', 'typescript-testing.md')));
+ assert.ok(fs.existsSync(path.join(projectDir, '.agent', 'workflows', 'plan.md')));
+ assert.ok(fs.existsSync(path.join(projectDir, '.agent', 'skills', 'architect.md')));
const statePath = path.join(projectDir, '.agent', 'ecc-install-state.json');
const state = readJson(statePath);
@@ -176,7 +176,7 @@ function runTests() {
assert.deepStrictEqual(state.resolution.selectedModules, ['rules-core', 'agents-core', 'commands-core']);
assert.ok(
state.operations.some(operation => (
- operation.destinationPath.endsWith(path.join('.agent', 'commands', 'plan.md'))
+ operation.destinationPath.endsWith(path.join('.agent', 'workflows', 'plan.md'))
)),
'Should record manifest command file copy operation'
);
@@ -266,9 +266,9 @@ function runTests() {
const result = run(['--target', 'antigravity', '--profile', 'core'], { cwd: projectDir, homeDir });
assert.strictEqual(result.code, 0, result.stderr);
- assert.ok(fs.existsSync(path.join(projectDir, '.agent', 'rules', 'common', 'coding-style.md')));
- assert.ok(fs.existsSync(path.join(projectDir, '.agent', 'agents', 'architect.md')));
- assert.ok(fs.existsSync(path.join(projectDir, '.agent', 'commands', 'plan.md')));
+ assert.ok(fs.existsSync(path.join(projectDir, '.agent', 'rules', 'common-coding-style.md')));
+ assert.ok(fs.existsSync(path.join(projectDir, '.agent', 'skills', 'architect.md')));
+ assert.ok(fs.existsSync(path.join(projectDir, '.agent', 'workflows', 'plan.md')));
assert.ok(!fs.existsSync(path.join(projectDir, '.agent', 'skills', 'tdd-workflow', 'SKILL.md')));
const state = readJson(path.join(projectDir, '.agent', 'ecc-install-state.json'));