feat(orchestration-v2): add merge-back replay coverage
Record provider fixtures for continued forks and sibling merge-backs, exercise context survival end to end, and stop completed run listeners from consuming later provider events. Co-authored-by: codex <[email protected]>
This commit is contained in:
1 parent
86e3e75e5a
commit
d5f86541d3
24 files changed
+2600
-88
No files matched your search
@@ -163,7 +163,23 @@ function stableStringify(value: unknown): string {
|
||||
return JSON.stringify(value);
|
||||
}
|
||||
|
||||
function normalizeContextHandoffText(value: string): string {
|
||||
if (!value.startsWith("Context handoff (")) {
|
||||
return value;
|
||||
}
|
||||
const userMessageMarker = "\n\nUser message:\n";
|
||||
const userMessageIndex = value.indexOf(userMessageMarker);
|
||||
const headerEndIndex = value.indexOf(":\n");
|
||||
if (headerEndIndex === -1 || userMessageIndex === -1 || headerEndIndex >= userMessageIndex) {
|
||||
return value;
|
||||
}
|
||||
return `${value.slice(0, headerEndIndex + 2)}<dynamic-summary>${value.slice(userMessageIndex)}`;
|
||||
}
|
||||
|
||||
function normalizeReplayFrame(value: unknown): unknown {
|
||||
if (typeof value === "string") {
|
||||
return normalizeContextHandoffText(value);
|
||||
}
|
||||
if (typeof value !== "object" || value === null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user