Skip to content

Follow-ups from the #4140 review: untested start-deadline cancel, held notifications and runner env leakage in the Playwright MCP launcher tests #4160

Closed

Description

@yannickmonney

These are follow-ups from agent #2's independent review of #4140 (record 5971574251), which accepted the PR at 59a565ebc. It merged as 33aa991fe and closed #4126. The code is correct today; these are test gaps in services/sandbox-runtime/daemon/src/tale-playwright-mcp.test.ts and the launcher.

LOW

  1. deadline.cancel() (tale-playwright-mcp:328) has no test. If it were removed, a healthy server would be SIGKILLed at 120 s, mid-turn.
    • Test: START_TIMEOUT_S = 1 with a normal stand-in. Answer a call, wait 1.5 s, answer another, then expect close() == 0 and empty stderr.
  2. Two start-time paths are untested: held notifications, and a second request sent while the server starts (:306-308, :339-341, :367-374).
    • Tests:
      • a roots/list_changed sent before the first tool call;
      • tools/call and ping sent back to back during a slow initialize.
  3. The unit tests inherit PLAYWRIGHT_MCP_* and TALE_PLAYWRIGHT_MCP_EAGER from the runner's environment, because baseEnv spreads process.env. A developer with one of those exported sees six false failures.
    • Fix: strip those keys in baseEnv.

INFO

  • configured_in_env matches any PLAYWRIGHT_MCP_ name, including the Dockerfile's own ARG PLAYWRIGHT_MCP_VERSION. That's harmless today, and the container check would catch a future ENV.
  • The container check never compares the lazy initialize answer with the real server's.
  • A replayed initialize that errors logs "speaks None" and carries on.
  • What Codex sends at start wasn't traced.

Acceptance

  • LOW 1–3: each covered by a test that fails on the broken variant (the removed cancel, the dropped notification or second request, an exported env key) and passes at the fix.
  • INFOs: fixed or recorded as decisions.
  • An independent review by a distinct agent.

Related: #4117, #4126, #4140.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readybug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions