Skip to content

feat(linear): add complete issue relations - #9674

Merged
brennanb2025 merged 3 commits into
mainfrom
brennanb2025/linear-relations
Jul 21, 2026
Merged

brennanb2025 merged 3 commits into
mainfrom
brennanb2025/linear-relations

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • return outbound and inverse Linear issue relations with normalized current-issue semantics
  • add idempotent orca linear relation add|remove commands and linear.issueRelationWrite RPC
  • support local and SSH execution, help, human/JSON output, and bundled skill documentation

Design

  • relationship is always expressed from the requested issue: blocks, blockedBy, relatedTo, duplicateOf, or read-only duplicatedBy/similar
  • direction preserves the underlying relation direction (outbound or inbound)
  • writes resolve both issue references in the same workspace and treat repeated add/remove requests as successful no-ops

Validation

  • pnpm run typecheck:node
  • pnpm run typecheck:cli
  • 81 focused Vitest tests
  • pnpm exec oxlint (pre-existing warnings only)
  • pnpm run check:max-lines-ratchet
  • pnpm run verify:bundled-skill-guides
  • pnpm run verify:skill-bundle-manifest

Live Electron agent validation (2026-07-21)

  • launched this exact branch in an isolated Electron dev app with the branch-local revision-3 orca-linear skill and ran a real Codex agent against the disposable orca test workspace
  • verified ORC-5 blocks ORC-6 reads as outbound blocks from ORC-5 and inbound blockedBy from ORC-6; an identical add returned the same relation with alreadySet: true, and inverse-side removal cleared both views
  • verified symmetric relatedTo reads from both ORC-5 and ORC-7 and removal from the inverse side
  • verified ORC-7 duplicateOf ORC-6 reads as inbound duplicatedBy from ORC-6; removing from the writable duplicate source cleared both views
  • Linear temporarily moved ORC-7 to Duplicate for the duplicate relation and automatically restored Backlog on removal
  • final reads showed zero relations on ORC-5/6/7; no Stably issue was accessed or mutated

@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@brennanb2025, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 10 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a12e2575-a901-4cf5-b4fb-0bd2b6b09df6

📥 Commits

Reviewing files that changed from the base of the PR and between 5b7347d and d20aabd.

📒 Files selected for processing (31)
  • resources/skills/current-manifest.json
  • resources/skills/snapshot-registry.json
  • skill-guides/linear-tickets.md
  • skill-guides/orca-linear.md
  • skills/linear-tickets/SKILL.md
  • skills/orca-linear/SKILL.md
  • src/cli/bundled-skill-guides.ts
  • src/cli/handlers/linear-relation-write.ts
  • src/cli/handlers/linear.test.ts
  • src/cli/handlers/linear.ts
  • src/cli/linear-format.ts
  • src/cli/specs/linear.ts
  • src/main/linear/issue-context-includes.test.ts
  • src/main/linear/issue-context-includes.ts
  • src/main/linear/issue-context-raw.ts
  • src/main/linear/issue-context-relations.test.ts
  • src/main/linear/issue-context-relations.ts
  • src/main/linear/issue-relation-mutation.ts
  • src/main/linear/issue-relation-write.test.ts
  • src/main/linear/issue-relation-write.ts
  • src/main/linear/issues.ts
  • src/main/runtime/orca-runtime.ts
  • src/main/runtime/rpc/methods/linear-agent-access.test.ts
  • src/main/runtime/rpc/methods/linear-agent-access.ts
  • src/main/ssh/ssh-remote-linear-output.ts
  • src/main/ssh/ssh-remote-linear-read-help.ts
  • src/main/ssh/ssh-remote-linear-relation-write.test.ts
  • src/main/ssh/ssh-remote-linear-relation-write.ts
  • src/main/ssh/ssh-remote-linear-result-guards.ts
  • src/main/ssh/ssh-remote-linear-write-cli.ts
  • src/main/ssh/ssh-remote-linear-write-help.ts
📝 Walkthrough

Walkthrough

Adds Linear issue relation discovery and mutation for outbound and inverse relations, including shared request/result types, GraphQL reads and writes, duplicate detection, and pagination metadata. Exposes the functionality through runtime RPC methods, local and remote CLI commands, validation, help text, formatting, tests, linked-worktree notifications, and skill guides. Updates relation result typing and records new Linear skill revisions in release metadata and manifests.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description covers summary, design, and validation, but it is missing required Screenshots, AI Review Report, Security Audit, and Notes sections. Add the missing template sections, especially Screenshots, AI Review Report, Security Audit, and Notes, and explicitly confirm the requested platform review.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and accurately summarizes the main change: adding complete Linear issue relation support.

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
src/cli/handlers/linear-relation-write.ts (1)

32-46: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Type the lookup map so strict-mode indexing doesn't trip TS7053.
Indexing the inline object with value: string can fail in strict mode because there’s no string index signature. A Record-typed map avoids the implicit-any error.

src/main/ssh/ssh-remote-linear-output.ts (1)

206-211: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Improve phrasing for idempotent removals.

When operation is remove and alreadySet is true, the output will read Removed ... (already set). This phrasing is slightly contradictory since the relation was already absent. Consider adjusting the phrasing based on the operation.

💬 Proposed fix for the phrasing
 function formatLinearRelationWrite(result: LinearIssueRelationWriteResult): string {
   const verb = result.operation === 'add' ? 'Added' : 'Removed'
-  const suffix = result.meta.alreadySet ? ' (already set)' : ''
+  const suffix = result.meta.alreadySet ? (result.operation === 'add' ? ' (already set)' : ' (already removed)') : ''
   return `${verb} ${result.issue.identifier} ${result.relation.relationship} ${result.relatedIssue.identifier}${suffix}.`
 }

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ab061afa-c6dc-47ed-978c-8aa5c9bffac0

📥 Commits

Reviewing files that changed from the base of the PR and between ede57cf and 5708d33.

📒 Files selected for processing (31)
  • resources/skills/current-manifest.json
  • resources/skills/release-mapping.json
  • resources/skills/snapshot-registry.json
  • skill-guides/orca-linear.md
  • skills/orca-linear/SKILL.md
  • src/cli/bundled-skill-guides.ts
  • src/cli/handlers/linear-relation-write.ts
  • src/cli/handlers/linear.test.ts
  • src/cli/handlers/linear.ts
  • src/cli/linear-format.ts
  • src/cli/specs/linear.ts
  • src/main/linear/issue-context-includes.test.ts
  • src/main/linear/issue-context-includes.ts
  • src/main/linear/issue-context-raw.ts
  • src/main/linear/issue-context-relations.test.ts
  • src/main/linear/issue-context-relations.ts
  • src/main/linear/issue-relation-write.test.ts
  • src/main/linear/issue-relation-write.ts
  • src/main/runtime/orca-runtime.ts
  • src/main/runtime/rpc/methods/linear-agent-access.test.ts
  • src/main/runtime/rpc/methods/linear-agent-access.ts
  • src/main/ssh/ssh-remote-linear-output.ts
  • src/main/ssh/ssh-remote-linear-read-help.ts
  • src/main/ssh/ssh-remote-linear-relation-write.test.ts
  • src/main/ssh/ssh-remote-linear-relation-write.ts
  • src/main/ssh/ssh-remote-linear-result-guards.ts
  • src/main/ssh/ssh-remote-linear-write-cli.ts
  • src/main/ssh/ssh-remote-linear-write-help.ts
  • src/shared/linear-agent-access.ts
  • src/shared/linear-agent-result-types.ts
  • src/shared/linear-issue-relation-write.ts

Comment thread resources/skills/release-mapping.json Resolved
Comment thread src/cli/specs/linear.ts Resolved
Comment thread src/main/runtime/orca-runtime.ts Resolved
@brennanb2025
brennanb2025 force-pushed the brennanb2025/linear-relations branch from 564fc9f to d20aabd Compare July 21, 2026 20:21
@brennanb2025
brennanb2025 merged commit 87af1c8 into main Jul 21, 2026
18 of 19 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* feat(linear): add complete issue relations

* fix(linear): harden relation reads and writes

* fix(linear): classify ambiguous relation writes
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