diff --git a/CHANGELOG.md b/CHANGELOG.md index eb7d567..bd81abc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.7.5 - 2026-10-06 + +- Harden the `test-pi-local.mjs` temp-home cleanup against transient `ENOTEMPTY` when RPC children flush session files while exiting: poll with fresh removal attempts instead of relying on `maxRetries`, whose behavior on `ENOTEMPTY` varies across Node versions. Test-only change; the 0.7.4 release run failed on this cleanup after all tests had passed. + ## 0.7.4 - 2026-10-05 - Use the Provider API's OpenAI Responses wire (`/provider/v1/responses`) for models whose `/provider/v1/models` entry advertises `/responses`, keeping OpenAI Chat Completions for chat-only models and Anthropic Messages for Claude. The wire is resolved per model from `supported_endpoints`, falling back to Chat Completions when the catalog omits the field. This also enables prompt caching (`prompt_cache_key` is forwarded on `/responses` but ignored on `/chat/completions`): repeated prefixes bill at cache-read instead of full input price ([#132](https://github.com/patlux/pi-commandcode-provider/issues/132), [#133](https://github.com/patlux/pi-commandcode-provider/pull/133)). diff --git a/package-lock.json b/package-lock.json index 2a80cbd..846dcef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pi-commandcode-provider", - "version": "0.7.4", + "version": "0.7.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pi-commandcode-provider", - "version": "0.7.4", + "version": "0.7.5", "license": "MIT", "devDependencies": { "@types/node": "25.6.0", diff --git a/package.json b/package.json index f99a4b2..7aa00cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pi-commandcode-provider", - "version": "0.7.4", + "version": "0.7.5", "description": "pi custom provider for Command Code API (commandcode.ai)", "type": "module", "keywords": [ diff --git a/tests/test-pi-local.mjs b/tests/test-pi-local.mjs index ae95d48..a7096eb 100644 --- a/tests/test-pi-local.mjs +++ b/tests/test-pi-local.mjs @@ -1200,7 +1200,20 @@ try { console.log("[pi-local] PASS") } finally { await new Promise((resolve) => server.close(resolve)) - // RPC children can still flush session files while exiting after SIGTERM. - // Retry transient ENOTEMPTY, but keep a persistent cleanup failure fatal. - rmSync(tempHome, { recursive: true, force: true, maxRetries: 5, retryDelay: 100 }) + // RPC children can still flush session files while exiting after SIGTERM, + // so a single rmSync can hit transient ENOTEMPTY even with maxRetries + // (retry behavior on ENOTEMPTY varies across Node versions). Poll with + // fresh attempts instead, but keep a persistent cleanup failure fatal. + let lastCleanupError + for (let attempt = 0; attempt < 30; attempt += 1) { + try { + rmSync(tempHome, { recursive: true, force: true }) + lastCleanupError = undefined + break + } catch (error) { + lastCleanupError = error + await new Promise((resolve) => setTimeout(resolve, 500)) + } + } + if (lastCleanupError) throw lastCleanupError }