mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-10-22 06:49:52 +00:00
style(serve): prettier-normalize the merged wake surfaces
This commit is contained in:
parent
35cd29e942
commit
786c319111
3 changed files with 9 additions and 5 deletions
|
|
@ -3154,8 +3154,11 @@ export function registerHostedHarnessSessionRoutes(
|
|||
}
|
||||
if (
|
||||
turn.source === AUTOMATION_INPUT_SOURCE &&
|
||||
outcome === 'settled'
|
||||
(outcome === 'settled' || outcome === 'settled_incomplete')
|
||||
) {
|
||||
// Both burned the input: the run settles from the turn's
|
||||
// own committed result (completed or errored), never from
|
||||
// a re-run of it.
|
||||
await settleAutomation(turn.turnId);
|
||||
}
|
||||
return outcome;
|
||||
|
|
@ -5774,7 +5777,7 @@ export function registerHostedHarnessSessionRoutes(
|
|||
// pending one settles cancelled here, model-free, before the log
|
||||
// closes; a run whose input settled that way ends cancelled with an
|
||||
// execution proven not to have started.
|
||||
if (session.monitors || session.automations) {
|
||||
if (session.monitors || session.childAgents || session.automations) {
|
||||
await settlePendingMonitorInputs({
|
||||
authority: session.managed.authority,
|
||||
sink: session.managed.sink,
|
||||
|
|
@ -5782,6 +5785,7 @@ export function registerHostedHarnessSessionRoutes(
|
|||
cwd: session.cwd,
|
||||
sources: [
|
||||
...(session.monitors ? ['monitor'] : []),
|
||||
...(session.childAgents ? ['child_agent'] : []),
|
||||
...(session.automations ? [AUTOMATION_INPUT_SOURCE] : []),
|
||||
],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ describe('withChildAgentConsumption', () => {
|
|||
}),
|
||||
session,
|
||||
);
|
||||
await expect(turn(TURN)).resolves.toBe('settled');
|
||||
await expect(turn(TURN)).resolves.toBe('recovery');
|
||||
expect(session.blocked).toBe(true);
|
||||
expect(agents.markConsumed).not.toHaveBeenCalled();
|
||||
});
|
||||
|
|
@ -125,7 +125,7 @@ describe('withChildAgentConsumption', () => {
|
|||
}),
|
||||
session,
|
||||
);
|
||||
await expect(turn(TURN)).resolves.toBe('settled');
|
||||
await expect(turn(TURN)).resolves.toBe('recovery');
|
||||
expect(session.blocked).toBe(true);
|
||||
expect(agents.markConsumed).not.toHaveBeenCalled();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ export async function settlePendingMonitorInputs(params: {
|
|||
/** The notification sources to settle; H6 adds `automation` to `monitor`. */
|
||||
readonly sources?: readonly string[];
|
||||
}): Promise<number> {
|
||||
const sources = params.sources ?? ['monitor'];
|
||||
const sources = params.sources ?? ['monitor', 'child_agent'];
|
||||
// The whole committed prefix, not a bounded page: a notification input
|
||||
// lands late in the log, and `readEvents()` alone would stop at the
|
||||
// default page and leave the Session's owed inputs unsettled — which is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue