plugin-git-manager 1.2.27 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/README.md +151 -108
  2. package/client-v2.d.ts +2 -2
  3. package/client-v2.js +1 -1
  4. package/client.d.ts +3 -3
  5. package/client.js +1 -1
  6. package/dist/client/{326.90c276058682b536.js → 313.d38fc1d40c4589b9.js} +1 -1
  7. package/dist/client/941.1793e67472872992.js +10 -0
  8. package/dist/client/index.js +1 -1
  9. package/dist/client-v2/156.445366026c1cc9a8.js +10 -0
  10. package/dist/client-v2/{326.42b7b53651ffab3a.js → 313.3c867179c3a1e817.js} +1 -1
  11. package/dist/client-v2/434.19c7579c06b9077c.js +10 -0
  12. package/dist/client-v2/928.bba701b5a1ece58e.js +10 -0
  13. package/dist/client-v2/941.b0d55429cd053f32.js +10 -0
  14. package/dist/client-v2/index.js +1 -1
  15. package/dist/externalVersion.js +9 -8
  16. package/dist/locale/en-US.json +396 -297
  17. package/dist/locale/vi-VN.json +384 -292
  18. package/dist/locale/zh-CN.json +150 -51
  19. package/dist/node_modules/simple-git/dist/cjs/index.js +25 -25
  20. package/dist/node_modules/simple-git/package.json +1 -1
  21. package/dist/node_modules/zod/index.cjs +1 -1
  22. package/dist/node_modules/zod/package.json +1 -1
  23. package/dist/server/actions/git-actions.js +90 -36
  24. package/dist/server/actions/gitlab-api.js +4 -2
  25. package/dist/server/actions/poller.js +5 -2
  26. package/dist/server/actions/review-cutover.js +137 -0
  27. package/dist/server/actions/review.js +150 -51
  28. package/dist/server/actions/role-permissions.js +1 -0
  29. package/dist/server/ai-tools.js +8 -9
  30. package/dist/server/collections/gitCodeReviews.js +10 -0
  31. package/dist/server/collections/gitReviewCutover.js +44 -0
  32. package/dist/server/collections/gitReviewFlows.js +3 -0
  33. package/dist/server/collections/gitReviewInbox.js +51 -0
  34. package/dist/server/collections/gitReviewProjects.js +43 -0
  35. package/dist/server/collections/gitReviewRequests.js +56 -0
  36. package/dist/server/index.js +8 -2
  37. package/dist/server/plugin.js +57 -20
  38. package/dist/server/poller.js +95 -74
  39. package/dist/server/repository-access.js +23 -5
  40. package/dist/server/request-method-policy.js +76 -0
  41. package/dist/server/review-control-access.js +79 -0
  42. package/dist/server/services/legacy-post-service.js +412 -0
  43. package/dist/server/services/registry-content-service.js +4 -3
  44. package/dist/server/services/review-service.js +1451 -0
  45. package/dist/server/services/review-source.js +325 -0
  46. package/dist/server/utils/get-repo-account.js +3 -2
  47. package/dist/server/utils/url-security.js +24 -0
  48. package/package.json +61 -43
  49. package/server.d.ts +2 -2
  50. package/server.js +1 -1
  51. package/src/client/__tests__/CommitHistory.test.tsx +79 -0
  52. package/src/client/__tests__/ReviewHistory.test.tsx +126 -0
  53. package/src/client/__tests__/RunReviewButton.test.tsx +84 -0
  54. package/src/client/__tests__/workflowRoutes.test.ts +65 -0
  55. package/src/client/ai-context.tsx +114 -114
  56. package/src/client/components/AIEmployeeSelect.tsx +63 -63
  57. package/src/client/components/CommitHistory.tsx +429 -374
  58. package/src/client/components/FileExplorer.tsx +386 -386
  59. package/src/client/components/GitAccounts.tsx +179 -179
  60. package/src/client/components/GitManagerSettings.tsx +160 -160
  61. package/src/client/components/GitOperations.tsx +220 -220
  62. package/src/client/components/LLMModelSelect.tsx +63 -63
  63. package/src/client/components/LLMServiceSelect.tsx +58 -58
  64. package/src/client/components/MarkdownView.tsx +80 -80
  65. package/src/client/components/MergeRequests.tsx +790 -790
  66. package/src/client/components/PollingStatus.tsx +225 -225
  67. package/src/client/components/RepositoryConfig.tsx +335 -335
  68. package/src/client/components/RepositoryPermissions.tsx +123 -123
  69. package/src/client/components/ReviewFlows.tsx +352 -303
  70. package/src/client/components/ReviewHistory.tsx +796 -566
  71. package/src/client/components/RunReviewButton.tsx +57 -173
  72. package/src/client/context/GitManagerContext.tsx +92 -92
  73. package/src/client/index.tsx +91 -82
  74. package/src/client/locale.ts +9 -9
  75. package/src/client/promptTemplates.ts +31 -31
  76. package/src/client/workflowRoutes.ts +42 -0
  77. package/src/client-v2/ai-context.tsx +99 -0
  78. package/src/client-v2/components/SubtreeSplits.tsx +547 -547
  79. package/src/client-v2/index.tsx +1 -1
  80. package/src/client-v2/locale.ts +8 -8
  81. package/src/client-v2/plugin.tsx +67 -39
  82. package/src/index.ts +2 -2
  83. package/src/locale/en-US.json +396 -297
  84. package/src/locale/vi-VN.json +384 -292
  85. package/src/locale/zh-CN.json +150 -51
  86. package/src/server/__tests__/git-actions.test.ts +24 -24
  87. package/src/server/__tests__/git-security.test.ts +170 -0
  88. package/src/server/__tests__/plugin-url-security.test.ts +17 -17
  89. package/src/server/__tests__/poller-lifecycle.test.ts +71 -0
  90. package/src/server/__tests__/poller.test.ts +37 -37
  91. package/src/server/__tests__/repository-access.test.ts +760 -752
  92. package/src/server/__tests__/review-service.integration.test.ts +1263 -0
  93. package/src/server/__tests__/review.test.ts +76 -137
  94. package/src/server/__tests__/role-permissions.test.ts +147 -147
  95. package/src/server/__tests__/smoke.test.ts +139 -17
  96. package/src/server/__tests__/subtree.test.ts +85 -85
  97. package/src/server/actions/git-actions.ts +540 -480
  98. package/src/server/actions/gitlab-api.ts +422 -411
  99. package/src/server/actions/poller.ts +39 -27
  100. package/src/server/actions/review-cutover.ts +121 -0
  101. package/src/server/actions/review.ts +1498 -1369
  102. package/src/server/actions/role-permissions.ts +331 -321
  103. package/src/server/actions/subtree.ts +508 -508
  104. package/src/server/ai-tools.ts +334 -319
  105. package/src/server/collections/gitAccounts.ts +56 -56
  106. package/src/server/collections/gitCodeReviews.ts +218 -199
  107. package/src/server/collections/gitRepositories.ts +87 -87
  108. package/src/server/collections/gitReviewCutover.ts +23 -0
  109. package/src/server/collections/gitReviewFlows.ts +120 -108
  110. package/src/server/collections/gitReviewInbox.ts +30 -0
  111. package/src/server/collections/gitReviewProjects.ts +22 -0
  112. package/src/server/collections/gitReviewRequests.ts +35 -0
  113. package/src/server/collections/gitSubtreeConfigs.ts +38 -38
  114. package/src/server/collections/gitSubtreeRuns.ts +30 -30
  115. package/src/server/index.ts +14 -2
  116. package/src/server/migrations/20260508000000-add-auto-review-flow-id.ts +29 -29
  117. package/src/server/migrations/20260712000000-add-git-accounts.ts +198 -198
  118. package/src/server/migrations/20260730000000-migrate-legacy-repository-permissions.ts +81 -81
  119. package/src/server/plugin.ts +409 -361
  120. package/src/server/poller.ts +365 -352
  121. package/src/server/repository-access.ts +803 -773
  122. package/src/server/request-method-policy.ts +56 -0
  123. package/src/server/review-control-access.ts +71 -0
  124. package/src/server/services/__tests__/registry-content-service.test.ts +359 -345
  125. package/src/server/services/__tests__/review-source.test.ts +226 -0
  126. package/src/server/services/legacy-post-service.ts +550 -0
  127. package/src/server/services/registry-content-service.ts +495 -484
  128. package/src/server/services/review-service.ts +1899 -0
  129. package/src/server/services/review-source.ts +359 -0
  130. package/src/server/utils/__tests__/redact.test.ts +56 -56
  131. package/src/server/utils/__tests__/url-security.test.ts +85 -85
  132. package/src/server/utils/get-repo-account.ts +51 -41
  133. package/src/server/utils/gitlab-url.ts +38 -38
  134. package/src/server/utils/redact.ts +87 -87
  135. package/src/server/utils/url-security.ts +128 -95
  136. package/dist/client/900.acf7d1fa22f95e71.js +0 -10
  137. package/dist/client-v2/434.7a27051db18526c0.js +0 -10
  138. package/dist/client-v2/900.f32b9dc85249fc0a.js +0 -10
