mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-08 08:25:09 +00:00
fix(cli): forward reserved id input to flow kickoff; ruff format
- Cursor: the schema filter treated an `id` key in --inputs as unknown and dropped it, regressing kickoff's persistence-restore support (inputs["id"]). Let `id` pass through untouched (test: reserved_id_input_is_forwarded). - Apply ruff format to run_declarative_flow.py (fixes the lint-run `ruff format --check` step). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh
This commit is contained in:
@@ -335,3 +335,19 @@ def test_validates_input_types_before_kickoff(
|
||||
run_declarative_flow_module.run_declarative_flow(str(path), '{"count":"nope"}')
|
||||
|
||||
assert "Invalid input 'count'" in capsys.readouterr().err
|
||||
|
||||
|
||||
def test_reserved_id_input_is_forwarded_not_dropped(
|
||||
tmp_path: Path, capsys: pytest.CaptureFixture[str]
|
||||
) -> None:
|
||||
# `id` is a reserved kickoff key (persistence restore); it must pass through
|
||||
# instead of being flagged as an unknown key and dropped.
|
||||
path = _write(tmp_path, REQUIRED_FLOW_YAML)
|
||||
|
||||
run_declarative_flow_module.run_declarative_flow(
|
||||
str(path), '{"id":"run-123","prospect_email":"a@b.com"}'
|
||||
)
|
||||
|
||||
captured = capsys.readouterr()
|
||||
assert captured.out == "a@b.com\n"
|
||||
assert "Ignoring unknown input 'id'" not in captured.err
|
||||
|
||||
Reference in New Issue
Block a user