fffiloni commited on
Commit
91600eb
·
verified ·
1 Parent(s): ccd0f32

Upload 4 files

Browse files
Files changed (2) hide show
  1. README.md +11 -1
  2. app.py +11 -4
README.md CHANGED
@@ -133,7 +133,17 @@ See `CHANGELOG_V194.md` for the Model Pre-scan Decision Card UI pass.
133
  See `CHANGELOG_V195.md` for the Runtime CSS Cleanup with Legacy Safety Net pass.
134
 
135
 
136
- Current release: Agentic Space Factory v198.26.12.
 
 
 
 
 
 
 
 
 
 
137
 
138
 
139
  ## v198.26.12 — OAuth Recovery
 
133
  See `CHANGELOG_V195.md` for the Runtime CSS Cleanup with Legacy Safety Net pass.
134
 
135
 
136
+ Current release: Agentic Space Factory v198.26.14.
137
+
138
+ ## v198.26.14 — Linked Test Accounting & Propagation
139
+
140
+ See `CHANGELOG_V198_26_14.md`.
141
+
142
+
143
+ ## v198.26.13 — Runtime Stage Granularity
144
+
145
+ See `CHANGELOG_V198_26_13.md`.
146
+
147
 
148
 
149
  ## v198.26.12 — OAuth Recovery
app.py CHANGED
@@ -1095,7 +1095,7 @@ def register_custom_routes(fastapi_app: FastAPI) -> None:
1095
  run_id = validate_run_id(run_id)
1096
  bucket_source = user_bucket_source(username=ctx["username"], bucket_name=bucket_name)
1097
  snapshot = _build_live_run_snapshot(run_id, bucket_source=bucket_source, token=ctx["token"], include_heavy=False)
1098
- return JSONResponse({**snapshot["view"], "summary": snapshot["summary"], "state": snapshot["state"], "events": snapshot["events"], "events_recent": snapshot["events"][-100:], "events_count": len(snapshot["events"]), "eval_publish": snapshot["eval_publish"], "final_status_reconciliation": snapshot["bundle"].get("final_status_reconciliation") or {}, "eval_record": snapshot["bundle"].get("eval_record") or {}, "validation_metrics": snapshot["view"].get("validation_metrics") or {}, "run_documents": snapshot["view"].get("run_documents") or snapshot["bundle"].get("run_documents") or [], "space_link_state": snapshot["view"].get("space_link_state") or {}, "space_identity": snapshot["bundle"].get("space_identity") or {}, "links": snapshot["view"].get("links") or {}})
1099
 
1100
  @fastapi_app.post("/api/runs/{run_id}/cancel")
1101
  async def api_cancel_run(request: Request, run_id: str, bucket_name: str = settings.bucket_name): # type: ignore[no-untyped-def]
@@ -1320,6 +1320,9 @@ def register_custom_routes(fastapi_app: FastAPI) -> None:
1320
  "blockage": bundle.get("blockage") or {},
1321
  "run_documents": view.get("run_documents") or bundle.get("run_documents") or [],
1322
  "validation_metrics": view.get("validation_metrics") or {},
 
 
 
1323
  "events": events[-100:],
1324
  "events_recent": events[-100:],
1325
  "events_count": len(events),
@@ -1333,6 +1336,7 @@ def register_custom_routes(fastapi_app: FastAPI) -> None:
1333
  job_url=effective_state.get("job_url") or effective_summary.get("job_url"),
1334
  ),
1335
  "space_link_state": view.get("space_link_state") or {},
 
1336
  "space_identity": bundle.get("space_identity") or {},
1337
  }
1338
  )
@@ -1861,8 +1865,10 @@ def _linked_validation_summaries(parent_run_id: str, *, bucket_source: str, toke
1861
 
1862
 
1863
  def _manual_validation_status_from_linked(parent_run_id: str, linked: list[dict[str, Any]]) -> dict[str, Any]:
1864
- successes = [row for row in linked if str(row.get("status") or row.get("effective_status") or "").lower() in {"full_inference_success", "success", "succeeded", "passed", "validated_after_manual_space_test"}]
1865
- failures = [row for row in linked if "failed" in str(row.get("status") or "").lower() or "error" in str(row.get("status") or "").lower()]
 
 
1866
  source = successes[0] if successes else (failures[0] if failures else {})
1867
  if not source:
1868
  return {"status": "none", "parent_build_run_id": parent_run_id, "validation_run_id": "", "updated_at": utc_now_iso()}
@@ -1890,7 +1896,8 @@ def _write_parent_linked_validation_state(parent_run_id: str, linked: list[dict[
1890
  for row in linked:
1891
  compact.append({
1892
  "validation_run_id": row.get("run_id") or "",
1893
- "status": row.get("status") or "unknown",
 
1894
  "target_space": row.get("target_space") or row.get("target_space_id") or "",
1895
  "api_name": row.get("api_name") or "",
1896
  "latency_seconds": row.get("latency_seconds") or row.get("observed_latency_seconds"),
 
1095
  run_id = validate_run_id(run_id)
1096
  bucket_source = user_bucket_source(username=ctx["username"], bucket_name=bucket_name)
1097
  snapshot = _build_live_run_snapshot(run_id, bucket_source=bucket_source, token=ctx["token"], include_heavy=False)
1098
+ return JSONResponse({**snapshot["view"], "summary": snapshot["summary"], "state": snapshot["state"], "events": snapshot["events"], "events_recent": snapshot["events"][-100:], "events_count": len(snapshot["events"]), "eval_publish": snapshot["eval_publish"], "final_status_reconciliation": snapshot["bundle"].get("final_status_reconciliation") or {}, "eval_record": snapshot["bundle"].get("eval_record") or {}, "validation_metrics": snapshot["view"].get("validation_metrics") or {}, "run_documents": snapshot["view"].get("run_documents") or snapshot["bundle"].get("run_documents") or [], "space_link_state": snapshot["view"].get("space_link_state") or {}, "runtime_stage_history": snapshot["view"].get("runtime_stage_history") or {}, "space_identity": snapshot["bundle"].get("space_identity") or {}, "links": snapshot["view"].get("links") or {}})
1099
 
1100
  @fastapi_app.post("/api/runs/{run_id}/cancel")
1101
  async def api_cancel_run(request: Request, run_id: str, bucket_name: str = settings.bucket_name): # type: ignore[no-untyped-def]
 
1320
  "blockage": bundle.get("blockage") or {},
1321
  "run_documents": view.get("run_documents") or bundle.get("run_documents") or [],
1322
  "validation_metrics": view.get("validation_metrics") or {},
1323
+ "post_build_validation_status": bundle.get("post_build_validation_status") or {},
1324
+ "manual_validation_status": bundle.get("manual_validation_status") or {},
1325
+ "linked_validations": bundle.get("linked_validations") or {},
1326
  "events": events[-100:],
1327
  "events_recent": events[-100:],
1328
  "events_count": len(events),
 
1336
  job_url=effective_state.get("job_url") or effective_summary.get("job_url"),
1337
  ),
1338
  "space_link_state": view.get("space_link_state") or {},
1339
+ "runtime_stage_history": view.get("runtime_stage_history") or {},
1340
  "space_identity": bundle.get("space_identity") or {},
1341
  }
1342
  )
 
1865
 
1866
 
1867
  def _manual_validation_status_from_linked(parent_run_id: str, linked: list[dict[str, Any]]) -> dict[str, Any]:
1868
+ success_tokens = {"full_inference_success", "success", "succeeded", "passed", "validated_after_space_test", "validated_after_manual_space_test", "recovered_by_space_test", "recovered_by_manual_validation", "manual_validation_passed", "manual_validated"}
1869
+ failure_tokens = {"partial_validation", "manual_hardware_required", "generated_needs_manual_hardware", "technical_blocker", "technical_blocker_boot_only", "blocked", "completed_with_warnings", "failed", "failure", "error", "auth_refresh_required", "stale", "stopped", "cancelled", "canceled"}
1870
+ successes = [row for row in linked if str(row.get("status") or row.get("effective_status") or "").lower() in success_tokens]
1871
+ failures = [row for row in linked if str(row.get("status") or row.get("validation_status") or row.get("result_status") or row.get("effective_status") or "").lower() in failure_tokens]
1872
  source = successes[0] if successes else (failures[0] if failures else {})
1873
  if not source:
1874
  return {"status": "none", "parent_build_run_id": parent_run_id, "validation_run_id": "", "updated_at": utc_now_iso()}
 
1896
  for row in linked:
1897
  compact.append({
1898
  "validation_run_id": row.get("run_id") or "",
1899
+ "status": row.get("status") or row.get("validation_status") or row.get("result_status") or "unknown",
1900
+ "effective_status": row.get("effective_status") or "",
1901
  "target_space": row.get("target_space") or row.get("target_space_id") or "",
1902
  "api_name": row.get("api_name") or "",
1903
  "latency_seconds": row.get("latency_seconds") or row.get("observed_latency_seconds"),