Skip to content

Linear adapter with full verb parity #2946

Closed

Description

@kyle-sexton

Parent

Refs #2933. Source: topic pocock-shipping-breakdown (PR backfilled when opened).

What to build

A linear adapter for the work-item-tracker seam with full verb parity with the github adapter — read, write, claim/renew/reclaim leases, sub-items, dependency edges, frontier listing, capabilities manifest — measured by the existing conformance suite (needs a bindings/linear.sh conformance binding; sandbox-workspace pattern analogous to the GitHub sandbox repo). Motivations: first-class free-tier tracker for solo devs; issue numbering lives outside the repo so GitHub's shared PR/issue numbering never bites; the owner's personal dogfood target for day-job-adjacent work (personal workspace, not team-shared). Follow the jira adapter's hardening posture (token via env-name indirection, never in argv; host validation; deny-by-default egress) and its config-seam pattern for per-instance semantics (state categories, relation types). Auth for headless/cloud agent use is a design point to settle explicitly (API key posture).

Acceptance criteria

  • All seam verbs implemented or capability-gated with honest manifest entries; conformance suite green via a linear binding
  • Credential hygiene matches or exceeds the jira adapter's guards
  • Setup skill's provider comparison updated; per-instance semantics externalized to config, not hard-coded

Blocked by

None — can start immediately (topology investigation informs pairing use but standalone coordination use is independent).

Activity

  1. added
    needs-human
    on Aug 17, 2026
  2. added
    needs-triage
    on Aug 17, 2026
  3. kyle-sexton commented on Aug 18, 2026

    @kyle-sexton
    MemberAuthor

    Mission sharpened by the topology decision on #2945 (2026-08-17): Linear is the reference coordination provider for the role-split topology — the supported answer both for "my org's tracker is the source of record, agents coordinate elsewhere" (Jira-read via sources, Linear-write as provider) and for the GitHub PR/issue shared-numbering concern (issue numbering lives outside the repo entirely; the issues-only-second-GitHub-repo topology was rejected with recorded costs). Full verb parity + conformance binding per the body; credential hygiene per the jira adapter's guards; contract-version handshake already landed (#2942).


    Generated by Claude Code

  4. kyle-sexton commented on Aug 21, 2026

    @kyle-sexton
    MemberAuthor

    Status: built, one clause short of closable — and the gap is a credential, not code

    This is the last open sub-issue of container #2933 (19/20 closed). Recording exactly what is met
    and what is not, per criterion, so the item reads as blocked-on-a-named-input rather than
    silently open.

    Criterion 1 — "All seam verbs implemented or capability-gated with honest manifest entries; conformance suite green via a linear binding"

    First clause MET. The adapter implements every verb the github adapter has, one-for-one:
    add-sub-item, capabilities, claim, create-item, get-item, link-blocks, list-items,
    list-sub-items, reclaim, renew-lease. capabilities.json declares all ten true and
    features as cross_repo_edges, labels, leases, sub_items — nothing gated, nothing
    overclaimed. Every verb has a mocked-transport test suite and all of them pass.

    Second clause NOT MET, and cannot be met here. "Conformance suite green via a linear binding"
    means a live run. conformance/bindings/linear.sh exists and is complete — including a real
    _cb_clean_at_start that archives the throwaway team's issues through Linear's own GraphQL API
    rather than through the seam, so a broken adapter cannot hide its own breakage while preparing
    its fixture. What it needs is a Linear workspace and an API key, and Linear is SaaS: there is no
    self-hosted mode, no free local instance, nothing this environment can stand up. gitea was the
    designated vehicle for proving the generator end-to-end against a live server and has been
    descoped by the maintainer's "we just need linear" call, so this is now the only live-provider
    proof left in the container.

    To clear it, two inputs are needed from a human, neither of which can be produced by an agent:

    1. A throwaway Linear workspace or team — never a workspace anyone coordinates in. The suite
      creates, claims, mutates, and archives real issues. _cb_clean_at_start archives rather than
      deletes precisely so that a mis-pointed scope stays recoverable, but that is a safety net, not
      a licence to point it at live work.
    2. WIT_LINEAR_API_KEY set in the environment configuration — not pasted into a chat or a
      file
      . The name is not fixed: it is whatever config.linear.auth_env says, and the
      conformance binding defaults it to WIT_LINEAR_API_KEY.

    Criterion 2 — "Credential hygiene matches or exceeds the jira adapter's guards" — MET

    Verified line-by-line against jira/common.sh. The key is read from the env var named by
    config.linear.auth_env and dereferenced through ${!name}, never stored in the tracked
    binding; it is handed to curl through a stdin config (-K -) so it never reaches argv or a
    process listing; egress is pinned with --proto '=https' against the single endpoint
    https://api.linear.app/graphql; and the host must satisfy WIT_LINEAR_HOSTNAME_RE, a bare
    hostname with a .linear.app suffix default. Same posture as jira, on a smaller attack surface
    because Linear has exactly one endpoint.

    Criterion 3 — "Setup skill's provider comparison updated; per-instance semantics externalized to config, not hard-coded" — MET

    work-items:setup lists linear among the bundled adapters and describes it as full verb parity
    with github and therefore a genuine coordination surface. Per-instance semantics — host, scopes,
    auth_env — come from config.linear, with no values baked into the adapter.

    What is not being done

    No follow-up issue, and no relaxing of a guard to manufacture a green run. This item stays open
    against a named, human-supplied input. Container #2933 cannot close until it lands, because
    criterion 1 of the container requires every sub-issue closed.


    Generated by Claude Code

  5. kyle-sexton commented on Aug 21, 2026

    @kyle-sexton
    MemberAuthor

    Closing — live conformance descoped, with static validation substituted and the gap named

    Maintainer decision, 2026-08-21: this item's live-conformance clause gets the same treatment
    #2950 and #2952 received. Recording what that does and does not buy, per criterion, so the closure
    is auditable rather than asserted.

    Criterion 1 — "All seam verbs implemented or capability-gated with honest manifest entries; conformance suite green via a linear binding"

    First clause MET. Every verb the github adapter has, one-for-one: add-sub-item,
    capabilities, claim, create-item, get-item, link-blocks, list-items, list-sub-items,
    reclaim, renew-lease. capabilities.json declares all ten true with cross_repo_edges,
    labels, leases, sub_items — nothing gated, nothing overclaimed.

    Second clause DESCOPED, not met. Linear is SaaS: no self-hosted mode, no local instance, so a
    live run needs a throwaway workspace and WIT_LINEAR_API_KEY that this environment cannot
    produce. conformance/bindings/linear.sh is complete and waiting — including a real
    _cb_clean_at_start that archives through Linear's own GraphQL API rather than through the seam,
    so a broken adapter cannot hide its breakage while preparing its own fixture.

    What replaced it, and why it is worth more than nothing

    Descoping a live run would normally leave "unverified". It does not here, because the adapter was
    validated against Linear's real published GraphQL schema in #3071 — @linear/sdk 90.0.0 plus
    the published SDL, cross-checked and byte-identical including doc strings.

    • 17 of 17 operations validate clean under graphql-js: operation names, argument names and
      types, nested selections, enum members, variable coercion, connection shapes.
    • The harness was proven sensitive rather than vacuously green — a negative control injecting
      ten deliberate faults (wrong field name, wrong mutation name, wrong argument, bogus enum member,
      wrong variable type, missing required input field, and more) caught 10 of 10.
    • Specifically confirmed: done_state_types' default ["completed","canceled","duplicate"] are
      real WorkflowState.type members; IssueRelationCreateInput.type coerces the string "blocks"
      to the enum correctly; IssueUpdateInput.assigneeId is nullable so the unassign write is
      schema-valid; Comment.createdAt is the DateTime! the lease handles parse.

    That closes the entire class this item was worried about — a wrong name passes every mock and
    fails on the first real call
    . It found and fixed two real defects doing so: a page_size above
    Linear's cap of 250 that config validation accepted, and label resolution that could neither see
    workspace-level labels nor read past its first page, both of which surfaced as a hard refusal of a
    label that exists.

    What is still not known, stated rather than glossed

    Static validation cannot settle resolver behaviour. Four things remain open and a credential is
    the only way to close them:

    1. Whether assigneeId: null semantically unassigns, or is ignored. The schema permits the
      null; what the resolver does with it is not in the schema.
    2. Linear's default comment ordering. The adapter paginates every page and is correct either way,
      so this is a possibly-wrong rationale in a comment, not a defect.
    3. Whether Team.labels excludes workspace-level labels in practice — the reason the resolution
      moved to the root issueLabels connection, which is documented to return both.
    4. End-to-end behaviour under real rate limits, real pagination boundaries, and real concurrent
      claims — the lease arbitration in particular has only ever raced against a mock.

    Criteria 2 and 3 — MET, verified

    Credential hygiene matches jira line-for-line: the key is read from the env var named by
    config.linear.auth_env and dereferenced via ${!name}, never stored in the tracked binding;
    handed to curl through a stdin config (-K -) so it never reaches argv or a process listing;
    egress pinned with --proto '=https' against the single endpoint https://api.linear.app/graphql;
    host constrained by WIT_LINEAR_HOSTNAME_RE with a .linear.app suffix default.

    Setup comparison lists linear among the bundled adapters and describes it as full verb parity
    with github, therefore a genuine coordination surface. Per-instance semantics — host, scopes,
    auth_env, done_state_types, page_size — all come from config.linear, none baked in.

    Honest summary

    What ships is an adapter verified against the provider's schema and a full mocked-transport
    suite, never against a live server.
    That is materially stronger than it was this morning and
    still short of what this criterion asked for. If a throwaway workspace and WIT_LINEAR_API_KEY
    ever appear, running conformance/run-conformance.sh against the linear binding is the one step
    left — and per the archival-by-closure doctrine that is a new item, not a reopening of this one.

    Closing as completed on that basis.


    Generated by Claude Code

  6. added a commit that references this issue on Aug 21, 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

    needs-humanneeds-triage

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions