Skip to content

Propose upstream: persist a scheduled task's run completion time (replaces the sign's overlay record) #236

Open

Description

@immakermatty

Follow-up of #232, the coordinator's (C). The sign by Buddy's avatar needs to know when a scheduled task's last run finished. Upstream does not persist that time:

  • ScheduledTask keeps lastRunAt (the run's start) and updatedAt, which every save or toggle moves;
  • ScheduledTaskService.markCompleted writes updated_at, last_run_status and run_count, with no completion time of its own.

#232 bridges this in the overlay: buddyTaskFailures.ts records a failed run when the task list reports a new runCount, kept in the server's state. Its one known cost: on the first start of the version, an unrecorded failure is dated by that reading, so a stale failure already cleared by a later turn shows once, until the next completed turn (tested in buddyTaskFailures.test.ts). The fork adds no server migration of its own, because an own numbered migration collides with upstream's next one and cannot be taken back.

Proposal for upstream: a lastRunCompletedAt on ScheduledTask, written by markCompleted in the same update and exposed in the contract. Useful beyond Buddy too: the task list and MCP could show when a run ended, not only when it began. Once upstream has it, the overlay record and its first-start rule go away and the sign reads the task's own field.

Not done yet: posting the proposal to upstream (pingdotgg/t3code, as an Ideas discussion per its CONTRIBUTING). That is a public post in the owner's name and waits for his word. The draft text is above.

Agent: environment a480495c-25e0-4e51-828b-1dbf1b77d62f · T3 thread 72068f77-568a-48aa-aa8a-108c03b29972

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions