Skip to content

feat(agent): list Linear project-milestones for fuzzy tracker matching - #4693

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
carlh7777:feat/linear-list-open-milestones
Jul 10, 2026
Merged

feat(agent): list Linear project-milestones for fuzzy tracker matching#4693
JSONbored merged 1 commit into
JSONbored:mainfrom
carlh7777:feat/linear-list-open-milestones

Conversation

@carlh7777

Copy link
Copy Markdown
Contributor

Summary

Completes the remaining #3186 gap: LinearAdapter.listOpenMilestones was an inert stub, so Linear suggest-mode could only fuzzy-match projects (milestones only appeared via native attachmentsForURL links). This wires workspace projectMilestones listing (paginated, includeArchived: false) and fail-open fuzzy matching for both projects and milestones — same best-effort pattern as the GitHub path.

Supersedes closed #4642 with a narrower diff: no unused factory/probe helpers, and no guarded src/auth/** / routes changes (those held/closed the prior attempt).

Closes #3186

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • Focused local gate so far: npx vitest run test/unit/linear-adapter.test.ts test/unit/project-tracker-adapter.test.ts (67 pass) with v8 coverage at 100% stmts/branches on src/integrations/linear-adapter.ts + project-tracker-adapter.ts. Will run full npm run test:ci + audit before push.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests. (N/A — no auth/session surface touched.)
  • API/OpenAPI/MCP behavior is updated and tested where needed. (N/A — no API/OpenAPI/MCP surface touched.)
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks. (N/A — no UI changes.)
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. (N/A — no visible UI changes.)
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs. (N/A.)

UI Evidence

N/A — no UI/frontend/docs changes in this PR.

Notes

…g project milestones

Added the listOpenMilestones method to the LinearAdapter, enabling retrieval of non-archived project milestones with pagination support. Updated the class documentation to reflect this new functionality and its integration with the existing project tracking system. Enhanced unit tests to cover various scenarios, including API error handling and pagination across multiple pages.
@carlh7777
carlh7777 requested a review from JSONbored as a code owner July 10, 2026 12:55
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 10, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.14%. Comparing base (c3b10f2) to head (1b413de).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4693   +/-   ##
=======================================
  Coverage   94.14%   94.14%           
=======================================
  Files         437      437           
  Lines       38531    38542   +11     
  Branches    14049    14051    +2     
=======================================
+ Hits        36274    36285   +11     
  Misses       1599     1599           
  Partials      658      658           
Files with missing lines Coverage Δ
src/integrations/linear-adapter.ts 100.00% <100.00%> (ø)
src/integrations/project-tracker-adapter.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 10, 2026
@loopover-orb

loopover-orb Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-10 20:34:21 UTC

3 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · unstable

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR wires up the previously-inert `LinearAdapter.listOpenMilestones` with a real paginated GraphQL query against `projectMilestones` (mirroring the existing `listOpenProjects`/`GitHubProjectsAdapter` pagination pattern, bounded by `LINEAR_LIST_PAGE_LIMIT`), and switches `resolveTrackerMatches`'s Linear fallback path to fail-open independently for projects and milestones via `Promise.all([...].catch(() => []))`, matching the GitHub adapter's established best-effort behavior. The change closes #3186 as claimed, the diff matches the description with no scope creep, and the new tests (pagination, page-limit cutoff, includeArchived query-shape assertion, and both independent fail-open branches) exercise the real code paths rather than fabricated states. The one behavior change worth calling out is that a full Linear outage now silently resolves to `{suggested: false}` instead of propagating to the outer `milestone_suggest_failed` logger, which trades away some observability for consistency with the GitHub path.

Nits — 5 non-blocking
  • src/integrations/project-tracker-adapter.ts: catching listOpenProjects/listOpenMilestones errors inside resolveTrackerMatches means a genuine Linear outage or invalid API key no longer reaches maybeSuggestMilestoneMatchForPr's outer catch, so the `milestone_suggest_failed` log line is lost for this path — confirm that's an acceptable tradeoff versus logging inside the .catch handlers.
  • src/integrations/linear-adapter.ts:34-40: LinearProjectMilestoneNode/ListProjectMilestonesResponse duplicate the exact shape of LinearProjectNode/ListProjectsResponse — consider a shared `{id, name}` node type to avoid the parallel definitions drifting.
  • The external secret-scan hits in test/unit/linear-adapter.test.ts (lines ~361/405/448) are the existing `lin_api_test_key` placeholder already used throughout this test file, not a real leaked credential — safe to ignore.
  • src/integrations/linear-adapter.ts: the GraphQL query for projectMilestones has no analogous status filter to LINEAR_OPEN_PROJECT_STATUS_TYPES; the doc comment explains why (`includeArchived: false` is the only available knob), but a future Linear API addition of a milestone status field could silently make this stale — worth a follow-up note or issue if you want to track it.
  • Consider adding a brief log (not a throw) inside the two new .catch(() => []) branches in project-tracker-adapter.ts so a persistent Linear misconfiguration is still discoverable in structured logs, even though the suggest-mode feature itself should stay fail-open.
Flagged checks (non-blocking)
  • Contributor trust — Contributor flagged for review
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #4642, #3186
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (2 linked issues).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 185 registered-repo PR(s), 114 merged, 17 issue(s).
Contributor context ✅ Confirmed Gittensor contributor carlh7777; Gittensor profile; 185 PR(s), 17 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: carlh7777
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 185 PR(s), 17 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb loopover-orb 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.

Gittensory approves — the gate is satisfied and CI is green.

@JSONbored
JSONbored merged commit 3126992 into JSONbored:main Jul 10, 2026
8 of 9 checks passed
@loopover-orb loopover-orb Bot added gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. and removed gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. labels Jul 10, 2026
@JSONbored JSONbored added gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jul 11, 2026
@carlh7777
carlh7777 deleted the feat/linear-list-open-milestones branch July 13, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Development

Successfully merging this pull request may close these issues.

feat(agent): Linear adapter for project/milestone matching

2 participants