patchrelay 0.50.4 → 0.50.5
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/dist/build-info.json +3 -3
- package/dist/config.js +2 -0
- package/dist/prompting/patchrelay.js +11 -5
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
package/dist/config.js
CHANGED
|
@@ -21,6 +21,8 @@ const DEFAULT_PATCHRELAY_DEVELOPER_INSTRUCTIONS = [
|
|
|
21
21
|
"- If you change files for an implementation run, commit, push the issue branch, and open or update the PR.",
|
|
22
22
|
"- For repair runs, work on the existing PR branch and do not open a new PR.",
|
|
23
23
|
"- A requested-changes repair is only complete after a newer PR head is pushed, unless a genuine external blocker prevents correct publication.",
|
|
24
|
+
"- If you change schema, enums, shared vocabulary, normalization helpers, or compatibility mappings, inspect the main read/write paths that can bypass the new abstraction and fix or cover any mismatch before publishing.",
|
|
25
|
+
"- For CI repair, do not change code or config until you either reproduce the failure on the exact failing head or can point to a concrete log signature that justifies the fix. If you cannot reproduce it, prefer a rerun-only repair over speculative changes.",
|
|
24
26
|
"- If a broader inconsistency is not required to make this task correct, mention it briefly instead of expanding scope.",
|
|
25
27
|
"- Before publishing, do one brief reviewer-minded pass on the current head and fix likely in-scope blockers.",
|
|
26
28
|
].join("\n");
|
|
@@ -290,6 +290,8 @@ function buildCiRepairContext(context) {
|
|
|
290
290
|
return [
|
|
291
291
|
"Settled CI failure on the existing PR branch.",
|
|
292
292
|
"Goal: restore CI readiness and push a branch that is likely to pass the next full CI run.",
|
|
293
|
+
"Before changing code or config, reproduce the failure on the exact failing head or identify the concrete log signature that justifies the fix.",
|
|
294
|
+
"If the exact failing head does not reproduce locally and the logs do not support a scoped fix, prefer a rerun-only repair over speculative branch changes.",
|
|
293
295
|
snapshot?.gateCheckName ? `Gate check: ${String(snapshot.gateCheckName)}` : "",
|
|
294
296
|
snapshot?.gateCheckStatus ? `Gate status: ${String(snapshot.gateCheckStatus)}` : "",
|
|
295
297
|
snapshot?.settledAt ? `Settled at: ${String(snapshot.settledAt)}` : "",
|
|
@@ -443,17 +445,21 @@ function buildOrchestrationWorkflowGuidance() {
|
|
|
443
445
|
"Keep outputs concise and observable in Linear.",
|
|
444
446
|
].join("\n");
|
|
445
447
|
}
|
|
446
|
-
function buildPrePushSelfReviewSection(target) {
|
|
448
|
+
function buildPrePushSelfReviewSection(target, runType) {
|
|
447
449
|
const publishTarget = target === "new_pr"
|
|
448
450
|
? "open or update the PR"
|
|
449
451
|
: "push the existing PR branch";
|
|
450
|
-
|
|
452
|
+
const lines = [
|
|
451
453
|
"## Final Self-Review Before Push",
|
|
452
454
|
"",
|
|
453
455
|
`Before you ${publishTarget}, do one brief reviewer-minded pass on the current head.`,
|
|
454
456
|
"Fix any likely in-scope blocker you can see now: missing edge-case handling, broken adjacent invariant in the touched flow, mismatch between the PR explanation and the code, or an obviously unreviewable half-finished branch.",
|
|
455
|
-
"Do not widen scope for optional cleanup. If the issue explicitly allows a non-PR outcome, complete that outcome clearly; otherwise publish before stopping.",
|
|
456
457
|
];
|
|
458
|
+
if (runType === "implementation") {
|
|
459
|
+
lines.push("Name 2-4 concrete invariants most likely to regress in the touched flow, confirm which file or path enforces each one, and verify at least one adjacent path you did not edit directly.", "If you changed schema, enums, shared vocabulary, normalization helpers, or compatibility mappings, inspect the main read/write paths that can bypass the new abstraction and verify one legacy-flow and one new-flow case before publishing.");
|
|
460
|
+
}
|
|
461
|
+
lines.push("Do not widen scope for optional cleanup. If the issue explicitly allows a non-PR outcome, complete that outcome clearly; otherwise publish before stopping.");
|
|
462
|
+
return lines;
|
|
457
463
|
}
|
|
458
464
|
function buildPublicationContract(runType, issueClass) {
|
|
459
465
|
if (issueClass === "orchestration") {
|
|
@@ -471,7 +477,7 @@ function buildPublicationContract(runType, issueClass) {
|
|
|
471
477
|
"If this is code-delivery work, publish before stopping: commit, push the issue branch, and open or update the PR.",
|
|
472
478
|
"If the issue explicitly allows a non-PR outcome, complete that outcome clearly instead of inventing a PR.",
|
|
473
479
|
"",
|
|
474
|
-
...buildPrePushSelfReviewSection("new_pr"),
|
|
480
|
+
...buildPrePushSelfReviewSection("new_pr", runType),
|
|
475
481
|
].join("\n");
|
|
476
482
|
}
|
|
477
483
|
return [
|
|
@@ -481,7 +487,7 @@ function buildPublicationContract(runType, issueClass) {
|
|
|
481
487
|
"Do not open a new PR.",
|
|
482
488
|
"A PR-less stop is not a successful outcome for a repair run unless a genuine external blocker prevents any correct push.",
|
|
483
489
|
"",
|
|
484
|
-
...buildPrePushSelfReviewSection("existing_pr"),
|
|
490
|
+
...buildPrePushSelfReviewSection("existing_pr", runType),
|
|
485
491
|
].join("\n");
|
|
486
492
|
}
|
|
487
493
|
function buildSections(issue, runType, repoPath, context, followUp = false) {
|