Skip to content

agent: do not point at a peer branch when shared git is off - #87

Open
hhh2210 wants to merge 2 commits into
cooperbench:mainfrom
hhh2210:fix/nogit-peer-visibility
Open

hhh2210 wants to merge 2 commits into
cooperbench:mainfrom
hhh2210:fix/nogit-peer-visibility

Conversation

@hhh2210

@hhh2210 hhh2210 commented Sep 22, 2026 •

Copy link
Copy Markdown

When shared Git is disabled, each agent's origin is a private submission remote. The coop prompt and peer-exit notice previously told agents to fetch origin/<peer> anyway. A messaging-on, shared-Git-off Click run followed that guidance and failed with unknown revision.

This change names a peer branch only when shared Git is enabled and the peer published it. Prompts distinguish the local graded submission from a branch the colleague can read. All four Git × messaging configurations retain git push / gh pr create submission guidance while recommending only the enabled communication channels. The gh shim's help and conflict warning no longer unconditionally recommend messaging.

The existing peer-exit fixtures now explicitly model a shared remote, preserving their published/unpublished recovery-path coverage. New regressions cover prompt rendering for all four configurations, no messaging-off peer notices, and the private-remote pointer. Existing real-Git shim tests also verify the revised guidance. The task, grading, and messaging protocol are unchanged.

Validation on macOS / Python 3.13.13:

  • Full pytest tests/ -q: 457 passed, 63 skipped. Redis-dependent unit tests used a temporary loopback fakeredis.TcpFakeServer via TEST_REDIS_URL; this validates the connector path against fake Redis, not a live Redis service. Modal/Docker/GCP integration tests remain skipped by default.
  • Tests used isolated Git global/system configuration to avoid the workstation's automatic tag signing. The real-Git shim suite passed all 27 tests.
  • ruff check src/cooperbench/, ruff format --check src/cooperbench/, and mypy src/cooperbench/: pass.
  • Focused lint/format checks for the visibility and peer-exit tests, sh -n for the shim, and git diff --check: pass.

No new live model rollout was run for this prompt correction. Hosted CI has not reported checks for this PR yet.

Made with Cursor

A local pull request only records the graded submission. The prompt and the exit pointer were telling the other agent to fetch origin/<peer>, which does not exist on their remote.

Co-authored-by: Cursor <[email protected]>
Copilot AI lite review requested due to automatic review settings September 22, 2026 04:57

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 review overview

🟡 Changes recommended

Existing peer-exit tests appear incompatible with the new default behavior and must be updated before merging.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Updates collaboration prompts and peer-work pointers to avoid inaccessible peer branches when shared Git is disabled.

Changes:

  • Gates shared-branch guidance on git_enabled.
  • Clarifies local pull-request submission behavior.
  • Adds peer-visibility regression tests.
File Summary
tests/​agents/​mini_swe_agent_v2/​test_peer_visibility.py Adds prompt and peer-pointer visibility tests.
src/​cooperbench/​agents/​mini_swe_agent_v2/​config/​coop.yaml Makes collaboration guidance conditional on shared Git.
src/​cooperbench/​agents/​mini_swe_agent_v2/​agents/​default.py Avoids suggesting inaccessible peer branches. Existing peer-exit fixtures require updates for the changed default behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/cooperbench/agents/mini_swe_agent_v2/agents/default.py

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 review overview

🟢 Approval recommended

The channel-aware guidance is consistent with runtime behavior and has focused regression coverage.

Review effort: Balanced
Findings: None

Resolved since last review (1)

This branch has not been deployed

No deployments
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.

2 participants