fix: stabilize vedastro oracle closure boundaries
This commit is contained in:
@@ -180,6 +180,10 @@ def _packet_missing(packet_path: str) -> list[str]:
|
||||
if "metadata.source_artifact" not in missing:
|
||||
missing.append("metadata.source_artifact")
|
||||
def walk(prefix: str, value: Any) -> None:
|
||||
if prefix == "target.tajika_yogas":
|
||||
if value is None or value == "" or value == {}:
|
||||
missing.append(prefix)
|
||||
return
|
||||
if isinstance(value, dict):
|
||||
for key, child in value.items():
|
||||
walk(f"{prefix}.{key}" if prefix else key, child)
|
||||
|
||||
@@ -104,7 +104,7 @@ def generate_blank_oracle_kit(output_dir: str) -> dict[str, Any]:
|
||||
"validate_command": report["validate_command"],
|
||||
}
|
||||
|
||||
recommended_front_order = sorted(FRONTS, key=lambda front: fronts[front]["missing_field_count"])
|
||||
recommended_front_order = list(FRONTS)
|
||||
manifest = {
|
||||
"scope": "first_oracle_blank_kit_manifest",
|
||||
"front_count": len(FRONTS),
|
||||
|
||||
@@ -119,6 +119,7 @@ def build_dashboard(dasha_oracle_file: str, tajika_oracle_file: str) -> dict[str
|
||||
}
|
||||
total_tasks = sum(front["task_count"] for front in fronts.values())
|
||||
verified_tasks = sum(front["external_verified_tasks"] for front in fronts.values())
|
||||
current_target_set_closed = total_tasks > 0 and verified_tasks == total_tasks
|
||||
next_action_order = sorted(
|
||||
[
|
||||
{
|
||||
@@ -142,14 +143,16 @@ def build_dashboard(dasha_oracle_file: str, tajika_oracle_file: str) -> dict[str
|
||||
"total_tasks": total_tasks,
|
||||
"external_verified_tasks": verified_tasks,
|
||||
"open_tasks": total_tasks - verified_tasks,
|
||||
"can_claim_global_oracle_closure": total_tasks > 0 and verified_tasks == total_tasks,
|
||||
"can_claim_current_target_set_closure": current_target_set_closed,
|
||||
"can_claim_global_oracle_closure": False,
|
||||
"production_tuning_allowed": False,
|
||||
},
|
||||
"fronts": fronts,
|
||||
"next_action_order": next_action_order,
|
||||
"boundary": (
|
||||
"This dashboard merges external evidence readiness only. It does not claim prediction accuracy, "
|
||||
"does not tune production constants, and does not treat local engine output as oracle evidence."
|
||||
"This dashboard merges current target-set external evidence readiness only. A closed target set does not "
|
||||
"claim global oracle closure, does not claim prediction accuracy, does not tune production constants, "
|
||||
"and does not treat local engine output as oracle evidence."
|
||||
),
|
||||
}
|
||||
|
||||
@@ -166,6 +169,7 @@ def render_markdown(report: dict[str, Any]) -> str:
|
||||
f"- total_tasks: `{summary['total_tasks']}`",
|
||||
f"- external_verified_tasks: `{summary['external_verified_tasks']}`",
|
||||
f"- open_tasks: `{summary['open_tasks']}`",
|
||||
f"- can_claim_current_target_set_closure: `{str(summary['can_claim_current_target_set_closure']).lower()}`",
|
||||
f"- can_claim_global_oracle_closure: `{str(summary['can_claim_global_oracle_closure']).lower()}`",
|
||||
f"- production_tuning_allowed: `{str(summary['production_tuning_allowed']).lower()}`",
|
||||
"",
|
||||
|
||||
@@ -190,7 +190,8 @@ def build_queue(oracle: dict[str, Any]) -> dict[str, Any]:
|
||||
"by_status": by_status,
|
||||
"ready_for_collection": sum(1 for task in tasks if task["ready_for_collection"]),
|
||||
"ready_for_calibration": ready_for_calibration,
|
||||
"production_tuning_allowed": ready_for_calibration > 0 and ready_for_calibration == len(tasks),
|
||||
"current_target_set_closed": bool(tasks) and ready_for_calibration == len(tasks),
|
||||
"production_tuning_allowed": False,
|
||||
"next_action": "Collect external Varshaphala target values, then promote rows to external_verified.",
|
||||
},
|
||||
"tasks": tasks,
|
||||
|
||||
@@ -2420,11 +2420,11 @@ def _run_official_full_snapshot_case(case: dict[str, Any], case_id: str = "user_
|
||||
}
|
||||
manifest = _official_full_snapshot_manifest(user_case, case_id)
|
||||
budget_started_at = time.monotonic()
|
||||
official_full_capability_catalog = _try_official_full_capability_catalog_bundle(user_case)
|
||||
official_full_capability_catalog: dict[str, Any] = {}
|
||||
elapsed_seconds = time.monotonic() - budget_started_at
|
||||
if elapsed_seconds >= _timeout_seconds():
|
||||
official_python_bundle = _official_snapshot_budget_exhausted_bundle(
|
||||
"VedAstro official capability catalog consumed the foreground full-snapshot budget."
|
||||
"VedAstro official full-snapshot budget was exhausted before the snapshot runner started."
|
||||
)
|
||||
else:
|
||||
official_python_bundle = _try_official_capability_runner_snapshot_bundle(user_case)
|
||||
@@ -2441,6 +2441,23 @@ def _run_official_full_snapshot_case(case: dict[str, Any], case_id: str = "user_
|
||||
and official_python_bundle.get("status") != "official_snapshot_budget_exhausted"
|
||||
):
|
||||
official_python_bundle = _try_official_python_bridge_snapshot_bundle(user_case)
|
||||
if time.monotonic() - budget_started_at < _timeout_seconds():
|
||||
official_full_capability_catalog = _try_official_full_capability_catalog_bundle(user_case)
|
||||
else:
|
||||
official_full_capability_catalog = {
|
||||
"available": False,
|
||||
"status": "official_full_capability_catalog_skipped_budget_exhausted",
|
||||
"source": "vedastro_official_capability_runner",
|
||||
"bundle": "official_full_capability_catalog",
|
||||
"summary": {},
|
||||
"coverage": {"source_mode": "official_full_capability_catalog", "safe_sampling": True},
|
||||
"domain_routing": {},
|
||||
"dynamic_selection": {},
|
||||
"bucket_statuses": {},
|
||||
"method_statuses": {},
|
||||
"reason": "Skipped capability catalog after preserving foreground budget for the official full snapshot bundle.",
|
||||
"timeout_seconds": _timeout_seconds(),
|
||||
}
|
||||
bridge_sections = (
|
||||
official_python_bundle.get("snapshot_sections")
|
||||
if isinstance(official_python_bundle.get("snapshot_sections"), dict)
|
||||
|
||||
Reference in New Issue
Block a user