Compaction/Safeguard: add summary quality audit retries (#25556)

Merged via squash.

Prepared head SHA: be473efd16
Co-authored-by: rodrigouroz <384037+rodrigouroz@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
This commit is contained in:
Rodrigo Uroz
2026-03-05 18:39:25 -03:00
committed by GitHub
parent 029c473727
commit 036c329716
15 changed files with 967 additions and 65 deletions

View File

@@ -13,6 +13,10 @@ describe("config compaction settings", () => {
reserveTokensFloor: 12_345,
identifierPolicy: "custom",
identifierInstructions: "Keep ticket IDs unchanged.",
qualityGuard: {
enabled: true,
maxRetries: 2,
},
memoryFlush: {
enabled: false,
softThresholdTokens: 1234,
@@ -34,6 +38,8 @@ describe("config compaction settings", () => {
expect(cfg.agents?.defaults?.compaction?.identifierInstructions).toBe(
"Keep ticket IDs unchanged.",
);
expect(cfg.agents?.defaults?.compaction?.qualityGuard?.enabled).toBe(true);
expect(cfg.agents?.defaults?.compaction?.qualityGuard?.maxRetries).toBe(2);
expect(cfg.agents?.defaults?.compaction?.memoryFlush?.enabled).toBe(false);
expect(cfg.agents?.defaults?.compaction?.memoryFlush?.softThresholdTokens).toBe(1234);
expect(cfg.agents?.defaults?.compaction?.memoryFlush?.prompt).toBe("Write notes.");