fix(webui): keep saved topics bound to their project (#6509)
* fix(webui): keep saved topics bound to their project Lock the project as soon as the session exists, independently of loaded history. Validate both explicit updates and message admissions against the persisted directory while retaining same-project permission changes. Related to #6505. Co-authored-by: Xiaoyu-hub <17346801517@163.com> * test(agent): retain goal shutdown failure stacks Use the existing stop_loop diagnostic without changing the five-second teardown deadline or the goal assertions. The Windows failure on #6509 reached session shutdown but did not capture its worker stacks. * test(cron): await rearm tick completion instead of disk timing The Windows run completed the first and last jobs correctly, but rescheduling took over three seconds inside a two-second timeout. Await the original timer task, detect an early exit before callback entry, and preserve job-order, cancellation, persistence and rearming assertions. Keep real disk writes and all parameterized cases. Also place the goal-shutdown diagnostic import in the existing first-party group. --------- Co-authored-by: Xiaoyu-hub <17346801517@163.com>
This commit is contained in:
1 parent
8f7a7d1759
commit
4a14faa47e
17 files changed
+241
-85
No files matched your search
@@ -5,6 +5,7 @@ from unittest.mock import AsyncMock, MagicMock
|
||||
|
||||
import pytest
|
||||
|
||||
from agent.session_helpers import stop_loop
|
||||
from nanobot.agent.goal_permission import goal_mutation_allowed, goal_mutation_permission
|
||||
from nanobot.agent.loop import AgentLoop
|
||||
from nanobot.bus.events import InboundMessage
|
||||
@@ -89,8 +90,7 @@ async def test_goal_input_enters_running_turn_with_scoped_permission(tmp_path, c
|
||||
assert public_history_messages(hidden)[0]["content"] == task
|
||||
finally:
|
||||
release.set()
|
||||
loop.stop()
|
||||
await asyncio.wait_for(run, 5)
|
||||
await stop_loop(loop, run, timeout=5)
|
||||
|
||||
|
||||
async def test_scheduled_goal_command_cannot_generate_internal_input(tmp_path):
|
||||
|
||||
Reference in new issue
Block a user