Skip to content

fix(desktop): make task retirement the lifecycle authority - #12187

Merged
kodjima33 merged 1 commit into
BasedHardware:mainfrom
aryanorastar:codex/11518-task-retirement-authority
Aug 25, 2026
Merged

kodjima33 merged 1 commit into
BasedHardware:mainfrom
aryanorastar:codex/11518-task-retirement-authority

Conversation

@aryanorastar

@aryanorastar aryanorastar commented Aug 25, 2026 •

Copy link
Copy Markdown
Collaborator

What changed and why

Fixes #11518. TaskActionItem.isRetired already understood canonical cancelled and superseded statuses, but desktop task surfaces, filters, automation, and chat tools could still read the optional legacy deleted flag directly and treat status-only-retired tasks as live.

This makes the legacy wire marker private, preserves its deleted JSON key, and routes every TaskActionItem lifecycle decision through isRetired. Cancelled and superseded tasks are now excluded from active lists and mutations and classified into the correct Removed lane even when the backend omits deleted.

Product invariants affected

  • INV-CHAT-1: task chat/tool paths still use the existing canonical task and conversation owners; this only rejects already-retired task targets.
  • INV-NAV-1: chat-first and legacy task surfaces now apply the same retirement predicate.
  • INV-TASK-1: complete dated buckets and bounded No Deadline paging are unchanged; retired rows are consistently removed from both active bucket shapes.

How it was verified

  • xcrun swift build -c debug --package-path desktop/macos/Desktop — passed.
  • Built, signed, installed, and launched /Applications/omi-11518-retirement.app (com.omi.omi-11518-retirement) against the development desktop backend. The automation bridge reported the exact bundle and exposed the genuine task store actions. This machine has no signed-in desktop auth seed; an attempted CRUD smoke correctly failed closed as signed out. The repository's offline synthetic-auth harness could not start because Docker/Typesense is not installed, so no authenticated UI claim is made.
  • Focused lifecycle/storage/navigation suite — 44 tests, 0 failures.
  • Full desktop suite — 5,766 tests executed, 1 skipped, 2 failures outside this diff:
    • FloatingBarNotificationPreviewPolicyTests.testDirectorDeliveryWithDisabledCategoryToggleIsSuppressedAtTheEntryPoint failed only in the full shared-state run and passed when rerun in isolation.
    • RewindCaptureExclusionGenerationTests.testOwnerSnapshotStaysCurrentWhenAuthLeadsUnresolvedRewindDatabase reproduces in isolation with the process-global owner resolving to anonymous; no changed file participates in that test.
  • Pinned swift-format lint --strict, check_desktop_test_quality.py, and git diff --check — passed.

Tests

TaskActionItemRetirementAuthorityTests is the regression coverage. It constructs cancelled and superseded payloads with deleted: nil and proves they are retired, appear only in the appropriate Removed filter, and never enter the active dated surface. It also proves user-removal provenance and exact legacy deleted wire compatibility.

Related TasksStoreTaskPaginationTests, TasksStoreDeletedLaneRetirementTests, ActionItemStorageVisibilityReconciliationTests, and DashboardIntelligenceStoreTests all pass with the new authority boundary.

Failure class (fixes)

Failure-Class: none

Review in cubic

Cancelled and superseded tasks can omit the legacy deleted flag. Make that raw wire marker private and route every TaskActionItem lifecycle decision through isRetired so status-only-retired tasks cannot surface as live or accept mutations.

Add regression coverage for task filters, active surfaces, provenance, and deleted-wire compatibility.

Failure-Class: none
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Desktop bug-fix fast lane (owner-override): fixes #11518, routes all task lifecycle checks through isRetired instead of legacy deleted flag so cancelled/superseded tasks are correctly excluded. CI clean.

@kodjima33
kodjima33 merged commit a79d9ea into BasedHardware:main Aug 25, 2026
32 checks passed
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.

Desktop: raw TaskActionItem.deleted reads disagree with isRetired, so status-only-retired tasks read as live

2 participants