Skip to content

Commit 6d1e842

Browse files
fix(bots): revert poetry lock/pyproject churn before author/followup publish
The engineer-bot author run on issue #860 failed at "Open / update fix PR": publish's leftover safety-net found poetry.lock + pyproject.toml unstaged and not in the agent's touched_files, so it refused to open the PR — even though the agent's fix + tests were correct (494 passed). Root cause: the shared setup-poetry action runs `poetry lock` (to reconcile the lock with the internal JFrog source it injects), which REWRITES the tracked poetry.lock / pyproject.toml in the working tree. That churn is harmless for the 5 real-CI consumers of the action (they commit nothing) but poisons the two engineer-bot workflows, which publish a PR from the working tree. Fix (engineer-bot side only — leave the shared action untouched): after the Poetry setup, `git checkout -- poetry.lock pyproject.toml` to drop the churn once the venv is built, so only the agent's edits remain in the tree at publish time. Applied to both engineer-bot.yml (author) and engineer-bot-followup.yml. Signed-off-by: eric-wang-1990 <e.wang@databricks.com> Co-authored-by: Isaac
1 parent 3e29a62 commit 6d1e842

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/engineer-bot-followup.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@ jobs:
9494
with:
9595
python-version: '3.11'
9696

97+
# setup-poetry runs `poetry lock` (to reconcile the lock with the internal
98+
# JFrog source it injects), which REWRITES tracked poetry.lock / pyproject.toml
99+
# in the working tree. The venv is already built, so the tree no longer needs
100+
# that churn — revert it, else the followup's fixup commit (or its leftover
101+
# check) would sweep up these bot-untouched dirty files. Keep ONLY the
102+
# agent's edits in the tree.
103+
- name: Revert poetry lock/pyproject churn (keep only the agent's edits)
104+
run: git checkout -- poetry.lock pyproject.toml || true
105+
97106
# Shared prelude: mint the engineer-bot token (pushes fixup commits, posts
98107
# replies) + the engine-scoped token, set up Node, install the engine.
99108
- name: Bot prelude (tokens + Node + engine install)

.github/workflows/engineer-bot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@ jobs:
8181
with:
8282
python-version: '3.11'
8383

84+
# setup-poetry runs `poetry lock` (to reconcile the lock with the internal
85+
# JFrog source it injects), which REWRITES tracked poetry.lock / pyproject.toml
86+
# in the working tree. The venv is already built, so the tree no longer needs
87+
# that churn — revert it, else publish's leftover safety-net sees these
88+
# bot-untouched dirty files and refuses to open the PR (they aren't in the
89+
# agent's touched_files). Keep ONLY the agent's edits in the tree.
90+
- name: Revert poetry lock/pyproject churn (keep only the agent's edits)
91+
run: git checkout -- poetry.lock pyproject.toml || true
92+
8493
# Shared prelude: mint the engineer-bot token (pushes the fix branch,
8594
# comments) + the engine-scoped token, set up Node, install the pinned
8695
# engine (PAT-free). `token` output is used by the steps below.

0 commit comments

Comments
 (0)