From 21944367903d1e665042a8c13dc4a8e60d67ebaf Mon Sep 17 00:00:00 2001 From: Szehon Ho Date: Fri, 10 Apr 2026 17:23:01 -0700 Subject: [PATCH 1/3] [SPARK-56449][INFRA] Skip pre-flight checks for code questions in AGENTS.md --- AGENTS.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 62732904dd3a..be7736af39c1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,9 @@ ## Pre-flight Checks -Before the first code read, edit, or test in a session, ensure a clean working environment. DO NOT skip these checks: +These checks apply to all tasks **except** answering questions about the code or its behavior. For those, skip these checks and work directly on whatever branch is currently checked out. + +Before the first edit or test in a session, ensure a clean working environment. DO NOT skip these checks: 1. Run `git remote -v` to identify the personal fork and upstream (`apache/spark`). If unclear, ask the user to configure their remotes following the standard convention (`origin` for the fork, `upstream` for `apache/spark`). 2. If the latest commit on `/master` is more than a day old (check with `git log -1 --format="%ci" /master`), run `git fetch master`. @@ -10,7 +12,7 @@ Before the first code read, edit, or test in a session, ensure a clean working e 4. Switch to the appropriate branch: - **Existing PR**: resolve the PR branch name via `gh api repos/databricks-eng/runtime/pulls/ --jq '.head.ref'`, then look for a local branch matching that name. If found, switch to it and inform the user. If not found, ask whether to fetch it or if there is a local branch under a different name. - **New edits**: ask the user to choose: create a new git worktree from `/master` and work from there (recommended), or create and switch to a new branch from `/master`. - - **Reading code or running tests**: use `/master`. + - **Running tests**: use `/master`. ## Development Notes From e261a87917d04f8fbb8d3b9d38c981c3239d2540 Mon Sep 17 00:00:00 2001 From: Szehon Ho Date: Mon, 13 Apr 2026 22:50:27 -0700 Subject: [PATCH 2/3] Address review: simplify pre-flight skip to a single line change --- AGENTS.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index be7736af39c1..fba9ebf7c33b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,9 +2,7 @@ ## Pre-flight Checks -These checks apply to all tasks **except** answering questions about the code or its behavior. For those, skip these checks and work directly on whatever branch is currently checked out. - -Before the first edit or test in a session, ensure a clean working environment. DO NOT skip these checks: +Before the first code edit or running test in a session, ensure a clean working environment. DO NOT skip these checks: 1. Run `git remote -v` to identify the personal fork and upstream (`apache/spark`). If unclear, ask the user to configure their remotes following the standard convention (`origin` for the fork, `upstream` for `apache/spark`). 2. If the latest commit on `/master` is more than a day old (check with `git log -1 --format="%ci" /master`), run `git fetch master`. From 84daa3018946118a4ee0e7129808f9c8394d89e2 Mon Sep 17 00:00:00 2001 From: Wenchen Fan Date: Tue, 14 Apr 2026 18:44:01 +0800 Subject: [PATCH 3/3] Apply suggestion from @cloud-fan --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index fba9ebf7c33b..3587c99fcf4a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,7 +8,7 @@ Before the first code edit or running test in a session, ensure a clean working 2. If the latest commit on `/master` is more than a day old (check with `git log -1 --format="%ci" /master`), run `git fetch master`. 3. If there are uncommitted changes (check with `git status`), ask the user to stash them before proceeding. 4. Switch to the appropriate branch: - - **Existing PR**: resolve the PR branch name via `gh api repos/databricks-eng/runtime/pulls/ --jq '.head.ref'`, then look for a local branch matching that name. If found, switch to it and inform the user. If not found, ask whether to fetch it or if there is a local branch under a different name. + - **Existing PR**: resolve the PR branch name via `gh api repos/apache/spark/pulls/ --jq '.head.ref'`, then look for a local branch matching that name. If found, switch to it and inform the user. If not found, ask whether to fetch it or if there is a local branch under a different name. - **New edits**: ask the user to choose: create a new git worktree from `/master` and work from there (recommended), or create and switch to a new branch from `/master`. - **Running tests**: use `/master`.