Skip to content

feat(tracker): keep Linear's own GitHub links on each issue; adopt cli-core 3.8.2 - #40

Merged
leemour merged 2 commits into
mainfrom
feat/github-links
Dec 1, 2026
Merged

leemour merged 2 commits into
mainfrom
feat/github-links

Conversation

@leemour

@leemour leemour commented Dec 1, 2026

Copy link
Copy Markdown
Member

Task

G12 of the github-cli (gthb) plan: Linear's own GitHub links must reach the store, so gthb can join Linear issues to pull requests. Also bump to the latest cli-core and cli-base, and put linear in the tracker parity group (cli-base #776).

Why

cli-core's tracker domain has no field for an issue's branch, links or relations, and its manifest map refuses unknown fields. The hooks seam (hooks.after.issue) is the existing way to add to a record, and the store keeps the extra keys in tracker_items.data.

What

  • src/hooks.ts (named by hooks in wirecat.config.ts) adds to each issue: branchName, attachments { id, url, source_type }, relations { id, type, issue }. Field names checked in spec/linear/schema.json. An unselected list stays unsaid (the store keeps what it had); an empty list clears it.
  • Issues page 50 → 25: a selection takes no arguments, so each nested list counts as 50 rows of Linear's complexity points (about 245 an issue, about 6,100 a page of the 10,000 limit). The id pass now selects only id trashed at 100 a page.
  • Adopt cli-core 3.8.2 (the tracker: ref round-trip, #3540) and cli-base 3.1.5.
  • config/parity-groups.json: the tracker group (linear, gthb). audit --family skips gthb until it is on npm (cli-base familyPackages filters by its PACKAGES list).
  • docs/dev/DESIGN.md: the stored shape, the cost, the cli-core gaps, and - **Kinds:** tracker, documents for cli-dev ready (cli-base #778).

Testing

  • pnpm test:coverage: 15 files, 624 tests passed; coverage 97% lines.
  • src/tracker-links.test.ts: a sync through the strict trackerManifestFake stores the links, a later sync with empty lists clears them, no fake refusals; a unit case for malformed and unselected lists.
  • pnpm lint, pnpm typecheck, pnpm docs:check, pnpm contracts:check, pnpm test:matrix:check (0 missing), pnpm audit:commands (7 CLIs, 0 new that block), pnpm smoke:node: all pass.

Review (strict-review, two readers)

Fixed: SEC-1/SEC-2 (attachment titles and Linear's metadata would reach agents unmarked, since cli-core's UNTRUSTED.issue is a fixed list; left out until cli-core can mark them), inner keys in snake case, reuse of crmValues, the cast and unused exports dropped, the kind() ids parameter removed, a wrong comment about the write selection, doc nits, and a test that only exercised cli-core's merge replaced by the removal case.
Not fixed here (cli-core gaps, listed in DESIGN.md): domain fields for links marked untrusted; an index on link URLs so a pull request finds its issue without scanning tracker_items. Not checked live: whether Linear moves an issue's updatedAt when a link is added.

🤖 Generated with Claude Code

leemour and others added 2 commits December 1, 2026 01:41
cli-core 3.8.1 (was 3.6.3): search all puts records that may correct a hit under it (later),
puts a named person's private chat on top, and a compact later line keeps 200 characters.
cli-base 3.1.5 (was 3.1.4): the audit's shared differences due in December are reviewed.

cli-core's tracker: refs round-trip (#3540) merged after 3.8.1 and is not on npm yet.

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

G12 of the github-cli plan: gthb joins Linear issues to pull requests through the links Linear's GitHub integration
already made. cli-core's tracker domain has no field for them and its manifest map refuses unknown fields, so a new
hooks module (src/hooks.ts, named in wirecat.config.ts) adds to each issue record:
- branchName
- attachments: { id, url, source_type }
- relations: { id, type, issue } (the issue's own relations; the inverse is the other issue's)
The store keeps them in tracker_items.data; a read that omits them keeps the stored value, an empty list clears it.

Attachment titles and Linear's metadata are left out on purpose: cli-core marks a fixed list of issue fields
untrusted, so a PR title would reach agents unmarked in every issue view (strict-review SEC-1/SEC-2).

A GraphQL selection takes no arguments, so each nested list counts as 50 rows of Linear's complexity points: an issue
costs about 245, so issues are read 25 a page (about 6,100 of 10,000). The id pass selects only id and trashed and
reads 100 a page.

Also:
- adopt cli-core 3.8.2: the tracker: ref round-trip (#3540) opens issues in issues show/assign/update/comments
- config/parity-groups.json gets the tracker group (linear, gthb); audit --family skips gthb until it is on npm
- DESIGN.md: the stored shape, the cost, the cli-core gaps, and a Kinds line for cli-dev ready

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​wirecat/​cli-base@​3.1.4 ⏵ 3.1.578 -191001009670
Updated@​wirecat/​cli-core@​3.6.3-dev ⏵ 3.8.2-dev98 +1100100 +19670

View full report

@leemour
leemour merged commit b0f3ee7 into main Dec 1, 2026
16 checks passed
@leemour
leemour deleted the feat/github-links branch December 1, 2026 01:52
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