From 63c198b34395c5f6c4c8925cdde3b017c4ebea78 Mon Sep 17 00:00:00 2001 From: Behnam Ousat Date: Fri, 22 May 2026 12:56:28 -0700 Subject: [PATCH 1/5] FIX diff paths in helpdesk bot example patch --- helpdesk-bot/mitigation.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helpdesk-bot/mitigation.patch b/helpdesk-bot/mitigation.patch index 448763e..58ff274 100644 --- a/helpdesk-bot/mitigation.patch +++ b/helpdesk-bot/mitigation.patch @@ -29,10 +29,10 @@ The patch deliberately does NOT change `approval_mode`. Flipping it to Apply with `git apply mitigation.patch` from inside helpdesk-bot/. Revert with `git apply -R` or `git checkout -- helpdesk_bot/agent.py`. --- -diff --git a/helpdesk_bot/agent.py b/helpdesk_bot/agent.py +diff --git a/helpdesk-bot/helpdesk_bot/agent.py b/helpdesk-bot/helpdesk_bot/agent.py index 21f1b4e..ae6d45e 100644 ---- a/helpdesk_bot/agent.py -+++ b/helpdesk_bot/agent.py +--- a/helpdesk-bot/helpdesk_bot/agent.py ++++ b/helpdesk-bot/helpdesk_bot/agent.py @@ -38,20 +38,32 @@ from agent_framework import Agent, tool from agent_framework.openai import OpenAIChatClient from pydantic import Field From 0d8a4a32e1bd9a4771e84532df6c7879cc8dd087 Mon Sep 17 00:00:00 2001 From: Behnam Ousat Date: Fri, 22 May 2026 15:43:18 -0700 Subject: [PATCH 2/5] fix test --- tests/helpdesk/test_patch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/helpdesk/test_patch.py b/tests/helpdesk/test_patch.py index 5ea2fb5..972643c 100644 --- a/tests/helpdesk/test_patch.py +++ b/tests/helpdesk/test_patch.py @@ -34,7 +34,7 @@ def test_applies_and_reverses_cleanly(self, tmp_path: Path) -> None: pytest.skip("git not on PATH") work = tmp_path / "demo" - pkg_dir = work / "helpdesk_bot" + pkg_dir = work / "helpdesk-bot" / "helpdesk_bot" pkg_dir.mkdir(parents=True) shutil.copy( HELPDESK_BOT_DIR / "helpdesk_bot" / "agent.py", @@ -56,7 +56,8 @@ def git(*args: str) -> subprocess.CompletedProcess[str]: git("init", "-q", "--initial-branch=main") git("config", "user.email", "smoke@local") git("config", "user.name", "smoke") - git("add", "helpdesk_bot/agent.py") + git("config", "core.autocrlf", "false") + git("add", "helpdesk-bot/helpdesk_bot/agent.py") git("commit", "-qm", "baseline") # Apply. Must succeed, must produce valid Python. From 2bacd1048f71b48f5c97d5493039470dda46fc78 Mon Sep 17 00:00:00 2001 From: Behnam Ousat Date: Fri, 22 May 2026 15:51:10 -0700 Subject: [PATCH 3/5] revert --- tests/helpdesk/test_patch.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/helpdesk/test_patch.py b/tests/helpdesk/test_patch.py index 972643c..5ea2fb5 100644 --- a/tests/helpdesk/test_patch.py +++ b/tests/helpdesk/test_patch.py @@ -34,7 +34,7 @@ def test_applies_and_reverses_cleanly(self, tmp_path: Path) -> None: pytest.skip("git not on PATH") work = tmp_path / "demo" - pkg_dir = work / "helpdesk-bot" / "helpdesk_bot" + pkg_dir = work / "helpdesk_bot" pkg_dir.mkdir(parents=True) shutil.copy( HELPDESK_BOT_DIR / "helpdesk_bot" / "agent.py", @@ -56,8 +56,7 @@ def git(*args: str) -> subprocess.CompletedProcess[str]: git("init", "-q", "--initial-branch=main") git("config", "user.email", "smoke@local") git("config", "user.name", "smoke") - git("config", "core.autocrlf", "false") - git("add", "helpdesk-bot/helpdesk_bot/agent.py") + git("add", "helpdesk_bot/agent.py") git("commit", "-qm", "baseline") # Apply. Must succeed, must produce valid Python. From f6ad458edeb87d7a3721bcd440cd949863706fb7 Mon Sep 17 00:00:00 2001 From: Behnam Ousat Date: Fri, 22 May 2026 15:51:28 -0700 Subject: [PATCH 4/5] revert --- helpdesk-bot/mitigation.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helpdesk-bot/mitigation.patch b/helpdesk-bot/mitigation.patch index 58ff274..448763e 100644 --- a/helpdesk-bot/mitigation.patch +++ b/helpdesk-bot/mitigation.patch @@ -29,10 +29,10 @@ The patch deliberately does NOT change `approval_mode`. Flipping it to Apply with `git apply mitigation.patch` from inside helpdesk-bot/. Revert with `git apply -R` or `git checkout -- helpdesk_bot/agent.py`. --- -diff --git a/helpdesk-bot/helpdesk_bot/agent.py b/helpdesk-bot/helpdesk_bot/agent.py +diff --git a/helpdesk_bot/agent.py b/helpdesk_bot/agent.py index 21f1b4e..ae6d45e 100644 ---- a/helpdesk-bot/helpdesk_bot/agent.py -+++ b/helpdesk-bot/helpdesk_bot/agent.py +--- a/helpdesk_bot/agent.py ++++ b/helpdesk_bot/agent.py @@ -38,20 +38,32 @@ from agent_framework import Agent, tool from agent_framework.openai import OpenAIChatClient from pydantic import Field From 3f073d45ece13df462a54596787596603f340736 Mon Sep 17 00:00:00 2001 From: Behnam Ousat Date: Fri, 22 May 2026 15:52:41 -0700 Subject: [PATCH 5/5] just update readme --- helpdesk-bot/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpdesk-bot/README.md b/helpdesk-bot/README.md index b0b8464..54871cc 100644 --- a/helpdesk-bot/README.md +++ b/helpdesk-bot/README.md @@ -148,7 +148,7 @@ vary run to run; that's exactly why we use `trial(n=20)`. ## 🛠️ Step 2: Apply the fix ```bash -git apply mitigation.patch +git apply mitigation.patch --directory=helpdesk-bot ``` The patch makes two changes to