fix: bump uv-pre-commit to 0.11.3, distinguish checkpoint resume

- Bump uv-pre-commit from 0.9.3 to 0.11.3 to support relative
  exclude-newer values in pyproject.toml
- Use checkpoint_kickoff_event_id to detect resume, preventing
  second kickoff() from skipping tasks or suppressing events
This commit is contained in:
Greyson LaLonde
2026-04-04 21:29:30 +08:00
parent b882988128
commit ebb58a237e
4 changed files with 1683 additions and 1533 deletions

View File

@@ -21,7 +21,7 @@ repos:
types: [python]
exclude: ^(lib/crewai/src/crewai/cli/templates/|lib/crewai/tests/|lib/crewai-tools/tests/|lib/crewai-files/tests/)
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.3
rev: 0.11.3
hooks:
- id: uv-lock
- repo: https://github.com/commitizen-tools/commitizen

View File

@@ -1298,6 +1298,8 @@ class Crew(FlowTrackable, BaseModel):
manager.crew = self
def _get_execution_start_index(self, tasks: list[Task]) -> int | None:
if self.checkpoint_kickoff_event_id is None:
return None
for i, task in enumerate(tasks):
if task.output is None:
return i if i > 0 else None

View File

@@ -284,7 +284,7 @@ def prepare_kickoff(
)
from crewai.events.types.crew_events import CrewKickoffStartedEvent
resuming = crew._kickoff_event_id is not None
resuming = crew.checkpoint_kickoff_event_id is not None
if not resuming and get_current_parent_id() is None:
reset_emission_counter()

3210
uv.lock generated

File diff suppressed because it is too large Load Diff