Skip to content

fix(bots): revert poetry lock/pyproject churn before engineer-bot publish#866

Merged
eric-wang-1990 merged 2 commits into
mainfrom
fix/engineer-bot-revert-poetry-churn
Jul 17, 2026
Merged

fix(bots): revert poetry lock/pyproject churn before engineer-bot publish#866
eric-wang-1990 merged 2 commits into
mainfrom
fix/engineer-bot-revert-poetry-churn

Conversation

@eric-wang-1990

Copy link
Copy Markdown
Contributor

Problem

The engineer-bot author run on issue #860 (failed run) succeeded at authoring the fix (correct maxmin change in retry.py + tests, 494 passed) but failed at "Open / update fix PR":

##[error]Unstaged paths remain after explicit staging. These were written by the
agent but not tracked in touched_files ...

Root cause

The shared setup-poetry action runs poetry lock (to reconcile the lock with the internal JFrog source it injects for the egress-blocked runner), which rewrites the tracked poetry.lock + pyproject.toml in the working tree. At publish time the tree therefore has 4 dirty paths: the agent's 2 (retry.py, test_retry.py) plus poetry.lock + pyproject.toml. Publish stages only the agent's touched_files, then its leftover safety-net sees the two poetry files still dirty (not in touched_files) and correctly refuses.

This is harmless for the 5 real-CI consumers of setup-poetry (they commit nothing) but poisons the two engineer-bot workflows, which publish a PR from the working tree. It affects every engineer-bot run on this repo, so the bot cannot open a PR until fixed.

Fix

Engineer-bot side only (leave the shared action untouched so real CI is unaffected): after the Poetry setup, git checkout -- poetry.lock pyproject.toml to drop the churn once the venv is built. Only the agent's edits remain in the tree at publish time. Applied to both engineer-bot.yml (author) and engineer-bot-followup.yml.

Testing

Both workflow YAMLs parse; actionlint clean. Will re-trigger the engineer-bot on #860 once this lands to confirm the full author→publish→PR path.

This pull request and its description were written by Isaac.

…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
Copilot AI review requested due to automatic review settings July 17, 2026 00:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@peco-review-bot peco-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: 1 Low

Looks good — a clean, minimal CI fix. The revert step is correctly ordered (after setup-poetry builds the venv, before the agent's edits) and applied consistently to both engineer-bot workflows. One Low note about || true masking a failed revert.

Comment thread .github/workflows/engineer-bot.yml
@eric-wang-1990 eric-wang-1990 added the engineer-bot Maintainer-applied gate: triggers engineer-bot (bug-fix on issue / take-over on PR). label Jul 17, 2026
Addresses:
  - #3599651153 at .github/workflows/engineer-bot.yml:89

Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>

@peco-review-bot peco-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No issues identified by the review bot.

@eric-wang-1990
eric-wang-1990 added this pull request to the merge queue Jul 17, 2026
Merged via the queue into main with commit e23254d Jul 17, 2026
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engineer-bot Maintainer-applied gate: triggers engineer-bot (bug-fix on issue / take-over on PR).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants