fix(agent): normalize ssh session timeout blocker
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 35s
CD Pipeline / build-and-deploy (push) Failing after 27s
CD Pipeline / post-deploy-checks (push) Has been skipped

This commit is contained in:
Your Name
2026-07-01 12:46:19 +08:00
parent 7019d4a005
commit ce5bcab8b5
10 changed files with 101 additions and 33 deletions

View File

@@ -614,6 +614,14 @@ def _queue_readback_normalizer_contract() -> list[dict[str, Any]]:
],
"learning_targets": ["km", "rag", "playbook", "mcp", "verifier", "ai_agent"],
},
{
"field_id": "latest_visible_harbor_110_repair_remote_ssh_server_accepts_key_then_session_timeout",
"purpose": "classify whether 110 accepts the SSH key and then times out during session, PAM, account, or shell setup",
"writes_blockers": [
"gitea_queue_harbor_110_remote_ssh_server_accepts_key_then_session_timeout",
],
"learning_targets": ["km", "rag", "playbook", "mcp", "verifier", "ai_agent"],
},
{
"field_id": "current_cd_workflow_runner_readiness",
"purpose": "classify whether current CD is waiting on a non110 runner label",

View File

@@ -37,7 +37,7 @@ def _assert_log_controlled_writeback_executor(payload: dict):
assert payload["rollups"]["current_blocker_control_path_blocked_count"] == 1
assert (
payload["rollups"]["current_blocker_control_path_pressure_blocked_count"]
== 1
== 0
)
assert payload["rollups"]["current_blocker_local_recovery_package_count"] == 1
assert payload["rollups"]["runtime_dispatch_performed"] is False
@@ -75,11 +75,11 @@ def _assert_log_controlled_writeback_executor(payload: dict):
"forbidden_runtime_actions"
]
assert current_queue["external_control_path_blocker"] == (
"remote_ssh_publickey_auth_stalled"
"remote_ssh_server_accepts_key_then_session_timeout"
)
assert current_queue["node_load_classifier"] == "high_load"
assert current_queue["node_load_high"] is True
assert current_queue["control_path_pressure_blocker"] == "node_load_high"
assert current_queue["node_load_classifier"] == "load_not_high"
assert current_queue["node_load_high"] is False
assert current_queue["control_path_pressure_blocker"] == ""
assert context["raw_payload_required"] is False
boundaries = payload["operation_boundaries"]

View File

@@ -67,7 +67,7 @@ def _assert_executor_readback(payload: dict, *, public_endpoint: bool = False):
assert payload["rollups"]["current_blocker_control_path_blocked_count"] == 1
assert (
payload["rollups"]["current_blocker_control_path_pressure_blocked_count"]
== 1
== 0
)
assert payload["rollups"]["current_blocker_local_recovery_package_count"] == 1
assert (
@@ -129,8 +129,8 @@ def _assert_executor_readback(payload: dict, *, public_endpoint: bool = False):
"controlled_recovery_packaged_waiting_control_path_readback"
)
assert current_queue[0]["runner_label"] == "awoooi-non110-host"
assert current_queue[0]["node_load_classifier"] == "high_load"
assert current_queue[0]["node_load_high"] is True
assert current_queue[0]["node_load_classifier"] == "load_not_high"
assert current_queue[0]["node_load_high"] is False
assert current_queue[0]["registry_v2_status"] == 502
assert current_queue[0]["controlled_recovery_package"] == (
"recover-110-control-path-and-harbor-local.sh --check"
@@ -187,7 +187,7 @@ def _assert_executor_readback(payload: dict, *, public_endpoint: bool = False):
]
for item in current_queue[0]["harbor_recovery_receipt_output_contract"]
)
assert current_queue[0]["queue_readback_normalizer_contract_count"] == 7
assert current_queue[0]["queue_readback_normalizer_contract_count"] == 8
assert [
item["field_id"]
for item in current_queue[0]["queue_readback_normalizer_contract"]
@@ -197,6 +197,7 @@ def _assert_executor_readback(payload: dict, *, public_endpoint: bool = False):
"latest_visible_harbor_110_repair_no_matching_runner_label",
"latest_visible_harbor_110_repair_remote_control_channel_unavailable",
"latest_visible_harbor_110_repair_remote_ssh_publickey_auth_stalled",
"latest_visible_harbor_110_repair_remote_ssh_server_accepts_key_then_session_timeout",
"current_cd_workflow_runner_readiness",
"controlled_profile_no_matching_runner_labels",
]
@@ -237,9 +238,9 @@ def _assert_executor_readback(payload: dict, *, public_endpoint: bool = False):
)
assert current_queue[0]["runtime_apply_required_on_110_local_console"] is True
assert current_queue[0]["external_control_path_blocker"] == (
"remote_ssh_publickey_auth_stalled"
"remote_ssh_server_accepts_key_then_session_timeout"
)
assert current_queue[0]["control_path_pressure_blocker"] == "node_load_high"
assert current_queue[0]["control_path_pressure_blocker"] == ""
assert current_queue[0]["control_channel_readback_required"] is True
assert set(current_queue[0]["learning_writeback_targets"]) == set(batches)
assert len(current_queue[0]["target_batches"]) == 6

View File

@@ -167,7 +167,7 @@ def _assert_controlled_writeback_plan(payload: dict, *, public_endpoint: bool =
assert {
plan["current_blocker_recovery"]["external_control_path_blocker"]
for plan in p0_plans
} == {"remote_ssh_publickey_auth_stalled"}
} == {"remote_ssh_server_accepts_key_then_session_timeout"}
boundaries = payload["operation_boundaries"]
assert boundaries["plan_readback_only"] is True

View File

@@ -107,11 +107,17 @@ def _assert_log_intelligence_payload(payload: dict):
"harbor_110_remote_ssh_publickey_auth_stalled"
)
assert p0_sample["classification"]["ssh_auth_classification"] == (
"remote_ssh_publickey_auth_stalled"
"remote_ssh_server_accepts_key_then_session_timeout"
)
assert p0_sample["classification"]["remote_control_channel"] == "unavailable"
assert p0_sample["classification"]["bounded_ssh_timeout_seen"] is True
assert p0_sample["classification"]["remote_ssh_publickey_auth_stalled"] is True
assert (
p0_sample["classification"][
"remote_ssh_server_accepts_key_then_session_timeout"
]
is True
)
assert p0_sample["classification"]["remote_ssh_auth_permission_denied"] is False
assert p0_sample["classification"]["remote_ssh_reachable"] is True
assert p0_sample["classification"]["controlled_recovery_package"] == (
@@ -131,7 +137,13 @@ def _assert_log_intelligence_payload(payload: dict):
"verify_harbor_queue_and_controlled_cd_lane",
]
assert recovery_plan[0]["mode"] == "read_only"
assert recovery_plan[0]["expected_result"] == (
"remote_ssh_server_accepts_key_then_session_timeout_classifier_without_secret_material"
)
assert recovery_plan[2]["mode"] == "controlled_apply"
assert recovery_plan[2]["expected_result"] == (
"ssh_session_pam_account_or_shell_path_repaired_without_key_material_read"
)
assert recovery_plan[2]["runtime_write_allowed_only_on_110_local_console"] is True
assert "read-public-gitea-actions-queue.py --json" in p0_sample[
"classification"

View File

@@ -261,12 +261,10 @@ def test_awoooi_priority_work_order_readback_overlays_ai_loop_current_blocker_qu
"harbor_110_remote_ssh_publickey_auth_stalled"
)
assert state["ai_loop_current_blocker_control_path_blocker"] == (
"remote_ssh_publickey_auth_stalled"
"remote_ssh_server_accepts_key_then_session_timeout"
)
assert state["ai_loop_current_blocker_control_path_pressure_blocker"] == (
"node_load_high"
)
assert state["ai_loop_current_blocker_node_load_classifier"] == "high_load"
assert state["ai_loop_current_blocker_control_path_pressure_blocker"] == ""
assert state["ai_loop_current_blocker_node_load_classifier"] == "load_not_high"
assert evidence["ai_loop_current_blocker_execution_queue_count"] == 1
assert evidence["ai_loop_current_blocker_id"] == (
"harbor_110_remote_ssh_publickey_auth_stalled"
@@ -283,12 +281,10 @@ def test_awoooi_priority_work_order_readback_overlays_ai_loop_current_blocker_qu
"controlled_after_110_local_console_preflight"
)
assert evidence["ai_loop_current_blocker_control_path_blocker"] == (
"remote_ssh_publickey_auth_stalled"
"remote_ssh_server_accepts_key_then_session_timeout"
)
assert evidence["ai_loop_current_blocker_control_path_pressure_blocker"] == (
"node_load_high"
)
assert evidence["ai_loop_current_blocker_node_load_classifier"] == "high_load"
assert evidence["ai_loop_current_blocker_control_path_pressure_blocker"] == ""
assert evidence["ai_loop_current_blocker_node_load_classifier"] == "load_not_high"
assert set(evidence["ai_loop_current_blocker_learning_writeback_targets"]) == {
"km",
"rag",
@@ -369,6 +365,7 @@ def test_awoooi_priority_work_order_readback_overlays_ai_loop_current_blocker_qu
"latest_visible_harbor_110_repair_no_matching_runner_label",
"latest_visible_harbor_110_repair_remote_control_channel_unavailable",
"latest_visible_harbor_110_repair_remote_ssh_publickey_auth_stalled",
"latest_visible_harbor_110_repair_remote_ssh_server_accepts_key_then_session_timeout",
"current_cd_workflow_runner_readiness",
"controlled_profile_no_matching_runner_labels",
]
@@ -394,11 +391,9 @@ def test_awoooi_priority_work_order_readback_overlays_ai_loop_current_blocker_qu
assert payload["summary"]["ai_loop_current_blocker_id"] == (
"harbor_110_remote_ssh_publickey_auth_stalled"
)
assert payload["summary"]["ai_loop_current_blocker_control_path_pressure_blocker"] == (
"node_load_high"
)
assert payload["summary"]["ai_loop_current_blocker_control_path_pressure_blocker"] == ""
assert payload["summary"]["ai_loop_current_blocker_node_load_classifier"] == (
"high_load"
"load_not_high"
)
assert payload["summary"]["ai_loop_current_blocker_local_console_phase_count"] == 5
assert payload["summary"][
@@ -429,7 +424,7 @@ def test_awoooi_priority_work_order_readback_overlays_ai_loop_current_blocker_qu
payload["summary"][
"ai_loop_current_blocker_queue_readback_normalizer_contract_count"
]
== 7
== 8
)
assert payload["summary"][
"ai_loop_current_blocker_queue_readback_normalizer_field_ids"