package/README.md CHANGED
@@ -1,108 +1,151 @@
1
- # plugin-git-manager
2
-
3
- ## Overview
4
- Manage Git repositories with PAT authentication and run AI-powered code reviews on
5
- merge requests. Combines repository operations (clone/pull/push/diff) with a configurable
6
- review pipeline backed by AI Employees.
7
-
8
- ## Features
9
-
10
- ### Repository management
11
- - **Clone, fetch, pull, push** to external Git providers (GitHub, GitLab, etc.).
12
- - **PAT authentication** — Personal Access Tokens are stored encrypted and redacted
13
- from API responses.
14
- - **File & diff browser** — view commits, changed files, and inline diffs from the
15
- NocoBase UI.
16
- - **Merge Request integration** — list, filter, and inspect GitLab MRs (overview,
17
- changes, comments).
18
-
19
- ### AI code review
20
- - **Review Flows** — configurable per repository or global (apply to all repos).
21
- Each flow binds an AI Employee, an optional LLM service / model override,
22
- trigger mode, post mode, branch filter (regex), and extra prompt instructions.
23
- - **Trigger modes**:
24
- - `manual` — run from the Merge Requests tab.
25
- - `onMergeRequestCreated` — auto-trigger when a new MR is detected by the poller.
26
- - `both` — manual + auto.
27
- - **Post modes**:
28
- - `auto` — review is posted to the MR as soon as it completes.
29
- - `manual` — review is held in the Review History tab pending approval.
30
- - `disabled` — review is generated and stored but never posted.
31
- - **Re-review on new commits** — every review tracks `headSha` (the SHA that was
32
- reviewed) and `latestSha` (the latest known SHA on the MR). The Merge Requests
33
- tab flags MRs whose `latestSha !== headSha` so reviewers can re-run the flow.
34
- - **One review per MR** — re-running a review UPSERTs the existing record, preserving
35
- history through `metadata` while keeping the row count bounded.
36
-
37
- ### Background poller
38
- - **5-minute interval** — polls open MRs for repos with `autoReview` enabled.
39
- - **Per-repo opt-in** — toggle `Auto Review` on the repository row to enable polling
40
- for that repo. Disabled repos are never queried.
41
- - **Smart re-poll** — uses GitLab `updated_after` (with a 1-second safety buffer) so
42
- each tick only fetches MRs that have changed since the last poll.
43
- - **No auto re-trigger** — auto-poll only triggers a review the **first time** an MR
44
- is seen. When new commits arrive on an already-reviewed MR, the poller refreshes
45
- `latestSha` only; re-review must be initiated manually.
46
- - **Status panel** — the Polling tab shows poller state (running/stopped), last tick,
47
- last error, and provides `Poll Now` / `Poll Now (All)` actions.
48
-
49
- ## Collections
50
- | Name | Purpose |
51
- |---|---|
52
- | `gitRepositories` | Connected repos, PAT, default branch, `autoReview` flag, `lastPolledAt`. |
53
- | `gitReviewFlows` | Review pipeline definitions (AI employee, trigger mode, post mode, branch filter). |
54
- | `gitCodeReviews` | Review records — one per MR target — with status, markdown output, metadata, post status. |
55
-
56
- ## Permissions
57
- The plugin registers two ACL snippets:
58
- - `pm.plugin-git-manager.read` — list/get on repos, flows, reviews + read-only Git
59
- operations (status, log, diff, MR queries, poller status).
60
- - `pm.plugin-git-manager.write` — create/update/destroy on collections + write Git
61
- operations (clone, pull, push, checkout) + review actions
62
- (`triggerReview`, `reviewApprovePost`, `reviewReject`, `pollNow`).
63
-
64
- ## Usage
65
-
66
- ### 1. Connect a repository
67
- 1. Open **Settings → Git Manager → Repositories**.
68
- 2. Click **Add Repository** and provide the clone URL, username, and PAT.
69
- 3. (Optional) Toggle **Auto Review** to enable background polling for this repo.
70
-
71
- ### 2. Configure a Review Flow
72
- 1. Open the **Review Flows** tab.
73
- 2. Click **Add Review Flow** and set:
74
- - **Repository** — leave empty for a global flow.
75
- - **AI Employee** — username of the AI Employee that will run the review.
76
- - **Trigger Mode** — `Manual`, `On Merge Request Created`, or `Both`.
77
- - **Post Mode** — `Auto post to MR`, `Manual approval before posting`, or
78
- `Do not post`.
79
- - **Branch Filter** — optional regex; only MRs whose source branch matches will
80
- be picked up.
81
- - **Additional Instructions** — extra prompt text appended to every review run.
82
-
83
- ### 3. Run a review
84
- - **Manual** — from the **Merge Requests** tab, click **Run Review** on any open MR.
85
- - **Automatic** — enable **Auto Review** on the repo and create a flow with
86
- trigger mode `On Merge Request Created` or `Both`. Within ~5 minutes the poller
87
- will detect new MRs and trigger reviews.
88
-
89
- ### 4. Approve or reject
90
- If the flow uses `manual` post mode, completed reviews land in the **Review History**
91
- tab with status **Pending Approval**. From there:
92
- - **Approve & Post** — posts the review as a note on the MR.
93
- - **Reject** — marks the review as rejected; nothing is posted.
94
- - **Edit before posting** — tweak the markdown before approving.
95
-
96
- ### 5. Re-review on new commits
97
- When new commits are pushed to an already-reviewed MR, the Merge Requests tab shows
98
- a **New commits** badge. Click **Re-run** to overwrite the existing review with a
99
- fresh one for the latest `headSha`.
100
-
101
- ## Notes & limits
102
- - The poller fetches at most 50 MRs per repo per tick (`per_page=50`). Repos with
103
- more than 50 open MRs may need manual `Poll Now` runs to catch up.
104
- - GitLab is the only fully-supported MR provider for the review pipeline; basic
105
- Git operations work against any provider.
106
- - The poller is in-process. In multi-instance deployments it runs on every node;
107
- the `isPolling` flag prevents overlap within a single process but not across
108
- nodes. Co-ordinate via a single primary node if needed.
1
+ # plugin-git-manager
2
+
3
+ ## Overview
4
+ Manage Git repositories with PAT authentication and run workflow-based AI reviews on
5
+ merge requests, commits, branches, and folders. Git Manager owns repository access,
6
+ request admission, project reservations, and review history; `plugin-workflow-git-review`
7
+ provides the workflow nodes and templates.
8
+
9
+ ## Repository prerequisites
10
+
11
+ The repository features are available independently of the optional review workflow.
12
+
13
+ - Set each self-hosted GitLab account's **Base URL** to its HTTPS origin. A blank Base URL means
14
+ `https://gitlab.com` for GitLab and `https://github.com` for GitHub. Repository and account origins
15
+ must match, including the port. GitHub Enterprise API endpoints are not implemented.
16
+ - Use the final repository URL. Authenticated Git and provider API requests reject redirects.
17
+ - Use Git 2.31 or newer for process-scoped credential configuration. PATs are no longer written into
18
+ remote URLs or Git configuration. The plugin clears inherited Git command/config/trace overrides
19
+ for its Git subprocesses. `GIT_SSL_CAINFO` and `GIT_SSL_CAPATH` remain available for private CAs.
20
+ - Repository paths must resolve strictly below `GIT_REPOS_BASE_PATH`. The base directory itself,
21
+ traversal paths, and symlinks/junctions escaping the base are rejected, including clone destinations
22
+ below a linked parent. Keep that storage directory writable only by trusted service operators.
23
+ - Call mutation actions with **POST**, including `subtreeOptions` and `subtreePreview`, which fetch
24
+ remote refs. GET and HEAD return 405 before executing these actions. The bundled clients already use POST.
25
+ - Poller timers, in-flight guards and status belong to each application. Stopping one application
26
+ does not stop another application's poller. A running cycle retains its guard until it finishes.
27
+ - Standard Git screens can load without the AI module. Git-specific review actions submit to the
28
+ workflow review queue.
29
+
30
+ For review workflows, install and enable the compatible Workflow, Workflow Manual, AI and
31
+ `plugin-workflow-git-review` plugins. The integration plugin requires NocoBase 2.2.40 or newer in the 2.x series.
32
+
33
+ ## Features
34
+
35
+ ### Repository management
36
+ - **Clone, fetch, pull, push** to external Git providers (GitHub, GitLab, etc.).
37
+ - **PAT authentication** — Personal Access Tokens are held in Git accounts and redacted
38
+ from API responses. Git operations receive credentials through the child process environment.
39
+ - **File & diff browser** — view commits, changed files, and inline diffs from the
40
+ NocoBase UI.
41
+ - **Merge Request integration** — list, filter, and inspect GitLab MRs (overview,
42
+ changes, comments).
43
+
44
+ ### AI code review
45
+ - **Review Flows** — configurable per repository or global (apply to all repos).
46
+ A flow defines admission and posting policy and binds a native Workflow. The workflow
47
+ owns its LLM configuration, review instructions and manual approval node.
48
+ - **Trigger modes**:
49
+ - `manual` — submit a review from Git Manager.
50
+ - `onMergeRequestCreated` — auto-trigger when a new MR is detected by the poller.
51
+ - `both` — manual + auto.
52
+ - **Post modes**:
53
+ - `auto` — review is posted to the MR as soon as it completes.
54
+ - `manual` — an MR/PR review waits for an assigned user's manual decision before posting.
55
+ - `disabled` — review is generated and stored but never posted.
56
+ - **Re-review on new commits** — every review tracks `headSha` (the SHA that was
57
+ reviewed) and `latestSha` (the latest known SHA on the MR). The Merge Requests
58
+ tab flags MRs whose `latestSha !== headSha` so reviewers can re-run the flow.
59
+ - **Review history** — each manual re-run is a separate queued request and history entry.
60
+
61
+ ### Background poller
62
+ - **5-minute interval** — polls open MRs for repos with `autoReview` enabled.
63
+ - **Per-repo opt-in** — toggle `Auto Review` on the repository row to enable polling
64
+ for that repo. Disabled repos are never queried.
65
+ - **Full pagination** — scans all pages of open MRs and retries unsuccessful scans.
66
+ - **New commits** — the default reviews the MR once; enable `Review new commits automatically`
67
+ on a flow to queue a review for each new head SHA.
68
+ - **Status panel** — the Polling tab shows poller state (running/stopped), last tick,
69
+ last error, and provides `Poll Now` / `Poll Now (All)` actions.
70
+
71
+ ## Collections
72
+ | Name | Purpose |
73
+ |---|---|
74
+ | `gitRepositories` | Connected repos, PAT, default branch, `autoReview` flag, `lastPolledAt`. |
75
+ | `gitReviewFlows` | Workflow bindings and admission policy (trigger mode, post mode, branch filter). |
76
+ | `gitCodeReviews` | Review records — one per submitted run — with status, markdown output, metadata, post status. |
77
+
78
+ ## Permissions
79
+ The plugin registers two ACL snippets:
80
+ - `pm.plugin-git-manager.read` — list/get on repos, flows, reviews + read-only Git
81
+ operations (status, log, diff, MR queries, poller status).
82
+ - `pm.plugin-git-manager.write` — manage repository and flow configuration + write Git
83
+ operations (clone, pull, push, checkout) + review actions
84
+ (`triggerReview`, `reviewApprovePost`, `reviewReject`, `pollNow`).
85
+
86
+ ## Usage
87
+
88
+ ### 1. Connect a repository
89
+ 1. Open **Settings → Git Manager → Repositories**.
90
+ 2. Click **Add Repository** and provide the clone URL, username, and PAT.
91
+ 3. (Optional) Toggle **Auto Review** to enable background polling for this repo.
92
+
93
+ ### 2. Configure a Review Flow
94
+ 1. Open the **Review Flows** tab.
95
+ 2. Click **Add Review Flow** and set:
96
+ - **Repository** — leave empty for a global flow.
97
+ - **AI Employee** and model — initial settings used to provision the workflow's LLM nodes.
98
+ - **Trigger Mode** — `Manual`, `On Merge Request Created`, or `Both`.
99
+ - **Post Mode** — `Auto post to MR`, `Manual approval before posting`, or
100
+ `Do not post`.
101
+ - **Branch Filter** — optional regex; only MRs whose source branch matches will
102
+ be picked up.
103
+ - **Additional Instructions** — extra prompt text appended to every review run.
104
+ 3. Configure the associated workflow under **Git Review Workflows**. Choose Quick or Full and assign
105
+ approvers with repository access when manual posting is required. The setup page reports missing
106
+ employee, model, repository or approver bindings. Create a disabled revision before editing its graph;
107
+ enabled revisions are frozen and the integration validates them before use.
108
+
109
+ ### 3. Run a review
110
+ - **Manual** — use a Git Manager review action for an MR/PR, commit, branch, or folder.
111
+ - **Automatic** — enable **Auto Review** on the repo and create a flow with
112
+ trigger mode `On Merge Request Created` or `Both`. Within ~5 minutes the poller
113
+ will detect new MRs and trigger reviews.
114
+
115
+ ### 4. Approve or reject
116
+ If the flow uses `manual` post mode, an assigned user decides in the native Workflow
117
+ manual task. Approval applies to the exact stored review and fingerprint; rejection
118
+ does not publish a comment. Assigned users with repository access use **Git review approvals**
119
+ in the modern Workflow task center. Commit, branch and folder results are stored without posting.
120
+ Review History links to the workflow execution and tasks.
121
+
122
+ ### 5. Re-review on new commits
123
+ When new commits are pushed to an already-reviewed MR, the Merge Requests tab shows
124
+ a **New commits** badge. Click **Re-run** to queue a separate review for the latest
125
+ `headSha`, or enable automatic new-head reviews on the flow.
126
+
127
+ ## Notes & limits
128
+ - The poller follows all pages of open MRs; provider availability and rate limits affect each scan.
129
+ - Review and publication support GitHub.com and GitLab HTTPS repositories. GitHub Enterprise is not supported.
130
+ - Each process runs a poller. PostgreSQL and MySQL/MariaDB use a shared advisory lock when available;
131
+ automatic request deduplication and project reservations are enforced in the database.
132
+
133
+ # Workflow-based AI review migration (1.3)
134
+
135
+ AI reviews use the Workflow integration in `plugin-workflow-git-review`, with individual Git review LLM nodes and a native manual node for required approvals. The LLM nodes use the native AI provider/model and structured-output contract, and persist the pending job before the provider call. They accept text messages for the diff review. Configure a workflow for each review flow and enable the bound revision before submitting a review. Git Manager keeps repository permissions, the review queue and review history; the workflow owns AI execution and approval. The old in-process review worker is not started by this version.
136
+
137
+ For an existing installation, stop **all** application and worker processes running the old Git Manager version and verify that all old review AI work, including work whose database row timed out or failed, has stopped or settled before confirming cutover in the workflow setup page. A fresh installation with no review history is ready automatically. The root-only cutover status shows legacy pending and running reviews and failed reviews with uncertain old execution history. Confirmation records the operator's acknowledgement; it does not itself stop an AI call and does not clear legacy running reviews. Pending legacy reviews migrate only when their original source commit, repository, actor and workflow can be established. A pending review with a missing or changed source, missing flow, or ambiguous actor is shown with its reason; a root user can explicitly cancel it with an audit record and submit a new review. Unresolved legacy reviews block their canonical project, including repository aliases. If project identity cannot be determined, dispatch remains blocked until the issue is resolved.
138
+
139
+ For historical merge-request reviews, the original reviewed base may not have been recorded and cannot be reconstructed reliably. Before approving one, compare the review with the current merge request and explicitly acknowledge this limitation. The current base is recorded for subsequent checks; it is not evidence of the original reviewed base. For a legacy publication in `posting`, `post_unknown` or `post_failed`, use Review History to check for an existing provider comment. A retry requires confirmation that the prior outbound call has stopped and settled, and keeps the approved content unchanged. An unmarked matching comment cannot be proven to belong to the same attempt and is not automatically reposted. Root administrators can release an abandoned publication hold after the same stop confirmation; this does not claim the remote outcome is known.
140
+
141
+ Requests are persisted separately from their workflow execution. A queued request uses the current enabled and validated workflow revision when it is dispatched, then pins that revision for its execution. One reservation per provider project is held across the entire workflow, including human approval. Reservations never expire on a timer. A failed, aborted or timed-out execution is quarantined when the underlying AI call might still be active; a settled failure or validated manual rejection may release it after the recorded job evidence is checked. Unclaimed or orphaned requests and missing execution records can also be recovered after the same verification. A root user may recover only after stopping and verifying the responsible worker or AI call; the setup page records the confirmation. Recovery fences late claims and results but cannot stop a still-running external call. Do not run old and new plugin binaries together during cutover: old binaries do not honor the new reservation.
142
+
143
+ Each run pins the project and commit identities at submission. GitHub.com and GitLab merge requests use provider comparison data; local commit, branch and folder reviews require the admitted commit objects to be present in the configured checkout. Missing or oversized context fails the review, and coverage limitations are reported to the workflow. The project and merge request head are checked again before publication. Publication uses an identifier in the remote comment to reconcile an uncertain response. No database transaction can make the remote head check and comment creation atomic, so provider-side head changes immediately after the check remain possible.
144
+
145
+ Automatic polling scans all open merge request pages and retries unsuccessful scans. Existing flows retain the original behavior of reviewing an MR once; enable **Review new commits automatically** to admit a review for each new head. Manual submissions are separate queued runs. Review history links to the workflow execution and workflow tasks; workflow-managed reviews must be approved in the workflow task instead of the legacy approval action.
146
+
147
+ When publication has an unknown outcome, Review History can check for the original comment without running AI again, even if the merge request head has since changed. A resend requires confirmation that the previous outbound post has stopped and settled, and the head must still match the reviewed commit. A root operator can release a publication hold after the same verification, including when no retry claim exists; the approved result is retained. The check matches the complete comment body and the authenticated Git account, and a different active review blocks the retry.
148
+
149
+ Version 1.3.1 also supports recovery of completed legacy reviews in `posting`, `post_unknown` and `post_failed`. Legacy records did not retain the reviewed base SHA: before a new post the reviewer must compare the saved review with the current merge request and explicitly acknowledge that the original base is unverified. The acknowledged current base and head are then pinned for subsequent attempts; this acknowledgement is not proof of the historical base. A matching historical comment without a marker is reported as observed rather than attributed to a specific attempt, and is not reposted. If an earlier outbound request may still be running, recovery or release of its project hold requires explicit confirmation that it has stopped and settled.
150
+
151
+ The publication retry action is a separate repository-scoped write permission. Existing roles with explicitly configured repository permissions must have their write scope saved again in Repository Permissions to grant this new action; it is not granted automatically during upgrade. Existing review submission permissions are unchanged.
package/client-v2.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './dist/client-v2';
2
- export { default } from './dist/client-v2';
1
+ export * from './dist/client-v2';
2
+ export { default } from './dist/client-v2';
package/client-v2.js CHANGED
@@ -1 +1 @@
1
- module.exports = require('./dist/client-v2/index.js');
1
+ module.exports = require('./dist/client-v2/index.js');
package/client.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- // @ts-nocheck
2
- export * from './dist/client';
3
- export { default } from './dist/client';
1
+ // @ts-nocheck
2
+ export * from './dist/client';
3
+ export { default } from './dist/client';
package/client.js CHANGED
@@ -1 +1 @@
1
- module.exports = require('./dist/client/index.js');
1
+ module.exports = require('./dist/client/index.js');