File size: 28,110 Bytes
966bd2a
 
40a663d
 
 
 
966bd2a
 
b2726f9
966bd2a
 
 
 
 
 
 
 
 
6797597
40a663d
fc4306d
40a663d
fc4306d
40a663d
a77684b
40a663d
a77684b
40a663d
5086f7d
40a663d
 
 
 
 
 
 
 
 
 
 
 
5086f7d
40a663d
5086f7d
 
40a663d
 
 
 
 
 
 
5086f7d
 
40a663d
226d90a
40a663d
 
 
 
6707b93
40a663d
5086f7d
40a663d
5086f7d
40a663d
 
 
 
 
 
65b4e25
40a663d
5086f7d
112460e
 
 
 
 
40a663d
 
112460e
 
 
 
40a663d
112460e
5086f7d
40a663d
844998b
40a663d
844998b
40a663d
 
 
 
 
 
112460e
62add84
40a663d
db921ed
40a663d
65b4e25
40a663d
65b4e25
40a663d
aad22a5
40a663d
aad22a5
40a663d
aad22a5
40a663d
a77684b
40a663d
a77684b
40a663d
b2726f9
40a663d
 
 
 
 
 
b2726f9
40a663d
b2726f9
d993eeb
 
 
 
 
 
 
 
50e67f0
b90cc10
 
50e67f0
 
 
 
b90cc10
 
 
 
 
 
 
 
 
 
 
92666f1
 
 
 
 
 
 
 
1adbfc6
 
 
 
 
 
 
 
24e1066
ba7eed6
24e1066
ba7eed6
 
 
24e1066
ba7eed6
92a2da5
9c4ebbe
92a2da5
9c4ebbe
 
 
92a2da5
9c4ebbe
 
 
 
 
 
 
 
 
654b659
6081c31
654b659
6081c31
 
 
654b659
6081c31
23cd4b3
dec6526
23cd4b3
d18ac62
0bba00c
 
 
dec6526
d18ac62
64eabe5
 
23cd4b3
dec6526
23cd4b3
 
 
 
 
 
 
 
5d556c8
 
 
 
 
 
 
 
e90f13e
 
 
 
 
 
 
 
28aae82
 
 
 
 
 
 
 
a9a19e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6a176b5
 
 
 
 
 
 
 
d7a83a9
 
 
 
 
 
 
 
a8fe720
 
 
 
 
 
 
 
bf65473
 
 
 
 
 
 
 
7181f1f
 
 
 
 
 
 
 
433a26a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0a36e6b
 
 
 
 
 
 
 
a697930
 
 
 
 
 
 
 
e5443c0
 
 
 
 
 
 
 
92de873
 
 
 
 
 
 
 
f64705c
 
 
 
 
 
 
 
 
59a28a8
 
 
 
 
 
 
 
bf3429f
 
 
 
 
 
 
 
5af1585
 
 
 
 
 
 
 
6edff2d
 
 
 
 
 
 
 
32ea916
 
 
 
 
 
 
 
c357aa3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e539c60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
00747be
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222d2d8
 
 
 
 
 
 
 
 
a8bf753
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5436e13
 
 
 
 
 
 
 
 
 
bdff079
a8cf1e4
bdff079
a8cf1e4
 
 
 
 
 
bdff079
a8cf1e4
e7124b4
4b0cf95
e7124b4
4b0cf95
 
 
 
e7124b4
4b0cf95
10a4c93
4ba141b
10a4c93
4ba141b
 
 
 
91600eb
4ba141b
91600eb
 
 
 
 
a9ddf04
 
ccd0f32
a9ddf04
ccd0f32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
---
title: Agentic Space Factory
emoji: 🏭
colorFrom: indigo
colorTo: blue
short_description: Build, inspect, validate Gradio Spaces from model cards.
sdk: docker
hf_oauth: true
hf_oauth_expiration_minutes: 1440
hf_oauth_scopes:
  - read-repos
  - write-repos
  - manage-repos
  - gated-repos
  - inference-api
  - jobs
  - read-billing
---

# Agentic Space Factory

Agentic Space Factory turns Hugging Face model cards into private, testable Gradio Spaces through an agentic build loop running on Hugging Face.

The app is an operator interface for model-to-Space generation. A user enters a model URL, reviews a compact pre-scan, launches a build, watches progress, opens the generated Space, validates the live API, and inspects the full run archive.

The project builds on the idea that a deployed Space can be the coding assistant's lab: generated code is not enough; the live Space must boot, expose an API, run inference, and return a valid artifact.

## What the Factory does

- Reads a Hugging Face model card or model URL.
- Runs a compact pre-scan before launch.
- Creates a private target Space under the signed-in user's namespace.
- Launches the build inside a Hugging Face Job.
- Prepares a grounded workspace for Pi, the coding assistant.
- Uploads the generated Space implementation.
- Applies platform dependency guardrails.
- Assigns hardware on a best-effort basis, including ZeroGPU when applicable.
- Validates the deployed Space through live Gradio API calls.
- Captures reports, logs, traces, generated files, tests, and output artifacts.
- Classifies outcomes honestly: full success, partial validation, technical blocker, manual hardware required, auth refresh required, or failure.
- Optionally publishes privacy-safe anonymous eval records.

## User journey

```text
Paste model card
β†’ run compact pre-scan
β†’ launch build
β†’ watch Active Run timeline
β†’ inspect generated Space and artifacts
β†’ validate through Space Test
β†’ review Run Explorer and Run Stats
```

The interface is organized around:

- **New Build** β€” model URL, pre-scan, launch readiness, and billing/compute hints.
- **Center workspace** β€” `Active Run` for build details and `Space Test` for linked validation runs.
- **Runs Explorer** β€” compact history of build runs.
- **Run Stats** β€” aggregate status and outcome overview.

## Hugging Face-native architecture

The Factory uses Hugging Face primitives end to end:

- **Spaces** for the orchestrator UI and generated demos.
- **Jobs** for long-running build, validation, and repair work.
- **Storage Buckets** for run archives.
- **Inference Providers** for assistant/model access.
- **ZeroGPU** for serverless GPU demos when a model fits the Gradio/ZeroGPU execution model.
- **Gradio** for live API validation.

Typical run artifacts are written under:

```text
runs/<run_id>/state.json
runs/<run_id>/summary.json
runs/<run_id>/events.jsonl
runs/<run_id>/report.md
runs/<run_id>/analysis_inputs/
runs/<run_id>/planning/
runs/<run_id>/generated/
runs/<run_id>/tests/
runs/<run_id>/artifacts/
runs/<run_id>/logs/
runs/<run_id>/traces/redacted/
```

## Model-card grounding

At build time, the worker prepares `analysis_inputs/` for Pi:

```text
model_card.md
model_card_source.json
model_repo_tree.json
prescan_summary.json
source_policy.md
```

The rule is simple: the model card is canonical, the repo tree is structural evidence, and generated Hugging Face snippets are hints only. Pi is asked to cite model-card evidence before implementing the Space.

## Validation contract

Generated Spaces are expected to describe what they implemented through an inference contract. The worker uses that contract to decide whether to run a generation smoke test, skip it as a declared technical blocker, or ask for manual validation.

For successful full-inference builds, the live Gradio API is the source of truth. The validator checks health, discovers endpoints, calls the generation endpoint, verifies returned artifacts, and records latency. For ZeroGPU-compatible apps, measured inference latency can inform `@spaces.GPU(duration=...)` recommendations.

## Privacy and safety

Generated Spaces are private by default. Run Buckets are per-user. Pi session traces are archived only in redacted form; RAW Pi traces are not published to Buckets or exposed in the UI. Redacted traces are best-effort and should still be reviewed before public sharing.

