You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d4307f5
Browse filesBrowse the repository at this point in the historyBrowse files
fix(pull-requests): store only the owning run's guide, and only from its own repository
A run's ownership check and its guide write now take turns with new claims, so
a run that loses ownership while writing cannot store its older guide. A pull
request from a repository the project is not a checkout of is refused instead
of being measured against that checkout's commits.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
"Guides are written from this project's checkout, and this pull request is in another repository. Write it from a project that is a checkout of that repository.",
137
+
});
138
+
}
139
+
},
140
+
);
141
+
107
142
constreadStored=(key: ThreadPullRequestKey)=>
108
143
guides.get(key).pipe(
109
144
Effect.mapError(
@@ -314,7 +349,11 @@ const make = Effect.gen(function* () {
314
349
};
315
350
// A newer run for this pull request, say after a push, owns its guide now; this one's result
316
351
// is for an older head and is dropped rather than written over it.
317
-
if(yield*owns)yield*guides.put(key,guide);
352
+
yield*ownership.withPermits(1)(
353
+
Effect.gen(function*(){
354
+
if(yield*owns)yield*guides.put(key,guide);
355
+
}),
356
+
);
318
357
});
319
358
320
359
/** What a reader is told when a run fails; the full cause goes to the log. */
@@ -346,7 +385,8 @@ const make = Effect.gen(function* () {
346
385
detail: "Review guides are off. Turn them on in Settings → Source Control.",
0 commit comments