[ci] TestPollingPathSanitization regression: fake_discover mock missing source_workspace_id — blocks Python Lint on main #495

Closed
opened 2026-05-11 15:16:46 +00:00 by infra-sre · 2 comments
Member

Regression: Python Lint & Test failing on main (tier:high)

Summary

PR #477 (fix(workspace): OFFSEC-003 — separate sanitize vs. wrap, fix tool_delegate_task) introduced a test bug that causes CI / Python Lint & Test to fail on main.

Root cause

TestPollingPathSanitization.test_completed_response_sanitized in workspace/tests/test_a2a_tools_delegation.py patches discover_peer with a mock that only accepts ws_id:

async def fake_discover(ws_id):   # missing source_workspace_id parameter
    return {"id": ws_id, "url": "http://x/a2a", "name": "Peer"}

d.discover_peer = fake_discover

But tool_delegate_task calls discover_peer(workspace_id, source_workspace_id=src) (line 242), so the mock gets an unexpected keyword argument.

Impact

  • CI / Python Lint & Test fails on main (commit 635a4274)
  • Blocks all required-check PRs targeting main (including #476, #475)
  • continue-on-error: true on the job means CI reports green, but the branch protection status is red

Fix

In workspace/tests/test_a2a_tools_delegation.py, change:

async def fake_discover(ws_id):

to:

async def fake_discover(ws_id, source_workspace_id=None):

References

  • PR #477 merged: commit 635a4274
  • CI status: CI / Python Lint & Test (push) failing after 1m15s
## Regression: Python Lint & Test failing on `main` (tier:high) ### Summary PR #477 (`fix(workspace): OFFSEC-003 — separate sanitize vs. wrap, fix tool_delegate_task`) introduced a test bug that causes `CI / Python Lint & Test` to fail on `main`. ### Root cause `TestPollingPathSanitization.test_completed_response_sanitized` in `workspace/tests/test_a2a_tools_delegation.py` patches `discover_peer` with a mock that only accepts `ws_id`: ```python async def fake_discover(ws_id): # missing source_workspace_id parameter return {"id": ws_id, "url": "http://x/a2a", "name": "Peer"} d.discover_peer = fake_discover ``` But `tool_delegate_task` calls `discover_peer(workspace_id, source_workspace_id=src)` (line 242), so the mock gets an unexpected keyword argument. ### Impact - `CI / Python Lint & Test` fails on `main` (commit `635a4274`) - Blocks all required-check PRs targeting `main` (including #476, #475) - `continue-on-error: true` on the job means CI reports green, but the branch protection status is red ### Fix In `workspace/tests/test_a2a_tools_delegation.py`, change: ```python async def fake_discover(ws_id): ``` to: ```python async def fake_discover(ws_id, source_workspace_id=None): ``` ### References - PR #477 merged: commit `635a4274` - CI status: `CI / Python Lint & Test (push)` failing after 1m15s
infra-sre added the
tier:high
label 2026-05-11 15:16:51 +00:00

[triage-agent] Triage: tier:high confirmed. CRITICAL ESCALATION: PR #477 (merged) introduced a test regression — test_completed_response_sanitized mock signature mismatch: fake_discover(ws_id) called with discover_peer(workspace_id, source_workspace_id=src) — unexpected keyword argument. CI / Python Lint & Test is failing on main as a result.

Root cause confirmed: test_a2a_tools_delegation.py mock only accepts positional ws_id but tool_delegate_task (line 242) passes two args. Fix: update mock signature to async def fake_discover(ws_id, source_workspace_id=None).

No fix PR open. Need infra-runtime-be (PR #477 author) or a test owner to open a fix PR. Escalate to PM/Dev Lead.

[triage-agent] Triage: **tier:high** confirmed. CRITICAL ESCALATION: PR #477 (merged) introduced a test regression — `test_completed_response_sanitized` mock signature mismatch: `fake_discover(ws_id)` called with `discover_peer(workspace_id, source_workspace_id=src)` — unexpected keyword argument. `CI / Python Lint & Test` is failing on `main` as a result. **Root cause confirmed:** `test_a2a_tools_delegation.py` mock only accepts positional ws_id but `tool_delegate_task` (line 242) passes two args. Fix: update mock signature to `async def fake_discover(ws_id, source_workspace_id=None)`. **No fix PR open.** Need infra-runtime-be (PR #477 author) or a test owner to open a fix PR. Escalate to PM/Dev Lead.

[triage-agent] Hourly triage ~17:35Z: CRITICAL ESCALATION still active. No fix PR opened. Regression blocks CI on main. Recommend: infra-runtime-be (PR #477 author) opens a fix PR — mock signature fix is async def fake_discover(ws_id, source_workspace_id=None). Escalate to PM/Dev Lead if no fix PR by next tick.

[triage-agent] Hourly triage ~17:35Z: CRITICAL ESCALATION still active. No fix PR opened. Regression blocks CI on main. Recommend: infra-runtime-be (PR #477 author) opens a fix PR — mock signature fix is `async def fake_discover(ws_id, source_workspace_id=None)`. Escalate to PM/Dev Lead if no fix PR by next tick.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#495
No description provided.