Skip to content

Fix remaining-task semantics for completed parent chains#37

Merged
deverman merged 4 commits into
masterfrom
issue-27-read-trust-parity
Jun 1, 2026
Merged

Fix remaining-task semantics for completed parent chains#37
deverman merged 4 commits into
masterfrom
issue-27-read-trust-parity

Conversation

@deverman

Copy link
Copy Markdown
Owner

Summary

Fix remaining/default task semantics so children of completed or dropped parent tasks are no longer treated as remaining.

Change

  • update bridge remaining-state helpers to respect the full parent task chain
  • update the embedded JXA path to apply the same ancestor-aware remaining logic
  • add live integration coverage for children under completed parents in bridge and JXA paths

Why

Issue #27 is about read trust before write support. A task should not appear actionable if an ancestor task has already been completed or dropped.

Validation

  • swift test
  • benchmark-gate-check --tool task-counts
  • benchmark-gate-check --tool list-tasks
  • 10-minute smoke benchmark for list-tasks
  • 10-minute smoke benchmark for task-counts

Notes

The semantic gates are slow on this machine and database, but they passed cleanly once run with a sufficient timeout budget.

Defiantweb and others added 3 commits April 4, 2026 16:34
The bridge plugin returns dates from OmniFocus in formats that Swift's
built-in .iso8601 JSONDecoder strategy cannot parse (e.g., dates without
fractional seconds, date-only strings, or timestamps without timezone).

This caused "Expected date string to be ISO8601-formatted" errors and
45-second bridge timeouts when requesting any date field (dueDate,
plannedDate, deferDate, completionDate, lastReviewDate, nextReviewDate)
on list-tasks or list-projects.

Replace the strict .iso8601 decoder with a .custom strategy that tries
multiple formats in order:
1. ISO8601 with fractional seconds
2. ISO8601 standard (withInternetDateTime)
3. Date-only (yyyy-MM-dd)
4. ISO8601 without timezone

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@deverman

Copy link
Copy Markdown
Owner Author

Merge-order note: this PR is intentionally independent from issue #28. Issue #28 was branched from origin/master and does not require #37 to merge first. Merge this PR whenever the read-trust fix is reviewed and ready; do not block #28 on this unless the write-contract review explicitly decides to reference the new completed-parent semantics examples.

@deverman

deverman commented Jun 1, 2026

Copy link
Copy Markdown
Owner Author

Validation after merging current origin/master into issue-27-read-trust-parity:

  • node --check Plugin/FocusRelayBridge.omnijs/Resources/BridgeLibrary.js
  • swift test (68 tests passed; existing MCP SDK deprecation warnings only)
  • ./scripts/install-plugin.sh; fully restarted OmniFocus
  • ./.build/debug/focusrelay bridge-health-check
  • swift run focusrelay benchmark-gate-check --tool task-counts
  • swift run focusrelay benchmark-gate-check --tool list-tasks
  • swift run focusrelay benchmark-gate-check --tool project-counts
  • swift run focusrelay benchmark-task-counts --duration-hours 0.1667 --warmup-calls 10 --interval-ms 2000 --cooldown-ms 3000 --output-dir /tmp/focusrelay-issue27-task-counts-smoke
  • swift run focusrelay benchmark-list-tasks --duration-hours 0.1667 --warmup-calls 10 --interval-ms 2000 --cooldown-ms 3000 --output-dir /tmp/focusrelay-issue27-list-tasks-smoke
  • swift run focusrelay benchmark-project-counts --duration-hours 0.1667 --warmup-calls 10 --interval-ms 2000 --cooldown-ms 3000 --output-dir /tmp/focusrelay-issue27-project-counts-smoke

Smoke results for all three affected tools: 0 mismatches, 0 errors, 0 timeouts, 0 timeout diagnostic entries.

Merge order note: this remains the bottom PR in the mutation/read-trust stack and should merge before #38, #40, #41, #42, #43, #44, #46, #49, #50, #51, #52, and #54.

@deverman deverman marked this pull request as ready for review June 1, 2026 10:47
@deverman deverman merged commit bb4da93 into master Jun 1, 2026
1 check 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.

2 participants