Uh oh!
There was an error while loading. Please reload this page.
test(fixtures): add self-contained openai-default test system YAML - #36
Conversation
AmitAvital1
commented
Jul 20, 2026
This is look greate example. but can you elaborate more how we running this test as system tests? how its should work? what makes you did it? (really helpfull question also for us to understand how to improve) Thanks |
Karn2898
commented
Jul 21, 2026
honestly this PR only adds the fixture , i doesn't include the test yet . this fixture would be pretty straight forwrd: load tests/fixtures/test_system.yaml and build the engine with fake model_factory, then send hello and verify it routes root router to greeting agent . send echo test and verify it routes root router to echo agent . |
AmitAvital1
commented
Jul 21, 2026
Very good plan! We really need this benefit. we already have issue #24 and this is great improvment. |
Karn2898
commented
Jul 24, 2026
apologies for the late reply , Want me to draft the infra patch now ? I'm working on that already btw |
AmitAvital1
commented
Jul 24, 2026
Yea when ever you ready for review, push it inside this PR i would love to see it ! 🥇 |
Karn2898
commented
Jul 26, 2026
via email
Hi I have pushed some files, hope it helps. Thank you …On Fri, Jul 24, 2026, 13:59 AmitAvital1 ***@***.***> wrote:
*AmitAvital1* left a comment (extra-org/extra#36)
<#36 (comment)>
This is look greate example. but can you elaborate more how we running
this test as system tests? how its should work? what makes you did it?
(really helpfull question also for us to understand how to improve)
Thanks
honestly this PR only adds the fixture , i doesn't include the test yet .
this fixture gives us everything a system test would need, but there is no
pytest that actually runs the full flow against it. the good news is that
the engine already supports this kind of system
test.tests/engine/test_engine_flow.py already follows the pattern, it
injects a fake model_factory into LangGraohEngine which returns a
FakeChatModel. This fake model simulates a tool call and a final response
so there is no API key or network dependency.
this fixture would be pretty straight forwrd: load
tests/fixtures/test_system.yaml and build the engine with fake
model_factory, then send hello and verify it routes root router to greeting
agent . send echo test and verify it routes root router to echo agent . I
left that test out of this PR intentionally. My goal here was to validate
the fixture first and the engine test also touches multiple internals, so I
felt it deserved its own focused PR.If you are happy with the approach I
can add it next.
Very good plan! We really need this benefit. we already have issue #24
<#24> and this is great
improvment. How sound make this PR as infra for this issue? with couple
infra test, and infra so any commit can be extended? and maybe next PR you
can do more e2e tests cases
apologies for the late reply , Want me to draft the infra patch now ? I'm
working on that already btw
Yea when ever you ready for review, push it inside this PR i would love to
see it ! 🥇
—
Reply to this email directly, view it on GitHub
<#36?email_source=notifications&email_token=BJUQNGBGNRCJTPBMUK2DTZD5GMM6BA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMBWG43TQNRXG422M4TFMFZW63VGMFZXG2LHN2SWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-5067786775>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BJUQNGHIGHIEQJLXJRO3XM35GMM6BAVCNFSNUABGKJSXA33TNF2G64TZHMYTENRRGEZDOMJVGY5US43TOVSTWNBZGMYDKMRTG4YTLILWAI>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
| @@ -0,0 +1,111 @@ | |||
| from __future__ import annotations | |||
There was a problem hiding this comment.
maybe lets call this file utils?
| FIXTURE_DIR = Path(__file__).resolve().parent | ||
| FIXTURE_SPEC = FIXTURE_DIR / "test_system.yaml" |
There was a problem hiding this comment.
maybe lets do it injectable? think about we will added more yamls for tests in your infra
There was a problem hiding this comment.
That's a good point . I have made changes ,just need to push
| temperature: 0.0 | ||
| execution: | ||
| max_iterations: 10 |
There was a problem hiding this comment.
what about test for all of this configurations?
There was a problem hiding this comment.
I added test_fixture_execution_policy_parsed_from_yaml which loads the spec from YAML and asserts all five fields (max_iterations, max_tool_calls, max_tool_calls_per_agent, max_child_agent_calls, allow_duplicate_tool_calls) match what's in the file. This guards against silent parser/schema changes dropping or misparsing those values. Not testing runtime enforcement here because tests/engine/test_execution_limits.py already covers that with inline specs; this fixture test just guarantees the YAML wiring is correct.
AmitAvital1
left a comment
There was a problem hiding this comment.
Nice work. can we also test generate?
AmitAvital1
commented
Jul 27, 2026
I see it that infra and support.py will be the infra, and test_yaml with generated files will be in dedicated folder that run this tests infra, and then we will add more folder with more yaml.. that extensabily more! |
Karn2898
commented
Jul 27, 2026
yep ,that's definetly a better structure , I have applied these changes |
AmitAvital1
commented
Jul 27, 2026
i added more comments please see :) |
Karn2898
commented
Jul 29, 2026
Done , added tests/cli/test_generate_command.py with two tests using CliRunner against the fixture's agents.yaml |
Karn2898
commented
Jul 29, 2026
yeah I was ill so couldn't complete all tasks . now i will push |
Asaf-prog
commented
Aug 1, 2026
Thanks — the reusable fixture and shared fake-model direction are valuable and align well with the system-test infrastructure described in #24. I found one blocking issue in the echo-tool flow. The shared args={"message": ...}but the fixture tool is defined as: defecho_tool(input: dict) ->str:Since the engine builds a Please align the tool signature and generated arguments, and explicitly assert that the tool record has The PR is also currently not mergeable and needs to be rebased onto the latest Once the branch is updated and the tool test proves successful execution rather than only attempted execution, the overall infrastructure looks useful. |
Karn2898
commented
Aug 3, 2026
echo_tool signature now matches the emitted args (message: str instead of input: dict) |
Asaf-prog
commented
Aug 3, 2026
Please rebase this PR onto |
Add a minimal, validating agent system under tests/fixtures/ for exercising the platform without the flagship example. - test_system.yaml defaults to the openai provider so it runs without an Anthropic key; any of anthropic/openai/gemini/bedrock is selectable via provider:. A comment makes explicit that the key is supplied via the environment, never in YAML. - Prompts, resolver stubs, and the echo_tool stub are implemented so agentctl validate passes fully offline (no LLM key required).
- test_system.yaml: small openai-default fixture with auto:true on tool-using agent - prompts/ + plugins/: implemented stubs so agentctl validate passes offline - utils.py: shared FakeChatModel, fake_model_factory, load_test_system, FakeEngine - test_infra.py: 5 core tests covering validation, build, routing, tools, resolvers - test_engine_flow.py: dedup FakeChatModel into tests.fixtures.utils Closes the shared-module import collision with an autouse cleanup fixture.
- test_generate_creates_all_declared_artifacts: copies fixture YAML to tmp_path, runs generate, asserts echo_tool, shared resolver, greeting_agent resolver, and plugins.toml are created. - test_generate_is_idempotent: runs generate twice, asserts second run reports 'Nothing to generate'. Uses CliRunner against the fixture's agents.yaml.
…cy test - load_test_system() accepts optional spec_path so future fixture folders are loadable without hardcoding. - fixture_path() helper returns paths under tests/fixtures/. - test_fixture_execution_policy_parsed_from_yaml asserts all 5 YAML execution fields are parsed correctly from agents.yaml.
1b717b0 to
d9a475bCompareKarn2898
commented
Aug 3, 2026
Rebased onto the latest main and force-pushed the updated branch. I also resolved the merge conflicts while preserving the newer fake-model fallback coverage and the CLI generate test additions. |
Karn2898
commented
Aug 4, 2026
via email
Thank you sir :) …On Wed, Aug 5, 2026, 02:26 Asaf ***@***.***> wrote:
Merged #36 <#36> into main.
—
Reply to this email directly, view it on GitHub
<#36?email_source=notifications&email_token=BJUQNGCN6PTEK4A6NXAUWCD5IJEY3A5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTEOBZG42DEMRWGYYTLJTSMVQXG33OUZQXG43JM5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#event-28974226615>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BJUQNGAW6NEKAVJSKYSF46T5IJEY3AVCNFSNUABGKJSXA33TNF2G64TZHMYTENRRGEZDOMJVGY5US43TOVSTWNBZGMYDKMRTG4YTLILWAI>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
Summary
Add a minimal, validating agent system under
tests/fixtures/for exercising the platform without the flagship example.tests/fixtures/test_system.yaml: root orchestrator routing togreeting_agentandecho_agent, with a shared resolver and anecho_tool.anthropic/openai/gemini/bedrockis selectable viaprovider:.OPENAI_API_KEY, etc.), never in the YAML.agentctl validateneeds no key;agentctl run/serveneed a key for the chosen provider.echo_toolstub are implemented soagentctl validatepasses fully offline.Verification
agentctl validate tests/fixtures/test_system.yaml # => validation passed