Skip to content

test(e2e): wait for the warm client in the tool-parity control (#13481) - #16699

Merged
dezren39 merged 6 commits into
mainfrom
xaltha/13481-envguard-classify
Nov 29, 2026
Merged

dezren39 merged 6 commits into
mainfrom
xaltha/13481-envguard-classify

Conversation

@dezren39

@dezren39 dezren39 commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Refs #13481 (one slice of the full-suite acceptance; does not close it).

The failure

TestEveryToolInToolsListIsReachableFromAScript failed deterministically at its control check (toolparity_test.go): "the reachability check cannot find demo.echo, which is in the generated client; the check is wrong and this test proves nothing". Reproduced solo before the fix: fleet-command run 46244446907, FAILURE at the control.

Diagnosis (probe runs on this branch, probes since removed)

  • Client fetched with no prior commands names demo's tools eagerly (__call("demo", "echo", args)) — run 46245304201.
  • In the test's scenario (adapters spec configured), the first client fetch spells demo as __lazyNamespace({}, "demo", null), naming no tools — run 46247077499.
  • Polling (run 46248331309): the client is lazy on the first fetch and eager from ~5s on, once the daemon's background schema read lands (the mcpx: faster CLI and exec -- no self-socket, lazy schemas, a typecheck default #1868 cold-client design). The control compared against a cold snapshot.
  • stdio mcpx serve tools/list never lists demo_echo in this scenario (meta-tools + adapter tools only, by design); the test only ever used that list for the adapter names, so no change was needed there.

The fix

The test now polls the generated client until the control tool demo.echo is named (60s deadline) before comparing adapter reachability, with a comment explaining the cold-client behaviour. No product code changes; the parity assertions themselves are unchanged.

Verification (remote dispatch, exact head d8f6485)

  • go test ./internal/e2e -run TestEveryToolInToolsListIsReachableFromAScript -count=1 -v — run 46248980602, PASS (64.96s).
  • Flake form per pkgs/mcpx/internal/AGENTS.md: -race -shuffle=on -count=5 — run 46249323375, SUCCESS.

Not in this PR

#13481's acceptance (full go test ./... green) still has four failing tests, measured at main 4a8555a in run 46242522537: execsvc TestFailureKindPreflightTimeout (verification image has no Node), e2e TestEnvCleanupStopsTheDaemonItStarted, e2e TestDaemonWarmReadsTheServersAtStartupFromTheEnvironment, e2e TestRestartReportsAServerThatDoesNotComeBack (supervisor-socket family). They are recorded on #13481 for follow-on slices.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-29T09:56:03Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "aa5a503c40005914ca3676c21a1da732e7aeb3d7"
    },
    "auth_subject": "xaltha",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

TestEveryToolInToolsListIsReachableFromAScript failed deterministically
at its control: the generated client fetched immediately after daemon
start spells demo as a lazy proxy naming no tools, because since #1868
the daemon reads server schemas in the background. The parity claim is
about the generated client with the schemas in, so poll the client
until the control tool demo.echo is named (60s deadline) before
comparing adapter reachability. Diagnosis and poll evidence are on
#13481 (fleet-command runs 46245304201, 46247077499, 46247659380,
46248331309).
@dezren39
dezren39 merged commit 16a5e75 into main Nov 29, 2026
1 check passed
@dezren39
dezren39 deleted the xaltha/13481-envguard-classify branch November 29, 2026 09:56
@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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