fix(native-compaction): retain image-only user content - #91557
fix(native-compaction): retain image-only user content#91557andrexibiza wants to merge 1 commit into
Conversation
andrexibiza
left a comment
There was a problem hiding this comment.
Exact-head review complete at fca470be7cf50d3ff4f6f0dc9a873f5f6b8e4609: no remaining blocker.
This head closes the residual post-#91477 non-text loss without broadening arbitrary multipart content into durable history:
_extract_item_text()remains text-only;- only the adapter-owned normalized
input_imageshape with a non-emptyimage_urlreceives attachment retention authority; - the original user message is retained verbatim and still consumes the explicit retention budget;
- empty, malformed, and unknown multipart placeholders remain non-retainable;
- the production
_chat_messages_to_responses_input()conversion path is exercised across an actual compaction checkpoint, rather than fabricating only a pruner-local shape.
The earlier unsupported file-only claim is correctly removed because the current adapter does not emit input_file.
Fresh exact-head hosted evidence is green: CI 32499632201, Docker 32499631402, and Nix 32499631392. The PR is open, non-draft, and mergeable against current main. No source, review, exact-head CI, or mergeability blocker remains.
8223fda to
4efadbb
Compare
Preserve valid normalized input_image user messages across native-compaction checkpoints at bounded one-token retention cost. Keep text extraction text-only, reject malformed or unknown multipart placeholders, and prove the production adapter path without claiming unsupported input_file behavior. Republish the identical source tree after an unrelated nondeterministic focus-redraw test failure; this commit contains no source delta from the previously verified object. Refs NousResearch#90976 and NousResearch#91477.
4efadbb to
039e269
Compare
Final statusThis is the authoritative current-state receipt after the branch cleanup.
Exact-object verification
The repair is deliberately narrow: valid normalized The final object republishes the identical source tree after an unrelated timing failure on the superseded object. No source delta was introduced during the history cleanup. No source, exact-head CI, base-alignment, or mergeability blocker remains. The remaining repository transition is upstream acceptance and merge. |
Good catch on what looks like a comment-vs-code regression: the old inline comment promised "Image-only user messages … Don't skip them just because text is falsy", but the guard above it ( Points:
|
Problem
#91477 repaired native-compaction summary provenance, but pre-checkpoint pruning still dropped an image-only user message. The normalized Responses item has a valid
input_imagepart and no measurable text, so the text-only extraction path returnedNoneand pruning discarded the message before retention accounting.Repair
_extract_item_text()text-only.input_imageshape with a non-empty stringimage_url.input_file.Proof
The regression suite proves text extraction remains text-only, valid image-only user content survives a replayed compaction checkpoint verbatim, zero budget still drops it, malformed or unknown multipart content is not promoted, and the production
_chat_messages_to_responses_input()path carries the image-only message across the checkpoint.Exact green object
The branch contains one commit only. Superseded red objects are no longer part of the PR history.
039e26994fa5b7f37a387721055519b531c32f5b2584b7c4eca82ada05f16eba08936d157b48332924c2bc4e5cd456799729b51b20a1c4b2295ad764The final object republishes the identical source tree after an unrelated focus-redraw timing failure on the superseded object; there is no source delta between the two objects.
Interlocks
#90976 → merged #91477 → #91557. This is a distinct post-merge regression repair, not a reopening or repeat review of #90975.