patchrelay 0.73.0 → 0.73.2
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.
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Self-hosted toolkit for shipping code with agents: a Linear-driven harness that runs Codex sessions inside your real repos, plus two GitHub-native services that review PRs and deliver them through a merge queue. Each component works on its own, and they communicate only through GitHub.
|
|
4
4
|
|
|
5
|
+
Background reading: [patchrelay: a Linear-driven harness for Codex](https://blog.krasnoperov.me/posts/patchrelay), [review-quill: a strict reviewer for your coding agent](https://blog.krasnoperov.me/posts/review-quill), and [merge-steward: speculative integration, parallel validation, fast-forward landing](https://blog.krasnoperov.me/posts/merge-steward).
|
|
6
|
+
|
|
5
7
|
## The stack
|
|
6
8
|
|
|
7
9
|
This repository ships **three independent services**. Install one, two, or all three.
|
|
@@ -9,8 +11,8 @@ This repository ships **three independent services**. Install one, two, or all t
|
|
|
9
11
|
| Service | Package | Role |
|
|
10
12
|
|-|-|-|
|
|
11
13
|
| [`patchrelay`](./) | `pnpm add -g patchrelay` | Linear-driven harness that runs Codex sessions inside your real repos. Fully autonomous on webhooks: implementation, review fix, CI repair, queue repair. |
|
|
12
|
-
| [`review-quill`](./packages/review-quill) | `pnpm add -g review-quill` |
|
|
13
|
-
| [`merge-steward`](./packages/merge-steward) | `pnpm add -g merge-steward` |
|
|
14
|
+
| [`review-quill`](./packages/review-quill) | `pnpm add -g review-quill` | Review gate that pairs with coding agents. Runs narrow and wide review passes, catches system misalignments the first pass missed, and sends fixes back through normal GitHub reviews. |
|
|
15
|
+
| [`merge-steward`](./packages/merge-steward) | `pnpm add -g merge-steward` | Turns reviewed PRs into a tested landing train: CI on exact future `main` SHAs, parallel validation for several PRs, and fast-forward landing through the green sequence. |
|
|
14
16
|
|
|
15
17
|
Common setups:
|
|
16
18
|
|
|
@@ -21,6 +23,7 @@ Common setups:
|
|
|
21
23
|
### What this buys you
|
|
22
24
|
|
|
23
25
|
- **PRs ship tested against the latest `main`.** The queue re-validates on the integrated SHA at admission time, and retries if `main` moves during validation. No more "green yesterday, broken today."
|
|
26
|
+
- **Review catches real misalignments before merge.** The reviewer checks both the changed lines and the surrounding system contract, so conflicts between code, docs, tests, callers, and shared abstractions get sent back while the PR is still cheap for the agent to fix.
|
|
24
27
|
- **Many PR failures have mechanical fixes an agent can handle.** Requested changes like a rename, a missing null check, a new test, refreshing against `main`, resolving a conflict surfaced by speculation, or rerunning a flaky job. Both services publish structured failure reasons (inline review comments, failing check names, queue incidents) an agent can act on directly.
|
|
25
28
|
- **No prerequisites beyond GitHub.** A GitHub App, a webhook, and `pnpm add -g` per service.
|
|
26
29
|
|
|
@@ -89,7 +92,7 @@ Two separate services handle review and delivery. Both are independent, GitHub-n
|
|
|
89
92
|
|
|
90
93
|
### review-quill
|
|
91
94
|
|
|
92
|
-
|
|
95
|
+
Review gate that pairs with coding agents. It checks both the narrow diff and wider system context for misalignments, sends fixes back through ordinary GitHub reviews, and carries approval forward when a rebase leaves the patch unchanged. By default it reviews as soon as the head updates; it can optionally wait for configured checks to go green first.
|
|
93
96
|
|
|
94
97
|
```bash
|
|
95
98
|
review-quill init https://review.example.com
|
|
@@ -101,11 +104,11 @@ See the [review-quill package README](./packages/review-quill/README.md) for the
|
|
|
101
104
|
|
|
102
105
|
### merge-steward
|
|
103
106
|
|
|
104
|
-
|
|
107
|
+
Merge queue with speculative integration. It turns reviewed PRs into a tested landing train: CI runs on the exact future `main` SHAs, several PRs validate in parallel, and `main` fast-forwards through the green sequence as soon as it is safe. Evictions produce a durable incident and a GitHub check run — the signal an agent uses to trigger a repair.
|
|
105
108
|
|
|
106
109
|
```bash
|
|
107
110
|
merge-steward init https://queue.example.com
|
|
108
|
-
merge-steward attach owner/repo --base-branch main
|
|
111
|
+
merge-steward repo attach owner/repo --base-branch main
|
|
109
112
|
merge-steward doctor --repo repo
|
|
110
113
|
merge-steward service status
|
|
111
114
|
```
|
|
@@ -115,6 +118,7 @@ See the [merge-steward package README](./packages/merge-steward/README.md) for t
|
|
|
115
118
|
## Docs
|
|
116
119
|
|
|
117
120
|
- [Concepts](./docs/concepts.md) — the shared mental model (three roles, four primitives, four states, carry-forward, eviction). Start here.
|
|
121
|
+
- [Blog: patchrelay](https://blog.krasnoperov.me/posts/patchrelay) · [review-quill](https://blog.krasnoperov.me/posts/review-quill) · [merge-steward](https://blog.krasnoperov.me/posts/merge-steward) · [the gates, not the autonomy](https://blog.krasnoperov.me/posts/gates-not-autonomy)
|
|
118
122
|
- [Self-hosting and deployment](./docs/self-hosting.md) — install, ingress, OAuth and GitHub App setup
|
|
119
123
|
- [Architecture](./docs/architecture.md) — components, ownership, state machine, failure taxonomy
|
|
120
124
|
- [Operator guide](./docs/operator-guide.md) — daily loop, CLI cheatsheet, troubleshooting
|
package/dist/build-info.json
CHANGED
package/dist/codex-app-server.js
CHANGED
|
@@ -266,6 +266,12 @@ export class CodexAppServerClient extends EventEmitter {
|
|
|
266
266
|
],
|
|
267
267
|
});
|
|
268
268
|
}
|
|
269
|
+
async interruptTurn(options) {
|
|
270
|
+
await this.sendRequest("turn/interrupt", {
|
|
271
|
+
threadId: options.threadId,
|
|
272
|
+
expectedTurnId: options.turnId,
|
|
273
|
+
});
|
|
274
|
+
}
|
|
269
275
|
mapThreadGoal(goal) {
|
|
270
276
|
return {
|
|
271
277
|
threadId: String(goal.threadId),
|
|
@@ -2,16 +2,13 @@ import { resolveLinkedPullRequest } from "../linear-linked-pr-reconciliation.js"
|
|
|
2
2
|
import { readRemotePrState } from "../remote-pr-state.js";
|
|
3
3
|
import { deriveLinkedPrAdoptionOutcome } from "../delegation-linked-pr.js";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* applies (wrong trigger, not delegated, PR already tracked, no candidate).
|
|
5
|
+
* For a delegated issue with no recorded PR yet, try to adopt any pull
|
|
6
|
+
* request referenced in Linear attachments. Delegation and status events can
|
|
7
|
+
* arrive in either order, so this cannot be tied to `delegateChanged` only.
|
|
9
8
|
*/
|
|
10
9
|
export async function resolveLinkedPrAdoption(input) {
|
|
11
10
|
if (!input.delegated)
|
|
12
11
|
return undefined;
|
|
13
|
-
if (input.triggerEvent !== "delegateChanged")
|
|
14
|
-
return undefined;
|
|
15
12
|
if (input.existingIssue?.prNumber !== undefined)
|
|
16
13
|
return undefined;
|
|
17
14
|
const resolution = resolveLinkedPullRequest(input.issue.attachments, input.project.github?.repoFullName);
|