mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-22 08:25:21 +08:00
feat(pipeline-migration): relax legacy config migration and pin latest runner plugins
- Coerce/default/drop invalid or unknown legacy fields with warnings instead of blocking - Never block on LocalAgent model; prune dangling KB/tool/MCP references - Mark custom (non-builtin) 4.10 runners as unsupported_runner instead of failing - Pin runner plugins to current marketplace versions (0.2.x); fall back to latest when a pin is withdrawn - Raise plugin install/upgrade timeout to 600s for slow dependency installs - Assistant configure_pipeline writes the 4.11 runner shape Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -103,20 +103,28 @@ async def test_valid_local_resources_and_real_descriptor_options(local):
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize('resource', ['model', 'kb', 'mcp', 'tool'])
|
||||
async def test_foreign_or_unresolved_resource_is_denied(local, resource):
|
||||
async def test_foreign_or_unresolved_model_is_denied(local):
|
||||
env, _, config, plan = local
|
||||
if resource == 'model':
|
||||
config['model']['primary'] = 'model_foreign'
|
||||
elif resource == 'kb':
|
||||
config['model']['primary'] = 'model_foreign'
|
||||
async with env.pm.tenant_scope(WS):
|
||||
with pytest.raises(env.m.MigrationError, match='runner_resource_unavailable'):
|
||||
await env.svc._verify_runtime(ExecutionContext.from_request(context()), plan)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize('resource', ['kb', 'mcp', 'tool'])
|
||||
async def test_foreign_or_unresolved_reference_is_pruned(local, resource):
|
||||
env, _, config, plan = local
|
||||
if resource == 'kb':
|
||||
config['knowledge-bases'] = ['kb_foreign']
|
||||
elif resource == 'mcp':
|
||||
config['mcp-resources'][0]['server_uuid'] = 'mcp_foreign'
|
||||
else:
|
||||
config['tools'] = ['foreign_tool']
|
||||
async with env.pm.tenant_scope(WS):
|
||||
with pytest.raises(env.m.MigrationError, match='runner_resource_unavailable'):
|
||||
await env.svc._verify_runtime(ExecutionContext.from_request(context()), plan)
|
||||
await env.svc._verify_runtime(ExecutionContext.from_request(context()), plan)
|
||||
key = {'kb': 'knowledge-bases', 'mcp': 'mcp-resources', 'tool': 'tools'}[resource]
|
||||
assert config[key] == []
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in New Issue
Block a user