Repository navigation
fix(server): report held recurring task occurrences #38906
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
Merged
juliusmarminge
merged 9 commits into
pingdotgg:main
from
dajiaohuang:fix/scheduled-held-queue
Nov 19, 2026
+177
−18
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
92d850a
fix(server): report held recurring task occurrences
dajiaohuang b417817
fix(server): preserve held run terminal failure
dajiaohuang c022d48
test: use advertised replay model in held scenario
dajiaohuang 013b52c
test: handle replay bootstrap model discovery
dajiaohuang 23bd221
test: classify held scenario setup failures
dajiaohuang 85060b0
fix(server): preserve run outcome during reschedule
dajiaohuang 3105712
test: fix scheduled record field narrowing
dajiaohuang 48d5039
Merge remote-tracking branch 'origin/main' into fix/scheduled-held-queue
juliusmarminge f5bb597
test(scenarios): drive held scheduled occurrence through t3 helpers
juliusmarminge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| import { expect } from "e2e"; | ||
| import * as Effect from "effect/Effect"; | ||
| import * as FileSystem from "effect/FileSystem"; | ||
| import * as Path from "effect/Path"; | ||
| import * as Schema from "effect/Schema"; | ||
|
|
||
| import { T3_HOME } from "../e2e.config.ts"; | ||
| import { runPromise, test, WEB } from "./t3.ts"; | ||
|
|
||
| const SettingsJson = Schema.fromJsonString(Schema.Record(Schema.String, Schema.Unknown)); | ||
| const decodeSettings = Schema.decodeEffect(SettingsJson); | ||
| const encodeSettings = Schema.encodeEffect(SettingsJson); | ||
|
|
||
| const threadRuntimeSettings = Effect.gen(function* () { | ||
| const fs = yield* FileSystem.FileSystem; | ||
| const settingsPath = (yield* Path.Path).join(T3_HOME, "userdata/settings.json"); | ||
| const original = yield* fs.readFileString(settingsPath); | ||
| const settings = yield* decodeSettings(original); | ||
| return { | ||
| supervise: fs.writeFileString( | ||
| settingsPath, | ||
| yield* encodeSettings({ ...settings, defaultRuntimeMode: "approval-required" }), | ||
| ), | ||
| restore: fs.writeFileString(settingsPath, original), | ||
| }; | ||
| }); | ||
|
|
||
| test( | ||
| "A recurring task reports when its queued occurrence is held", | ||
| WEB, | ||
| async ({ t3, app, screen }) => { | ||
| const settings = await runPromise(threadRuntimeSettings); | ||
| try { | ||
| // Supervised mode makes the approval recording wait for an answer, which holds its turn open. | ||
| await runPromise(settings.supervise); | ||
| const project = await t3.project("scheduled-hold"); | ||
| await t3.thread({ project, title: "Earlier work", messages: ["Start"] }); | ||
| const thread = await t3.thread({ | ||
| project, | ||
| title: "Waiting scheduled thread", | ||
| messages: ["Ask a question"], | ||
| model: "approval", | ||
| }); | ||
|
|
||
| await t3.open("/settings/scheduled-tasks"); | ||
| await screen.getByRole("button", "New task").tap(); | ||
| await screen.getByRole("textbox", "Name").fill("Held recurring task"); | ||
| await screen.getByRole("combobox", "Destination").tap(); | ||
| await screen.getByRole("option", "One thread, continuing the conversation").tap(); | ||
| await screen.getByRole("combobox", "Destination thread").tap(); | ||
| await screen.getByRole("option", "Waiting scheduled thread").tap(); | ||
| await screen.getByRole("textbox", "Prompt").fill("Scheduled check prompt"); | ||
| await screen.getByRole("button", "Every interval").tap(); | ||
| await screen.getByRole("spinbutton", "Run every").fill("1"); | ||
| await screen.getByRole("button", "Create task").tap(); | ||
|
|
||
| await t3.open(thread); | ||
| await screen.getByRole("button", "Approve", { exact: true }).waitFor(); | ||
| await screen | ||
| .getByRole("button", "Automation Held recurring task") | ||
| .waitFor({ timeout: 100_000 }); | ||
| // Stopping the active turn holds the queued scheduled occurrence. | ||
| await screen.getByRole("button", "Stop generation").tap(); | ||
| await screen.getByRole("button", "Resume thread").waitFor(); | ||
| await screen.getByRole("button", "Edit queued message").waitFor(); | ||
|
|
||
| await app.open("/settings/scheduled-tasks"); | ||
| await expect( | ||
| screen.getByText( | ||
| "A previous occurrence is held in the thread queue. Resume or remove it to run this task again.", | ||
| ), | ||
| ).toBeVisible({ timeout: 100_000 }); | ||
| await app.screenshot("held-scheduled-task"); | ||
| } finally { | ||
| await runPromise(settings.restore); | ||
| } | ||
| }, | ||
| ); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.