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: fix cross-platform orchestration regressions

Affaan Mustafad994e0503b84
diff --git a/tests/hooks/hooks.test.js b/tests/hooks/hooks.test.js
index a9ca850b7..a9d6315d8 100644
--- a/tests/hooks/hooks.test.js
+++ b/tests/hooks/hooks.test.js
@@ -4570,10 +4570,20 @@ async function runTests() {
const files = fs.readdirSync(sessionsDir).filter(f => f.endsWith('.tmp'));
assert.ok(files.length > 0, 'Should create session file');
const content = fs.readFileSync(path.join(sessionsDir, files[0]), 'utf8');
+ const summaryMatch = content.match(
+ /<!-- ECC:SUMMARY:START -->([\s\S]*?)<!-- ECC:SUMMARY:END -->/
+ );
// The real string message should appear
assert.ok(content.includes('Real user message'), 'Should include the string content user message');
- // Numeric/boolean/object content should NOT appear as text
- assert.ok(!content.includes('42'), 'Numeric content should be skipped (else branch → empty string → filtered)');
+ assert.ok(summaryMatch, 'Should include a generated summary block');
+ const summaryBlock = summaryMatch[1];
+ // Numeric/boolean/object content should NOT appear as task bullets
+ assert.ok(
+ !summaryBlock.includes('\n- 42\n'),
+ 'Numeric content should be skipped (else branch → empty string → filtered)'
+ );
+ assert.ok(!summaryBlock.includes('\n- true\n'), 'Boolean content should be skipped');
+ assert.ok(!summaryBlock.includes('[object Object]'), 'Object content should be skipped');
} finally {
fs.rmSync(isoHome, { recursive: true, force: true });
}
diff --git a/tests/lib/tmux-worktree-orchestrator.test.js b/tests/lib/tmux-worktree-orchestrator.test.js
index e4ee32041..819850fa4 100644
--- a/tests/lib/tmux-worktree-orchestrator.test.js
+++ b/tests/lib/tmux-worktree-orchestrator.test.js
@@ -161,9 +161,10 @@ test('buildOrchestrationPlan exposes shell-safe launcher aliases alongside raw d
workers: [{ name: 'Docs Fixer', task: 'Update docs' }]
});
const quote = value => `'${String(value).replace(/'/g, `'\\''`)}'`;
+ const resolvedRepoRoot = plan.workerPlans[0].repoRoot;
assert.ok(
- plan.workerPlans[0].launchCommand.includes(`bash ${quote(repoRoot)}/scripts/orchestrate-codex-worker.sh`),
+ plan.workerPlans[0].launchCommand.includes(`bash ${quote(resolvedRepoRoot)}/scripts/orchestrate-codex-worker.sh`),
'repo_root_sh should provide a shell-safe path'
);
assert.ok(