Anonymous eval records contain aggregate signals only. They must not include raw model cards, generated code, prompts, tokens, private bucket paths, validation payloads, endpoint schemas, or target Space IDs.

## Documentation

Public-facing documentation is in `docs/`:

- `ARCHITECTURE.md` β€” system overview.
- `PUBLIC_PREVIEW.md` β€” public-preview guidance and user journey.
- `SECURITY.md` β€” token, bucket, trace, and eval privacy notes.
- `RECOVERY_ALGORITHM.md` β€” repair behavior and safety boundaries.
- `RELEASE_VALIDATION.md` β€” release checklist.
- `NEXT_STEPS.md` β€” product roadmap.

Detailed version history is kept in the changelog files at the repository root.

<!-- Internal regression markers for historical tests; public version history remains in CHANGELOG files: v189.9, v190.10, v194, v191.11, Timeline polish and Run notes clarity, Run notes, Agent recovery, Anonymous eval archive activation, agent_trace.jsonl. -->

See `CHANGELOG_V194.md` for the Model Pre-scan Decision Card UI pass.


See `CHANGELOG_V195.md` for the Runtime CSS Cleanup with Legacy Safety Net pass.


Current release: Agentic Space Factory v198.26.130.


## v198.26.130 β€” Active Run Progress Stability Hotfix

Pass 128 fixes an Active Run progress regression introduced by release-aware timeline rendering. Polling alternates between lightweight bucket snapshots and heavier Job-log snapshots; the progress bar now applies the same monotonic stability guard to canonical timeline-model progress as it already did for legacy progress payloads. This prevents the progress bar and canonical timeline from jumping backwards, for example from 15% to 3%, when a lightweight poll temporarily has fewer live Job log events.

## v198.26.127 β€” Autonomous Release Orchestration

Pass 127 makes the worker validate the *latest release candidate* instead of merely trusting that any live Gradio endpoint belongs to the latest upload. The build worker now freezes an auditable release candidate, stamps the runtime payload with `ASF_RELEASE.json`, injects release identity into `/health`, waits for the Hub runtime to be non-busy before validation, blocks `/generate` until `/health` reports the expected release identity, and records release/build/runtime/smoke evidence per repair attempt. This keeps ASF autonomous while preventing stale-runtime smoke tests from being promoted to `full_inference_success`.

## v198.26.126 β€” Release Integrity Barrier

- Blocks unsafe local project installs such as `.`, `./`, `-e .` and `file:.` from publishable `requirements.txt` files.
- Treats model-card `pip install -e .` as a local-development instruction, not as a dependency line to add to generated Space payloads.
- Prevents model-card convergence from reintroducing a requirement that repair/log evidence proved build-breaking.
- Adds release-candidate hashes to the runtime upload manifest and upload epoch.
- Adds a post-upload release integrity barrier before trusting live HTTP/Gradio endpoints, so `full_inference_success` requires a settled latest upload.

## v198.26.125 β€” Multi-attempt Agent Recovery Tabs

- Active Run now shows structured `Agent recovery` tabs when a run chains multiple Pi repair attempts.
- Each attempt displays its own diagnosis, decision, patch/rebuild action, revalidation result, signatures, changed files and source links.
- The UI preserves the selected attempt during live polling and keeps the previous single recovery summary for older runs.

See `CHANGELOG_V198_26_125.md`.

## v198.26.124 β€” Expert Validation UI Polish

- Uses the short compact Runs Explorer chip `Expert` for expert-recovered builds so badges no longer overlap on narrow cards.
- Keeps long-form expert context in Active Run and Space Test with labels such as `Recovered after expert intervention` and `Passed Β· Expert acceptance`.
- Adds a subtle linked-validation row pulse when a validation run is loaded from Space Test.

See `CHANGELOG_V198_26_124.md`.

## v198.26.123 β€” Expert Recovered Outcome UI

- Shows expert-validated recovered Build Runs as `Recovered Β· Expert` rather than automatic success.
- Keeps the original raw Build Run status preserved while using the expert validation as the effective UI outcome.
- Fixes Expert filter/count handling and Active Run badge reconciliation after expert validation passes.

See `CHANGELOG_V198_26_123.md`.

## v198.26.118 β€” Runtime Risk Hints Advisory Layer

- Adds a non-invasive `RUNTIME_RISK_HINTS.json` artifact for worker/Pi observability.
- Records facts, inferences and suggestions around native kernels, `torch.compile`, LoRA/PEFT, ZeroGPU, remote code and video demo quality without mutating generated runtime behavior.
- Keeps the new advisory artifact bucket-side and out of the target Space release payload.

See `CHANGELOG_V198_26_118.md`.

## v198.26.117 β€” Release Payload Hygiene

- Keeps ASF run artifacts out of generated target Space repos while preserving them in the bucket-side run archive.
- Uploads only the whitelist runtime payload to the target Space; worker contracts, dependency findings, kernel findings and repair packets stay in the run archive.
- Adds runtime upload manifest reason `release_artifact_not_for_target_space` for clean observability.

See `CHANGELOG_V198_26_117.md`.

## v198.26.112 β€” Runs Explorer Linked Validation Reconciliation Lock

- Runs Explorer refreshes now preserve terminal linked validation facts instead of replacing them with weaker partial snapshots.
- Explicit empty linked-validation metadata clears stale linked test counts.
- Stats and cards now use the same reconciled linked validation rows, reducing count drift and status oscillation.

See `CHANGELOG_V198_26_112.md`.

## v198.26.87 β€” Runs Explorer Badge Rail Alignment

- Keeps the title-first card structure from v198.26.81.
- Moves the run age to the left under the run ID.
- Moves the badges to the right side of the footer.
- Reverses badge layout so the status badge is the rightmost badge.
- Extends the footer badge rail to the same right-side visual column as the delete button.
- Prevents the age label from compressing or shifting the status and Space Test badges.
- Keeps the `β€’` separator before the linked Space Test count.
- Keeps the Space Test badge height matched with the status badge.

See `CHANGELOG_V198_26_87.md`.

## v198.26.67 β€” Recovered Space Test Success Tone

- Treats `recovered_by_space_test` and `recovered_by_manual_validation` as terminal success statuses in the Active Run canonical UI state.
- Prevents stale `visual_status: error` from coloring a successful recovered run badge red.
- Keeps Runs Explorer / Runs Stats recovery accounting unchanged; this pass fixes the Active Run badge tone.

See `CHANGELOG_V198_26_67.md`.

## v198.26.66 β€” Simplified Runs Loading State

- Removes the animated dot suffix from the Runs Explorer loading state.
- Keeps the container sweep and pulsing blue orb as the only loading motion.
- Simplifies the loading markup and reduced-motion CSS by removing unused dot selectors.

See `CHANGELOG_V198_26_66.md`.

## v198.26.65 β€” Stable Runs Loading Dots

- Keeps the Runs Explorer loading label visually stable by reserving fixed space for the animated dots.
- Replaces variable `content: "..."` dot animation with opacity/scale-only motion, preventing center text reflow.
- Extends reduced-motion coverage to the updated dot pseudo-elements.

See `CHANGELOG_V198_26_65.md`.

## v198.26.64 β€” Runs Explorer Loading Motion

- Replaces the static initial `Loading runs...` text with a compact animated loading state.
- Animates the Runs Explorer container during network refreshes while preserving cached rows when available.
- Updates static asset cachebusters so the refreshed CSS/JS is served immediately.

See `CHANGELOG_V198_26_64.md`.

## v198.26.63 β€” Factory Upload Retry Budget

- Adds a small factory-side packaging/upload retry budget, defaulting to one retry, separate from Pi repair attempts.
- Retries transient runtime payload or HF upload errors without relaunching Pi or consuming patch repair budget.
- Records `factory_upload_retry.json` and richer `factory_upload_error.json` metadata so upload failures are classified instead of ending opaquely.

See `CHANGELOG_V198_26_63.md`.

## v198.26.62 β€” LongCat Runtime Import and Payload Repair

- Ensures deterministic gated-token injection puts `import os` before `HF_TOKEN = os.environ.get(...)`, even when Pi already placed `import os` later in `app.py`.
- Preserves valid `from __future__ import ...` ordering while still placing token setup before application code.
- Retries runtime payload copy once when a repair re-upload transiently loses a vendored package parent directory such as `longcat_video/audio_process`.

See `CHANGELOG_V198_26_62.md`.

## v198.26.61 β€” Pre-scan Panel Output Authority

- Separates pre-scan input detection from generated-output guessing.
- Adds output confidence, evidence, and authority metadata to model pre-scan results.
- Updates the pre-build panel to label the output as a provisional guess while runtime contracts and Gradio returns remain authoritative.

See `CHANGELOG_V198_26_61.md`.

## v198.26.60 β€” Linked Validation Output Type From Gradio Returns

- Uses the discovered Gradio endpoint return schema to resolve linked validation output type.
- Lets `/generate` returning `Video` override a stale parent `EXPECTED_OUTPUT_TYPE=image`.
- Records `linked_expected_output_resolution.json` so false prescan output mismatches are auditable.

See `CHANGELOG_V198_26_60.md`.

## v198.26.59 β€” Linked Validation Argument Realignment

- Rebuilds incomplete linked validation args from the discovered Gradio schema instead of preserving legacy positional prompt args in media slots.
- Moves a provided prompt string to the actual prompt/text parameter when required image/audio inputs appear before it.
- Preserves real replay payloads when they provide FileData, URLs, or existing file paths, and only falls back to smoke media for unusable media strings.

See `CHANGELOG_V198_26_59.md`.

## v198.26.58 β€” Linked Validation Media Autofill

- Auto-fills required image/audio/file inputs in linked validation using deterministic local smoke files.
- Prevents required `audio_path` or `image_path` inputs from failing before `/generate` is called.
- Keeps video-output validation aligned with the generated runtime contract while preserving real inference checks.

See `CHANGELOG_V198_26_58.md`.

## v198.26.57 β€” Recoverable Blocker Space Test Unlock

- Enables linked Space Test for blocked parent runs when a target Space and generation endpoint are available.
- Keeps diagnostic-only/no-generation-endpoint blockers disabled.
- Marks successful recovery validations as `recovered_by_space_test`.

See `CHANGELOG_V198_26_57.md`.

## v198.26.56 β€” Conservative Pre-scan Output Hints

- Detects LongCat/video-avatar model cards as video output even when the model has image inputs and no canonical `pipeline_tag`.
- Falls back to `any` for custom libraries without a strong output signal instead of guessing image.
- Keeps generated runtime contracts authoritative for final smoke validation.

See `CHANGELOG_V198_26_56.md`.

## v198.26.55 β€” Linked Validation Recovery Promotion

- Allows a successful linked Space Test to recover a parent run that was marked `technical_blocker` by a false automatic validation failure.
- Preserves the original build verdict while exposing `recovered_by_space_test` as the effective/display status.
- Keeps diagnostic-only and no-full-inference blockers non-promotable.

See `CHANGELOG_V198_26_55.md`.

## v198.26.54 β€” Runtime Output Smoke Alignment

- Uses the generated app runtime contract output type for automatic smoke validation, so a video app is validated as video even when model prescan guessed image.
- Normalizes MIME-style outputs such as `video/mp4` before timeout and result checks.
- Makes video smoke payloads prefer exact/non-cache acceleration over optional fast cache presets.

See `CHANGELOG_V198_26_54.md`.

## v198.26.53 β€” Native Kernel Repair Diff Gate

- Allows `NATIVE_KERNEL_RESOLUTION.json` during unrelated bounded repairs when it was produced by a successful deterministic native-kernel guard.
- Prevents syntax/decorator repairs from being rejected merely because the native-kernel policy sidecar was refreshed.
- Keeps `requirements_policy.json` quarantined as a benign advisory sidecar while preserving publishable native-kernel evidence.

See `CHANGELOG_V198_26_53.md`.

## v198.26.52 β€” Native Kernel HF Kernels Policy

- Resolves model-card `flash_attn` requirements through `NATIVE_KERNEL_RESOLUTION.json` before upload.
- Prefers HF Kernels backends for Diffusers and Transformers instead of fragile Space source builds.
- Allows documented xformers/SDPA fallback for LongCat-style apps, and blocks unresolved native-kernel source builds before upload.

See `CHANGELOG_V198_26_52.md`.

## v198.26.51 β€” Final ZeroGPU Torch Guard

- Re-checks `requirements.txt` after model-card convergence and immediately before upload.
- Forces unsupported ZeroGPU torch stack pins to the supported ASF policy even if Pi or repair rewrote requirements late.
- Treats Hub `CONFIG_ERROR` / `CONFIGURATION_ERROR` runtime stages as terminal instead of waiting for `/health`.

See `CHANGELOG_V198_26_51.md`.

## v198.26.50 β€” ZeroGPU Torch Stack Policy

- Normalizes ZeroGPU-targeted runs to supported torch stack requirements before upload.
- Replaces incompatible generated torch pins with `torch==2.11.0` when the app needs torch on ZeroGPU.
- Normalizes `torchaudio` and `torchvision` only when the app imports them or requirements already declare them.
- Leaves non-ZeroGPU/CPU apps on the existing lighter dependency policy.

See `CHANGELOG_V198_26_50.md`.

## v198.26.49 β€” Run Stats Linked Test Reconciliation

- Fixes Run Stats showing `0 linked tests` when a Build Run is already effectively validated by a linked Space Test.
- Counts durable validation facts from `post_build_validation` and `manual_validation_status`, not only explicit `linked_validations` rows.
- Keeps Effective Success and Linked Space Tests aggregate counts consistent after linked validation deletion/reconciliation.

See `CHANGELOG_V198_26_49.md`.

## v198.26.48 β€” Linked Space Test Deletion UI

- Lists linked validation runs directly in the Space Test panel for the selected Build Run.
- Adds a per-row delete button that reuses the existing delete confirmation modal.
- Keeps Build Run deletion cascading through linked validation run folders, while validation-run deletion refreshes parent linked validation metadata.

See `CHANGELOG_V198_26_48.md`.

## v198.26.47 β€” Space Test Multi-Choice Candidate Retry

- Fixes Gradio choice retry when multiple schema-compatible arguments share the rejected value, for example `width=512` and `height=512`.
- Updates all matching schema-backed choice parameters instead of toggling only the first matching argument.
- Adds regression coverage for duplicate `512` width/height candidates.

See `CHANGELOG_V198_26_47.md`.

## v198.26.46 β€” Space Test Alternate Choice Retry

- Adds a bounded second retry for Gradio choice errors when the first schema-choice retry still fails.
- Handles ambiguous `str`/`int` rendering where Gradio prints both rejected values and choices as `512`, making the first correction direction unknowable.
- Writes `generation_smoke_payload_retry_2.json` for the alternate primitive retry path.

See `CHANGELOG_V198_26_46.md`.

## v198.26.45 β€” Space Test Numeric Choice Retry

- Fixes linked Space Test retries for ambiguous Gradio choice errors such as `Value: 512 is not in the list of choices: [512, 768, 1024]`.
- Adds a fallback that toggles numeric-looking choice arguments from `int`/`float` to string when Gradio renders the current value and choices identically but still rejects the payload.
- Adds a regression test in the existing Space validation payload.

See `CHANGELOG_V198_26_45.md`.

## v198.26.44 β€” Space Test Payload Completeness Audit

- Adds missing Space Test finalizers/imports needed after a linked validation succeeds or fails.
- Ensures linked Space Test can write `summary.json` and `artifact_manifest.json` from its own worker payload.
- Adds a no-network success-path test for `VALIDATE_EXISTING_SPACE_WORKER_SCRIPT`.

See `CHANGELOG_V198_26_44.md`.

## v198.26.43 β€” Space Test Choice Retry Helper

- Includes `coerce_smoke_args_from_choice_error` inside the linked Space Test worker payload.
- Prevents Space Test from failing with `NameError` when the Gradio schema-choice retry path is reached.
- Keeps the existing schema-choice retry behavior instead of disabling the fallback.

See `CHANGELOG_V198_26_43.md`.

## v198.26.42 β€” Smoke Missing Dependency Repair

- Classifies generation-smoke `NameError: name '<package>' is not defined` as `missing_python_dependency` when the missing symbol looks like a Python package.
- Marks those smoke failures as `repair_candidate=true`, `failure_owner=app_runtime`, instead of leaving them as opaque `generation_smoke_error`.
- Preserves the v198.26.41 PRXPixel prevention rule, but ensures similar missing optional dependencies can trigger the normal smoke repair path.

See `CHANGELOG_V198_26_42.md`.

## v198.26.41 β€” PRXPixel Runtime Dependency Guard

- Adds `ftfy` automatically when a generated Space uses `PRXPixelPipeline` / `Photoroom/prxpixel-t2i`.
- Classifies `NameError: name 'ftfy' is not defined` as `missing_python_dependency:ftfy` instead of a generic runtime error.
- Keeps the repair scope narrow: requirements/app import repair only, with no inference fallback or placeholder output.

See `CHANGELOG_V198_26_41.md`.

## v198.26.40 β€” Conservative Dependency Policy

- Preserves stricter generated/model-specific `transformers>=...` lower bounds during requirements sanitization.
- Prevents the platform dependency sanitizer from downgrading requirements such as `transformers>=4.57` to ASF's generic `transformers>=4.51.0` base policy.
- Keeps the strict upload integrity guard after sanitize/convergence, but reduces avoidable repair churn before that guard.
- Adds explicit policy evidence in `requirements_policy.json` when a stricter generated minimum is preserved.

See `CHANGELOG_V198_26_40.md`.

## v198.26.39 β€” Repair Upload Convergence Ordering

- Runs model-card dependency convergence before strict upload preflight, so repair uploads are not blocked before their requirements are normalized.
- Accepts evidenced `diffusers.git@main` stale-ref repairs for deleted model-card branches such as `prx-pixel-pipeline`.
- Restores explicit model-card minimums such as `transformers>=4.57` after platform requirements sanitization.
- Keeps unaudited dependency deviations blocked.

See `CHANGELOG_V198_26_39.md`.

## v198.26.38 β€” Model-Card Stale Git Ref Deviation Guard

- Allows a narrow model-card git dependency deviation when the explicit branch/tag is proven unavailable and the replacement is the same official repo on default/main.
- Fixes the `Photoroom/prxpixel-t2i` loop where Pi repaired the deleted `prx-pixel-pipeline` Diffusers branch, then the model-card guard rewrote or rejected the repair.
- Keeps unaudited dependency deviations blocked before upload.
- Preserves deterministic convergence for other explicit model-card requirements such as `transformers>=4.57`.

See `CHANGELOG_V198_26_38.md`.

## v198.26.37 β€” Pre-Upload Payload Repair-First Convergence

- Adds deterministic payload convergence before `runtime_payload_too_large` becomes terminal.
- Prunes optional example/sample/demo media when those assets alone push the runtime payload over budget.
- Keeps `app.py`, `README.md`, `requirements.txt`, `src/`, and `web/` protected from silent pruning.
- Writes `runtime_payload_convergence.json` with the repair outcome before failing closed.
- Preserves v198.26.36 `ref_spaces/` exclusion and Git LFS pointer detection.

See `CHANGELOG_V198_26_37.md`.

## v198.26.36 β€” Runtime Payload Reference-Space LFS Guard

- Excludes `ref_spaces/` snapshots from the generated Space runtime payload.
- Detects unresolved Git LFS pointer stubs before upload and records `git_lfs_pointer_without_object`.
- Fixes the failed `Photoroom/prxpixel-t2i` run where `ref_spaces/examples/ex*.png` LFS pointer files were sent to the commit endpoint.
- Keeps v198.26.35 ZeroGPU actionability repair and fixed-GPU fallback behavior.

See `CHANGELOG_V198_26_36.md`.

## v198.26.35 β€” ZeroGPU Actionability Repair & Hardware Fallback

- Runs ZeroGPU actionability repair before Space creation, so ASF does not create a `zero-a10g` Space from a payload missing `@spaces.GPU`.
- Reuses the deterministic decorator repair to add `@spaces.GPU` around the generated `/generate` path when possible.
- Falls back to the configured fixed GPU hardware before creation when ZeroGPU remains non-actionable and fallback is allowed.
- Writes `zero_gpu_actionability_resolution.json` and clearer failure metadata for remaining non-actionable manual-hardware payloads.
- Keeps v198.26.34 model-card convergence and the default Pi assistant model `zai-org/GLM-5.2`.

See `CHANGELOG_V198_26_35.md`.

## v198.26.34 β€” Model Card Repair Convergence & GLM Default

- Adds deterministic model-card repair convergence after Pi repair: simple leftovers such as `transformers>=4.51.0` when the card requires `transformers>=4.57` are patched directly and re-checked.
- Keeps pre-upload repair alive while Pi budget remains, relaunching Pi with direct guard deviations when model-card/template guards still fail.
- Writes `model_card_repair_convergence_patch.json` with exact requirement changes, removed local artifacts, and README cleanup.
- Cleans stale local Diffusers wheel artifacts and README β€œvendored wheel” claims when the final strategy follows an official model-card git dependency.
- Changes the default Pi assistant model in the Launch Build form and backend fallback to `zai-org/GLM-5.2`.
- Preserves v198.26.33 model-card instruction authority, local requirement sanity, health-to-repair propagation, terminal repair reconciliation, and v198.26.32 quick links.

See `CHANGELOG_V198_26_34.md`.

## v198.26.27 β€” Pi Repair Execution Guarantee & Model-Family Runtime Recipes

- Executes a targeted Pi repair when pre-upload integrity still has repairable defects after deterministic compile/API/decorator patches.
- Guarantees smoke-repair terminal outcomes: no more `repair_candidate=true` / `triggered=true` with `post_repair_validation=not_started` and no patch reason.
- Adds SDXL-LoRA text-encoder mismatch classification and a smoke-primary error packet so Pi repairs from the real `/generate` failure even when Space runtime logs are unavailable.
- Preserves the worker stabilization, schema coercion, token/cache guards, manual-hardware actionability, and terminal UI hydration from v198.26.14–v198.26.26.

See `CHANGELOG_V198_26_27.md`.

## v198.26.24 β€” Worker Stabilization & Regression Replay

- Converts known repairable pre-upload integrity failures from fail-fast to repair-first.
- Adds deterministic `@spaces.GPU` insertion for ZeroGPU apps that expose `/generate` but missed the decorator.
- Archives rejected pre-upload payloads under `generated_rejected/` with `pre_upload_integrity_failure.json` for audit and regression replay.
- Keeps recent safeguards for Diffusers duplicate token injection, writable HF cache paths, manual hardware actionability, and Gradio schema coercion.

See `CHANGELOG_V198_26_24.md`.

## v198.26.13 β€” Runtime Stage Granularity

See `CHANGELOG_V198_26_13.md`.



## v198.26.12 β€” OAuth Recovery

See `CHANGELOG_V198_26_12.md`.