fffiloni commited on
Commit
62add84
·
verified ·
1 Parent(s): 40a016e

Upload 6 files

Browse files
Files changed (3) hide show
  1. CHANGELOG.md +9 -0
  2. README.md +9 -5
  3. app.py +9 -6
CHANGELOG.md CHANGED
@@ -201,3 +201,12 @@
201
  - Run Explorer filters and search now operate locally from a cached run list for a much snappier interaction.
202
  - Refresh now explicitly reloads the connected bucket; ordinary filter/search changes no longer re-query the bucket.
203
  - Selecting a run highlights it, switches the detail/progress context, and keeps the build form independent.
 
 
 
 
 
 
 
 
 
 
201
  - Run Explorer filters and search now operate locally from a cached run list for a much snappier interaction.
202
  - Refresh now explicitly reloads the connected bucket; ordinary filter/search changes no longer re-query the bucket.
203
  - Selecting a run highlights it, switches the detail/progress context, and keeps the build form independent.
204
+
205
+ ## V42 — Product tabs and run recovery hardening
206
+
207
+ - Renamed the custom UI top-level workflow tabs to the intended product model: **New Build**, **Live Progress**, and **Space Test**.
208
+ - Kept the build form isolated from selected historical runs; selecting a run only updates Live Progress and details.
209
+ - Hardened run discovery from the connected bucket by combining `ls` and targeted `glob` patterns so partial/in-progress runs are recovered more reliably.
210
+ - Persisted `launch.json`, `summary.json`, and a minimal `state.json` immediately after a Job launch, so running Jobs appear in the Run Explorer before the worker writes final artifacts.
211
+ - Progress polling now falls back to launch metadata when `state.json`/`events.jsonl` are not ready yet.
212
+ - Job links are preserved or reconstructed from launch metadata for active and historical runs.
README.md CHANGED
@@ -159,13 +159,17 @@ The custom dashboard separates two user intents more clearly:
159
  - Selecting a previous run in the Run Explorer only updates progress, details, links, and report preview. It does not modify the build form.
160
  - Run filtering/search is now local and cached after the latest bucket refresh, so status filters should feel instant. Use **Refresh runs** to reload the bucket.
161
 
162
- ## V40 product UI
163
 
164
- The public custom UI now uses three top-level tabs instead of a left sidebar:
165
 
166
- 1. **Run new build** — prepare and launch a fresh private Space build from a model card.
167
- 2. **Live progress** — inspect active or historical runs, follow the compact step timeline, open Job/Space/Settings/Artifacts, and browse the connected bucket's Run Explorer.
168
- 3. **Test Space** — run a live smoke test after manual hardware selection or after a generated Space is ready.
 
 
 
 
169
 
170
  The live progress timeline is designed to avoid horizontal scrolling and uses explicit step states: completed, active, pending, and failed. Historical run Job links are reconstructed from `job_id` when possible, so the Job button should remain available even when older summaries did not store a full `job_url`.
171
 
 
159
  - Selecting a previous run in the Run Explorer only updates progress, details, links, and report preview. It does not modify the build form.
160
  - Run filtering/search is now local and cached after the latest bucket refresh, so status filters should feel instant. Use **Refresh runs** to reload the bucket.
161
 
162
+ ## Current product UI
163
 
164
+ The public custom UI uses three top-level workflow tabs:
165
 
166
+ 1. **New Build** — prepare and launch a fresh private Space build from a model card.
167
+ 2. **Live Progress** — inspect active or historical runs, follow the compact step timeline, open Job/Space/Settings/Artifacts, and browse the connected bucket's Run Explorer.
168
+ 3. **Space Test** — run a live smoke test after manual hardware selection or after a generated Space is ready.
169
+
170
+ The build form is intentionally isolated from selected historical runs. Selecting a run only updates Live Progress, details, quick links, and report preview; it never mutates the New Build form.
171
+
172
+ The Run Explorer reads launch metadata, summary metadata, state, gate files, and validation files from the connected user's bucket. New Jobs write launch metadata immediately so in-progress runs can appear before the worker has finished writing final artifacts.
173
 
174
  The live progress timeline is designed to avoid horizontal scrolling and uses explicit step states: completed, active, pending, and failed. Historical run Job links are reconstructed from `job_id` when possible, so the Job button should remain available even when older summaries did not store a full `job_url`.
175
 
app.py CHANGED
@@ -149,7 +149,7 @@ def register_custom_routes(fastapi_app: FastAPI) -> None:
149
  return JSONResponse(
150
  {
151
  "name": "Agentic Space Factory",
152
- "version": "v40-tabbed-product-ui",
153
  "bucket_default": settings.bucket_name,
154
  "workflows": ["build_from_model_card", "validate_existing_space", "runs_explorer"],
155
  "custom_ui_status": "root_custom_ui",
@@ -332,14 +332,17 @@ def register_custom_routes(fastapi_app: FastAPI) -> None:
332
  bucket_source = user_bucket_source(username=ctx["username"], bucket_name=bucket_name)
333
  bundle = read_run_bundle(run_id, bucket_source=bucket_source, token=ctx["token"])
334
  state = bundle.get("state") or {}
 
 
335
  events = bundle.get("events") or []
336
- progress = progress_from_events(events, state=state)
 
337
  progress.update(
338
  {
339
  "run_id": run_id,
340
  "bucket_source": bucket_source,
341
- "state": state,
342
- "summary": bundle.get("summary") or {},
343
  "inference_gate": bundle.get("inference_gate") or {},
344
  "generation_smoke": bundle.get("generation_smoke") or {},
345
  "hardware_strategy": bundle.get("hardware_strategy") or {},
@@ -348,8 +351,8 @@ def register_custom_routes(fastapi_app: FastAPI) -> None:
348
  "links": _api_links(
349
  run_id=run_id,
350
  bucket_source=bucket_source,
351
- target_space=state.get("target_space") or (bundle.get("summary") or {}).get("target_space"),
352
- job_url=state.get("job_url") or (bundle.get("summary") or {}).get("job_url"),
353
  ),
354
  }
355
  )
 
149
  return JSONResponse(
150
  {
151
  "name": "Agentic Space Factory",
152
+ "version": "v42-tabbed-runs-recovery",
153
  "bucket_default": settings.bucket_name,
154
  "workflows": ["build_from_model_card", "validate_existing_space", "runs_explorer"],
155
  "custom_ui_status": "root_custom_ui",
 
332
  bucket_source = user_bucket_source(username=ctx["username"], bucket_name=bucket_name)
333
  bundle = read_run_bundle(run_id, bucket_source=bucket_source, token=ctx["token"])
334
  state = bundle.get("state") or {}
335
+ launch = bundle.get("launch") or {}
336
+ effective_state = {**launch, **state}
337
  events = bundle.get("events") or []
338
+ progress = progress_from_events(events, state=effective_state)
339
+ summary = bundle.get("summary") or {}
340
  progress.update(
341
  {
342
  "run_id": run_id,
343
  "bucket_source": bucket_source,
344
+ "state": effective_state,
345
+ "summary": summary,
346
  "inference_gate": bundle.get("inference_gate") or {},
347
  "generation_smoke": bundle.get("generation_smoke") or {},
348
  "hardware_strategy": bundle.get("hardware_strategy") or {},
 
351
  "links": _api_links(
352
  run_id=run_id,
353
  bucket_source=bucket_source,
354
+ target_space=effective_state.get("target_space") or summary.get("target_space"),
355
+ job_url=effective_state.get("job_url") or summary.get("job_url"),
356
  ),
357
  }
358
  )