Repository navigation
[3556 by Claude Opus 5.5] Official plugin: Linear (start work from a ticket, keep the ticket in sync) - #3588
Conversation
…a source. The tests I ran pass. I did not test against a real Linear workspace, and I did not run the full repository suite or the existing Plugins Playwright specs. How it works - Hand-off: when a ticket in a mapped team or project gets the trigger label (`propr` by default), the plugin creates one GitHub issue. The issue has the ticket reference and title, the description quoted, a link back to the ticket, and ProPR's trigger label (`AI` by default) as its only label. The plugin reads the ticket back from Linear's API before deciding. - One issue per ticket: tickets are remembered by id. A retried webhook, a replayed delivery or re-adding the label creates nothing. - Untrusted text: ticket text only becomes the issue's title and body. HTML, `<!-- -->` markers and `@mentions` are made harmless. - Sync-back: a comment for each of the six events, each switchable, plus optional state moves when the pull request opens and when it merges. Each comment and each move happens once per ticket. Comments contain only ProPR's own sentence, numbers, coded values and GitHub links. - Missing state name: if the ticket's team has no state of that name, the plugin logs a warning in Activity and skips the move; the comment and later events still go ahead. - Agent context: Linear's MCP server at its read-only endpoint (`/mcp/readonly`), plus a `linear-ticket` skill. - Shared helper: the ticket-to-issue creation, de-duplication and sync-back logic is in `packages/plugins/_shared/` (`trackerIssue.ts`, `trackerRecords.ts`, `trackerSync.ts`) so the Jira plugin can reuse it. Platform changes - `optionsFrom`: a text setting or a repository map can name a handler that loads its choices from the service. The new route `GET /api/instance/plugins/v1/:pluginId/settings/:settingKey/options` is for administrators only. The handler runs even while the plugin is disabled, can make outbound requests but gets no ProPR permissions. The OpenAPI spec and client types are regenerated. - Raw API key header: Linear's personal API keys must be sent without `Bearer`, which `ctx.http` couldn't do. A token connection can now declare `"authorization": "raw"`. - Form: settings with `optionsFrom` become dropdowns with Reload choices. Before the key is set, the field shows "Linear is not connected yet…" and stays a text box. Tests and checks - Plugins package: 73 pass, 12 of them new Linear tests. I broke the de-duplication, the HTML escaping and the redelivery tracking on purpose, and the tests failed each time. - New core test through ProPR's real webhook receiver: passes. The existing core plugin suites (159) also pass. - API: the new options route test and the 7 existing plugin, OpenAPI and authorization suites pass. - Also passing: shared (23), Plugins page UI (69), `plugins:check` (6 plugins), the docs build, the OpenAPI check, typechecks, and zero-warning lint on the changed files. - Changed existing tests: the registry tests list `linear` now, and the core test helper `pluginHandlerFixture` can set connections before enabling. Things to know - Linear's MCP docs don't publish tool names, so the read-tool allow-list in the manifest is based on third-party listings. A name the server doesn't have is just never offered. - I found no published sample of a label-change webhook payload, so the plugin doesn't rely on it: it only uses it to spot that labels changed, then reads the ticket from the API. - The API key permission names in the docs (Read, Write, Create comments) are from memory, not checked against Linear's docs. - The plugin remembers roughly 800 tickets at a time, each for a year. If one is forgotten, re-adding its label creates a new issue (documented). - Two webhook deliveries for the same ticket arriving at the same moment could in theory both create an issue, the same race the Slack plugin accepts. I captured four previews of the Configure step (desktop and phone; loaded choices and the not-connected error) from the real manifest with mocked API data. I used a temporary Playwright spec and deleted it afterwards. Sources: [Linear GraphQL](https://linear.app/developers/graphql), [Linear webhooks](https://linear.app/developers/webhooks), [Linear MCP](https://linear.app/docs/mcp), [Hookdeck Linear guide](https://hookdeck.com/webhooks/skills/linear-webhooks), [Cotera Linear reference](https://cotera.co/docs/reference/webhooks/linear), [Composio Linear MCP](https://composio.dev/toolkits/linear_mcp) Acceptance criteria - AC1: met — `packages/plugins/test/linear.test.ts` (one issue with the link and trigger label; repeated and replayed deliveries create nothing; unmapped tickets, other label changes, removed labels and other updates do nothing) and `packages/core/test/linearPluginEvents.test.ts` (forged, missing or tampered signatures get 401 before any plugin code runs; a repeated `Linear-Delivery` gets 409) - AC2: met — `linear.test.ts` ("each sync-back event posts its comment and state change when switched on, once, and nothing when off" and "a state name the ticket's team lacks is reported in Activity and does not block…") - AC3: met — `propr-ui/src/pages/PluginsPage/PluginSettingOptions.test.tsx` (dropdowns plus the not-connected error), `linear.test.ts` (teams, projects and states loaders), `packages/api/test/pluginSettingOptionsRoutes.test.ts` (members, non-durable admins and signed-out users refused before Linear is called) - AC4: met — `linear.test.ts` ("ticket text cannot affect the repository, the labels or the model (injection)") - AC5: met — `linear.test.ts` (sentinel test: ticket text and task output never reach Linear requests or logs; ticket text appears only in the created issue) and `linearPluginEvents.test.ts` (no ticket text or key in Activity) - AC6: met — `packages/plugins/linear/README.md` (setup, permissions and scopes, manual smoke-test checklist, vendor links) and `docs/docs/plugins/linear.md`
|
/ultrafix goal=8 max=10 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 10) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThis PR implements Linear intake, sync-back, and service-loaded settings choices with substantial test coverage. It needs changes before merge: concurrent intake can lose tracking records, and two valid input sizes exceed downstream limits. ✅ Scoped settings access — The options route checks durable administrator authority and removes ProPR permissions from the handler context. ✅ Controlled outbound content — Sync comments use explicit templates rather than copying ticket descriptions or task output. ✅ Passing current checks — The supplied authoritative status reports 35 passed checks, no failures, and no pending checks. This review used static analysis of the supplied code; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Concurrent intake loses ticket records
F2: 🔴 Supported choice lists exceed runner limits
F3: 🔴 Escaping can exceed issue-body limits
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Correct Activity troubleshooting guidanceThe new Linear documentation promises specific intake errors and warnings in Activity, but the supplied ScoreThe implementation has substantial coverage and passing checks, but the tracking race and size-limit mismatches leave core intake and configuration behavior incorrect for reachable cases. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit aef7111
Summary of ChangesI fixed F1, F2 and F3, and each new regression test fails when its fix is removed. The one thing not tested is the Postgres locking path for F1, because there is no Postgres in this container; every database test ran on SQLite. F1: concurrent intake loses ticket records
F2: large choice lists rejected by the runner
F3: escaping can push the issue body past its limit
I also updated the plugin docs ( Checks run: plugins suite (78 pass), all core Found separately, not changed: the Slack plugin's The PR description still says that two simultaneous deliveries for one ticket could both create an issue. That is no longer true and should be removed from it. There's no visual change, so I made no previews. Review digestRisk-tiered paths
Validation evidence
Diff size: 14 files changed, +429/−83 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…hen its fix is removed. The one thing not tested is the Postgres locking path for F1, because there is no Postgres in this container; every database test ran on SQLite. I fixed F1, F2 and F3, and each new regression test fails when its fix is removed. The one thing not tested is the Postgres locking path for F1, because there is no Postgres in this container; every database test ran on SQLite. **F1: concurrent intake loses ticket records** - **Platform change:** plugins get a new `ctx.state.update(key, change)`, which reads and replaces one key atomically. On Postgres it first locks the installation row with `FOR UPDATE`, before the existing shared-lock check, because two transactions both upgrading a shared lock would deadlock. On SQLite, write transactions already run one at a time. The `change` function must not await anything, and returning `undefined` leaves the value as it is. Without this, plugins only had separate `get` and `set` calls. - **Tracker records** (`trackerRecords.ts`, `trackerIssue.ts`): checking whether a ticket was already handed over and reserving it is now one atomic step (`reserveTicket`). Writing the created record and deleting a failed one also use `update`. So of two deliveries for the same ticket, only one creates an issue, and tickets sharing a shard no longer overwrite each other. - **Same defect in sync-back progress:** linking a pull request and marking an action done were also separate read-then-write steps on shared shards, so a lost record could repeat a comment. Both now go through a new atomic `updateProgress`. - **Tests:** - `packages/core/test/pluginStateUpdate.test.ts` uses the real store, with one store per simulated process. It covers 40 concurrent updates to one key, and four tickets sharing a shard, each delivered twice: every record is kept and exactly one issue is created per ticket. - `packages/plugins/test/trackerShared.test.ts` covers the same cases through the test kit, plus concurrent progress writes. **F2: large choice lists rejected by the runner** - A `setting_options` run now gets a result budget of `PLUGIN_SETTING_OPTIONS_LIMITS.resultBytes` (about 1 MB). That is enough for 250 choices at their full value and label lengths, even if every character is JSON-escaped. Other handlers keep the 16 KiB limit. - The Linear loaders now trim their results to the contract: at most 250 choices, labels cut to 200 characters on whole characters. - **Test:** `pluginSettingOptionsRoutes.test.ts` now asks for 250 teams with long multibyte labels (over 16 KiB) and gets 200 with all 250. A list of 500 teams comes back cut to 250. **F3: escaping can push the issue body past its limit** - `inertQuote` now takes a byte budget and applies it after escaping and quoting. It cuts only between whole entities, whole characters, and an `@` with its word joiner. `ticketIssueBody` gives the description whatever the wrapper text leaves of `ISSUE_BODY_BYTES` (the 65,536 limit minus 1 KiB kept free for the attribution marker ProPR appends). - **Tests:** 14,000 `&`, 19,999 `<` and mixed `&<>` descriptions are created against a stand-in for `createIssue` that enforces the limit including the marker. CJK, emoji and accented descriptions are cut with no split characters or entities and no mention left live. I also updated the plugin docs (`plugins.md`, `plugin-runtime.md`) and the Linear README for `update` and the larger options result. **Checks run:** plugins suite (78 pass), all core `plugin*` suites plus the Linear webhook suite (164 pass; six of them need `--experimental-test-module-mocks`), shared (136 pass), the options route test, `plugins:check` (6 plugins), typechecks of shared, plugins, core and api, and zero-warning lint on the changed files. I did not run the full repository suite, the docs build or Playwright. **Found separately, not changed:** the Slack plugin's `mentionRecords.ts` (an earlier commit on this branch) has the same read-then-write pattern on its shards. It could now use `ctx.state.update` too. The PR description still says that two simultaneous deliveries for one ticket could both create an issue. That is no longer true and should be removed from it. There's no visual change, so I made no previews. PR: #3588 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements Linear intake, sync-back, and service-backed settings choices with substantial fixture coverage. It needs a localized correctness fix before merge: a transient GitHub lookup failure can permanently discard a pull request’s ticket association. ✅ Scoped settings access — The options route checks durable administrator authority and runs handlers with an empty ProPR permission grant. ✅ Atomic intake reservation — Ticket reservation uses ✅ Bounded issue content — Description escaping accounts for UTF-8 size and preserves complete entities and characters when truncating. The supplied current-head status shows 31 passed checks, three pending, and no failures. This review used static analysis only; no commands or tests were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F4: 🔴 Retry failed pull request association lookups
SuggestionsThese are optional follow-ups and are not sent to S2: 🟢 Align troubleshooting with retained diagnosticsThe new Linear documentation promises specific webhook errors and mapping explanations in Activity, but ScoreThe implementation has strong scope controls and useful boundary tests, but the association failure path can silently disable sync-back for an otherwise supported ticket. The remaining checks are pending, not failed. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit a100ff8
Summary of ChangesI fixed F4. If the pull request lookup fails while linking a pull request to its ticket, the delivery now fails and is retried, instead of being reported as The change is in
Regression test in
To support this, the test kit has a new Verification
Siblings checked
Separate discovery, not changed: a later review or merge event still cannot find the ticket on its own, because only No previews were made, since nothing visible changed. Review digestRisk-tiered paths
Validation evidence
Diff size: 2 files changed, +35/−5 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…a pull request to its ticket, the delivery now fails and is retried, instead of being reported as `not_tracked` and dropped. I fixed F4. If the pull request lookup fails while linking a pull request to its ticket, the delivery now fails and is retried, instead of being reported as `not_tracked` and dropped. **The change** is in `packages/plugins/_shared/trackerSync.ts`, in `ticketOfPullRequest`. - A failed `ctx.propr.getPullRequest` call is now thrown as a `PluginDeliveryError` that names the pull request. - If ProPR or GitHub is unavailable (`unavailable`), or the error is unexpected, the delivery is retried on the dispatcher's normal schedule. - A refusal (`permission_denied`, `repository_not_allowed`, other SDK codes) fails the delivery for good. Retrying cannot fix a missing permission. - `not_tracked` now only means the lookup worked and the branch matches no ticket this plugin handed over. **Regression test** in `packages/plugins/test/linear.test.ts`: "a failed pull request lookup fails the delivery to be retried, and the retry links the ticket for the merge". - The first `opened` delivery fails while ProPR is unavailable: it throws a retryable error and posts no comment. - The retry links the ticket and posts the opening comment. - A later `merged` event, with the lookup failing again, still reaches ENG-123 through the stored link: it posts the comment and moves the ticket to Done. - A permission refusal gives a permanent error. To support this, the test kit has a new `pullRequestLookup` option. **Verification** - With the fix removed, the new test fails; with it, it passes. - The plugins suite passes (79 of 79), and the plugins typecheck and zero-warning lint on both changed files are clean. - I did not run the full repository suite. **Siblings checked** - `taskStep` and the stored-record lookups (`findTicketByIssue`, `findTicketByPullRequest`) already let failures through. - `issueLink` and `pullLink` still catch lookup failures, on purpose. A failure there only leaves the GitHub link out of a comment; it never decides whether the ticket is found. **Separate discovery, not changed:** a later review or merge event still cannot find the ticket on its own, because only `opened` events look at the branch. If every retry of the `opened` delivery fails, those later events are reported as `not_tracked`. Fixing that means looking up the branch on every pull request event, which is a larger change than F4 asked for. No previews were made, since nothing visible changed. PR: #3588 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
⏳ Ultrafix is waiting for CI before the next These blocking checks on
Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops. |
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR adds Linear intake, sync-back, and service-backed settings choices with substantial fixture coverage. It needs a localized correctness fix before merge: retrying an older failed state move can undo a completed merge transition. ✅ Restricted settings access — The options route checks durable administrator authority, and its handler receives no ProPR permissions. ✅ Bounded issue content — Description escaping accounts for UTF-8 expansion and preserves whole entities, mentions, and characters when truncating. ✅ Atomic ticket reservation — Intake uses This review used the supplied code only; no commands or tests were run. The authoritative checks show 30 passed, four pending, and no failures. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F5: 🔴 Retried opening move can reverse completion
SuggestionsThese are optional follow-ups and are not sent to S3: 🟢 Align troubleshooting with stored diagnosticsThe new Linear documentation says Activity shows specific intake errors and mapping explanations, but the supplied runtime documentation states that webhook diagnostics discard handler messages and retain generic failures. Adjusting those troubleshooting instructions would help administrators find usable evidence. This is documentation cleanup rather than a blocker to the integration’s core behavior. S4: 🟢 Capture a real integration smoke testThe fixtures exercise many important cases, but the implementation summary acknowledges that no real Linear workspace was tested and that webhook examples and MCP tool names were partly inferred. Running the documented smoke test and retaining sanitized payload shapes would improve confidence in vendor compatibility. No concrete incompatibility is established by the supplied code, so this remains optional validation. ScoreThe implementation is substantial and well covered by targeted tests, but the demonstrated retry sequence can reverse a completed ticket’s workflow state. A localized transition guard and regression test are needed before merge. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit beaf5ea
Summary of ChangesI fixed F5. Retrying a failed opening delivery after its pull request has been merged no longer moves the ticket back to "In Review". Any opening comment that failed is still posted on that retry. The fix
Regression tests (
Each test fails when its fix is removed. With the planner check removed, test 1 still sends no move, because the second check catches it. It fails on its "nothing left to do" assertion instead. Checks run: all 81 plugins tests pass, as do the 3 Linear core webhook tests and Docs: I added a sentence each to The change has no visible UI, so there are no previews. Review digestRisk-tiered paths
Validation evidence
Diff size: 5 files changed, +81/−8 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…ll request has been merged no longer moves the ticket back to "In Review". Any opening comment that failed is still posted on that retry.
I fixed F5. Retrying a failed opening delivery after its pull request has been merged no longer moves the ticket back to "In Review". Any opening comment that failed is still posted on that retry.
**The fix**
- **Planner** (`packages/plugins/_shared/trackerSync.ts`): a move can now name a later move that replaces it. The opening move of PR *n* is replaced by `merged:<n>:move`. If that merge marker is already recorded, `planSync` no longer plans the opening move. The comment is planned as before, so a failed comment is still retried.
- **Just before the move is sent** (`packages/plugins/linear/sync.ts`): `run` reads the progress again right before it sends `issueUpdate`, using a new shared helper `moveSuperseded`. The check runs after the comment is posted and the team's states are read. Without it, a merge recorded while the opening delivery was posting its comment would still be undone. If the move is skipped, Activity gets an info line ("Did not move ENG-123 back: its pull request was merged already"). The move is not marked as done, because it never happened.
- **What still can't be prevented:** a merge that lands between that last read and Linear applying the update. That's a race between two outside systems, so I didn't try to make it atomic, and the code comment says so.
- **Scope:** the check is per pull request. If the same ticket gets a new pull request after the merge, that pull request's opening move still happens.
**Regression tests** (`packages/plugins/test/linear.test.ts`)
1. The sequence from the finding: Linear rejects the opening move on three attempts, the merge moves the ticket to "Done", then the opening delivery is retried by hand. No move is sent. This runs twice:
- with the opening comment already posted: the retry does nothing and isn't reposted.
- with the opening comment also failed: the retry posts only the comment.
The test also checks that a second pull request opened after the merge still moves the ticket.
2. The merge marker is written while the opening delivery is reading the team's states. The move is not sent, and the info line is logged.
Each test fails when its fix is removed. With the planner check removed, test 1 still sends no move, because the second check catches it. It fails on its "nothing left to do" assertion instead.
**Checks run:** all 81 plugins tests pass, as do the 3 Linear core webhook tests and `plugins:check` (6 plugins). The plugins typecheck passes, and lint on the changed files gives zero warnings. I didn't run the docs build.
**Docs:** I added a sentence each to `docs/docs/plugins/linear.md` and the Linear README about this behaviour.
The change has no visible UI, so there are no previews.
PR: #3588
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR adds Linear intake, sync-back, and service-backed settings choices with substantial focused coverage. It needs changes before merge: ticket bookkeeping can lose sync associations and leave successfully created issues permanently marked pending. ✅ Scoped configuration access — The options route checks durable administrator access and runs handlers without ProPR permissions. ✅ Controlled issue creation — Repository and label selection come from settings; description escaping neutralizes HTML markers and mentions. ✅ Atomic ticket reservation — Shard updates prevent concurrent deliveries from independently reserving the same ticket. This review used the supplied code only; no commands or tests were run. Current checks show 31 passed, three pending, and no failures. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F6: 🔴 Preserve links to earlier pull requests
F7: 🔴 Reserve room for completed ticket records
SuggestionsThese are optional follow-ups and are not sent to S5: 🟢 Align troubleshooting with retained diagnosticsThe new Linear documentation says Activity displays specific intake errors and warnings, but the supplied ScoreThe implementation has strong authorization boundaries and focused tests, but two bookkeeping defects can permanently suppress expected sync-back. Both appear addressable with localized changes. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit b49f263
Summary of ChangesI fixed F6 and F7. All 85 plugin tests pass and so does the core Linear webhook test. I removed each fix in turn and its new regression test failed every time. Typecheck and zero-warning lint on the plugin package are clean. F6: earlier pull requests stay linked to their ticket
F7: room to finish every pending hand-off
The ticket and progress shards are still updated atomically, so the concurrent cases are guarded by that, not by a new lock. The one remaining race is between a GitHub request and the state update that follows it; reserving room removes the only way that update could fail for lack of space. As before, there is no real Postgres or Linear workspace test. I found nothing else outside F6 and F7. There are no previews because nothing visible changed. Review digestRisk-tiered paths
Validation evidence
Diff size: 4 files changed, +156/−19 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
… core Linear webhook test. I removed each fix in turn and its new regression test failed every time. Typecheck and zero-warning lint on the plugin package are clean. I fixed F6 and F7. All 85 plugin tests pass and so does the core Linear webhook test. I removed each fix in turn and its new regression test failed every time. Typecheck and zero-warning lint on the plugin package are clean. **F6: earlier pull requests stay linked to their ticket** - **The bug:** a ticket's progress record stored one pull request number, so linking #56 replaced #55. When #55 later merged or closed, the event was dropped as `not_tracked`. - **The fix:** the record now keeps a list of the ticket's pull requests, oldest first, and linking adds to it (`withPullRequest` in `trackerRecords.ts`, used by `linkPullRequest` in `trackerSync.ts`). Looking up a ticket by pull request searches the whole list. - **List limit:** at most 10 pull requests per ticket. Past that, ones already merged or closed are dropped first, then the oldest. - **Same mistake in a second place:** when a progress shard is full, records of "finished" tickets are forgotten first. A ticket counted as finished as soon as any one of its pull requests merged or closed. A ticket whose #55 closed while #56 was still open was therefore dropped early, losing the #56 link. A ticket now counts as finished only once all its linked pull requests have. - **Tests:** - `linear.test.ts`: opens #55, then #56, then merges #55 and closes #56. The ticket gets both comments and the "Done" move. - `trackerShared.test.ts`: covers the 10-link limit and the full-shard eviction. **F7: room to finish every pending hand-off** - **The bug:** a reservation only checked that the smaller pending record fit. Many hand-offs reserved at once could fill a shard, and then saving a created issue's number failed with nothing left to drop. - **The fix:** the shard's size is now measured as if every pending record had already finished with the largest possible issue number. A new reservation that doesn't fit by that measure is refused before its GitHub issue is created, with the existing "retried later" error. Finishing a pending record never makes the shard bigger than that measure, so saving the issue number can't run out of room. - **Test:** `trackerShared.test.ts` starts 260 hand-offs in one shard and lets them all reserve before any GitHub request answers. It checks that: - some reservations are refused, and those are retryable and created no issue. - every issue created is saved with its number, and none is left pending. - the shard stays within its byte limit. - a refused ticket retried later is created. The ticket and progress shards are still updated atomically, so the concurrent cases are guarded by that, not by a new lock. The one remaining race is between a GitHub request and the state update that follows it; reserving room removes the only way that update could fail for lack of space. As before, there is no real Postgres or Linear workspace test. I found nothing else outside F6 and F7. There are no previews because nothing visible changed. PR: #3588 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
|
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR adds Linear intake, sync-back, dynamic settings choices, and shared tracker helpers. It needs a localized correctness fix before merge: a failed opening-event delivery can permanently prevent subsequent merge and close events from reaching the ticket. ✅ Restricted settings loader — The options route checks durable administrator access, and the handler receives no ProPR permissions. ✅ Atomic intake reservation — Ticket reservation uses ✅ Focused boundary coverage — Added tests cover signature rejection, repository mapping, escaped issue bodies, concurrent reservations, and settings-option response limits. This review is a static trace of the supplied code; no commands or tests were run. The authoritative checks show 33 passed, none failed, and one pending. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F8: 🔴 Recover ticket links after opening failures
SuggestionsThese are optional follow-ups and are not sent to S6: 🟢 Document progress retention limits
ScoreThe implementation has substantial targeted coverage and passing current checks, but the missing recovery path can silently lose terminal sync-back updates. A localized association fallback should resolve the blocker. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 925616d
Summary of ChangesI fixed F8. When a merge, close or goal-reached review arrives for a pull request that was never linked to its ticket, the plugin now reads the pull request's branch to find the ticket and saves the link, the same way the opening event does. Before, only the opening event did this. So if the opening delivery used up all its retries without saving a link, the merge or close was reported as What changed (
Tests (
Results: all 86 plugin tests pass, as do the 3 core Linear webhook tests. Typecheck and zero-warning lint on the plugin package are clean. Similar code: task events ( There's nothing visual in this change, so no preview. Review digestRisk-tiered paths
Validation evidence
Diff size: 2 files changed, +56/−21 lines 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…ves for a pull request that was never linked to its ticket, the plugin now reads the pull request's branch to find the ticket and saves the link, the same way the opening event does. Before, only the opening event did this. So if the opening delivery used up all its retries without saving a link, the merge or close was reported as `not_tracked` and its comment and "Done" move were silently dropped. I fixed F8. When a merge, close or goal-reached review arrives for a pull request that was never linked to its ticket, the plugin now reads the pull request's branch to find the ticket and saves the link, the same way the opening event does. Before, only the opening event did this. So if the opening delivery used up all its retries without saving a link, the merge or close was reported as `not_tracked` and its comment and "Done" move were silently dropped. **What changed** (`packages/plugins/_shared/trackerSync.ts`) - **Branch lookup on every sync-back event:** `ticketOfPullRequest` now tries the branch lookup whenever no link is stored, not only for `opened`. - **Failed lookups are retried:** if reading the pull request fails, the delivery fails and is retried, using the existing `lookupFailure`. It is no longer accepted as untracked. Permission or repository refusals are still not retried. - **No lookup for events that do nothing:** the pull request is only read for events that sync something back. A review short of its goal, or any other pull request event, ends before any read. **Tests** (`packages/plugins/test/linear.test.ts`) - **New regression:** the opening delivery fails on all three attempts. The merge then arrives while ProPR is still unavailable, and its delivery fails to be retried rather than being dropped. Once access is back, the retried merge finds ENG-123 from the branch and posts its comment and the "Done" move. A close and a goal-reached review of two other pull requests also find the ticket from their branches. A review short of its goal does nothing and reads no pull request. - **Checked against the old code:** with the old opening-only condition put back, the new test fails; with the fix it passes. - **Changed test helper:** I added an optional `headRefs` setting to the fake pull request lookup. It was needed because the existing "pull request of an issue no ticket created" case relied on merges never reading the branch, and the fake branch always pointed to issue 101. That case now uses a branch for issue 202 and still expects `not_tracked`. **Results:** all 86 plugin tests pass, as do the 3 core Linear webhook tests. Typecheck and zero-warning lint on the plugin package are clean. **Similar code:** task events (`taskStep`) find the ticket by issue number first. They only use a stored pull request link when the event has no issue number, and they have no branch to read, so this defect doesn't apply there and I left them unchanged. There's nothing visual in this change, so no preview. PR: #3588 Comment by: @integry (ID: 6932990290) Model: Claude Opus 5.5
|
/ultrafix |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 10) First action:
|
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThis PR adds Linear intake, sync-back, service-loaded settings, and shared tracker helpers. The implementation is substantial and generally careful, but needs a correction before merge: sync-back can permanently skip events while the initial issue creation is still being recorded. ✅ Scoped configuration access — The options route checks durable administrator authority, and its handler receives no ProPR permissions. ✅ Bounded issue content — Description escaping and byte-budget enforcement preserve the issue wrapper and avoid splitting entities or Unicode characters. ✅ Concurrent intake protection — Ticket reservation uses an atomic state update before creating the GitHub issue. This review used static analysis of the supplied code; no commands or tests were run. Current checks report 32 passed, 10 neutral/skipped, and two pending. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F9: 🔴 Retry events arriving during intake
SuggestionsThese are optional follow-ups and are not sent to S7: 🟢 Align troubleshooting with stored diagnosticsThe new Linear documentation promises webhook-specific Activity messages, including instructions to check the repository after uncertain creation. The supplied webhook runner contract strips handler messages and error text, retaining generic failure diagnostics. Update the troubleshooting guidance to describe what users can actually inspect. This documentation follow-up does not require weakening the existing privacy boundary. ScoreThe permission boundaries, intake deduplication, and focused tests are strong. The intake-to-event ordering gap still permits a required notification to disappear permanently, so the PR is not yet merge-ready. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 7b1e489
Summary of ChangesI fixed F9. A start event that arrives before Linear's hand-off has saved the new issue number is now retried instead of being acknowledged and dropped. Once the hand-off saves the number, the retry posts the start comment once. What changed
Tests (
Results: all 88 plugin tests pass, as do the core Linear webhook test and the state-update test. Plugin typecheck and zero-warning lint are clean. Trade-offs
Nothing visual changed, so there are no previews. Review digestRisk-tiered paths
Validation evidence
Diff size: 3 files changed, +125/−12 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…-off has saved the new issue number is now retried instead of being acknowledged and dropped. Once the hand-off saves the number, the retry posts the start comment once. I fixed F9. A start event that arrives before Linear's hand-off has saved the new issue number is now retried instead of being acknowledged and dropped. Once the hand-off saves the number, the retry posts the start comment once. **What changed** - **One read per lookup** (`_shared/trackerRecords.ts`): `findTicketByIssue` reads each ticket shard once. It returns either the matching created ticket or the repository's tickets that are still pending. A ticket lives in one shard, so a record that finishes during the lookup is seen as pending or as created, never missed by both. - **Retry on a likely match** (`_shared/trackerSync.ts`, new `ticketOfIssue`): if no ticket matches but a pending one in the same repository was reserved less than 90 seconds ago, the plugin reads the GitHub issue. If the issue's title starts with that ticket's reference (as the hand-off writes it), or the issue can't be read, the delivery fails and is retried. The wait is 30 seconds or the time left in the 90 seconds, whichever is shorter. - 90 seconds is three times the 30-second handler time limit. A pending record older than that belongs to a hand-off that ended without saving an issue, so it no longer holds events back. - Waits of 30 seconds use at most 4 attempts, within the dispatcher's 5. - **Other events still skip:** these are still reported as `not_tracked` straight away: - other issues in the same repository - other repositories - events in a repository with no pending hand-off - events that never sync back (`taskStep` now checks this before looking anything up, so a follow-up task's start no longer waits) - **Same path for pull requests:** a pull request event that finds its ticket from the branch name goes through the same check, so an opening that arrives during a hand-off waits too. **Tests** (`test/linear.test.ts`) - **The finding's sequence:** issue creation is paused after GitHub has the issue but before the plugin saves its number. The start event and a pull request opening are each retried. After intake finishes, each posts its comment once, and a redelivery says `done`. - **No unneeded waits:** while a hand-off is under way, an unrelated issue (including one titled `ENG-1234: …` next to ticket `ENG-123`), another repository and a follow-up start all skip at once. An issue that can't be read waits. A pending record older than 90 seconds holds nothing back. - I removed each of the three checks (pending, age, event type) in turn, and each time at least one new test failed. **Results:** all 88 plugin tests pass, as do the core Linear webhook test and the state-update test. Plugin typecheck and zero-warning lint are clean. **Trade-offs** - The dispatcher counts each retry as a failure, and three in a row marks the plugin Degraded. That needs an issue whose title matches a pending ticket and an intake that stays unfinished for a minute or more; normally the second attempt succeeds. - If someone edits the issue title on GitHub while intake is still running, the start event can still be skipped. That is a race with GitHub, not something the plugin can prevent. Nothing visual changed, so there are no previews. PR: #3588 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements Linear intake, sync-back, and service-loaded settings with substantial coverage. It needs a localized correctness fix before merge: progress retention can erase the protection against moving merged tickets backward. ✅ Atomic intake reservation — Ticket reservation uses ✅ Restricted configuration access — The options route checks durable administrator access and removes ProPR permissions from its handler context. ✅ Bounded issue descriptions — Escaping and truncation account for UTF-8 expansion while preserving entities and characters. This review used static tracing only; no commands were run. Current checks report 34 passed, one pending, and no failures. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F10: 🔴 Retain merge protection for linked pulls
SuggestionsThese are optional follow-ups and are not sent to S8: 🟢 Align webhook troubleshooting with ActivityThe new Linear documentation promises specific intake errors and mapping explanations in Activity, but S9: 🟢 Verify the live integrationThe fixture coverage is extensive, but the supplied implementation history reports no real-workspace smoke test. Running the documented checklist would strengthen confidence in label-change payloads, API-key permissions, and MCP tool availability. This is supplementary integration evidence, not a demonstrated code blocker. ScoreThe implementation has strong defensive handling and broad tests, but its bounded progress history can undo a completed workflow state on a supported retry path. The remaining pending check is not itself a blocker. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit c9c75ca
Summary of ChangesI fixed F10. A retried opening delivery no longer moves the ticket back to "In Review" when later pull requests on the same ticket have pushed its merge marker out of the done history. Cause: the only record that a pull request merged was a marker in the done history, and that history keeps only the latest 24 markers. A pull request can stay linked after its markers have been dropped. The opening move then looked like it had never been made, and nothing showed that the merge had overtaken it. Fix (
Tests:
Results: all 90 plugin tests and the core Linear webhook test pass. Typecheck and zero-warning lint on the plugin package are clean. Separate finding, not changed: the "don't move back" guard depends on the merge's own move having happened. If no merged state is configured, the merge records no move marker, so a manual retry of the opening delivery can still move the ticket to the opening state. That was already the case before this PR's fixes and is outside F10. There is no visual change, so I made no previews. Review digestRisk-tiered paths
Validation evidence
Diff size: 4 files changed, +85/−13 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
… ticket back to "In Review" when later pull requests on the same ticket have pushed its merge marker out of the done history. I fixed F10. A retried opening delivery no longer moves the ticket back to "In Review" when later pull requests on the same ticket have pushed its merge marker out of the done history. **Cause:** the only record that a pull request merged was a marker in the done history, and that history keeps only the latest 24 markers. A pull request can stay linked after its markers have been dropped. The opening move then looked like it had never been made, and nothing showed that the merge had overtaken it. **Fix** (`packages/plugins/_shared/trackerRecords.ts`, `trackerSync.ts`): - **Separate field:** each progress record now has a field `f` that holds the merge and close markers (`merged:N:…`, `closed:N:…`) of every pull request still linked. It is kept apart from the rolling history. - **Where it is filled:** `updateProgress` builds `f` from both the stored record and the new one. So callers that rebuild the record without `f` (such as `linkPullRequest`) can't wipe it. A pull request's flags are dropped when it is unlinked, so `f` stays bounded by `PULL_LIMIT`. - **What reads it:** a new `doneMarkers()` combines `f` and the history. Every check that relies on that evidence now uses it: - `planSync`'s done and superseded checks - `moveSuperseded`, the re-read just before the move - `markSyncDone` - the finished-pull check used by `withPullRequest` and by shard eviction Before, those last two could also lose track of a finished pull request once its markers rolled out of the history. - **Older records:** records saved before this change, without `f`, still work. Their surviving merge and close markers are moved into `f` on their next update. **Tests:** - **`linear.test.ts`:** reproduces the review's exact sequence. It asserts that the history no longer holds any marker for #55 while #55 is still linked. The retry then posts the missing opening comment and sends no opening-state change. With the source fix reverted, this test fails on "no move back to the opening state". - **`trackerShared.test.ts`:** checks that the merge markers survive the rolling history and records rebuilt by `linkPullRequest`, and that they are dropped with their pull request when it is unlinked. **Results:** all 90 plugin tests and the core Linear webhook test pass. Typecheck and zero-warning lint on the plugin package are clean. **Separate finding, not changed:** the "don't move back" guard depends on the merge's own move having happened. If no merged state is configured, the merge records no move marker, so a manual retry of the opening delivery can still move the ticket to the opening state. That was already the case before this PR's fixes and is outside F10. There is no visual change, so I made no previews. PR: #3588 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements Linear intake, sync-back, and service-loaded settings through the existing plugin runtime. The shared tracker helpers fit the stated reuse objective. No merge-blocking defect was verified from the supplied diff and surrounding context; merge readiness remains conditional on the pending checks. ✅ Atomic ticket reservation — Intake reserves a ticket through ✅ Restricted settings access — The options route requires durable administrator access and removes ProPR permissions from the handler’s starting context. ✅ Boundary coverage — Added tests cover signature rejection, concurrent reservations, escaped description limits, pending hand-offs, and delayed opening events after merges. This was a static review only. No commands or tests were run. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S10: 🟢 Align Activity troubleshooting guidance
S11: 🟢 Exercise separate database connections
ScoreThe implementation has substantial targeted coverage and no verified blocker in this static review. The supplied current-head status reports 29 passed checks, five pending, and no failures; live Linear behavior remains unverified. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
ℹ️ GitHub auto-merge is turned off for this repository, so ProPR merges this PR itself once it is ready (checks passed or no CI configured, and the review goal met). To let GitHub merge it the moment required checks pass, enable Settings → General → Pull Requests → Allow auto-merge. |
…each. The affected suites pass: 482 tests in the root ultrafix suites and 193 in core status/webhook, with no failures. Typecheck and the zero-warning lint pass for the root, `packages/core` and `packages/shared`. 1. `Last score` is now the real score. The loop usually stops right after a fix step, and a fix step has no score, so the notice always said `unknown`. - The loop state now remembers the score of each review that reports one (`lastReviewScore`). - When the loop stops, that score is used if the final step had none. It goes into the stop notice, the stored final score and the status line's `at 6/10`. - The notice now prints `Last score: 6/10`. It says `unknown` only when no review in the loop produced a score. - The CI-timeout stop notice uses the same score. It shares one header builder with the regular stop notice, in the new `src/jobs/ultrafixStopNotice.ts`. 2. One cycle count everywhere. Cycle counting is defined once in `packages/shared/src/ultrafixCycle.ts`: cycle N holds the Nth review and the Nth fix. - While the loop runs, the status line shows the cycle of the step running or due next. This is the same number as before. - When the loop stops, it records the cycle it stopped in. Normally that is the last completed step's cycle. For a fix that hit a blocker, or a review held back by CI, it is the cycle that step would have had. - The stop notice now says `Stopped in cycle 5 of 10.`. The status line after the stop uses the same number: `Ultrafix stopped after 5 cycles at 6/10`, where #3588 said "after 4". - Older loop states without the stored cycle fall back to the old number. - I moved `getActionCounts` into the same shared file, mainly to keep `ultrafixOrchestrationService.ts` under the 400-line lint limit. It is still re-exported from the old place. 3. The leftover `ultrafix` label is removed on merge or close. This happens in the status sync's merged/closed branch, the same place that removes the status block and the title slot. The new code is `removeLeftoverUltrafixLabel` in `pullRequestStatusFacts.ts`. - It is best-effort: if the removal fails, it is logged and the next status update tries again. - It runs on any closed PR that has the label, not only ones ProPR created. Tests added: - In `test/ultrafixContinuationEntryPoint.test.ts`: - a loop that stops after its final fix reports `6/10` and cycle 2 of 2. - a #3588-style stop during a review reports the cycle the status line showed. - a loop that ends before any review scored still says `unknown`. - In `packages/core/test/pullRequestStatusSync.test.ts`, one test checks that the running and stopped status lines agree, and one checks the label removal (merged, closed, and a failed first try). - I updated the existing CI-timeout wording test in `test/ultrafixCiWait.test.ts` for the new format. When to stop and how many cycles to run are unchanged. The only extra Redis write is the score stored on the state write that already happens after each review. I made no preview images because the changes are text in GitHub comments and the PR status line.
… score and a consistent cycle count (#3614) * I fixed all three problems from #3593 and added regression tests for each. The affected suites pass: 482 tests in the root ultrafix suites and 193 in core status/webhook, with no failures. Typecheck and the zero-warning lint pass for the root, `packages/core` and `packages/shared`. 1. `Last score` is now the real score. The loop usually stops right after a fix step, and a fix step has no score, so the notice always said `unknown`. - The loop state now remembers the score of each review that reports one (`lastReviewScore`). - When the loop stops, that score is used if the final step had none. It goes into the stop notice, the stored final score and the status line's `at 6/10`. - The notice now prints `Last score: 6/10`. It says `unknown` only when no review in the loop produced a score. - The CI-timeout stop notice uses the same score. It shares one header builder with the regular stop notice, in the new `src/jobs/ultrafixStopNotice.ts`. 2. One cycle count everywhere. Cycle counting is defined once in `packages/shared/src/ultrafixCycle.ts`: cycle N holds the Nth review and the Nth fix. - While the loop runs, the status line shows the cycle of the step running or due next. This is the same number as before. - When the loop stops, it records the cycle it stopped in. Normally that is the last completed step's cycle. For a fix that hit a blocker, or a review held back by CI, it is the cycle that step would have had. - The stop notice now says `Stopped in cycle 5 of 10.`. The status line after the stop uses the same number: `Ultrafix stopped after 5 cycles at 6/10`, where #3588 said "after 4". - Older loop states without the stored cycle fall back to the old number. - I moved `getActionCounts` into the same shared file, mainly to keep `ultrafixOrchestrationService.ts` under the 400-line lint limit. It is still re-exported from the old place. 3. The leftover `ultrafix` label is removed on merge or close. This happens in the status sync's merged/closed branch, the same place that removes the status block and the title slot. The new code is `removeLeftoverUltrafixLabel` in `pullRequestStatusFacts.ts`. - It is best-effort: if the removal fails, it is logged and the next status update tries again. - It runs on any closed PR that has the label, not only ones ProPR created. Tests added: - In `test/ultrafixContinuationEntryPoint.test.ts`: - a loop that stops after its final fix reports `6/10` and cycle 2 of 2. - a #3588-style stop during a review reports the cycle the status line showed. - a loop that ends before any review scored still says `unknown`. - In `packages/core/test/pullRequestStatusSync.test.ts`, one test checks that the running and stopped status lines agree, and one checks the label removal (merged, closed, and a failed first try). - I updated the existing CI-timeout wording test in `test/ultrafixCiWait.test.ts` for the new format. When to stop and how many cycles to run are unchanged. The only extra Redis write is the score stored on the state write that already happens after each review. I made no preview images because the changes are text in GitHub comments and the PR status line. * feat(ai): I fixed the Shard 4/4 failure with a one-line change to the test. The failure was a timing flake in `test/agentCapacityAliasOccupancy.test.ts` and has nothing to do with this PR's ultrafix changes: the test and the capacity code it checks weren't touched. I fixed the Shard 4/4 failure with a one-line change to the test. The failure was a timing flake in `test/agentCapacityAliasOccupancy.test.ts` and has nothing to do with this PR's ultrafix changes: the test and the capacity code it checks weren't touched. **What failed:** The subtest "a newer admission generation is not deferred by a live older-generation holder" stopped with `Missing expected rejection: an old-generation job is still deferred`. **Cause:** - The test keeps an old-generation holder alive on a short lease. The lease lasts 600 ms and is renewed every 200 ms. - Partway through, the test calls `checkJobAgentCapacity` for the first time. That call loads `@propr/core` on demand. - Loading `@propr/core` takes about 2.8 s and runs in chunks that pause everything else. Locally each pause was up to 124 ms, with the machine otherwise idle. - On a busy CI machine those pauses can delay the renewals until the lease runs out. The old-generation check then sees a free slot and doesn't refuse, which is what the test expected it to do. - The failed subtest took 2.07 s, which matches the module loading inside the test. **Fix:** The test now runs `await import('@propr/core')` before the short lease starts, with a comment explaining why. The later call then finds the module already loaded and no longer stalls. The test still checks the same things. **Verification:** I built Redis 7.2.7 from source and ran the suite 3 times through `scripts/run-test-suite.mjs` with `PROPR_REQUIRE_REDIS_INTEGRATION=1`, the setting CI uses. It passed each time, 5 of 5 tests. I couldn't recreate the CI load locally, so the original failure wasn't reproduced here. The cause above comes from the CI log and the pause timing I measured. The "Run Full Test Suite" failure is only the summary of the failed shard, so it needs no separate fix. There are no preview images because nothing visible changed. PR: #3614 Comment by: @propr-dev[bot] (ID: 6935539877) Comment by: @propr-dev[bot] (ID: 6935560493) Comment by: @github-actions[bot] (ID: 6935562083) Model: Claude Opus 5.5 --------- Co-authored-by: propr-dev[bot] <1316198+propr-dev[bot]@users.noreply.github.com>
AI Implementation Summary
Closes #3556
Branch:
3556/claude-opus-5-5-official-plugin-linear-st-20261116-1828-z4fCommits: ✅ Changes committed (0fda45a)
AI Processing Completed
Execution Details:
Summary:
I've built the Linear plugin and added the
optionsFromsettings data source. The tests I ran pass. I did not test against a real Linear workspace, and I did not run the full repository suite or the existing Plugins Playwright specs.How it works
proprby default), the plugin creates one GitHub issue. The issue has the ticket reference and title, the description quoted, a link back to the ticket, and ProPR's trigger label (AIby default) as its only label. The plugin reads the ticket back from Linear's API before deciding.<!-- -->markers and@mentionsare made harmless./mcp/readonly), plus alinear-ticketskill.packages/plugins/_shared/(trackerIssue.ts,trackerRecords.ts,trackerSync.ts) so the Jira plugin can reuse it.Platform changes
optionsFrom: a text setting or a repository map can name a handler that loads its choices from the service. The new routeGET /api/instance/plugins/v1/:pluginId/settings/:settingKey/optionsis for administrators only. The handler runs even while the plugin is disabled, can make outbound requests but gets no ProPR permissions. The OpenAPI spec and client types are regenerated.Bearer, whichctx.httpcouldn't do. A token connection can now declare"authorization": "raw".optionsFrombecome dropdowns with Reload choices. Before the key is set, the field shows "Linear is not connected yet…" and stays a text box.Tests and checks
plugins:check(6 plugins), the docs build, the OpenAPI check, typechecks, and zero-warning lint on the changed files.linearnow, and the core test helperpluginHandlerFixturecan set connections before enabling.Things to know
I captured four previews of the Configure step (desktop and phone; loaded choices and the not-connected error) from the real manifest with mocked API data. I used a temporary Playwright spec and deleted it afterwards.
Sources: Linear GraphQL, Linear webhooks, Linear MCP, Hookdeck Linear guide, Cotera Linear reference, Composio Linear MCP
Acceptance criteria
packages/plugins/test/linear.test.ts(one issue with the link and trigger label; repeated and replayed deliveries create nothing; unmapped tickets, other label changes, removed labels and other updates do nothing) andpackages/core/test/linearPluginEvents.test.ts(forged, missing or tampered signatures get 401 before any plugin code runs; a repeatedLinear-Deliverygets 409)linear.test.ts("each sync-back event posts its comment and state change when switched on, once, and nothing when off" and "a state name the ticket's team lacks is reported in Activity and does not block…")propr-ui/src/pages/PluginsPage/PluginSettingOptions.test.tsx(dropdowns plus the not-connected error),linear.test.ts(teams, projects and states loaders),packages/api/test/pluginSettingOptionsRoutes.test.ts(members, non-durable admins and signed-out users refused before Linear is called)linear.test.ts("ticket text cannot affect the repository, the labels or the model (injection)")linear.test.ts(sentinel test: ticket text and task output never reach Linear requests or logs; ticket text appears only in the created issue) andlinearPluginEvents.test.ts(no ticket text or key in Activity)packages/plugins/linear/README.md(setup, permissions and scopes, manual smoke-test checklist, vendor links) anddocs/docs/plugins/linear.mdReview digest
Acceptance criteria (6 of 6 met, as stated by the agent)
Fixture-based handler tests: trigger label added on a mapped ticket creates exactly one GitHub issue with link and trigger label; repeated or replayed webhooks create no second issue; unmapped tickets and other label changes do nothing; invalid signature is rejected before plugin code runs.—`packages/plugins/test/linear.test.ts` (one issue with the link and trigger label; repeated and replayed deliveries create nothing; unmapped tickets, other label changes, removed labels and other updates do nothing) and `packages/core/test/linearPluginEvents.test.ts` (forged, missing or tampered si…Each sync-back event posts the expected comment or state change when switched on and nothing when off; a missing state name is reported in Activity and does not block other events.—`linear.test.ts` ("each sync-back event posts its comment and state change when switched on, once, and nothing when off" and "a state name the ticket's team lacks is reported in Activity and does not block…")The configure form loads teams and workflow states through `optionsFrom`, with a clear error when not connected; the options route refuses non-administrators.—`propr-ui/src/pages/PluginsPage/PluginSettingOptions.test.tsx` (dropdowns plus the not-connected error), `linear.test.ts` (teams, projects and states loaders), `packages/api/test/pluginSettingOptionsRoutes.test.ts` (members, non-durable admins and signed-out users refused before Linear is called)Ticket text cannot affect repository, labels or model (injection test).—`linear.test.ts` ("ticket text cannot affect the repository, the labels or the model (injection)")No ticket text is sent anywhere except into the created GitHub issue; no code or logs are posted to tickets.—`linear.test.ts` (sentinel test: ticket text and task output never reach Linear requests or logs; ticket text appears only in the created issue) and `linearPluginEvents.test.ts` (no ticket text or key in Activity)README with setup steps, required permissions or scopes, and a manual smoke-test checklist; `docs/docs/plugins/linear.md`.—`packages/plugins/linear/README.md` (setup, permissions and scopes, manual smoke-test checklist, vendor links) and `docs/docs/plugins/linear.md`Risk-tiered paths
packages/api/openapi/routeDocsPlugins.ts(+6/−0)packages/api/openapi/schemasPlugins.ts(+6/−1)packages/api/pluginRouteRegistry.ts(+1/−0)packages/api/routes/pluginRoutes.ts(+5/−1)packages/client/src/generated/apiTypes.ts(+17/−2)packages/core/src/plugins/pluginContext.ts(+19/−10)packages/core/src/plugins/pluginHandlerRunner.ts(+3/−3)packages/core/src/plugins/pluginHttp.ts(+9/−6)packages/core/src/plugins/pluginSettingOptions.ts(added, +33/−0)packages/plugins/_shared/trackerIssue.ts(added, +118/−0)packages/plugins/_shared/trackerRecords.ts(added, +120/−0)packages/plugins/_shared/trackerSync.ts(added, +157/−0)packages/plugins/linear/api.ts(added, +122/−0)packages/plugins/linear/handlers.ts(added, +22/−0)packages/plugins/linear/icon.svg(added, +1/−0)packages/plugins/linear/intake.ts(added, +99/−0)packages/plugins/linear/manifest.json(added, +174/−0)packages/plugins/linear/settings.ts(added, +89/−0)packages/plugins/linear/sync.ts(added, +84/−0)packages/plugins/registry.json(+1/−0)packages/shared/src/pluginSdk.ts(+42/−2)packages/shared/src/plugins.ts(+26/−0)propr-ui/src/api/pluginsApi.ts(+3/−0)propr-ui/src/pages/PluginsPage/PluginSettingFields.tsx(+43/−4)propr-ui/src/pages/PluginsPage/PluginSettingOptions.tsx(added, +30/−0)propr-ui/src/pages/PluginsPage/PluginSettingsForm.tsx(+1/−1)propr-ui/src/pages/PluginsPage/usePluginSettingChoices.ts(added, +31/−0)docs/docs/architecture/plugin-runtime.md(+16/−0)docs/docs/features/plugins.md(+26/−2)docs/docs/plugins/linear.md(added, +164/−0)docs/sidebars.ts(+1/−0)docs/static/openapi/propr-api.yaml(+81/−4)packages/api/test/pluginSettingOptionsRoutes.test.ts(added, +110/−0)packages/core/test/helpers/pluginHandlerFixture.ts(+4/−2)packages/core/test/linearPluginEvents.test.ts(added, +127/−0)packages/plugins/linear/README.md(added, +126/−0)packages/plugins/linear/fixtures/graphql.json(added, +259/−0)packages/plugins/linear/fixtures/webhooks.json(added, +70/−0)packages/plugins/linear/skills/linear-ticket/SKILL.md(added, +26/−0)packages/plugins/test/linear.test.ts(added, +317/−0)packages/plugins/test/registry.test.ts(+16/−4)packages/shared/test/plugins.test.ts(+35/−0)propr-ui/src/pages/PluginsPage/PluginSettingOptions.test.tsx(added, +79/−0)Validation evidence
Diff size: 43 files changed, +2,719/−42 lines
Detailed Logs:
7c181e2b-bbdd-43f1-9294-c6630ecfab7dLog files stored at:
/usr/src/app/logs/executions/issue-3556-2026-11-16T18-58-55-932Z-conversation.json/usr/src/app/logs/executions/issue-3556-2026-11-16T18-58-55-932Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #3556.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!
Visual preview
Not connected yet (desktop)
Before the Linear API key is set, each optionsFrom field shows the plugin's message and keeps a text box.
Full-size original
Workflow states loaded from Linear (desktop)
The state-move settings as selects of Linear workflow state names, each labelled with the teams that have it.
Full-size original
Repository teams loaded from Linear (desktop)
The Linear plugin's Configure step: Repository teams and Repository projects load their choices through optionsFrom, with a select per repository, the choice count and Reload choices. API data is mocked; the manifest is the real one.
Full-size original
Repository teams at phone width
The same loaded-choices field at 390 px wide.
Full-size original