Skip to content

Sanitize forked child history - #16709

Merged
aibrahim-oai merged 9 commits into
mainfrom
dev/fork-child-history-sanitization
Apr 3, 2026
Merged

aibrahim-oai merged 9 commits into
mainfrom
dev/fork-child-history-sanitization

Conversation

@aibrahim-oai

Copy link
Copy Markdown
Contributor
  • Keep only parent system/developer/user messages plus assistant final-answer messages in forked child history.
  • Strip parent tool/reasoning items and remove the unmatched synthetic spawn output.

},
assistant_message("parent final answer", Some(MessagePhase::FinalAnswer)),
];
assert_eq!(history.raw_items(), &expected_history);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: add an assertion message to emphasize what we expect (note what should be filtered)?

"queued message"
));
assert!(history_contains_text(
assert!(!history_contains_text(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, add assertion message for clarity?

@aibrahim-oai
aibrahim-oai enabled auto-merge (squash) April 3, 2026 21:08
@aibrahim-oai
aibrahim-oai merged commit 567d260 into main Apr 3, 2026
22 checks passed
@aibrahim-oai
aibrahim-oai deleted the dev/fork-child-history-sanitization branch April 3, 2026 21:13
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants