fix(mcp): validate actual_end is not before actual_start in fix_actual_times tool - #1178
Closed
amir-rezaei wants to merge 1 commit into
Closed
fix(mcp): validate actual_end is not before actual_start in fix_actual_times tool#1178amir-rezaei wants to merge 1 commit into
amir-rezaei wants to merge 1 commit into
Conversation
Owner
|
Thanks, but closing this one — the check it adds is already enforced, and in a stricter form, one layer down.
if new_start is not None and new_end is not None and new_end < new_start:
raise TaskValidationError(
f"actual_end ({new_end}) must be >= actual_start ({new_start})"
)Two problems with adding the same rule in the MCP tool:
If you want to pick up #1143, the useful change is consolidating CLI / TUI / MCP onto the core rules — happy to review that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR resolves part of issue #1143 by adding validation to the MCP
fix_actual_timestool inpackages/taskdog-mcp/src/taskdog_mcp/tools/task_lifecycle.pyto reject inputs whereactual_end < actual_start.Details
fix_actual_timesvalidated onlyactual_duration > 0, permitting invalid timestamp configurations whereactual_endwas earlier thanactual_start.start_dtandend_dtto raiseValueError("actual_end cannot be before actual_start")ifend_dt < start_dt.