feat(agent): add p0 harbor blocker loop sample
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Failing after 23s
CD Pipeline / build-and-deploy (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 0s
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Has been cancelled

This commit is contained in:
Your Name
2026-06-30 22:07:40 +08:00
parent 106acf6830
commit 2d677f8af5
6 changed files with 156 additions and 20 deletions

View File

@@ -146,6 +146,15 @@ def load_latest_ai_agent_log_intelligence_integration_readback(
missing_lane_count = len(lanes) - ready_lane_count
runtime_sample = _load_runtime_sample(root)
runtime_sample_present = runtime_sample is not None
runtime_samples = runtime_sample.get("samples", []) if runtime_sample else []
current_p0_blocker_sample_present = _sample_present(
runtime_samples,
"p0_110_harbor_runner_control_path_sample",
)
controlled_recovery_package_sample_present = _sample_event_present(
runtime_samples,
"local_recovery_package_packaged",
)
label_field_count = len(
{field for group in _LABEL_TAXONOMY for field in group["required_fields"]}
)
@@ -199,6 +208,12 @@ def load_latest_ai_agent_log_intelligence_integration_readback(
"runtime_sample_count": len(runtime_sample.get("samples", []))
if runtime_sample
else 0,
"current_p0_blocker_runtime_sample_present": (
current_p0_blocker_sample_present
),
"controlled_recovery_package_sample_present": (
controlled_recovery_package_sample_present
),
"km_rag_feedback_receipt_ready": _feedback_ready(
runtime_sample,
"km_rag_feedback_receipt_ready",
@@ -298,6 +313,21 @@ def _feedback_ready(runtime_sample: dict[str, Any] | None, field: str) -> bool:
return (runtime_sample.get("feedback_receipt_readiness") or {}).get(field) is True
def _sample_present(samples: Any, sample_id: str) -> bool:
return any(
isinstance(sample, dict) and sample.get("sample_id") == sample_id
for sample in samples
)
def _sample_event_present(samples: Any, event: str) -> bool:
return any(
isinstance(sample, dict)
and event in {str(item) for item in sample.get("observed_events", [])}
for sample in samples
)
def _build_lane(root: Path, lane: dict[str, Any]) -> dict[str, Any]:
evidence_refs = [str(ref) for ref in lane["required_refs"]]
missing_refs = [ref for ref in evidence_refs if not _ref_exists(root, ref)]