Skip to content

Reconcile delegated replies missed during a plugin restart - #497

Merged
Fei2411 merged 6 commits into
devfrom
fix/483-handoff-unknown
Oct 25, 2026
Merged

Fei2411 merged 6 commits into
devfrom
fix/483-handoff-unknown

Conversation

@klarkxy

@klarkxy klarkxy commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Issue

Fixes #483

What changed / 改了什么

When DS Bot missed a delegated turn's start but observes its end after a plugin restart, reconcile it from DSH's public session inspection API instead of silently dropping the recovery record. Return known output once through the existing handoff path; preserve collected child results and held text; retain partial max-token output and distinguish an empty completed reply from unavailable evidence.

An unreadable result is reported as unknown with its session identified, without re-running the original request. Existing queued work, normal interrupted-turn recovery and Stop behavior remain in place. No task-board object, automatic retry policy or DSH patch is introduced.

Changelog

Recover delegated replies missed during a plugin restart, or explain when their outcome cannot be established.

How I checked it / 怎么验证的

  • Full suite before upstream merge: 941 tests, 940 passed, 1 existing Windows-specific skip, 0 failed.
  • 16 focused follow-through tests, including unreadable logs across repeated restarts, nested results, held contributions, partial token-limit output and completed empty replies.
  • Generated-client check and lint passed before the upstream merge.
  • Post-merge full suite (serialized): 941 tests, 940 passed, 1 skipped; generated-client check and lint passed. Isolated pinned-DSH mock smoke: all 52 steps passed.
  • All six branches combined: 1,000 tests, 999 passed, 1 skipped; client check and lint passed.
  • A Windows CI timing failure in the new state-persistence test was fixed by using a real-time condition deadline while advancing the mock clock. All 16 follow-through tests passed again; the test-only fix is pushed and CI is re-running.
  • Screenshot: no new interface surface.

Independent review found missing-output cases in the first candidate; the recovery now uses the same answer composition as live turns, with regression coverage for those cases. A recurring home-lock timing test failed once in the parallel post-merge suite; the subsequent serialized full check passed. DSH contracts were checked against the pinned version's public session inspection and event schemas.

Checklist / 检查

  • One issue, one subject.
  • No client source changes; generated client in sync.
  • No keys, tokens or personal data.
  • No AI tool as author or Co-authored-by.

Read durable turn evidence to return known output once, preserve downstream results and held text, and report unreadable outcomes without replaying work.
@klarkxy
klarkxy marked this pull request as ready for review October 23, 2026 15:57
Merge dev and restore completion of continued nested handoff work after restart. Include regression coverage.
# Conflicts:
#	docs/plans/2026-10-16-bot-handoffs.md
# Conflicts:
#	docs/plans/2026-10-16-bot-handoffs.md
@Fei2411
Fei2411 merged commit 76c9e60 into dev Oct 25, 2026
12 checks passed
@Fei2411
Fei2411 deleted the fix/483-handoff-unknown branch October 25, 2026 08:17
This was referenced Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants