From dd6f58d3d4e63e316eb81358ec6d5b6fdddbc64f Mon Sep 17 00:00:00 2001 From: Dante Date: Tue, 27 Oct 2026 08:34:42 +0800 Subject: [PATCH] fix(codex): recommend native cache recovery in checker --- scripts/codex/check-plugin-cache.js | 12 +++++++----- tests/scripts/codex-hooks.test.js | 6 +++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/scripts/codex/check-plugin-cache.js b/scripts/codex/check-plugin-cache.js index 6839b413c..699d1abd4 100644 --- a/scripts/codex/check-plugin-cache.js +++ b/scripts/codex/check-plugin-cache.js @@ -224,13 +224,15 @@ function checkCache(options) { if (failures > 0) { log(`${failures} cached manifest reference(s) do not resolve.`); log('codex plugin list only confirms marketplace registration; it is not proof of runtime skill loading.'); - const syncScript = path.join(REPO_ROOT, 'scripts', 'sync-ecc-to-codex.sh'); - if (fs.existsSync(syncScript)) { - log('Use the supported sync path until the cache contains the referenced files:'); - log('npm install && bash scripts/sync-ecc-to-codex.sh'); + log('Refresh the native marketplace and re-add the plugin using the same CODEX_HOME as the affected session:'); + if (options.marketplace === 'ecc' && options.plugin === 'ecc') { + log('codex plugin marketplace upgrade ecc'); + log('codex plugin add ecc@ecc'); } else { - log('Use the supported manual sync workflow from your ECC installation.'); + log('Follow the requested plugin marketplace instructions to refresh and re-add that native plugin.'); } + log('Restart Codex, confirm the active plugin root with codex plugin list --json, and re-run this checker against that root.'); + log('See .codex-plugin/README.md for native cache recovery and runtime dependency instructions.'); return 1; } diff --git a/tests/scripts/codex-hooks.test.js b/tests/scripts/codex-hooks.test.js index 85e2f31af..d09aebc85 100644 --- a/tests/scripts/codex-hooks.test.js +++ b/tests/scripts/codex-hooks.test.js @@ -660,7 +660,11 @@ if ( assert.match(result.stdout, /\[FAIL\] skills missing/); assert.match(result.stdout, /\[FAIL\] mcpServers missing/); assert.match(result.stdout, /codex plugin list only confirms marketplace registration/); - assert.match(result.stdout, /sync-ecc-to-codex\.sh/); + assert.match(result.stdout, /codex plugin marketplace upgrade ecc/); + assert.match(result.stdout, /codex plugin add ecc@ecc/); + assert.match(result.stdout, /same CODEX_HOME/); + assert.match(result.stdout, /active plugin root/); + assert.doesNotMatch(result.stdout, /npm install|sync-ecc-to-codex\.sh/); } finally { cleanup(homeDir); }