Skip to content

Commit be28fdb

Browse files
authored
Merge branch 'main' into fix/result-cache-deadlock-623
2 parents 8b145ec + 481fac3 commit be28fdb

14 files changed

Lines changed: 562 additions & 102 deletions

File tree

CHANGELOG.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,94 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
66

77
<!-- changelog:entries -->
88

9+
## [0.1.112-rc.1] - 2026-07-20
10+
11+
12+
### Other
13+
14+
- Fix/fire and forget (#723)
15+
16+
* fix: fixed the blocking fire and forget issue.
17+
18+
- Wrapped all functions (`notify_call_start`, `notify_call_complete` and `notify_call_error`) into `asyncio.Task` so parent function don't have to await them.
19+
- Converted the `_emit_execution_transition_log` to sync as underlying code is sync and execute it to a separate thread.
20+
21+
* revert: I reverted the execution of `_emit_execution_transition_log` method using `asyncio.to_thread()` because of mismatch order.
22+
23+
- Considering the `log_execution` inside the function is a lightweight function which don't takeover the `event_loop` for long time.
24+
25+
* lint: Removed unused import
26+
27+
* fix: Added missing background task cleanup in `_cleanup_async_resources` method.
28+
29+
* fix: Fixed the `F401` lint error from `test_did_auth_invariants` test.
30+
31+
* test: Updated the test for updated `_cleanup_async_resources`.
32+
33+
- Initially mock `Agent` is created through __new__ which by pass __init__ and it doesn't contain `_background_tasks` property.
34+
- I added `_background_tasks` property and added new assert in `test_cleanup_async_resources` test.
35+
36+
* fix: Used a queue type notification dispatcher to maintain the order of notification.
37+
- class used a queue internally to maintain order. It itself run as background task so it will not block it's parent coroutine.
38+
- Initialization is done inside life cycle (lazily) so that queue and task attached them self with the ASGI optimized event loop (uvloop)
39+
- Some tests are modified as a new property introduced, so a similar dummy class also introduced for tests.
40+
41+
* test: fix test and added test for
42+
- Previously I tested againest a blank set which result true always but now 5 async tasks will be added to to check is the set is empty or not after calling .
43+
- As notification dispatcher's shutdown method also linked to so I created a dummpy class to check if it's shutdown is called properly or not.
44+
45+
* fix(sdk/python): lazily start the notification dispatcher on first submit
46+
47+
submit() previously dropped notifications silently whenever the queue was
48+
not yet initialized, and start() only ran inside the AgentServer lifespan.
49+
Any execution path that never runs that lifespan — CLI `call` mode
50+
(asyncio.run on a tracked function) or mounting the Agent app in uvicorn
51+
directly — lost all workflow telemetry, where the pre-#622 code delivered
52+
it inline.
53+
54+
submit() now starts the dispatcher lazily on the running loop, so it still
55+
binds to uvicorn's uvloop when serving; the lifespan start() remains as an
56+
idempotent fast path. The no-running-loop fallback keeps the old
57+
drop-with-dev-log behavior.
58+
59+
Also removes the unused _create_coro_factory helper and the unreferenced
60+
is_start() method (and its mirror in the test helper), and drops the
61+
now-unneeded manual dispatcher start in test_agent_integration so that
62+
test exercises the lazy path.
63+
64+
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
65+
66+
* test(sdk/python): behavior tests for the non-blocking notification path
67+
68+
Four tests derived from the #622 validation contract rather than the
69+
implementation, using a fake control-plane client whose event POSTs are
70+
slow and recorded in arrival order:
71+
72+
- execute_with_tracking returns without waiting for the start/complete
73+
telemetry POSTs (the pre-fix inline awaits could never beat a single
74+
POST delay)
75+
- events for each execution arrive running -> terminal, under concurrent
76+
executions including a failing reasoner
77+
- _cleanup_async_resources delivers every queued event before the HTTP
78+
client closes
79+
- a dispatcher that was never explicitly started still delivers
80+
(regression test for the CLI-call-mode silent drop)
81+
82+
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
83+
84+
* chore(sdk/python): fix typos and format nits in the dispatcher change
85+
86+
- "dilivery" -> "delivery" in the dispatcher error log
87+
- ruff-format the two hunks the fix introduced (keyword spacing in
88+
wait_for's timeout, range(1, 6) in the cleanup test)
89+
90+
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
91+
92+
---------
93+
94+
Co-authored-by: Abir Abbas <abirabbas1998@gmail.com>
95+
Co-authored-by: Claude Fable 5 <noreply@anthropic.com> (b2a5eef)
96+
997
## [0.1.111] - 2026-07-20
1098

1199
## [0.1.111-rc.3] - 2026-07-20

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.111
1+
0.1.112-rc.1

control-plane/internal/templates/go/go.mod.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module {{.GoModule}}
22

33
go 1.23
44

5-
require github.com/Agent-Field/agentfield/sdk/go v0.1.111
5+
require github.com/Agent-Field/agentfield/sdk/go v0.1.112-rc.1

sdk/python/agentfield/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,4 @@
181181
"reasoner",
182182
]
183183

184-
__version__ = "0.1.111"
184+
__version__ = "0.1.112-rc.1"

0 commit comments

Comments
 (0)