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:
Vendored
+11
@@ -5,6 +5,14 @@ export interface JobBuildInput {
|
||||
ctx: AdapterExecutionContext;
|
||||
selfPod: SelfPodInfo;
|
||||
}
|
||||
/** When the prompt exceeds the env-var size limit, the manifest uses a
|
||||
* Secret-backed volume instead of the init container's PROMPT_CONTENT env.
|
||||
* The caller must create this Secret before the Job and clean it up after. */
|
||||
export interface PromptSecret {
|
||||
name: string;
|
||||
namespace: string;
|
||||
data: Record<string, string>;
|
||||
}
|
||||
export interface JobBuildResult {
|
||||
job: k8s.V1Job;
|
||||
jobName: string;
|
||||
@@ -12,6 +20,9 @@ export interface JobBuildResult {
|
||||
prompt: string;
|
||||
claudeArgs: string[];
|
||||
promptMetrics: Record<string, number>;
|
||||
/** Non-null when the prompt is too large for an env var and must be
|
||||
* staged as a K8s Secret before creating the Job. */
|
||||
promptSecret: PromptSecret | null;
|
||||
}
|
||||
export declare function buildJobManifest(input: JobBuildInput): JobBuildResult;
|
||||
//# sourceMappingURL=job-manifest.d.ts.map
|
||||
Reference in New Issue
Block a user