Repository navigation
Eliminate all 11 source any with real Linear GraphQL and SDK context types #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
unbraind
merged 2 commits into
main
from
refactor/typed-linear-graphql-and-handler-contexts
Jul 27, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| id: pm-linear-pfmo | ||
| title: Eliminate all source any with real Linear GraphQL and SDK handler types | ||
| description: "Remove the 11 remaining any annotations in index.ts: (A) type the four Linear GraphQL response sites (team query, viewer probe, issue create/update mutations) with a generic LinearResponse<T> envelope plus per-operation data types, and (B) replace the any handler/context params (isJsonMode, renderImportDryRun, registerPreflight callback) with the real SDK types CommandHandlerContext, ImportExportContext, and PreflightOverrideContext from @unbrained/pm-cli/sdk/authoring. Mirrors the pm-github PR #18 precedent. Typing refactor only: behaviour must not change, all gates (build, test, typecheck, changelog check, zero-any grep) must pass, plus real activation proof in a throwaway workspace." | ||
| type: Chore | ||
| status: closed | ||
| priority: 2 | ||
| tags: [] | ||
| created_at: "2026-07-27T21:38:19.988Z" | ||
| updated_at: "2026-07-27T21:42:26.676Z" | ||
| closed_at: "2026-07-27T21:42:26.675Z" | ||
| author: pi-agent | ||
| notes[1]{created_at,author,text}: | ||
| "2026-07-27T21:42:18.672Z",pi-agent,"Two clusters fixed. (A) Linear GraphQL: LinearResponse is now generic LinearResponse<TData> { data?: TData; errors?: LinearGraphQLError[] }; linearRequest/linearRequestOnce take a type parameter. New data types: LinearIssuesData (paginated issues query), LinearTeamData + LinearTeamNode (TEAM_QUERY), LinearViewerData (viewer{id} credential probe). The issueCreate/issueUpdate mutation sites read only the error envelope, so they are typed linearRequest<unknown> (no invented schema mirror). JSON.parse wire boundary keeps its single deserialization cast, now as LinearResponse<TData>. (B) SDK contexts: isJsonMode and renderImportDryRun now take CommandHandlerContext | ImportExportContext, registerPreflight callback takes PreflightOverrideContext; all imported type-only from @unbrained/pm-cli/sdk/authoring (same subpath as the existing ExtensionApi/ExtensionModule imports, so no runtime module edge). --json stays read from ctx.global.json (correct contract); defensive ?. chains kept. Gates: build ok, npm test 63/63 pass, tsc --noEmit clean, changelog:check ok, zero-any grep empty. Activation proof in /tmp/pm-linear-proof: pm linear --help exit=0 listing export/import/sync/validate; pm linear sync --help exit=0 with full flags; pm list --json exit=0; pm health exit=0; pm linear validate exit=0 (stderr text) and --json exit=0 (structured object); pm linear sync --team ENG --dry-run --skip-preflight-network exit=0 printing the offline GraphQL plan." | ||
| close_reason: "All 11 source any eliminated with real Linear GraphQL + SDK types; build/test(63)/typecheck/changelog gates green; zero-any grep empty; real activation proof in throwaway workspace (pm linear --help exit 0 with all subcommands, host commands intact, validate + dry-run paths exercised, JSON and stderr modes correct)." | ||
| body: "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| {"ts":"2026-07-27T21:38:19.988Z","author":"pi-agent","author_source":"asserted","agent_harness":"pi","op":"create","patch":[{"op":"add","path":"/metadata/id","value":"pm-linear-pfmo"},{"op":"add","path":"/metadata/title","value":"Eliminate all source any with real Linear GraphQL and SDK handler types"},{"op":"add","path":"/metadata/description","value":"Remove the 11 remaining any annotations in index.ts: (A) type the four Linear GraphQL response sites (team query, viewer probe, issue create/update mutations) with a generic LinearResponse<T> envelope plus per-operation data types, and (B) replace the any handler/context params (isJsonMode, renderImportDryRun, registerPreflight callback) with the real SDK types CommandHandlerContext, ImportExportContext, and PreflightOverrideContext from @unbrained/pm-cli/sdk/authoring. Mirrors the pm-github PR #18 precedent. Typing refactor only: behaviour must not change, all gates (build, test, typecheck, changelog check, zero-any grep) must pass, plus real activation proof in a throwaway workspace."},{"op":"add","path":"/metadata/type","value":"Chore"},{"op":"add","path":"/metadata/status","value":"open"},{"op":"add","path":"/metadata/priority","value":2},{"op":"add","path":"/metadata/tags","value":[]},{"op":"add","path":"/metadata/created_at","value":"2026-07-27T21:38:19.988Z"},{"op":"add","path":"/metadata/updated_at","value":"2026-07-27T21:38:19.988Z"},{"op":"add","path":"/metadata/author","value":"pi-agent"}],"before_hash":"3cc22dff72be7b14824654a7a64ea62b04799939b2fee54c1b5f52ca60bf6df0","after_hash":"8b0316660ff3cce2faf6d911c0932753efae35e5a64526de84cf05b7fa690d77","message":""} | ||
| {"ts":"2026-07-27T21:38:26.736Z","author":"pi-agent","author_source":"asserted","agent_harness":"pi","op":"update","patch":[{"op":"replace","path":"/metadata/updated_at","value":"2026-07-27T21:38:26.736Z"},{"op":"replace","path":"/metadata/status","value":"in_progress"}],"before_hash":"8b0316660ff3cce2faf6d911c0932753efae35e5a64526de84cf05b7fa690d77","after_hash":"6d144eefd2e8c0ada13a64cb362a3466c86b5862be0dd6da131f20b3b6445e28"} | ||
| {"ts":"2026-07-27T21:42:18.673Z","author":"pi-agent","author_source":"asserted","agent_harness":"pi","op":"note_add","patch":[{"op":"replace","path":"/metadata/updated_at","value":"2026-07-27T21:42:18.673Z"},{"op":"add","path":"/metadata/notes","value":[{"created_at":"2026-07-27T21:42:18.672Z","author":"pi-agent","text":"Two clusters fixed. (A) Linear GraphQL: LinearResponse is now generic LinearResponse<TData> { data?: TData; errors?: LinearGraphQLError[] }; linearRequest/linearRequestOnce take a type parameter. New data types: LinearIssuesData (paginated issues query), LinearTeamData + LinearTeamNode (TEAM_QUERY), LinearViewerData (viewer{id} credential probe). The issueCreate/issueUpdate mutation sites read only the error envelope, so they are typed linearRequest<unknown> (no invented schema mirror). JSON.parse wire boundary keeps its single deserialization cast, now as LinearResponse<TData>. (B) SDK contexts: isJsonMode and renderImportDryRun now take CommandHandlerContext | ImportExportContext, registerPreflight callback takes PreflightOverrideContext; all imported type-only from @unbrained/pm-cli/sdk/authoring (same subpath as the existing ExtensionApi/ExtensionModule imports, so no runtime module edge). --json stays read from ctx.global.json (correct contract); defensive ?. chains kept. Gates: build ok, npm test 63/63 pass, tsc --noEmit clean, changelog:check ok, zero-any grep empty. Activation proof in /tmp/pm-linear-proof: pm linear --help exit=0 listing export/import/sync/validate; pm linear sync --help exit=0 with full flags; pm list --json exit=0; pm health exit=0; pm linear validate exit=0 (stderr text) and --json exit=0 (structured object); pm linear sync --team ENG --dry-run --skip-preflight-network exit=0 printing the offline GraphQL plan."}]}],"before_hash":"6d144eefd2e8c0ada13a64cb362a3466c86b5862be0dd6da131f20b3b6445e28","after_hash":"ee66c4c078ba66df785750687022295b4d5932fb08712dc7a8b412d9d2f42ace"} | ||
| {"ts":"2026-07-27T21:42:26.676Z","author":"pi-agent","author_source":"asserted","agent_harness":"pi","op":"close","patch":[{"op":"replace","path":"/metadata/updated_at","value":"2026-07-27T21:42:26.676Z"},{"op":"replace","path":"/metadata/status","value":"closed"},{"op":"add","path":"/metadata/closed_at","value":"2026-07-27T21:42:26.675Z"},{"op":"add","path":"/metadata/close_reason","value":"All 11 source any eliminated with real Linear GraphQL + SDK types; build/test(63)/typecheck/changelog gates green; zero-any grep empty; real activation proof in throwaway workspace (pm linear --help exit 0 with all subcommands, host commands intact, validate + dry-run paths exercised, JSON and stderr modes correct)."}],"before_hash":"ee66c4c078ba66df785750687022295b4d5932fb08712dc7a8b412d9d2f42ace","after_hash":"0e1a0064447eaa71453276aab804ef3fa15818b0dcfb4d9326da2607a4417cde"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.