fix: skills not bundled and resumeLastSession ignored (FAR-56, FAR-57)

Two bugs prevented skill content from reaching K8s Job prompts, and
resumeLastSession: false was silently ignored.

Skills fix (execute.ts, FAR-57):
- Add /paperclip/.claude/skills as additional candidate to
  readPaperclipRuntimeSkillEntries — the relative candidates in
  adapter-utils don't resolve to the PVC-mounted skills home
- Read entry.source/SKILL.md instead of entry.source (which is a
  directory path); fall back to source directly for file-based entries
- Mock readPaperclipRuntimeSkillEntries in execute.test.ts to prevent
  real SKILL.md reads from delaying fake-timer registration

Session fix (job-manifest.ts, FAR-56):
- Gate --session flag on asBoolean(config.resumeLastSession, true)
  so setting resumeLastSession: false actually stops session resumption
- Default true preserves existing behaviour for agents without config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-25 10:11:47 +00:00
parent 0e94e84e2c
commit 2bd8107f1d
4 changed files with 24 additions and 4 deletions
+3 -1
View File
@@ -286,7 +286,9 @@ export function buildJobManifest(input: JobBuildInput): JobBuildResult {
// Build opencode CLI args
const opencodeArgs = ["run", "--format", "json"];
if (runtimeSessionId) opencodeArgs.push("--session", runtimeSessionId);
// resumeLastSession defaults to true (preserve existing behaviour); set to false to start fresh.
const resumeLastSession = asBoolean(config.resumeLastSession, true);
if (runtimeSessionId && resumeLastSession) opencodeArgs.push("--session", runtimeSessionId);
if (model) opencodeArgs.push("--model", model);
if (variant) opencodeArgs.push("--variant", variant);
if (extraArgs.length > 0) opencodeArgs.push(...extraArgs);