Skip to content

Show each scheduled task's last run, and Retry a failed one - #494

Merged
Birfy merged 5 commits into
ThinkFlowLab:mainfrom
Birfy:feat/473-schedule-last-run-retry
Oct 20, 2026
Merged

Birfy merged 5 commits into
ThinkFlowLab:mainfrom
Birfy:feat/473-schedule-last-run-retry

Conversation

@Birfy

@Birfy Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Fixes #473

What. Each row in Settings → Scheduled tasks (and a Bot's card) shows its last run: "Running since …", "Last run …", "Last run … · Stopped", or in red "Last run … · Failed: ". A failed run of a task that is not paused gets Retry, which runs the task once now with the same prompt.

Why / how (Owner decision 2026-10-20, option a):

Test. ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify passes (core 1081, social 296, tree 80, timeline 83, scripts 93, interop 37, live-e2e 16; 0 failures). New tests: core/test/schedules.test.js (run results, Retry, not delivered), core/test/schedules-client.test.js (row line + Retry), authz.test.js (schedule-retry ownership). Not run: live DSH with the Automation tasks bundle, smoke test.

Risk tier: T2 (estimate; the controller sets the label)

…wLab#473)

A run fails only when DSH could not deliver it or the Bot's turn errored;
a finished turn without an answer has run. Retry sends the same prompt once
now, without backfilling missed times. A reminder DSH did not deliver joins
the ended turns that notifications and the Agent inbox read (ThinkFlowLab#353).
@Birfy Birfy added agent-pr Pull request opened by an agent enhancement New feature or request area:automation Scheduled tasks and automation labels Oct 20, 2026
@Birfy Birfy self-assigned this Oct 20, 2026
@Birfy

Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review: PASS
Tip SHA: 561d0e3
Ran:

  • ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify at the tip: 0 failures (core lint + arch-docs OK, plugin lint, build-client --check, ds-bot-patches check, core 1081, social 296, tree 80, timeline 83, scripts 93, interop 37, live-e2e 16)
  • CI at the tip: tests-ok, test, plugins (social/tree/timeline), package all green; risk tier T3 (authz.js, channel.js)
  • Diff reviewed against the Owner decision (option a): failed = DSH did not deliver or the turn errored; a finished turn without an answer is a run; Retry = same prompt once now, no backfill; failures go into the Proactive reminders 1/3: event reminders (approval waiting, failed, finished) in app and desktop #353 ended-turn list (no second event path); limits ([Team] Bound agent loops and resource consumption #56) left out
  • Design rules: Retry is an owner UI button behind the same session-ownership check as Pause (authz.js); no approval by chat reply; English UI copy with zh strings; no DSH patch (only createUserMessage with DSH's schedule source and its public catalog)
    Not run:
  • Live DSH with the Automation tasks bundle (a real refused delivery, a real scheduled turn), the smoke test, the user's Mac instances
  • Agent inbox card for a failed scheduled run: comes from Agent inbox phase 2: board view, tool-call counts, failed turns and team views (after #349) #471 (reads the same work.ended list), not in this PR

@Birfy Birfy added the awaiting-approval PR is green and waits for the maintainer's approval (T2/T3) or a review PASS at its tip label Oct 20, 2026
@github-actions github-actions Bot added the risk:T3 Risk tier T3 (needs a human approval), set by the controller from the diff label Oct 20, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 20, 2026
@Birfy

Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review: PASS
Tip SHA: 0c2f52a
Ran:

Keep ThinkFlowLab#473 last-run/Retry schedules docs; take main's ThinkFlowLab#471 inbox docs.
Regenerate client bundle and ds-bot patches.
@Birfy

Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review: PASS
Tip SHA: d3ad708
Ran:

  • ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify (pass)
  • reviewed diff at tip vs owner design rules
    Not run:
  • live Mac instances / production Bot Social

@Birfy
Birfy added this pull request to the merge queue Oct 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 20, 2026
…t-run-retry

# Conflicts:
#	patches/ds-bot/0008-client-bundle.patch
@Birfy

Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review: PASS
Tip SHA: 877927e
Ran:

  • git merge origin/main (eb91742, after Remind about approvals waiting 15 min, switch each notification kind, one notification per chat #492 and Social: neutral 'You already have …' on a re-accepted invite; clearer Remove confirm #503) into the branch, no rebase or force-push; only conflict was the generated patches/ds-bot/0008-client-bundle.patch
  • generated files regenerated, not hand-merged: took main's patches/ds-bot, then (cd core && npm run build), node scripts/ds-bot-patches.mjs generate, then check: ok (10 patches apply cleanly; core/ = ds-bot/ + patches)
  • ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify (core lint + arch-docs, plugin lint, build-client --check, ds-bot-patches check, all suites): pass, 0 failures (core 1102, social 309, tree 80, timeline 92, .github scripts 93, interop 37, live-e2e 16; a first run had 1 failure in connectors.test.js 'an address saved by an older version…' under parallel load, which passed 3/3 alone and in the full file; the rerun of the full verify passed)
  • CI on this tip: all checks pass (tests-ok, Node 24 · DSH 0.2.0-rc.2, plugins social/timeline/tree, package, risk tier, reviewed tip); mergeable MERGEABLE, mergeStateStatus CLEAN
  • re-read the diff against main at this tip: changelog.d fragment kept, no CHANGELOG.md or ds-bot/ edits, owner design rules kept (approvals only via UI buttons, English UI, no separate Friends' Bots section, no turn limit or Extend in friend chats, connector tokens only at /mcp)
    Not run:
  • live Mac instances / production Bot Social

@Birfy
Birfy added this pull request to the merge queue Oct 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 20, 2026
…t-run-retry

# Conflicts:
#	docs/subsystems/core-host.md
#	patches/ds-bot/0008-client-bundle.patch
@Birfy

Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review: PASS (merge-main conflict fix; no feature change)

Tip SHA: 67ddae5
Ran:

Verdict: PASS

Not merge authority: risk:T3, waits for the maintainer's approval (merge queue).

@Birfy
Birfy added this pull request to the merge queue Oct 20, 2026
Merged via the queue into ThinkFlowLab:main with commit b6e89d2 Oct 20, 2026
8 checks passed
@Birfy
Birfy deleted the feat/473-schedule-last-run-retry branch October 20, 2026 12:18
@Birfy Birfy removed awaiting-approval PR is green and waits for the maintainer's approval (T2/T3) or a review PASS at its tip agent-pr Pull request opened by an agent labels Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:automation Scheduled tasks and automation enhancement New feature or request risk:T3 Risk tier T3 (needs a human approval), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scheduled tasks: last run result, failed runs with retry, and limits (#354 follow-up)

1 participant