Skip to content

feat(tracker): trackerSourceFromManifest — a tracker CLI from wirecat.config, over GraphQL - #3099

Merged
leemour merged 4 commits into
mainfrom
feat/tracker-manifest
Nov 17, 2026
Merged

leemour merged 4 commits into
mainfrom
feat/tracker-manifest

Conversation

@leemour

@leemour leemour commented Nov 17, 2026

Copy link
Copy Markdown
Member

Task

L4 of the Linear pilot: a tracker CLI assembles from wirecat.config.ts, as a CRM does. This adds trackerSourceFromManifest over the tracker category (#3095) and the GraphQL executor (#3097).

What

  • src/tracker/manifest/: TrackerManifest, parseTrackerManifest, mapTrackerRecord, trackerSourceFromManifest.
    • Each kind names a list, a changes call with "{since}" (the cursor less overlapMs), and an ids call; a map in the CRM rule language.
    • Over GraphQL a call sends its own selection; the parser refuses a map path the selection leaves out, so a field missing from the request is never read as "cleared".
    • A selected object answered null clears the field, converted by its type ([] for a list).
    • An optional kind refused (errors[] FORBIDDEN through the executor) is a gap; the other kinds still sync.
  • syncTracker: an id pass after a gap for its kind is held even under --rescan.
  • wirecat.config: category: "tracker" with its source, spec.kind: "graphql".
  • CRM manifest: a number conversion; crmRuleSchema exported.

Testing

  • trackerSourceContract over a Linear-shaped graphqlFake (pages by two, filters on updatedAt.gte, archived only on ask), every call through serviceApiCall.
  • Mapping tests (null under every rule kind), optional-kind tests, and refusal tests for the parser.
  • Local: typecheck (all configs), lint, docs:check, src/tracker src/manifest src/crm/manifest src/cli/service-api (130 tests).

🤖 Generated with Claude Code

leemour and others added 3 commits November 17, 2026 23:20
…th a graphql spec in wirecat.config

A tracker CLI can be described as data, as a CRM CLI is:

- TrackerManifest names for each kind the list, changes ({since} in
  the variables) and ids operations of the generated API, and maps our
  fields to row paths in the CRM manifest's rule language.
- Over GraphQL a call sends its own selection (state { id },
  labels { nodes { id } }); parseTrackerManifest refuses a map path the
  selection leaves out, so a field never goes missing from a request
  and reads as cleared.
- A selected object answered null (project: null) clears the stored
  link instead of keeping it.
- wirecat.config takes category tracker, which needs its source, and
  spec.kind graphql.
- Tested: a Linear-shaped manifest over cli-base's graphqlFake passes
  trackerSourceContract.

Needs cli-base 0.115.0 in cli-core, which the graphql executor PR (L2)
brings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er delete what a gap left unread

From the review of trackerSourceFromManifest:

- A selected object the tracker answered null clears the field for
  every rule kind (first, path, map, join), converted by its type, so a
  list field becomes [] rather than null.
- An id pass after a gap for its kind is held even under --rescan: a
  refused optional kind lists no ids, and a rescan would have marked
  every stored row deleted.
- self.path is checked against the selection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nal kind in errors[] as a gap

The tracker manifest test now sends every call through serviceApiCall
(#3097) in place of its own GraphQL sender. TrackerCallInput goes:
ApiCommandInput carries the selection now.

An optional kind that the tracker refuses with errors[] FORBIDDEN is a
gap for its changes and its ids, and the other kinds still read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mission key

permission-keys.test.ts scans for literal `key: "…"` and took the tracker's text conversion for a write key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leemour
leemour merged commit 31666b9 into main Nov 17, 2026
43 checks passed
@leemour
leemour deleted the feat/tracker-manifest branch November 17, 2026 22:48
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