fix: replace pid:-1 sentinel with process.pid to prevent false process_lost

The adapter was calling onSpawn({ pid: -1 }) as a sentinel value for
K8s Jobs (which run out-of-process), then the server's orphan reaper
was checking isProcessAlive(-1) which always returns false, causing
legitimate runs to be reaped as 'process_lost'.

Using process.pid (the Paperclip server's own PID) is always alive
while the adapter runs in-process, preventing false reaping.

Fixes FAR-116.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Iceman
2026-04-21 18:09:41 +00:00
parent 31328dd85b
commit 5926b302e5
20 changed files with 400 additions and 94 deletions
+4 -4
View File
@@ -1,12 +1,12 @@
{
"name": "@farhoodliquor/paperclip-adapter-claude-k8s",
"version": "0.1.25",
"name": "paperclip-adapter-claude-k8s",
"version": "0.1.26",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@farhoodliquor/paperclip-adapter-claude-k8s",
"version": "0.1.25",
"name": "paperclip-adapter-claude-k8s",
"version": "0.1.26",
"license": "MIT",
"dependencies": {
"@kubernetes/client-node": "^1.0.0",