Skip to content

test(coding-agent): add issue #900 context eligibility regression - #963

Open
Mustaqeem66 wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
Mustaqeem66:fix/900-context-eligibility-bounded-compaction
Open

test(coding-agent): add issue #900 context eligibility regression#963
Mustaqeem66 wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
Mustaqeem66:fix/900-context-eligibility-bounded-compaction

Conversation

@Mustaqeem66

@Mustaqeem66 Mustaqeem66 commented Aug 8, 2026

Copy link
Copy Markdown

Failed assistant retries and compaction_outcome diagnostics must remain durable in session entries while being excluded from both the provider context and the compaction input.

Note

Add regression test for issue #900 context eligibility in compaction recovery

Adds a vitest regression suite in 900-compaction-recovery.test.ts to verify that failed assistant messages and compaction outcome messages are excluded from model context and compaction input while remaining in durable history.

  • Introduces a failedAssistant helper that builds a consistent AssistantMessage with stopReason: 'error' and errorMessage: 'context_length_exceeded'.
  • The test builds a conversation with an old user message, a failed assistant message, a compaction outcome message, and a recent user message, then asserts convertToLlm returns only the two user messages.
  • Verifies estimateRawContextTokens excludes the failed/outcome messages and that prepareCompaction schedules only the old user message for summarization with an empty turnPrefixMessages.

Macroscope summarized 3515afb.

…ty regression

Failed assistant retries and compaction_outcome diagnostics must remain
durable in session entries while being excluded from both the provider
context and the compaction input.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant