GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — Scheduled tasks: a webhook delivery saved while it waits runs on the task as saved (#719) by scuttletoby · Pull Request #743 · scuttletoby/t3code Conversation
Owner
Built on the seam PR #742 (its branch What and why#719's main item: a webhook delivery that waited for an agent slot was lost when its task was saved during the wait. The stored-delivery worker renders the prompt from the task, and
Fix:
Result:
The other #719 items, checked against current main
So nothing in #719 is left open. The bind-during-save and owner-entry items are documented decisions, not open bugs. Left, and why
Tests
On the old code (both sources from
The restart test passes there too. It pins upstream's restart behaviour, which this change must keep. Spot-checked mutants, one at a time. Each turns tests red:
Other runs:
State question
General vs projectGeneral: agent slots and MCP profiles on scheduled webhook tasks are fork features for any T3 fork user. Nothing here is specific to one project. Closes #719 🤖 Generated with Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsAnnounces one line in ScheduledTaskService.ts's stored-delivery worker: `if (yield* runSlots.keepStored(taskId)) continue;` right after its `runWebhookDelivery` call. With it, a webhook delivery whose task was saved while it waited for an agent slot is not removed: the worker reads the task again and runs the delivery on the task as saved. Part of #719. Co-Authored-By: Claude Opus 5.5 <[email protected]> …task as saved (#719) A stored webhook delivery that waited for an agent slot held the task and the prompt rendered before the wait. A save during the wait either ran it on that old copy (a bound task, or any edit the profile check does not see) or, for a task with an MCP profile record, refused it as a stale copy and dropped it. Now each retry of the wait checks whether the task's row was written since the copy was read (`updated_at`, and the prompt for a save in the same millisecond). If so, this run ends unstarted and the stored-delivery worker keeps the row (the seam line announced in the previous commit, `runSlots.keepStored`) and takes it again at once: it reads the task, renders the prompt again and waits again if no slot is free. The delivery is never run on the old copy, never dropped for the save, and runs once. A direct delivery waiting in memory (its first store failed) is stored then; if that store fails again it ends with a reason saying so. README: the waited delivery's new behaviour, and the note that a change letting profiles cut T3's own tools must revisit the bind-during-save sentence (#725 review A2). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Owner
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. # Conflicts: # .github/fork-seams.json Uh oh!
There was an error while loading. Please reload this page.
scuttletoby
added a commit
that referenced
this pull request
… saves (#750) (#754) The #743 reviews' minors on the slot wait's save check: - A save between the stored-delivery worker's read of the task and runTask's read is now seen, wait or not: as the run starts, a stored delivery whose row (task_json) holds another prompt than the task the run read is handed back to the worker, which renders it again. Only for the worker's own `dispatching` row (a `running` row keeps the prompt it was sent with), never for a direct delivery. - The wait compares every field a run uses (title, prompt, schedule, project, thread, thread mode, workspace, model, modes, creator), decoded as the service decodes the row, instead of `updated_at` and the raw prompt: a same-millisecond save of the title or project is seen, and a prompt written outside T3 with edge spaces is not a save. - Writes that are not saves (a new webhook token, a pause undone before the next retry) no longer hand the delivery back, so they count no extra `started`. - A read that fails during the wait is asked again at the next retry (no slot taken), instead of counting as a save that a second failed read then drops. - Rewraps the long comment in scheduledTaskMcpProfile.ts. Tests: a same-ms title or project save, a save between the two reads (slot free, and with a wait), a stored delivery left alone with no save, a new token, a pause undone, or an edge-spaced prompt (no hand-back, one `started`), an unreadable task during the wait, a `running` row saved after it was sent, a direct delivery beside a stored one, and a profile refusal after a hand-back. Closes #750 Co-authored-by: Claude Opus 5.5 <[email protected]>
scuttletoby
added a commit
that referenced
this pull request
…task as saved (#719) (#743) * fork seams: announce the stored-delivery worker's keep line (#719) Announces one line in ScheduledTaskService.ts's stored-delivery worker: `if (yield* runSlots.keepStored(taskId)) continue;` right after its `runWebhookDelivery` call. With it, a webhook delivery whose task was saved while it waited for an agent slot is not removed: the worker reads the task again and runs the delivery on the task as saved. Part of #719. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Scheduled tasks: a webhook delivery saved while it waits runs on the task as saved (#719) A stored webhook delivery that waited for an agent slot held the task and the prompt rendered before the wait. A save during the wait either ran it on that old copy (a bound task, or any edit the profile check does not see) or, for a task with an MCP profile record, refused it as a stale copy and dropped it. Now each retry of the wait checks whether the task's row was written since the copy was read (`updated_at`, and the prompt for a save in the same millisecond). If so, this run ends unstarted and the stored-delivery worker keeps the row (the seam line announced in the previous commit, `runSlots.keepStored`) and takes it again at once: it reads the task, renders the prompt again and waits again if no slot is free. The delivery is never run on the old copy, never dropped for the save, and runs once. A direct delivery waiting in memory (its first store failed) is stored then; if that store fails again it ends with a reason saying so. README: the waited delivery's new behaviour, and the note that a change letting profiles cut T3's own tools must revisit the bind-during-save sentence (#725 review A2). Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
scuttletoby
added a commit
that referenced
this pull request
… saves (#750) (#754) The #743 reviews' minors on the slot wait's save check: - A save between the stored-delivery worker's read of the task and runTask's read is now seen, wait or not: as the run starts, a stored delivery whose row (task_json) holds another prompt than the task the run read is handed back to the worker, which renders it again. Only for the worker's own `dispatching` row (a `running` row keeps the prompt it was sent with), never for a direct delivery. - The wait compares every field a run uses (title, prompt, schedule, project, thread, thread mode, workspace, model, modes, creator), decoded as the service decodes the row, instead of `updated_at` and the raw prompt: a same-millisecond save of the title or project is seen, and a prompt written outside T3 with edge spaces is not a save. - Writes that are not saves (a new webhook token, a pause undone before the next retry) no longer hand the delivery back, so they count no extra `started`. - A read that fails during the wait is asked again at the next retry (no slot taken), instead of counting as a save that a second failed read then drops. - Rewraps the long comment in scheduledTaskMcpProfile.ts. Tests: a same-ms title or project save, a save between the two reads (slot free, and with a wait), a stored delivery left alone with no save, a new token, a pause undone, or an edge-spaced prompt (no hand-back, one `started`), an unreadable task during the wait, a `running` row saved after it was sent, a direct delivery beside a stored one, and a profile refusal after a hand-back. Closes #750 Co-authored-by: Claude Opus 5.5 <[email protected]>
scuttletoby
added a commit
that referenced
this pull request
…task as saved (#719) (#743) * fork seams: announce the stored-delivery worker's keep line (#719) Announces one line in ScheduledTaskService.ts's stored-delivery worker: `if (yield* runSlots.keepStored(taskId)) continue;` right after its `runWebhookDelivery` call. With it, a webhook delivery whose task was saved while it waited for an agent slot is not removed: the worker reads the task again and runs the delivery on the task as saved. Part of #719. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Scheduled tasks: a webhook delivery saved while it waits runs on the task as saved (#719) A stored webhook delivery that waited for an agent slot held the task and the prompt rendered before the wait. A save during the wait either ran it on that old copy (a bound task, or any edit the profile check does not see) or, for a task with an MCP profile record, refused it as a stale copy and dropped it. Now each retry of the wait checks whether the task's row was written since the copy was read (`updated_at`, and the prompt for a save in the same millisecond). If so, this run ends unstarted and the stored-delivery worker keeps the row (the seam line announced in the previous commit, `runSlots.keepStored`) and takes it again at once: it reads the task, renders the prompt again and waits again if no slot is free. The delivery is never run on the old copy, never dropped for the save, and runs once. A direct delivery waiting in memory (its first store failed) is stored then; if that store fails again it ends with a reason saying so. README: the waited delivery's new behaviour, and the note that a change letting profiles cut T3's own tools must revisit the bind-during-save sentence (#725 review A2). Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
scuttletoby
added a commit
that referenced
this pull request
… saves (#750) (#754) The #743 reviews' minors on the slot wait's save check: - A save between the stored-delivery worker's read of the task and runTask's read is now seen, wait or not: as the run starts, a stored delivery whose row (task_json) holds another prompt than the task the run read is handed back to the worker, which renders it again. Only for the worker's own `dispatching` row (a `running` row keeps the prompt it was sent with), never for a direct delivery. - The wait compares every field a run uses (title, prompt, schedule, project, thread, thread mode, workspace, model, modes, creator), decoded as the service decodes the row, instead of `updated_at` and the raw prompt: a same-millisecond save of the title or project is seen, and a prompt written outside T3 with edge spaces is not a save. - Writes that are not saves (a new webhook token, a pause undone before the next retry) no longer hand the delivery back, so they count no extra `started`. - A read that fails during the wait is asked again at the next retry (no slot taken), instead of counting as a save that a second failed read then drops. - Rewraps the long comment in scheduledTaskMcpProfile.ts. Tests: a same-ms title or project save, a save between the two reads (slot free, and with a wait), a stored delivery left alone with no save, a new token, a pause undone, or an edge-spaced prompt (no hand-back, one `started`), an unreadable task during the wait, a `running` row saved after it was sent, a direct delivery beside a stored one, and a profile refusal after a hand-back. Closes #750 Co-authored-by: Claude Opus 5.5 <[email protected]>
scuttletoby
added a commit
that referenced
this pull request
…task as saved (#719) (#743) * fork seams: announce the stored-delivery worker's keep line (#719) Announces one line in ScheduledTaskService.ts's stored-delivery worker: `if (yield* runSlots.keepStored(taskId)) continue;` right after its `runWebhookDelivery` call. With it, a webhook delivery whose task was saved while it waited for an agent slot is not removed: the worker reads the task again and runs the delivery on the task as saved. Part of #719. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Scheduled tasks: a webhook delivery saved while it waits runs on the task as saved (#719) A stored webhook delivery that waited for an agent slot held the task and the prompt rendered before the wait. A save during the wait either ran it on that old copy (a bound task, or any edit the profile check does not see) or, for a task with an MCP profile record, refused it as a stale copy and dropped it. Now each retry of the wait checks whether the task's row was written since the copy was read (`updated_at`, and the prompt for a save in the same millisecond). If so, this run ends unstarted and the stored-delivery worker keeps the row (the seam line announced in the previous commit, `runSlots.keepStored`) and takes it again at once: it reads the task, renders the prompt again and waits again if no slot is free. The delivery is never run on the old copy, never dropped for the save, and runs once. A direct delivery waiting in memory (its first store failed) is stored then; if that store fails again it ends with a reason saying so. README: the waited delivery's new behaviour, and the note that a change letting profiles cut T3's own tools must revisit the bind-during-save sentence (#725 review A2). Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
scuttletoby
added a commit
that referenced
this pull request
… saves (#750) (#754) The #743 reviews' minors on the slot wait's save check: - A save between the stored-delivery worker's read of the task and runTask's read is now seen, wait or not: as the run starts, a stored delivery whose row (task_json) holds another prompt than the task the run read is handed back to the worker, which renders it again. Only for the worker's own `dispatching` row (a `running` row keeps the prompt it was sent with), never for a direct delivery. - The wait compares every field a run uses (title, prompt, schedule, project, thread, thread mode, workspace, model, modes, creator), decoded as the service decodes the row, instead of `updated_at` and the raw prompt: a same-millisecond save of the title or project is seen, and a prompt written outside T3 with edge spaces is not a save. - Writes that are not saves (a new webhook token, a pause undone before the next retry) no longer hand the delivery back, so they count no extra `started`. - A read that fails during the wait is asked again at the next retry (no slot taken), instead of counting as a save that a second failed read then drops. - Rewraps the long comment in scheduledTaskMcpProfile.ts. Tests: a same-ms title or project save, a save between the two reads (slot free, and with a wait), a stored delivery left alone with no save, a new token, a pause undone, or an edge-spaced prompt (no hand-back, one `started`), an unreadable task during the wait, a `running` row saved after it was sent, a direct delivery beside a stored one, and a profile refusal after a hand-back. Closes #750 Co-authored-by: Claude Opus 5.5 <[email protected]>
scuttletoby
added a commit
that referenced
this pull request
…task as saved (#719) (#743) * fork seams: announce the stored-delivery worker's keep line (#719) Announces one line in ScheduledTaskService.ts's stored-delivery worker: `if (yield* runSlots.keepStored(taskId)) continue;` right after its `runWebhookDelivery` call. With it, a webhook delivery whose task was saved while it waited for an agent slot is not removed: the worker reads the task again and runs the delivery on the task as saved. Part of #719. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Scheduled tasks: a webhook delivery saved while it waits runs on the task as saved (#719) A stored webhook delivery that waited for an agent slot held the task and the prompt rendered before the wait. A save during the wait either ran it on that old copy (a bound task, or any edit the profile check does not see) or, for a task with an MCP profile record, refused it as a stale copy and dropped it. Now each retry of the wait checks whether the task's row was written since the copy was read (`updated_at`, and the prompt for a save in the same millisecond). If so, this run ends unstarted and the stored-delivery worker keeps the row (the seam line announced in the previous commit, `runSlots.keepStored`) and takes it again at once: it reads the task, renders the prompt again and waits again if no slot is free. The delivery is never run on the old copy, never dropped for the save, and runs once. A direct delivery waiting in memory (its first store failed) is stored then; if that store fails again it ends with a reason saying so. README: the waited delivery's new behaviour, and the note that a change letting profiles cut T3's own tools must revisit the bind-during-save sentence (#725 review A2). Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
scuttletoby
added a commit
that referenced
this pull request
… saves (#750) (#754) The #743 reviews' minors on the slot wait's save check: - A save between the stored-delivery worker's read of the task and runTask's read is now seen, wait or not: as the run starts, a stored delivery whose row (task_json) holds another prompt than the task the run read is handed back to the worker, which renders it again. Only for the worker's own `dispatching` row (a `running` row keeps the prompt it was sent with), never for a direct delivery. - The wait compares every field a run uses (title, prompt, schedule, project, thread, thread mode, workspace, model, modes, creator), decoded as the service decodes the row, instead of `updated_at` and the raw prompt: a same-millisecond save of the title or project is seen, and a prompt written outside T3 with edge spaces is not a save. - Writes that are not saves (a new webhook token, a pause undone before the next retry) no longer hand the delivery back, so they count no extra `started`. - A read that fails during the wait is asked again at the next retry (no slot taken), instead of counting as a save that a second failed read then drops. - Rewraps the long comment in scheduledTaskMcpProfile.ts. Tests: a same-ms title or project save, a save between the two reads (slot free, and with a wait), a stored delivery left alone with no save, a new token, a pause undone, or an edge-spaced prompt (no hand-back, one `started`), an unreadable task during the wait, a `running` row saved after it was sent, a direct delivery beside a stored one, and a profile refusal after a hand-back. Closes #750 Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. MCP profiles: follow-ups from #716 reviewsUh oh!
There was an error while loading. Please reload this page. 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. | ||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |