mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-10-21 14:21:48 +00:00
fix(managed-agent): refuse to acknowledge a skipped tightening change
A settings reload applies to idle sessions only. For a tightening change, a session the reload skipped still holds the old revision, so answering the exact revision would let the Bridge lift its quarantine without the change having reached that session. Leave the request unanswered instead, which keeps the channel quarantined and the failure closed. Refs #12737
This commit is contained in:
parent
a22d58f1fd
commit
3439ca9da9
1 changed files with 16 additions and 2 deletions
|
|
@ -10684,12 +10684,26 @@ class QwenAgent implements Agent {
|
|||
);
|
||||
break;
|
||||
}
|
||||
case 'settings':
|
||||
await this.extMethodInternal(
|
||||
case 'settings': {
|
||||
const reloaded = await this.extMethodInternal(
|
||||
SERVE_CONTROL_EXT_METHODS.workspaceReload,
|
||||
{ cwd: changeCwd },
|
||||
);
|
||||
// A tightening change that skipped a live session has not
|
||||
// reached it: acknowledge nothing, so the Bridge keeps the
|
||||
// channel quarantined instead of lifting the fence.
|
||||
const skipped = reloaded['sessionsSkipped'];
|
||||
if (
|
||||
params['tightening'] === true &&
|
||||
Array.isArray(skipped) &&
|
||||
skipped.length > 0
|
||||
) {
|
||||
throw new Error(
|
||||
`The settings change did not reach ${skipped.length} live session(s).`,
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'sessionWorkflow':
|
||||
await this.extMethodInternal(
|
||||
SERVE_CONTROL_EXT_METHODS.workspaceSessionWorkflow,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue