fix(context): implement loose boundary policy for gc backstop. (#26594)

This commit is contained in:
joshualitt
2026-05-08 10:36:57 -07:00
committed by GitHub
parent 12c8469b34
commit 01635ddb83
12 changed files with 594 additions and 138 deletions
@@ -60,9 +60,7 @@ describe('ContextManager Sync Pressure Barrier Tests', () => {
// Verify Episode 0 (System) was pruned, so we now start with a sentinel due to role alternation
expect(projection[0].role).toBe('user');
expect(projection[0].parts![0].text).toBe(
'[Continuing from previous AI thoughts...]',
);
expect(projection[0].parts![0].text).toContain('User turn 17');
// Filter out synthetic Yield nodes (they are model responses without actual tool/text bodies)
const contentNodes = projection.filter(