From b2ea647d4109fb4d173ec5fce1dd3b01c91b175c Mon Sep 17 00:00:00 2001 From: haelyra <49814733+haelyra@users.noreply.github.com> Date: Thu, 5 Nov 2026 23:53:59 -0500 Subject: [PATCH] fix: reconcile combined integration test contracts --- docs/tr/AGENTS.md | 6 +++--- scripts/lib/install-lifecycle.js | 5 ++++- scripts/lib/install/apply.js | 4 ++++ tests/hooks/clv2-pymanager-launcher.test.js | 13 +++++++++---- tests/pi/agent-ir.test.js | 4 ++-- tests/pi/pi-hook-runtime.test.js | 1 + 6 files changed, 23 insertions(+), 10 deletions(-) diff --git a/docs/tr/AGENTS.md b/docs/tr/AGENTS.md index c5e1fabf4..fd6f78457 100644 --- a/docs/tr/AGENTS.md +++ b/docs/tr/AGENTS.md @@ -1,6 +1,6 @@ # ECC — Agent Talimatları -Bu, yazılım geliştirme için 71 özel agent, 315 skill, 98 command ve otomatik hook iş akışları sağlayan **üretime hazır bir AI kodlama eklentisidir**. +Bu, yazılım geliştirme için 72 özel agent, 326 skill, 98 command ve otomatik hook iş akışları sağlayan **üretime hazır bir AI kodlama eklentisidir**. **Sürüm:** 2.2.3 @@ -141,8 +141,8 @@ Başarısızlık sorunlarını giderin: test izolasyonunu kontrol edin → mockl ## Proje Yapısı ``` -agents/ — 71 özel subagent -skills/ — 315 iş akışı skillleri ve alan bilgisi +agents/ — 72 özel subagent +skills/ — 326 iş akışı skillleri ve alan bilgisi commands/ — 98 slash command hooks/ — Tetikleyici tabanlı otomasyonlar rules/ — Her zaman uyulması gereken kurallar (ortak + dile özel) diff --git a/scripts/lib/install-lifecycle.js b/scripts/lib/install-lifecycle.js index 10f266efb..7574a3a04 100644 --- a/scripts/lib/install-lifecycle.js +++ b/scripts/lib/install-lifecycle.js @@ -1566,7 +1566,10 @@ function repairLegacyOpencodeLayout(repair, build) { // Load lazily to avoid a module cycle during install-lifecycle startup. const { applyInstallPlan } = require('./install/apply'); - const appliedPlan = applyInstallPlan(canonicalPlan, { opencodeLease }); + const appliedPlan = applyInstallPlan(canonicalPlan, { + opencodeLease, + requireCompleteLegacyCleanup: true, + }); return { adapter: record.adapter, status: 'repaired', diff --git a/scripts/lib/install/apply.js b/scripts/lib/install/apply.js index 000fea0d8..4dde6c16b 100644 --- a/scripts/lib/install/apply.js +++ b/scripts/lib/install/apply.js @@ -1122,6 +1122,10 @@ function applyInstallPlanLocked(rawPlan, dependencies = {}, settingsLockHeld = f ]; } + if (dependencies.requireCompleteLegacyCleanup && opencodeMigrationWarnings.length > 0) { + throw new Error(opencodeMigrationWarnings.join(' ')); + } + if (legacyActivation) { assertOpenCodeHookDeactivationReady(legacyActivation.plan, { requireInactive: true, legacyOperations: legacyActivation.operations, diff --git a/tests/hooks/clv2-pymanager-launcher.test.js b/tests/hooks/clv2-pymanager-launcher.test.js index d48ff9a21..4fccfb3cc 100644 --- a/tests/hooks/clv2-pymanager-launcher.test.js +++ b/tests/hooks/clv2-pymanager-launcher.test.js @@ -59,7 +59,7 @@ function test(name, fn) { const DRIVER = ` conv() { case "$OSTYPE" in msys*|cygwin*) cygpath -u "$1" ;; *) printf '%s\\n' "$1" ;; esac; } tools="$(conv "$T_TOOLS")" -for t in cat dirname basename sed mkdir; do +for t in cat dirname basename sed mkdir git; do printf '#!/bin/sh\\nexec "%s" "$@"\\n' "$(command -v "$t")" > "$tools/$t" chmod +x "$tools/$t" done @@ -71,7 +71,7 @@ export CLV2_HOMUNCULUS_DIR="$(conv "$T_HOME")" export T_LOG="$(conv "$T_LOG")" if [ -n "\${T_PROJECT:-}" ]; then export CLAUDE_PROJECT_DIR="$(conv "$T_PROJECT")"; fi PATH="$new_path:$tools" -printf '%s' '{"cwd":""}' | "$BASH" "$target" post +printf '%s' "$T_INPUT" | "$BASH" "$target" post `; function makeTree({ enabled = false } = {}) { @@ -100,7 +100,7 @@ function makeTree({ enabled = false } = {}) { function writePython(dir, name, label) { fs.writeFileSync( path.join(dir, name), - `#!/bin/sh\necho "${label}|$CLV2_PYTHON_CMD\${_CLV2_HASH_INPUT:+|detect-project}" >> "$T_LOG"\n`, + `#!/bin/sh\necho "${label}|$CLV2_PYTHON_CMD\${_CLV2_HASH_INPUT:+|detect-project}" >> "$T_LOG"\ncase "$2" in *cwd*) [ -n "$T_PROJECT" ] && printf '%s\\n' "$T_PROJECT" ;; esac\n[ -n "\${_CLV2_HASH_INPUT:-}" ] && printf '0123456789ab\\n'\n`, { mode: 0o755 } ); } @@ -112,6 +112,7 @@ function run(dirs, pathDirs, env = {}, { checkStatus = true } = {}) { } baseEnv.CLAUDE_CODE_ENTRYPOINT = 'cli'; baseEnv.LOCALAPPDATA = dirs.local; + baseEnv.T_INPUT = JSON.stringify({ cwd: '' }); const merged = { ...baseEnv, ...env }; for (const [key, value] of Object.entries(merged)) { if (value === undefined) delete merged[key]; @@ -184,9 +185,13 @@ test('keeps an alias from another user\'s WindowsApps directory', () => withTree test('detect-project.sh hashes the project id with the launcher', () => withTree(dirs => { writePython(dirs.alias, 'python3', 'alias'); writePython(dirs.launcher, 'python3.exe', 'launcher'); + assert.strictEqual(spawnSync('git', ['init', '-q', dirs.project]).status, 0); // The stand-ins print nothing, so the hook stops at a later step; only the // calls made up to and inside detect-project.sh matter here. - const calls = run(dirs, [dirs.alias], { T_PROJECT: dirs.project }, { checkStatus: false }); + const calls = run(dirs, [dirs.alias], { + T_PROJECT: dirs.project, + T_INPUT: JSON.stringify({ cwd: dirs.project }), + }, { checkStatus: false }); const hashCalls = calls.filter(c => c[2] === 'detect-project'); assert.strictEqual(hashCalls.length, 1, `expected one detect-project hash call, got ${JSON.stringify(calls)}`); assert.strictEqual(hashCalls[0][0], 'launcher'); diff --git a/tests/pi/agent-ir.test.js b/tests/pi/agent-ir.test.js index c66ede9ea..8079b7c64 100644 --- a/tests/pi/agent-ir.test.js +++ b/tests/pi/agent-ir.test.js @@ -52,7 +52,7 @@ function main() { assert.strictEqual(a, b, "parseAllAgents must be deterministic") }], - ["retains current model tier distribution (61 sonnet / 6 haiku / 4 opus)", () => { + ["retains current model tier distribution (62 sonnet / 6 haiku / 4 opus)", () => { const agents = parseAllAgents() for (const ir of agents) { assert.ok(ir.model, `${ir.id}: missing model tier`) @@ -61,7 +61,7 @@ function main() { (acc, ir) => ({ ...acc, [ir.model]: (acc[ir.model] || 0) + 1 }), {} ) - assert.strictEqual(tally.sonnet, 61, "sonnet count") + assert.strictEqual(tally.sonnet, 62, "sonnet count") assert.strictEqual(tally.haiku, 6, "haiku count") assert.strictEqual(tally.opus, 4, "opus count") }], diff --git a/tests/pi/pi-hook-runtime.test.js b/tests/pi/pi-hook-runtime.test.js index 6ac4c9fcb..0ef0180fa 100644 --- a/tests/pi/pi-hook-runtime.test.js +++ b/tests/pi/pi-hook-runtime.test.js @@ -46,6 +46,7 @@ function loadAdapter(host, spawnError) { require: name => { if (name === 'node:child_process') return { execFile: recordExecFile }; if (name === './hook-runtime.js') return runtimeModule.exports; + if (name === './input-args.js') return require(path.join(extensionDir, 'input-args.js')); return require(name); } });