release: bump version to 0.83.0
ci / backend (push) Canceled after 0s
ci / frontend (push) Canceled after 0s
ci / delivery (push) Canceled after 0s

This commit is contained in:
linkong committed 2026-12-02 18:53:58 +08:00
1 parent 04cebdc504
commit 3b1b9ef68c
96 files changed
+8492 -1021

No files matched your search

+21 -3
View File
@@ -102,6 +102,21 @@ async def _make_sqlite_session():
return engine, _Ctx()
async def _add_graded_fixture(client, workflow_id: str) -> None:
"""Graded fixture that the deterministic (no-AI) fallback answer satisfies on both A/B sides."""
resp = await client.post(
f"/api/v1/ai/workflows/{workflow_id}/fixtures",
json={
"name": "Graded baseline",
"sample_question": "全球态势摘要",
"context_json": {"domain": "global"},
"expect": {"must_include": ["全球态势摘要"]},
},
)
assert resp.status_code == 200
assert resp.json()["context_json"]["expect"] == {"must_include": ["全球态势摘要"]}
@pytest.mark.asyncio
async def test_meta_workflow_seeded_excluded_from_public_and_single_level_recursion_locked():
engine, factory = await _make_sqlite_session()
@@ -316,15 +331,15 @@ async def test_evolution_policy_feedback_health_model_drift_and_dgm_archive(monk
assert health["model_drift_detected"] is True
assert "query_global_situational" in health["unused_tools"]
# 4. Propose `model_adapt` (deterministic fallback fills minimal patch)
# 4. Model explicitly returns an empty patch -> the engine must accept "no change"
prop_resp = await client.post(
"/api/v1/ai/evolution/propose/default.general",
json={"mode": "model_adapt", "apply_mode": "preview"},
)
assert prop_resp.status_code == 200
prop = prop_resp.json()
assert prop["constitution_ok"] is True
assert len(prop["changes"]) >= 1
assert prop["applied_status"] == "no_change"
assert prop["changes"] == []
# 5. Incubate new custom workflow from `default.general` BGP runs
inc_resp = await client.post("/api/v1/ai/evolution/incubate")
@@ -377,6 +392,8 @@ async def test_canary_auto_rollback_and_meta_canary_rollback(monkeypatch):
assert meta_pub.json()["applied_status"] == "auto_published"
assert meta_pub.json()["new_revision"] == 2
# Auto-publish requires a graded fixture A/B gate
await _add_graded_fixture(client, "default.general")
# Auto-publish default.general v2 (uses live meta v2)
evo_pub = await client.post(
"/api/v1/ai/evolution/propose/default.general",
@@ -548,6 +565,7 @@ async def test_lock_quota_cooldown_dgm_branching_canary_verify_and_ledger_dismis
"/api/v1/ai/evolution/policy",
json={"locked_workflows": [], "daily_auto_budget": 2},
)
await _add_graded_fixture(client, "default.general")
pub1 = await client.post(
"/api/v1/ai/evolution/propose/default.general",
json={"mode": "optimize", "instruction": "Always cite verified telemetry", "apply_mode": "auto"},