Skip to content

feat(macapp): show scheduled task lifecycle - #1171

Merged
dennisonbertram merged 1 commit into
mainfrom
codex/issue-1009-macapp-task-lifecycle
Aug 5, 2026
Merged

feat(macapp): show scheduled task lifecycle#1171
dennisonbertram merged 1 commit into
mainfrom
codex/issue-1009-macapp-task-lifecycle

Conversation

@dennisonbertram

Copy link
Copy Markdown
Owner

Closes #1009

What changed

  • Extends GET /v1/tasks with additive server-authored cron and callback lifecycle fields, including schedule/due timing, last result, linked run, retry metadata, safe error text, and authoritative actions.
  • Adds forward-compatible typed Swift task models and scoped pause/resume/delete/cancel clients.
  • Adds macOS Activity lifecycle detail, accessible actions, destructive-delete confirmation, loading state, and post-action server reconciliation.

Why

Scheduled work must be observable and safely controllable in the native app without fabricating chat state or trusting stale local state.

Test evidence

  • Red first: server lifecycle contract failed because Task had no lifecycle fields; Swift client contract failed because task values were raw strings and control APIs were absent.
  • Full repository gate after rebase to f7b6c70: ./scripts/test-regression.sh passed normal, race, and coverage phases (85.5% total, zero uncovered functions).
  • Full native suite: TMPDIR=/private/tmp swift test --package-path macapp passed 256 tests.

Boundary

This is #1009 implementation and review evidence, not #1010's required merged-main API, TUI, and native macOS full-conversation proof.

@dennisonbertram

Copy link
Copy Markdown
Owner Author

Review repair in 6c0871c: optional cron expected_updated_at CAS (stale/invalid actions return 409 without mutation), durable callback updated_at projection plus Swift started, and accessible linked conversation/run navigation where only non-terminal reducer evidence creates live controls. Verification: affected Go normal/race passed; full Swift passed 259 tests; fresh serial ./scripts/test-regression.sh passed normal/race/coverage at 85.5% with zero uncovered functions.

@dennisonbertram
dennisonbertram force-pushed the codex/issue-1009-macapp-task-lifecycle branch from 6c0871c to 22c82f5 Compare August 4, 2026 19:39
@dennisonbertram

Copy link
Copy Markdown
Owner Author

Review repair pushed at 22c82f5d.

  • Preserves task updated_at as opaque raw updatedAtVersion: String? end-to-end; action JSON no longer round-trips through Date/ISO8601DateFormatter.
  • Swift coverage proves .123456789Z survives GET decode and all cron action JSON requests; absent token keeps an empty body.
  • Go coverage lists a nanosecond token, proves truncated .123Z gets 409 with no mutation, then exact token pauses the job.
  • Ran swift format format --in-place and swift format lint --strict on only the five reviewer-reported files.

Verification: focused Go lifecycle test; go test ./internal/server ./internal/harness/tools -count=1; same with -race; swift test --package-path macapp (259 tests / 47 suites); serial ./scripts/test-regression.sh with fresh cache/profile — PASS, coverage 85.5%, zero uncovered functions. No merge performed.

@dennisonbertram
dennisonbertram force-pushed the codex/issue-1009-macapp-task-lifecycle branch from 22c82f5 to a6642e0 Compare August 5, 2026 05:32
@dennisonbertram

Copy link
Copy Markdown
Owner Author

Additional no-store callback lifecycle repair pushed at a6642e00.

  • ListAllCallbacks now safely snapshots retained m.callbacks terminal rows; List/ListCallbacks still use active-only byConv for legacy agent behavior and capacity accounting.
  • No-store cancel, fire, and shutdown cancellation advance UpdatedAt; durable cancel/list behavior is unchanged.
  • Deterministic tool test proves canceled/fired/shutdown timestamps plus all-state retention and legacy active-list exclusion.
  • Server test proves cancel followed by GET /v1/tasks yields one canceled callback with no actions and nonzero updated_at.

Verification: focused red→green; complete affected normal and race suites; swift test --package-path macapp (259 tests / 47 suites); serial ./scripts/test-regression.sh PASS at 85.5% coverage with zero uncovered functions. No merge performed.

@dennisonbertram
dennisonbertram marked this pull request as ready for review August 5, 2026 05:36
@cursor

cursor Bot commented Aug 5, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@dennisonbertram
dennisonbertram merged commit 48f38a3 into main Aug 5, 2026
5 checks passed
@dennisonbertram
dennisonbertram deleted the codex/issue-1009-macapp-task-lifecycle branch August 5, 2026 05:36
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.

[Change]: Show and control cron and callback lifecycle in the macOS app

1 participant