Repository navigation
fix(server): closed PR watches end even when the activity read fails #27953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cc8e7bf
c9e32fb
0c59b10
d038a63
20185af
a496715
eefcaf1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -298,7 +298,7 @@ export const make = Effect.gen(function* () { | |
|
|
||
| const giveUp = (target: WatchTarget) => | ||
| record(target, null, { | ||
| text: `T3 Code stopped watching pull request #${target.link.number} (${target.link.url}) because it failed to read it from the host ${READ_FAILURE_LIMIT} times in a row. Check it yourself, and call watch_pull_request to watch it again.`, | ||
| text: `T3 Code stopped watching pull request #${target.link.number} (${target.link.url}) because it failed to read it from the host ${READ_FAILURE_LIMIT} times in a row. Check it yourself, and call watch_pull_request only if it is still open.`, | ||
| notification: { | ||
| source: { kind: "monitor" }, | ||
| outcome: "failed", | ||
|
Comment on lines
298
to
304
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
@@ -491,11 +491,14 @@ export const make = Effect.gen(function* () { | |
| { concurrency: 2 }, | ||
| ); | ||
| // Activity failures must not cancel or hide a permanent detail failure. | ||
| // Activity is irrelevant once the pull request is closed or merged, so it cannot block ending. | ||
| const read = Exit.isFailure(detailRead) | ||
| ? Exit.failCause(detailRead.cause) | ||
| : Exit.isFailure(activityRead) | ||
| ? Exit.failCause(activityRead.cause) | ||
| : Exit.succeed([detailRead.value, activityRead.value] as const); | ||
| : detailRead.value.state !== "open" | ||
| ? Exit.succeed([detailRead.value, Option.none<PullRequestActivity>()] as const) | ||
| : Exit.isFailure(activityRead) | ||
| ? Exit.failCause(activityRead.cause) | ||
| : Exit.succeed([detailRead.value, activityRead.value] as const); | ||
| if (Exit.isFailure(read)) { | ||
| if (Cause.hasInterruptsOnly(read.cause)) return yield* Effect.failCause(read.cause); | ||
| lastReads.delete(group.key); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: pingdotgg/t3code
Length of output: 41373
Script executed:
Repository: pingdotgg/t3code
Length of output: 41313
Script executed:
Repository: pingdotgg/t3code
Length of output: 4507
Script executed:
Repository: pingdotgg/t3code
Length of output: 13561
Script executed:
Repository: pingdotgg/t3code
Length of output: 5153
Script executed:
sed -n '250,335p' apps/server/src/mcp/toolkits/pullRequests/handlers.tsRepository: pingdotgg/t3code
Length of output: 3730
Require activity-read recovery before re-arming.
An open pull request with a persistent activity-read failure can be re-armed through
watch_pull_request. The watch then reaches the same eight-failure give-up path again. Make the notice require both an open pull request and confirmed recovery of activity reads.Suggested fix
Committable suggestion