Skip to content

Ignore Forge metadata in Git state checks - #282

Open
eshulman2 wants to merge 1 commit into
mainfrom
fix/ignore-forge-metadata-in-git-state
Open

Ignore Forge metadata in Git state checks#282
eshulman2 wants to merge 1 commit into
mainfrom
fix/ignore-forge-metadata-in-git-state

Conversation

@eshulman2

Copy link
Copy Markdown
Collaborator

Summary

  • exclude the internal .forge directory when detecting user-facing workspace changes
  • determine whether a commit is needed from the staged index, preventing empty host commit failures
  • add regression coverage for metadata-only and real implementation changes

Why

The task agent commits implementation changes inside the container while leaving .forge/ untracked. The host then saw .forge/ in git status, excluded it during staging, and attempted an empty commit. That failed the otherwise successful task and caused an unnecessary retry.

Validation

  • uv run ruff format src/forge/workspace/git_ops.py tests/unit/workspace/test_git_ops_commit.py
  • uv run ruff check src/forge/workspace/git_ops.py tests/unit/workspace/test_git_ops_commit.py
  • uv run pytest tests/unit/workspace/test_git_ops_commit.py tests/unit/workspace/test_git_ops_redaction.py -q (6 passed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant