feat(FN-2617): merge fusion/fn-2617 (auto-resolved)

- test(FN-2617): stabilize workflow remediation timeout under full suite
- test(FN-2617): complete Step 5 — add openclaw runtime resolution coverage
- feat(FN-2617): complete Step 4 — route step sessions through runtime resolution
- fix(FN-2617): thread runtimeHint through merger rebase push flow
- feat(FN-2617): complete Step 3 — wire runtimeHint across engine subsystems
- feat(FN-2617): complete Step 2 — thread runtimeHint in executor paths
- feat(FN-2617): complete Step 1 — add runtimeHint extraction helper
This commit is contained in:
Fusion
2026-04-26 16:14:35 -07:00
committed by gsxdsm
parent 9c7c8ee586
commit c4abf39774
15 changed files with 246 additions and 23 deletions

View File

@@ -18,7 +18,7 @@ import type {
AgentSession,
} from "@mariozechner/pi-coding-agent";
import { describeModel, promptWithFallback } from "./pi.js";
import { createResolvedAgentSession } from "./agent-session-helpers.js";
import { createResolvedAgentSession, extractRuntimeHint } from "./agent-session-helpers.js";
import { reviewStep, type ReviewVerdict } from "./reviewer.js";
import { buildSessionSkillContext } from "./session-skill-context.js";
import { PRIORITY_SPECIFY, type AgentSemaphore } from "./concurrency.js";
@@ -858,12 +858,18 @@ export class TriageProcessor {
),
];
const assignedAgent = task.assignedAgentId && this.options.agentStore
? await this.options.agentStore.getAgent(task.assignedAgentId).catch(() => null)
: null;
let triageRuntimeHint = extractRuntimeHint(assignedAgent?.runtimeConfig);
// Resolve per-agent custom instructions for the triage role
let triageInstructions = "";
if (this.options.agentStore) {
try {
const agents = await this.options.agentStore.listAgents({ role: "triage" });
for (const agent of agents) {
triageRuntimeHint ??= extractRuntimeHint(agent.runtimeConfig);
if (agent.instructionsText || agent.instructionsPath) {
triageInstructions = await resolveAgentInstructions(agent, this.rootDir);
break;
@@ -891,6 +897,7 @@ export class TriageProcessor {
let { session } = await createResolvedAgentSession({
sessionPurpose: "triage",
runtimeHint: triageRuntimeHint,
pluginRunner: this.options.pluginRunner,
cwd: this.rootDir,
systemPrompt: triageSystemPrompt,
@@ -1111,6 +1118,7 @@ export class TriageProcessor {
const fallbackResult = await createResolvedAgentSession({
sessionPurpose: "triage",
runtimeHint: triageRuntimeHint,
pluginRunner: this.options.pluginRunner,
cwd: this.rootDir,
systemPrompt: triageSystemPrompt,