fix(agent-market): move discovery review to controlled queue
Some checks failed
CD Pipeline / tests (push) Successful in 1m43s
Code Review / ai-code-review (push) Successful in 12s
Ansible / Reboot Recovery Contract / validate (push) Failing after 12m47s
CD Pipeline / build-and-deploy (push) Successful in 5m52s
CD Pipeline / post-deploy-checks (push) Successful in 3m7s

This commit is contained in:
Your Name
2026-06-28 08:54:08 +08:00
parent d04cf629f4
commit a1f5935481
19 changed files with 1964 additions and 128 deletions

View File

@@ -37,8 +37,8 @@ def test_discovery_review_classifies_known_and_unknown_repositories():
assert report["policy"]["auto_registry_addition_approved"] is False
assert report["summary"]["unique_repositories"] == 2
assert report["summary"]["already_watched_or_registered"] == 1
assert report["summary"]["manual_classification_required"] == 1
assert report["summary"]["new_manual_classification_required"] == 1
assert report["summary"]["controlled_classification_queue"] == 1
assert report["summary"]["new_controlled_classification_queue"] == 1
drafts = {draft["repository_full_name"]: draft for draft in report["candidate_drafts"]}
assert drafts["microsoft/agent-framework"]["status"] == "already_watched_or_registered"
@@ -46,6 +46,12 @@ def test_discovery_review_classifies_known_and_unknown_repositories():
assert drafts["pydantic/pydantic-ai"]["recommended_next_gate"] == (
"classify_official_sources_then_update_watch_registry"
)
assert drafts["pydantic/pydantic-ai"]["decision"] == (
"ai_controlled_primary_source_classification_required"
)
assert drafts["pydantic/pydantic-ai"]["approval_boundary"][
"controlled_classification_allowed"
] is True
assert drafts["pydantic/pydantic-ai"]["approval_boundary"][
"approved_for_registry_addition"
] is False
@@ -67,8 +73,8 @@ def test_discovery_review_previous_review_suppresses_new_repeat_signal():
generated_at="2026-06-03T00:00:00+00:00",
)
assert report["summary"]["manual_classification_required"] == 2
assert report["summary"]["new_manual_classification_required"] == 0
assert report["summary"]["controlled_classification_queue"] == 2
assert report["summary"]["new_controlled_classification_queue"] == 0
assert all(not draft["new_since_previous_review"] for draft in report["candidate_drafts"])

View File

@@ -34,12 +34,12 @@ def test_governance_snapshot_keeps_openclaw_as_production_core_without_approvals
"next_scheduled_run_at": "2026-06-08T09:00:00+08:00",
"trigger_modes": [
"scheduled_weekly",
"manual_dispatch",
"operator_triggered_after_primary_source_signal",
"workflow_dispatch",
"agent_controlled_trigger_after_primary_source_signal",
],
"primary_source_policy": "primary_sources_only_no_llm_no_sdk_no_paid_api",
"operator_review_gate": (
"priority_upgrade_required_before_scorecard_replay_sdk_api_shadow_canary_or_production"
"controlled_review_gate": (
"controlled_priority_upgrade_required_before_scorecard_replay_sdk_api_shadow_canary_or_production"
),
}
assert snapshot["market_watch_health"] == {
@@ -47,8 +47,10 @@ def test_governance_snapshot_keeps_openclaw_as_production_core_without_approvals
"freshness_sla_hours": 168,
"stale_grace_hours": 6,
"stale_after": "2026-06-08T15:00:00+08:00",
"source_failures_require_controlled_reverify": False,
"source_failures_block_priority_upgrade": False,
"blocked_from_integration": 1,
"controlled_queue_reasons": [],
"operator_blockers": [],
}
assert snapshot["candidate_groups"]["production_baseline"] == ["openclaw_incumbent"]
@@ -88,7 +90,7 @@ def test_governance_snapshot_keeps_openclaw_as_production_core_without_approvals
"evaluation_priority": "watch_only",
"gate_status": "watch_only_prescreen_ready",
"current_gate": "watch_only_primary_source_monitoring",
"required_next_gate": "operator_priority_upgrade_then_market_scorecard_prescreen",
"required_next_gate": "controlled_priority_upgrade_then_market_scorecard_prescreen",
"integration_decision": "do_not_integrate_watch_only_primary_source_monitoring",
"score": None,
"evidence": {
@@ -112,8 +114,8 @@ def test_governance_snapshot_keeps_openclaw_as_production_core_without_approvals
"candidate_id": "hermes_agent_personal_platform",
"display_name": "Hermes Agent",
"priority": 30,
"queue_status": "operator_priority_review",
"recommended_action": "operator_priority_upgrade_then_market_scorecard_prescreen",
"queue_status": "controlled_priority_review",
"recommended_action": "controlled_priority_upgrade_then_market_scorecard_prescreen",
"approval_boundary": {
"replacement_adr_required": True,
"priority_upgrade_required": True,
@@ -133,7 +135,7 @@ def test_governance_snapshot_keeps_openclaw_as_production_core_without_approvals
"priority": 90,
"queue_status": "baseline_protected",
"recommended_action": (
"keep_openclaw_as_production_decision_core_until_formal_replacement_adr"
"keep_openclaw_as_production_decision_core_until_replay_shadow_canary_replacement_adr"
),
"approval_boundary": {
"replacement_adr_required": True,
@@ -162,9 +164,10 @@ def test_governance_snapshot_blocks_market_health_when_sources_or_queue_are_not_
generated_at="2026-06-04T00:00:00+00:00",
)
assert snapshot["market_watch_health"]["status"] == "blocked"
assert snapshot["market_watch_health"]["status"] == "controlled_queue"
assert snapshot["market_watch_health"]["source_failures_require_controlled_reverify"] is True
assert snapshot["market_watch_health"]["source_failures_block_priority_upgrade"] is True
assert snapshot["market_watch_health"]["operator_blockers"] == [
assert snapshot["market_watch_health"]["controlled_queue_reasons"] == [
"source_failures_present",
"unclassified_discovery_watch_additions_remaining",
"integration_queue_not_empty",
@@ -300,9 +303,9 @@ def _promotion_review() -> dict:
"candidate_id": "hermes_agent_personal_platform",
"eligible_for_market_scorecard_prescreen": True,
"display_name": "Hermes Agent",
"decision": "eligible_for_operator_priority_review_before_market_scorecard",
"decision": "eligible_for_controlled_priority_review_before_market_scorecard",
"integration_stage": "watch_only_primary_source_monitoring",
"required_next_gate": "operator_priority_upgrade_then_market_scorecard_prescreen",
"required_next_gate": "controlled_priority_upgrade_then_market_scorecard_prescreen",
"role": "personal_agent_platform_candidate",
"approved_for_replay": False,
"approved_for_sdk_install": False,

View File

@@ -23,7 +23,7 @@ def test_watch_promotion_review_allows_only_scorecard_prescreen_readiness():
assert review["eligible_for_market_scorecard_prescreen"] is True
assert review["approved_for_replay"] is False
assert review["required_next_gate"] == (
"operator_priority_upgrade_then_market_scorecard_prescreen"
"controlled_priority_upgrade_then_market_scorecard_prescreen"
)
@@ -145,7 +145,7 @@ def _classification() -> dict:
"html_url": "https://github.com/NousResearch/hermes-agent",
"homepage": "https://hermes-agent.nousresearch.com",
"classification": "personal_agent_platform_candidate",
"recommendation": "add_to_watch_registry_after_manual_source_review",
"recommendation": "add_to_watch_registry_after_controlled_source_review",
"watch_addition_recommended": True,
"risk_flags": ["requires_dependency_boundary_review"],
}