Repository navigation
[local-test-e2e-cover-the-linear-issue-lifecycl] test(e2e): cover the Linear issue lifecycle against an offline fake GraphQL server - #374
Conversation
…(e2e): cover the Linear issue lifecycle against an offline fake GraphQL server
Artifacts & verificationRun: 48 · Commit: Change explanationProduced by Offline Linear issue-lifecycle e2e coverageWhy this change is neededThe task states that Linear is the only supported task tracker with zero lifecycle e2e coverage. Its GraphQL API and schema are external, so a drift in request shape or field names for issue lookup, comments, workflow-state transitions, or What changed
No production code was modified; the diff is the fake provider, one test file, and three documentation files. Validation actually performedRecorded in the pipeline evidence (not re-run while writing this):
Not recorded: any live Linear run. Per the task, none was added, and both scenarios skip when the built CLI is absent, matching the Jira fake test. The 16 skips in the suite total are not broken down in the evidence, so this does not independently confirm the skip guard fired. Material risks
Where reviewers should focus
Suggested checks (inference, not observed here): add a small case asserting a closed ticket is excluded from Visual explanationProduced by Show artifactSummaryAdds an in-process Linear GraphQL fake ( EvidenceOperation dispatch in the fake, matching what the production client sends: Validation reported in the pipeline evidence (observed, post-change only):
Before/after execution results were not captured, so the numbers above are a single post-change run with no baseline to compare against. Scoping note: because the local bare remote cannot create a PR, the test sets Merge Danger
Verification reportProduced by Show artifactAuto-review summaryProduced by Show artifact |
Why
Task local-test-e2e-cover-the-linear-issue-lifecycl: test(e2e): cover the Linear issue lifecycle against an offline fake GraphQL server
Linear was the only supported task tracker with zero lifecycle coverage: only
helpers/tracker-smoke.tsdetectedLINEAR_API_KEY, with no fake server or end-to-end run. A drift in Linear GraphQL operation names, variables, issue lookup, comments, workflow-state transitions, or JSON IssueFilter selection would have shipped silently. The new offline fake closes that gap without a live account, token, or network access.What changed
packages/e2e/providers/fake-linear.ts: an in-processBun.servefake bound to127.0.0.1:0with onePOST /graphqlroute. It owns oneENGteam, Todo/In Progress/In Review/Done workflow states, issues, labels, markdown comments, and a fixed advancing clock. It dispatches onIssueById,IssueComments,TeamStates,CommentCreate,IssueUpdate, andSearchIssues; validates variables; and records unrecognized operations or malformed payloads inunexpectedOperationswith a diagnostic GraphQL error response. It accepts but never reads/logsAuthorization.packages/e2e/tests/local/tracker-linear-fake.test.ts: explicit-keyENG-1and JSON IssueFilter--queryscenarios driven through the built CLI andFixtureWorkspace. Both seed an expected issue plus a decoy, writelinear.projects.ENGstatus settings withprStatusequal toinProgressStatus, and assert exit 0, exact remote branch SHA, onlysrc/greeting.tschanged, one succeededtracker = "linear"run record, final workflow state, preserved unrelated label, one implementation comment, surviving seeded comment, marker delivery to the fake agent, untouched decoy, and emptyunexpectedOperations.packages/e2e/README.md,packages/e2e/docs/tracker-e2e-plan.md, andpackages/e2e/docs/coverage-matrix.md: documented the Linear fake and its env vars/operations, marked Linear Layer 3 implemented, changed the Linear matrix row todefault, and updated backlog item 17.Scope
Included exactly the offline Linear fake and lifecycle coverage described in the task, reusing
TrackerFixture, lifecycle assertions,FixtureWorkspace, andbuildTrackerSettings. No live or skipped Linear suite was added, no production Linear client code was changed, andFixtureWorkspacewas not modified because no extra CLI args were needed. Trello/Asana/Azure DevOps and live Linear team/project lifecycle, estimation, and attachment uploads remain out of scope.Tradeoffs
The unique description marker is also embedded in the issue title because the required
--queryscenario uses Linear’stitle.containsIgnoreCasefilter while lifecycle assertions read the marker back from the issue body.prStatusis intentionally set equal toinProgressStatusbecause the local bare Git remote cannot create the PR that would trigger a separate post-PR transition; the same approach is already used by the offline Jira test. The fake supports a small superset ofIssueUpdatefields (estimate,labelIds, title, description) beyond the currently exercisedstateIdto avoid freezing an unnecessarily narrow contract.Blast Radius
Only the
@devintern/e2eworkspace is affected. The new provider implements the existingTrackerFixturecontract and is consumed solely by the new test; existing Jira/GitHub/GitLab fixtures, helpers, and all production tracker code are untouched. The docs changes are additive or status updates. No product bug was found inLinearClientorLinearTaskTrackerClient, so no product fix was bundled.Verification
All commands were run from the monorepo root unless noted:
bun run --filter @getdevintern/code build→ succeeded (Built devintern v2.22.0).bun run --filter @devintern/e2e test→137 pass,16 skip,4 todo,0 failacross 157 tests in 25 files.bun run --filter @devintern/e2e typecheck→ exit 0.bun run --filter @devintern/e2e lint→ exit 0.bun run --filter @devintern/e2e format:check→ all 89 matched files correctly formatted.bun test tests/local/tracker-linear-fake.test.ts→2 pass,0 fail, 61 assertions, run repeatedly after the final fake changes.This PR was automatically created by @devintern/code