Skip to content

Weekly contract tests against the real tailscale CLI to catch output-format drift #47

Closed

Description

@TMHSDigital

Why it matters

Everything here depends on parsing tailscale CLI output: regexes over ping text (which has no --json, per src/providers/cli.ts:250), Serve URL extraction, and error-message matching (failed to connect|is Tailscale running, not enabled on your tailnet). Tailscale ships every few weeks and its text output isn't a stable API. Fixtures captured once at 1.98.4 can't catch a wording change, so a future CLI release could quietly break ping_all paths or the structured errors while CI stays green.

Suggested approach

A scheduled workflow (weekly, plus on demand) that installs the latest Tailscale on ubuntu, windows, and macos and runs contract tests against the real binary:

  • No login needed: BINARY_NOT_FOUND (PATH removed), NeedsLogin/NoState from status --json with tailscaled in userspace mode, and version --json shape.
  • With an ephemeral, tagged auth key in a repo secret (OAuth client, tag-locked, ephemeral, preauthorized): join the tailnet, ping a second ephemeral node to get real pong lines, run serve on a scratch port, then serve reset. Use tailscale/github-action.
  • On failure, open or update an issue such as "CLI output drift detected in tailscale X.Y.Z".
  • This also produces the fixture-capture tooling that the v1.0 roadmap item asks for. Feed captured output through a sanitizer into test/fixtures/.

Done when

A weekly job proves the parsers against the current Tailscale release on all three OSes and alerts when output drifts.

Activity

  1. added
    ci
    priority: P2
    feature
    tests
    on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cifeaturepriority: P2tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions