Skip to content

fix: preserve scheduled task isolation and editing (v0.9.10) - #96

Merged
cloader merged 4 commits into
devfrom
fix/issue-94-95
Nov 3, 2026
Merged

cloader merged 4 commits into
devfrom
fix/issue-94-95

Conversation

@cloader

@cloader cloader commented Nov 3, 2026

Copy link
Copy Markdown
Owner

改了什么?

Fix scheduled task isolation and editing for v0.9.10:

  • Give periodic successor cards independent branches. When a legacy pinned branch is occupied, persist the actual fallback branch on the task and execution so evidence, continuation and merging use the correct branch, including multi-repo mirrors.
  • Normalize consumed one-shot schedules to claim mode. Preserve due, queued and dispatching triggers during ordinary edits, and require a future time only when explicitly rescheduling.
  • Bump package, lockfile and UI versions to 0.9.10; update the bilingual README and changelog, linking the issues and crediting @timacek.

如何验证?

  • Node 22.23.1 and 26.13.0: 689 tests across 54 files passed; typecheck and host/client builds passed.
  • Real Git regression coverage: single repo, root plus nested repos, and multi-repo containers; verify evidence, committed and uncommitted work through continuation, and merging while predecessor worktrees remain alive.
  • React form and HTTP coverage: due, queued and dispatching windows, explicit rescheduling, and settlement preserving a schedule rearmed during execution.
  • After the version bump: package/UI version consistency test, host/client build and git diff --check passed.

关联 Issue(可选)

Fixes #94
Fixes #95

release: v0.9.9 — readable task details on narrow panels
… held by the predecessor (issue #94)

spawnNextCycle copied branch/branches into the successor, but the
predecessor's in_review worktree keeps that branch checked out until a
human accepts it. From cycle 2 on, prepareWorktree('fresh') could not
'git branch -f' the branch, returned undefined, and the whole run
silently degraded to in-place execution with no evidence.

- spawnNextCycle no longer inherits branch/branches: each cycle pins its
  own task/<title>+<newTaskId> on its first run.
- prepareWorktree('fresh') now falls back to a per-run branch
  (<branch>+r<rand>) when 'branch -f' fails because another live worktree
  holds the branch, instead of degrading the run to the main checkout.
- Regression: scripted git fallback test, successor-branch assertion
  updates, and a real-git end-to-end preparing cycle 2 while cycle 1's
  worktree is still alive.
…saveable (issue #95)

After a one-shot (定时一次) fired, the ledger kept mode 'scheduled' with
no cron/runAt: the edit form inferred mode 'once' with an empty datetime
and a permanently disabled Save button, and the card/detail rendered an
empty ⏰ badge.

- New shared predicate isSpentOneShot(exec, now): scheduled, no cron,
  no queued/dispatching window, and no FUTURE runAt. A past runAt counts
  as spent (its window is gone; only queue fields are still live).
- Host normalizes mode to claim (and consumes a leftover past runAt) at
  settlement, on a missed window, on queue expiry/clear, and on a dead
  cron — a mid-run re-arm with a fresh future runAt is left untouched.
- Client defense-in-depth: TaskFormModal treats a spent one-shot as a
  plain claim task (heals legacy ledgers), a queued one-shot still edits
  as 定时一次 seeded with its dispatch window, and TaskCard/TaskDetail
  hide the ⏰ badge/chip when no trigger field remains.
- Regression: settlement + missed-window + mid-run re-arm host tests and
  a jsdom form test asserting Save enables and submits mode 'claim'.
@cloader
cloader merged commit aac0706 into dev Nov 3, 2026
2 checks passed
@cloader
cloader deleted the fix/issue-94-95 branch November 9, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant