From 61a639e867833721038d13823982dc3086e56870 Mon Sep 17 00:00:00 2001 From: mcp-devbox Date: Thu, 27 Aug 2026 02:06:08 +0000 Subject: [PATCH 1/2] ci(validation): trigger subagent fork lifecycle probe --- validation-subagent-fork.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 validation-subagent-fork.txt diff --git a/validation-subagent-fork.txt b/validation-subagent-fork.txt new file mode 100644 index 000000000000..5ca13fdf8091 --- /dev/null +++ b/validation-subagent-fork.txt @@ -0,0 +1 @@ +trigger forked SubagentStart lifecycle validation From 6d3119457cf26b48799b4d854d5b74010c3d24b7 Mon Sep 17 00:00:00 2001 From: mcp-devbox Date: Thu, 27 Aug 2026 02:08:02 +0000 Subject: [PATCH 2/2] ci(validation): scope subagent fork test mutation --- .../validate-39951-subagent-fork.yml | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/validate-39951-subagent-fork.yml b/.github/workflows/validate-39951-subagent-fork.yml index d6028adebd32..16cff47930c4 100644 --- a/.github/workflows/validate-39951-subagent-fork.yml +++ b/.github/workflows/validate-39951-subagent-fork.yml @@ -51,9 +51,14 @@ jobs: "agent_type": "worker", "fork_context": true, }))?;''' - if text.count(old) != 1: - raise SystemExit(f"expected one SubagentStart test anchor, found {text.count(old)}") - path.write_text(text.replace(old, new, 1)) + start = text.index("async fn subagent_start_replaces_session_start_and_injects_context") + end = text.index("\n#[tokio::test", start + 1) + section = text[start:end] + if section.count(old) != 1: + raise SystemExit( + f"expected one SubagentStart test anchor in target function, found {section.count(old)}" + ) + path.write_text(text[:start] + section.replace(old, new, 1) + text[end:]) PY cargo fmt --manifest-path codex-rs/Cargo.toml --all git diff --check @@ -96,9 +101,14 @@ jobs: "agent_type": "worker", "fork_context": true, }))?;''' - if text.count(old) != 1: - raise SystemExit(f"expected one SubagentStart test anchor, found {text.count(old)}") - path.write_text(text.replace(old, new, 1)) + start = text.index("async fn subagent_start_replaces_session_start_and_injects_context") + end = text.index("\n#[tokio::test", start + 1) + section = text[start:end] + if section.count(old) != 1: + raise SystemExit( + f"expected one SubagentStart test anchor in target function, found {section.count(old)}" + ) + path.write_text(text[:start] + section.replace(old, new, 1) + text[end:]) PY cargo fmt --manifest-path codex-rs/Cargo.toml --all git diff --check