Repository navigation
fix(executor): preserve task update time on selection - #2384
Conversation
|
Warning Review limit reached
Next review available in: 13 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe runtime handler now hydrates goal status without changing ChangesGoal status hydration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
executor/src/runtime_work/handler/tests.rs (1)
238-260: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover both hydration and activity-update branches.
This test covers only a changed status through
hydrate_runtime_task_goal_status. Add one case for an unchanged status that preservesupdated_at, and one case for a changed status throughsync_runtime_task_goal_statusthat advancesupdated_at. These cases will detect a reversed activity flag or a removed no-op guard.As per coding guidelines, run focused tests before committing and broader tests when risk warrants it.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@executor/src/runtime_work/handler/tests.rs` around lines 238 - 260, Extend the runtime task goal-status tests around hydrate_runtime_task_goal_status and sync_runtime_task_goal_status: add an unchanged-status hydration case that preserves updated_at, and a changed-status sync case that advances updated_at. Keep the existing changed hydration case, and run focused tests plus broader tests if warranted.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@executor/src/runtime_work/handler/tests.rs`:
- Around line 238-260: Extend the runtime task goal-status tests around
hydrate_runtime_task_goal_status and sync_runtime_task_goal_status: add an
unchanged-status hydration case that preserves updated_at, and a changed-status
sync case that advances updated_at. Keep the existing changed hydration case,
and run focused tests plus broader tests if warranted.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f8f4093d-5dac-4203-9dfd-2bfa18e423f0
📒 Files selected for processing (5)
docs/en/wegent/developer-guide/runtime-local-work.mddocs/zh/wegent/developer-guide/runtime-local-work.mdexecutor/src/runtime_work/handler/archives.rsexecutor/src/runtime_work/handler/collection.rsexecutor/src/runtime_work/handler/tests.rs
What changed
runtime.tasks.goal.getas read-only task-state hydrationupdated_atduring goal hydrationupdatedAtRoot cause
Selecting a Wework task hydrates its goal state. The executor reused the mutation-oriented goal synchronization path, which unconditionally assigned
now_ms()to the LocalTaskupdated_at. As a result, merely opening a task changed its displayed update time and could affect list ordering.Impact
Selecting or reopening a task no longer changes its update time. Actual task content and lifecycle changes continue to advance task activity time.
Validation
cargo fmt --check --manifest-path executor/Cargo.tomlcargo test --manifest-path executor/Cargo.toml --lib goal_statuscargo test --manifest-path executor/Cargo.toml --lib syncing_cargo test --all-features --libcargo clippyupdatedAt = 1785743247743, switched away, reopened it, reloaded Wework, and confirmedupdatedAtremained1785743247743Summary by CodeRabbit
Bug Fixes
Documentation