specimba commited on
Commit
c7b4d47
·
verified ·
1 Parent(s): 621cf5d

docs: evidence-first README and export gate clarity

Browse files
.gitattributes CHANGED
@@ -9,3 +9,9 @@
9
  *.jpeg binary
10
  *.webp binary
11
 
 
 
 
 
 
 
 
9
  *.jpeg binary
10
  *.webp binary
11
 
12
+ assets/readme/blackwell-runtime.png filter=lfs diff=lfs merge=lfs -text
13
+ assets/readme/governance-workflow.png filter=lfs diff=lfs merge=lfs -text
14
+ assets/readme/live-command-surface.png filter=lfs diff=lfs merge=lfs -text
15
+ assets/readme/model-catalog.png filter=lfs diff=lfs merge=lfs -text
16
+ assets/readme/real-flux-artifact.png filter=lfs diff=lfs merge=lfs -text
17
+ assets/readme/wardrobe-controls.png filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -30,76 +30,134 @@ tags:
30
 
31
  # NEXUS Visual Weaver
32
 
33
- Dark creative-operations command center for the Hugging Face Build Small Hackathon.
34
 
35
- NEXUS Visual Weaver is a Gradio Space prototype for governed image and video creation. It combines a couture-oriented workflow dashboard, outfit and lore planning, model-lane governance, and an always-on defensive export gate.
36
 
37
- The current Space path is intentionally direct for judges: enter a creative brief, run the active weave, inspect the generated FLUX.2 artifact, review ST3GG evidence, approve the human checkpoint, and prepare a governed export packet.
38
 
39
- ## Direction
40
 
41
- The interface is built around a command-center surface:
42
 
43
- - workflow graph for `Seed Prompt -> Refine -> Judge -> Locate -> Generate -> Video Path -> Human Checkpoint`
44
- - contextual inspector with taste rings, material checks, model stack, relay status, and ST3GG evidence
45
- - wardrobe drawer for garments, materials, footwear, accessories, locks, and reference-region intent
46
- - lore-to-video timeline for compact cinematic beats
47
- - provider handoff cards for dry-run visibility before any paid, gated, or quota-limited call
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
  ## Model Governance
50
 
51
  Pinned lanes do not rotate:
52
 
53
- - `image_generation`: Raven Quality FLUX.2 Klein 9B image lane, with FLUX.2 Klein 4B as Tiny Titan sidecar/fallback
54
- - `grounding`: NVIDIA LocateAnything-3B grounding anchor
55
- - `security`: ST3GG defensive scanner/export gate
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
57
- Sponsor/evidence lanes are optional but first-class when secrets are configured:
58
 
59
- - `openbmb/MiniCPM-V-4.6` (1.30B): visual judge for wardrobe, footwear, material drift, lore continuity, and export notes.
60
- - `nvidia/NVIDIA-Nemotron-Parse-v1.2` (0.94B): structured evidence/parser lane for NVIDIA/Nemotron claim support.
 
 
 
 
 
 
61
 
62
- Helper lanes may rotate with quota, license, health, and parameter-budget checks:
63
 
64
- - prompt routing
65
- - taste judging
66
- - audio lore TTS
67
- - video repair
68
- - HF catalog research
69
- - Modal job runner
70
 
71
- Public demo mode uses the Raven Quality FLUX.2 Klein 9B lane when Space access is configured, while preserving the 4B sidecar for fallback/Tiny Titan evidence. Private research mode can add OFFELLIA/Gemma routes, but it never disables consent, provenance, ST3GG, export, or dataset-partition gates.
72
 
73
- ## Current Features
74
 
75
- - Gradio Blocks dashboard with split update regions.
76
- - Real FLUX.2 Klein 9B-first image generation on Hugging Face ZeroGPU when runtime access is configured, with honest 4B sidecar fallback.
77
- - Above-fold ST3GG trust strip with safe-vs-blocked fixture evidence.
78
- - Generated artifact ST3GG scan and checkpoint/export state.
79
- - Optional MiniCPM-V and Nemotron provider evidence lanes with explicit configured/missing-secret status.
80
- - Active workflow graph and checkpointed run record.
81
- - Taste profile scoring from `assets/taste_profile.json`.
82
- - Wardrobe slot planning for couture, gothic, fantasy, footwear, accessories, and material control.
83
- - HF model and LoRA catalog with Adult Mode hidden by default.
84
- - GMR/ModelRelay-inspired helper model selection.
85
- - ST3GG-inspired scan adapter with magic detection, mismatch review, purification actions, and export-gate state.
86
- - Focused regression tests for catalog scope, workflow planning, ModelRelay behavior, and scanner evidence.
87
 
88
  ## Build Small Prize Mapping
89
 
90
  | Target | Evidence status |
91
  | --- | --- |
92
- | Gradio Space | App runs as a public Hugging Face Gradio Space with `mcp_server=True`. |
93
- | <=32B models | Raven Quality stack is 16.42B: FLUX.2 Klein 9B + LocateAnything 3.83B + MiniCPM-V 1.30B + Nemotron Parse 0.94B + MiniCPM5 1.08B + FunctionGemma 0.27B. |
94
- | Off Brand | Custom command-center UI, dense inspector, workflow graph, wardrobe/lore drawer, and provider cards. |
95
- | Best Agent | Multi-step prompt, generation, scan, judge, checkpoint, export workflow. |
96
- | OpenBMB | Claimed only when MiniCPM-V returns success status in an export packet. |
97
- | NVIDIA | Claimed only when Nemotron returns success status in an export packet. LocateAnything remains visible but is not the Nemotron claim by itself. |
98
- | OpenAI Codex | Development branch and PR include Codex-authored implementation commits. |
99
  | Demo / social | Add final links here before submission: `DEMO_VIDEO_URL` and `SOCIAL_POST_URL`. |
100
 
101
- Tiny Titan can be claimed only from a successful sidecar export packet using the 4B mode. It must not weaken the main Raven Quality stack.
102
-
103
  ## Merit Badges
104
 
105
  | Badge | Bonus Quest | Status | Evidence |
@@ -120,30 +178,9 @@ python app.py
120
 
121
  The app reads `NEXUS_PORT` or `PORT` when present, otherwise it launches on `7860`.
122
 
123
- ## Verification
124
-
125
- ```powershell
126
- python -m compileall app.py src tests
127
- $env:NEXUS_DISABLE_REAL_HF='1'
128
- $env:PYTEST_DISABLE_PLUGIN_AUTOLOAD='1'
129
- python -m pytest -q tests -p no:cacheprovider --basetemp=C:\tmp\pytest-nvw-full
130
- ```
131
-
132
  ## Secret Policy
133
 
134
- Do not commit provider credentials. Use Hugging Face Space secrets or local `.env` files for:
135
-
136
- - `HF_TOKEN`
137
- - `MINICPM_BASE_URL`
138
- - `MINICPM_API_KEY`
139
- - `MINICPM_MODEL`
140
- - `NEMOTRON_BASE_URL`
141
- - `NEMOTRON_API_KEY` or `NVIDIA_API_KEY`
142
- - `NEMOTRON_MODEL`
143
- - `MODAL_TOKEN_ID`
144
- - `MODAL_TOKEN_SECRET`
145
- - `OPENAI_API_KEY`
146
- - provider-specific API keys or bearer tokens
147
 
148
  Generated outputs, local moodboards, logs, caches, auth folders, and preview artifacts are intentionally ignored.
149
 
 
30
 
31
  # NEXUS Visual Weaver
32
 
33
+ **Raven Chronicle** is a governed high-fashion visual creation command center.
34
 
35
+ > Real generation. Visible governance. Auditable output.
36
 
37
+ **Live Space:** [build-small-hackathon/NEXUS_Visual_Weaver](https://huggingface.co/spaces/build-small-hackathon/NEXUS_Visual_Weaver)
38
 
39
+ NEXUS Visual Weaver is built for creative work where the image is only part of the deliverable. A weave run carries the prompt, wardrobe controls, model route, ST3GG scan, checkpoint state, and export evidence together so the operator can prove what happened.
40
 
41
+ ## Live Command Surface
42
 
43
+ ![Live command surface](assets/readme/live-command-surface.png)
44
+
45
+ The first screen is the working surface: creative brief, outfit controls, reference metadata, ST3GG input, model route, checkpoint controls, and the **Run Active Weave** action stay together.
46
+
47
+ ## Real Usage & Evidence
48
+
49
+ ![Real FLUX.2 Klein artifact](assets/readme/real-flux-artifact.png)
50
+
51
+ | Evidence | Current status |
52
+ | --- | --- |
53
+ | Real FLUX.2 Klein 9B artifact | Verified in the live Space screenshot |
54
+ | Creator controls | Visible in the command surface and persisted into run evidence |
55
+ | ST3GG scan | Active before export |
56
+ | Human checkpoint | Required before release |
57
+ | Export gate | Blocks release until review or audit override |
58
+ | Tests | 288 passing locally |
59
+ | Secret scan | Clean |
60
+ | Runtime | ZeroGPU / RTX Pro 6000 Blackwell |
61
+ | Deployment evidence | Space SHA `621cf5d992e74c0d756ff0e5042a43f1fcab346d`; GitHub main `06114ab` |
62
+
63
+ No sponsor or video lane is claimed as successful unless the export packet proves it. Missing-secret and gated states stay visible by design.
64
+
65
+ ## How a Governed Weave Works
66
+
67
+ ```mermaid
68
+ flowchart LR
69
+ A["Creator controls"] --> B["Prompt refinement"]
70
+ B --> C["FLUX.2 Klein 9B generation"]
71
+ C --> D["ST3GG review"]
72
+ D --> E{"Human checkpoint"}
73
+ E -->|approved + clear| F["Governed export packet"]
74
+ E -->|reviewed + reason| G["Audit override packet"]
75
+ E -->|not reviewed| H["Export gate remains active"]
76
+ ```
77
+
78
+ ![Governance workflow](assets/readme/governance-workflow.png)
79
+
80
+ The graph and inspector make the state visible: generation can succeed while export remains gated. That is intentional.
81
+
82
+ ## Governance Model
83
+
84
+ **Generation is not export.**
85
+
86
+ Every artifact must pass defensive review and human checkpoint before release. Adult Mode is opt-in and partitioned; it never disables safety, consent, provenance, dataset, or export gates.
87
+
88
+ The export packet is the source of truth. It records:
89
+
90
+ - creator controls and wardrobe slots
91
+ - model and LoRA status
92
+ - reference metadata and hashes
93
+ - generated artifact basename
94
+ - ST3GG verdict and override reason when used
95
+ - checkpoint and provider states
96
+
97
+ ## Runtime Proof
98
+
99
+ ![Runtime telemetry](assets/readme/runtime-telemetry.png)
100
+
101
+ ![ZeroGPU Blackwell runtime](assets/readme/blackwell-runtime.png)
102
+
103
+ The public Space is running on ZeroGPU with RTX Pro 6000 Blackwell visible in the live runtime panel. The footer telemetry is operational evidence, not a marketing mockup. When the status says the export gate is active, the app is protecting release rather than failing generation.
104
 
105
  ## Model Governance
106
 
107
  Pinned lanes do not rotate:
108
 
109
+ | Lane | Model | Role |
110
+ | --- | --- | --- |
111
+ | Image generation | `black-forest-labs/FLUX.2-klein-9B` | Raven Quality primary image lane |
112
+ | Sidecar / Tiny Titan evidence | `black-forest-labs/FLUX.2-klein-4B` | Fallback and 4B sidecar |
113
+ | Grounding | `nvidia/LocateAnything-3B` | Region and visual grounding anchor |
114
+ | Security / export review | ST3GG adapter | Defensive scan, purification, export gate |
115
+
116
+ Optional lanes are first-class but gated:
117
+
118
+ | Lane | Status rule |
119
+ | --- | --- |
120
+ | OpenBMB MiniCPM-V | Claimed only when a configured provider returns success in an export packet |
121
+ | NVIDIA Nemotron | Claimed only when a configured provider returns success in an export packet |
122
+ | LTX-2.3 video path | Gated behind checkpoint and review in this sprint |
123
+ | Modal / external jobs | Deferred unless configured and proven by runtime evidence |
124
+
125
+ ## Current Scope: Gated, Not Claimed
126
 
127
+ This sprint focuses on governed image creation and export evidence. Video rendering and external sponsor judges remain gated behind human review and secrets. The interface shows those states openly instead of pretending that missing-secret or deferred lanes succeeded.
128
 
129
+ ## Verification
130
+
131
+ ```powershell
132
+ python -m compileall app.py src tests
133
+ $env:PYTEST_DISABLE_PLUGIN_AUTOLOAD='1'
134
+ python -m pytest -q tests -p no:cacheprovider --basetemp=C:\tmp\pytest-nvw-full
135
+ git grep -n -I -E "hf_[A-Za-z0-9]{20,}|Bearer [A-Za-z0-9._-]+|sk-[A-Za-z0-9_-]{20,}|api[_-]?key\s*=" -- .
136
+ ```
137
 
138
+ Latest local verification: **288 tests passing**, compile clean, tracked-file secret scan clean. The live Space root and `/gradio_api/info` returned HTTP 200 after deployment.
139
 
140
+ ## Wardrobe, Catalog, And Evidence Surfaces
 
 
 
 
 
141
 
142
+ ![Wardrobe controls](assets/readme/wardrobe-controls.png)
143
 
144
+ ![Model catalog evidence](assets/readme/model-catalog.png)
145
 
146
+ The wardrobe and catalog surfaces are included as evidence of the real operating model: couture slots, material locks, model roles, adapter shelf, and parameter-budget visibility.
 
 
 
 
 
 
 
 
 
 
 
147
 
148
  ## Build Small Prize Mapping
149
 
150
  | Target | Evidence status |
151
  | --- | --- |
152
+ | Gradio Space | Public Hugging Face Gradio Space with `mcp_server=True`. |
153
+ | <=32B models | Active stack remains under the 32B ceiling and is visible in the UI. |
154
+ | Off Brand | Gothic couture command center with workflow graph, wardrobe drawer, ST3GG trust strip, and live artifact evidence. |
155
+ | Best Agent | Multi-step weave: prompt refinement, generation, scan, optional judges, checkpoint, and governed export. |
156
+ | OpenBMB | Conditional; claimed only when MiniCPM-V returns `success` in an export packet. |
157
+ | NVIDIA | Conditional; claimed only when Nemotron returns `success`; LocateAnything remains grounding evidence. |
158
+ | OpenAI Codex | Development and review work performed through Codex-authored implementation commits. |
159
  | Demo / social | Add final links here before submission: `DEMO_VIDEO_URL` and `SOCIAL_POST_URL`. |
160
 
 
 
161
  ## Merit Badges
162
 
163
  | Badge | Bonus Quest | Status | Evidence |
 
178
 
179
  The app reads `NEXUS_PORT` or `PORT` when present, otherwise it launches on `7860`.
180
 
 
 
 
 
 
 
 
 
 
181
  ## Secret Policy
182
 
183
+ Do not commit provider credentials. Use Hugging Face Space secrets or local `.env` files for provider keys.
 
 
 
 
 
 
 
 
 
 
 
 
184
 
185
  Generated outputs, local moodboards, logs, caches, auth folders, and preview artifacts are intentionally ignored.
186
 
app.py CHANGED
@@ -670,13 +670,13 @@ def export_packet(
670
  scan = _authoritative_generated_scan(state)
671
  override_reason = (override_reason or "").strip()
672
  if run is None:
673
- next_state = {**state, "provider_state": "blocked", "export": "blocked", "message": "Export blocked: no active run packet exists."}
674
  elif state.get("checkpoint") != "approved":
675
- next_state = {**state, "provider_state": "blocked", "export": "blocked", "message": "Export blocked: human checkpoint has not been approved."}
676
  elif not _generated_output_path(state):
677
- next_state = {**state, "provider_state": "blocked", "export": "blocked", "message": "Export blocked: no generated artifact exists."}
678
  elif scan.get("export_gate") != "clear" and not override_reason:
679
- next_state = {**state, "provider_state": "blocked", "export": scan.get("export_gate", "blocked"), "message": "Export blocked: ST3GG gate is not clear. Add an explicit override reason to write an audit packet."}
680
  else:
681
  export_state = "clear" if scan.get("export_gate") == "clear" else "override"
682
  override_applies = scan.get("export_gate") != "clear" and bool(override_reason)
 
670
  scan = _authoritative_generated_scan(state)
671
  override_reason = (override_reason or "").strip()
672
  if run is None:
673
+ next_state = {**state, "provider_state": "blocked", "export": "blocked", "message": "Export gate active: run an active weave before preparing an export packet."}
674
  elif state.get("checkpoint") != "approved":
675
+ next_state = {**state, "provider_state": "blocked", "export": "blocked", "message": "Export gate active: approve the human checkpoint before release."}
676
  elif not _generated_output_path(state):
677
+ next_state = {**state, "provider_state": "blocked", "export": "blocked", "message": "Export gate active: generate an artifact before preparing evidence."}
678
  elif scan.get("export_gate") != "clear" and not override_reason:
679
+ next_state = {**state, "provider_state": "blocked", "export": scan.get("export_gate", "blocked"), "message": "Export gate active: ST3GG is not clear. Add an explicit override reason to write an audit packet."}
680
  else:
681
  export_state = "clear" if scan.get("export_gate") == "clear" else "override"
682
  override_applies = scan.get("export_gate") != "clear" and bool(override_reason)
assets/readme/blackwell-runtime.png ADDED
assets/readme/governance-workflow.png ADDED
assets/readme/live-command-surface.png ADDED
assets/readme/model-catalog.png ADDED
assets/readme/real-flux-artifact.png ADDED
assets/readme/runtime-telemetry.png ADDED
assets/readme/wardrobe-controls.png ADDED
src/nexus_visual_weaver/render.py CHANGED
@@ -54,6 +54,31 @@ def _metric(label: str, value: str, tone: str = "neutral") -> str:
54
  return f'<div class="nw-metric nw-metric-{tone}"><small>{escape(label)}</small><strong>{escape(value)}</strong></div>'
55
 
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  def _env_configured(*names: str) -> bool:
58
  """
59
  Determine whether any of the provided environment variables are set and truthy.
@@ -211,7 +236,7 @@ def render_trust_strip(scan: dict | None = None, operator_state: dict | None = N
211
  <span>Every artifact must pass ST3GG scan, purification, and human checkpoint before release.</span>
212
  </div>
213
  <div class="nw-trust-card">{badge(f"ST3GG {status}", tone)}<span>{escape(str(findings[0]))}</span></div>
214
- <div class="nw-trust-card">{badge(f"EXPORT {export_gate}", "pass" if export_gate == "CLEAR" else "warn" if export_gate == "BLOCKED" else "muted")}<span>{escape(str(actions[0]))}</span></div>
215
  <div class="nw-trust-card">{badge(f"CHECKPOINT {checkpoint.upper()}", "pass" if checkpoint == "Approved" else "muted")}<span>Adult Mode never bypasses safety, consent, provenance, or dataset gates.</span></div>
216
  <div class="nw-trust-card nw-trust-examples">{badge("FIXTURE EVIDENCE", "cyan")}<span>Clean PNG -> pass. PNG trailing bytes -> blocked.</span></div>
217
  </section>
@@ -386,12 +411,26 @@ def render_workflow(run: GenerationRun | None = None, operator_state: dict | Non
386
  </g>
387
  """
388
  )
 
 
 
 
 
 
389
  return f"""
390
  <section class="nw-panel nw-canvas">
391
  <div class="nw-panel-head nw-canvas-head">
392
  <div><strong>Active Weave</strong><small><span class="nw-live-dot"></span> Live / Weave ID: 4f7c9e2b</small></div>
393
  <div class="nw-tools nw-static-tools"><span>Layout Auto</span><span>{icon("zoom")}</span><span>{icon("frame")}</span></div>
394
  </div>
 
 
 
 
 
 
 
 
395
  <svg class="nw-graph" viewBox="0 0 1110 530" role="img" aria-label="NEXUS workflow graph">
396
  <defs>
397
  <pattern id="nw-grid" width="12" height="12" patternUnits="userSpaceOnUse">
@@ -404,7 +443,7 @@ def render_workflow(run: GenerationRun | None = None, operator_state: dict | Non
404
  {"".join(cards)}
405
  </svg>
406
  <div class="nw-legend">
407
- {badge("Text Flow", "accent")} {badge("Refine Loop", "violet")} {badge("Policy Gate", "blue")} {badge("Media Flow", "cyan")} {badge("Human Gate", "warn")} {badge(provider_state.replace("_", " ").upper(), "pass" if provider_state == "exported" else "warn" if provider_state in {"blocked", "stopped"} else "muted")}
408
  </div>
409
  <div class="nw-weave-console">
410
  <div class="nw-console-card nw-console-primary">
@@ -457,7 +496,7 @@ def render_artifact_lane(run: GenerationRun | None = None, scan: dict | None = N
457
  outfit_label = "Outfit map"
458
  locate_label = "Grounding overlay"
459
  video_label = run.video.preset if run else "Video path"
460
- active_prompt = run.refined_prompt.refined[:150] if run else "Awaiting first weave. The preview stage shows dry-run handoff packets until provider output exists."
461
  checkpoint = operator_state.get("checkpoint", getattr(run.checkpoint, "recommendation", "pending") if run else "pending")
462
  provider_state = str(operator_state.get("provider_state", "dry-run" if run else "idle"))
463
  generation = operator_state.get("generation") or {}
@@ -470,7 +509,7 @@ def render_artifact_lane(run: GenerationRun | None = None, scan: dict | None = N
470
  "checkpointed": "Checkpointed",
471
  "export_ready": "Export Ready",
472
  "exported": "Exported",
473
- "blocked": "Blocked",
474
  "stopped": "Stopped",
475
  }.get(provider_state, provider_state.replace("_", " ").title())
476
  demo_seed = (run.checkpoint.checkpoint_id[-4:] if run else "0000").upper()
@@ -478,7 +517,7 @@ def render_artifact_lane(run: GenerationRun | None = None, scan: dict | None = N
478
  (prompt_label, "Taste-refined brief", "dry-run", "material-0", "01"),
479
  (outfit_label, "Wardrobe slots and locks", "checkpointed", "material-1", "02"),
480
  (locate_label, "LocateAnything region plan", "configured", "material-4", "03"),
481
- (video_label, "Checkpointed storyboard", "blocked" if scan.get("export_gate") == "blocked" or provider_state == "blocked" else "ready", "story-2", "04"),
482
  ]
483
  cards = "".join(
484
  f"""
@@ -487,7 +526,7 @@ def render_artifact_lane(run: GenerationRun | None = None, scan: dict | None = N
487
  <i class="nw-{texture}"></i>
488
  <strong>{escape(title)}</strong>
489
  <span>{escape(body)}</span>
490
- {badge(status.upper(), "warn" if status == "blocked" else "muted")}
491
  </div>
492
  """
493
  for title, body, status, texture, index in artifacts
@@ -497,8 +536,8 @@ def render_artifact_lane(run: GenerationRun | None = None, scan: dict | None = N
497
  return f"""
498
  <section class="nw-panel nw-artifacts">
499
  <div class="nw-panel-head">
500
- <div><strong>Artifact Preview Lane</strong><small>Honest handoff packets until a provider call succeeds</small></div>
501
- {badge(f"Export {export_gate}", "warn" if export_gate == "BLOCKED" else "pass" if export_gate == "CLEAR" else "muted")}
502
  </div>
503
  <div class="nw-preview-stage">
504
  <div class="nw-preview-frame">
@@ -518,7 +557,7 @@ def render_artifact_lane(run: GenerationRun | None = None, scan: dict | None = N
518
  <div class="nw-preview-ribbon">
519
  <span>{icon("security")} ST3GG before export</span>
520
  <span>{icon("wardrobe")} continuity: {escape(continuity)}</span>
521
- <span>{icon("models")} provider call remains checkpointed; state: dry-run / configured / blocked / failed / exported; current: {escape(provider_state)}</span>
522
  </div>
523
  <div class="nw-artifact-grid">{cards}</div>
524
  </section>
@@ -706,9 +745,9 @@ def render_provider_cards(relay_status: dict | None = None, adult_mode: bool = F
706
  optional_statuses = {
707
  "openbmb": "configured" if _provider_configured("MINICPM_BASE_URL", "MINICPM_API_KEY", "OPENBMB_API_KEY") else "missing secret",
708
  "nvidia": "configured" if _provider_configured("NEMOTRON_BASE_URL", "NEMOTRON_API_KEY", "NVIDIA_API_KEY") else "missing secret",
709
- "fal": "configured" if _env_configured("FAL_KEY") else "blocked",
710
- "netlify": "configured" if _env_configured("NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID", "OPENAI_BASE_URL") else "blocked",
711
- "cloudflare": "configured" if _env_configured("CLOUDFLARE_API_TOKEN", "CF_ACCOUNT_ID") else "blocked",
712
  }
713
  cards = []
714
  for decision in decisions[:5]:
@@ -721,7 +760,7 @@ def render_provider_cards(relay_status: dict | None = None, adult_mode: bool = F
721
  provider_state = "dry-run" if status == "ready" else "blocked" if status == "blocked" else "limited"
722
  if provider in optional_statuses:
723
  provider_state = optional_statuses[provider]
724
- tone = "pass" if provider_state == "configured" else "warn" if provider_state in {"limited", "blocked", "failed"} else "muted"
725
  gate = primary.get("license_gate", "unknown")
726
  cards.append(
727
  f"""
@@ -730,7 +769,7 @@ def render_provider_cards(relay_status: dict | None = None, adult_mode: bool = F
730
  <strong>{escape(repo)}</strong>
731
  <span>{escape(str(provider))} / {escape(str(gate))}</span>
732
  <i class="nw-provider-meter" style="--health:{'86' if provider_state in {'configured', 'dry-run'} else '52' if provider_state == 'limited' else '22'}"></i>
733
- <div>{badge(provider_state.upper(), tone)}{badge("CHECKPOINTED", "muted")}</div>
734
  </div>
735
  """
736
  )
@@ -742,9 +781,9 @@ def render_provider_cards(relay_status: dict | None = None, adult_mode: bool = F
742
  <div class="nw-provider-card nw-provider-optional">
743
  <small>optional gateway</small>
744
  <strong>{escape(provider.title())}</strong>
745
- <span>off by default / secrets required</span>
746
  <i class="nw-provider-meter" style="--health:{'74' if state == 'configured' else '18'}"></i>
747
- <div>{badge(state.upper(), "pass" if state == "configured" else "warn")}{badge("SPONSOR LANE" if provider in {"openbmb", "nvidia", "hf_nvidia"} else "NOT MVP DEFAULT", "muted")}</div>
748
  </div>
749
  """
750
  )
@@ -752,7 +791,7 @@ def render_provider_cards(relay_status: dict | None = None, adult_mode: bool = F
752
  return f"""
753
  <section class="nw-panel nw-providers">
754
  <div class="nw-panel-head">
755
- <div><strong>Provider Handoff Cards</strong><small>Configured as visible packets before any paid or gated call</small></div>
756
  {badge(mode_label.upper(), "warn" if adult_mode else "pass")}
757
  </div>
758
  <div class="nw-provider-grid">{"".join(cards)}</div>
@@ -811,7 +850,7 @@ def render_inspector(
811
  minicpm = operator_state.get("minicpm_judge") or {}
812
  nemotron = operator_state.get("nemotron_evidence") or {}
813
  sponsor_rows = "".join(
814
- f"<li><span>{escape(label)}</span><strong>{escape(str(result.get('status', 'pending')).upper())}</strong><em>{escape(str(result.get('repo_id', repo)))}</em></li>"
815
  for label, repo, result in [
816
  ("OpenBMB MiniCPM", "openbmb/MiniCPM-V-4.6", minicpm),
817
  ("NVIDIA Nemotron", "nvidia/NVIDIA-Nemotron-Parse-v1.2", nemotron),
@@ -906,7 +945,8 @@ def render_drawer(run: GenerationRun | None = None) -> str:
906
  def render_status_bar(operator_state: dict | None = None) -> str:
907
  space = _space_runtime_status()
908
  operator_state = operator_state or {}
909
- provider_state = str(operator_state.get("provider_state", "idle")).replace("_", " ").title()
 
910
  stop_class = "nw-stop-idle" if provider_state == "Idle" else "nw-stop-active"
911
  return f"""
912
  <footer class="nw-statusbar">
 
54
  return f'<div class="nw-metric nw-metric-{tone}"><small>{escape(label)}</small><strong>{escape(value)}</strong></div>'
55
 
56
 
57
+ def _display_state(value: str) -> str:
58
+ """Return user-facing state labels without changing machine state values."""
59
+ normalized = str(value or "").replace("_", " ").strip().lower()
60
+ labels = {
61
+ "blocked": "Export Gate Active",
62
+ "missing secret": "Optional - Secret Required",
63
+ "missing_secret": "Optional - Secret Required",
64
+ "export_ready": "Export Ready",
65
+ "configured": "CONFIGURED",
66
+ "dry-run": "Dry Run",
67
+ "dry run": "Dry Run",
68
+ "success": "SUCCESS",
69
+ }
70
+ return labels.get(normalized, normalized.title() if normalized else "Pending")
71
+
72
+
73
+ def _gate_label(export_gate: str) -> str:
74
+ normalized = str(export_gate or "pending").upper()
75
+ if normalized == "BLOCKED":
76
+ return "Export Blocked - Override Available"
77
+ if normalized == "CLEAR":
78
+ return "EXPORT CLEAR"
79
+ return f"EXPORT {normalized}"
80
+
81
+
82
  def _env_configured(*names: str) -> bool:
83
  """
84
  Determine whether any of the provided environment variables are set and truthy.
 
236
  <span>Every artifact must pass ST3GG scan, purification, and human checkpoint before release.</span>
237
  </div>
238
  <div class="nw-trust-card">{badge(f"ST3GG {status}", tone)}<span>{escape(str(findings[0]))}</span></div>
239
+ <div class="nw-trust-card">{badge(_gate_label(export_gate), "pass" if export_gate == "CLEAR" else "warn" if export_gate == "BLOCKED" else "muted")}<span>{escape(str(actions[0]))}</span></div>
240
  <div class="nw-trust-card">{badge(f"CHECKPOINT {checkpoint.upper()}", "pass" if checkpoint == "Approved" else "muted")}<span>Adult Mode never bypasses safety, consent, provenance, or dataset gates.</span></div>
241
  <div class="nw-trust-card nw-trust-examples">{badge("FIXTURE EVIDENCE", "cyan")}<span>Clean PNG -> pass. PNG trailing bytes -> blocked.</span></div>
242
  </section>
 
411
  </g>
412
  """
413
  )
414
+ generation = operator_state.get("generation") or {}
415
+ generated = isinstance(generation, dict) and generation.get("status") == "success"
416
+ output_summary = "Real FLUX.2 Klein 9B artifact generated" if generated else "Awaiting generated artifact"
417
+ checkpoint_summary = _display_state(checkpoint_status)
418
+ export_summary = _display_state(str(operator_state.get("export", provider_state)))
419
+ next_summary = "Add override reason or complete review" if provider_state == "blocked" else action_label
420
  return f"""
421
  <section class="nw-panel nw-canvas">
422
  <div class="nw-panel-head nw-canvas-head">
423
  <div><strong>Active Weave</strong><small><span class="nw-live-dot"></span> Live / Weave ID: 4f7c9e2b</small></div>
424
  <div class="nw-tools nw-static-tools"><span>Layout Auto</span><span>{icon("zoom")}</span><span>{icon("frame")}</span></div>
425
  </div>
426
+ <div class="nw-run-summary">
427
+ <strong>Current Run Summary</strong>
428
+ <span><b>Output</b>{escape(output_summary)}</span>
429
+ <span><b>Security</b>ST3GG review active</span>
430
+ <span><b>Checkpoint</b>{escape(checkpoint_summary)}</span>
431
+ <span><b>Export</b>{escape(export_summary)}</span>
432
+ <span><b>Next</b>{escape(next_summary)}</span>
433
+ </div>
434
  <svg class="nw-graph" viewBox="0 0 1110 530" role="img" aria-label="NEXUS workflow graph">
435
  <defs>
436
  <pattern id="nw-grid" width="12" height="12" patternUnits="userSpaceOnUse">
 
443
  {"".join(cards)}
444
  </svg>
445
  <div class="nw-legend">
446
+ {badge("Text Flow", "accent")} {badge("Refine Loop", "violet")} {badge("Policy Gate", "blue")} {badge("Media Flow", "cyan")} {badge("Human Gate", "warn")} {badge(_display_state(provider_state), "pass" if provider_state == "exported" else "warn" if provider_state in {"blocked", "stopped"} else "muted")}
447
  </div>
448
  <div class="nw-weave-console">
449
  <div class="nw-console-card nw-console-primary">
 
496
  outfit_label = "Outfit map"
497
  locate_label = "Grounding overlay"
498
  video_label = run.video.preset if run else "Video path"
499
+ active_prompt = run.refined_prompt.refined[:150] if run else "Awaiting first weave. Real output and export evidence appear here after generation."
500
  checkpoint = operator_state.get("checkpoint", getattr(run.checkpoint, "recommendation", "pending") if run else "pending")
501
  provider_state = str(operator_state.get("provider_state", "dry-run" if run else "idle"))
502
  generation = operator_state.get("generation") or {}
 
509
  "checkpointed": "Checkpointed",
510
  "export_ready": "Export Ready",
511
  "exported": "Exported",
512
+ "blocked": "Export Gate Active",
513
  "stopped": "Stopped",
514
  }.get(provider_state, provider_state.replace("_", " ").title())
515
  demo_seed = (run.checkpoint.checkpoint_id[-4:] if run else "0000").upper()
 
517
  (prompt_label, "Taste-refined brief", "dry-run", "material-0", "01"),
518
  (outfit_label, "Wardrobe slots and locks", "checkpointed", "material-1", "02"),
519
  (locate_label, "LocateAnything region plan", "configured", "material-4", "03"),
520
+ (video_label, "Checkpointed storyboard", "deferred" if scan.get("export_gate") == "blocked" or provider_state == "blocked" else "ready", "story-2", "04"),
521
  ]
522
  cards = "".join(
523
  f"""
 
526
  <i class="nw-{texture}"></i>
527
  <strong>{escape(title)}</strong>
528
  <span>{escape(body)}</span>
529
+ {badge("Gated" if status == "deferred" else status.upper(), "warn" if status in {"blocked", "deferred"} else "muted")}
530
  </div>
531
  """
532
  for title, body, status, texture, index in artifacts
 
536
  return f"""
537
  <section class="nw-panel nw-artifacts">
538
  <div class="nw-panel-head">
539
+ <div><strong>Artifact Preview Lane</strong><small>Real output and export evidence appear here</small></div>
540
+ {badge(_gate_label(export_gate), "warn" if export_gate == "BLOCKED" else "pass" if export_gate == "CLEAR" else "muted")}
541
  </div>
542
  <div class="nw-preview-stage">
543
  <div class="nw-preview-frame">
 
557
  <div class="nw-preview-ribbon">
558
  <span>{icon("security")} ST3GG before export</span>
559
  <span>{icon("wardrobe")} continuity: {escape(continuity)}</span>
560
+ <span>{icon("models")} provider call remains checkpointed; state: dry-run / configured / gated / failed / exported; current: {escape(_display_state(provider_state))}</span>
561
  </div>
562
  <div class="nw-artifact-grid">{cards}</div>
563
  </section>
 
745
  optional_statuses = {
746
  "openbmb": "configured" if _provider_configured("MINICPM_BASE_URL", "MINICPM_API_KEY", "OPENBMB_API_KEY") else "missing secret",
747
  "nvidia": "configured" if _provider_configured("NEMOTRON_BASE_URL", "NEMOTRON_API_KEY", "NVIDIA_API_KEY") else "missing secret",
748
+ "fal": "configured" if _env_configured("FAL_KEY") else "deferred",
749
+ "netlify": "configured" if _env_configured("NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID", "OPENAI_BASE_URL") else "deferred",
750
+ "cloudflare": "configured" if _env_configured("CLOUDFLARE_API_TOKEN", "CF_ACCOUNT_ID") else "deferred",
751
  }
752
  cards = []
753
  for decision in decisions[:5]:
 
760
  provider_state = "dry-run" if status == "ready" else "blocked" if status == "blocked" else "limited"
761
  if provider in optional_statuses:
762
  provider_state = optional_statuses[provider]
763
+ tone = "pass" if provider_state == "configured" else "warn" if provider_state in {"limited", "failed"} else "muted"
764
  gate = primary.get("license_gate", "unknown")
765
  cards.append(
766
  f"""
 
769
  <strong>{escape(repo)}</strong>
770
  <span>{escape(str(provider))} / {escape(str(gate))}</span>
771
  <i class="nw-provider-meter" style="--health:{'86' if provider_state in {'configured', 'dry-run'} else '52' if provider_state == 'limited' else '22'}"></i>
772
+ <div>{badge(_display_state(provider_state), tone)}{badge("CHECKPOINTED", "muted")}</div>
773
  </div>
774
  """
775
  )
 
781
  <div class="nw-provider-card nw-provider-optional">
782
  <small>optional gateway</small>
783
  <strong>{escape(provider.title())}</strong>
784
+ <span>optional lane / secrets required</span>
785
  <i class="nw-provider-meter" style="--health:{'74' if state == 'configured' else '18'}"></i>
786
+ <div>{badge(_display_state(state), "pass" if state == "configured" else "muted")}{badge("SPONSOR LANE" if provider in {"openbmb", "nvidia", "hf_nvidia"} else "DEFERRED", "muted")}</div>
787
  </div>
788
  """
789
  )
 
791
  return f"""
792
  <section class="nw-panel nw-providers">
793
  <div class="nw-panel-head">
794
+ <div><strong>Optional Provider Lanes</strong><small>Visible capability cards; success is claimed only after configured calls</small></div>
795
  {badge(mode_label.upper(), "warn" if adult_mode else "pass")}
796
  </div>
797
  <div class="nw-provider-grid">{"".join(cards)}</div>
 
850
  minicpm = operator_state.get("minicpm_judge") or {}
851
  nemotron = operator_state.get("nemotron_evidence") or {}
852
  sponsor_rows = "".join(
853
+ f"<li><span>{escape(label)}</span><strong>{escape(_display_state(str(result.get('status', 'pending'))))}</strong><em>{escape(str(result.get('repo_id', repo)))}</em></li>"
854
  for label, repo, result in [
855
  ("OpenBMB MiniCPM", "openbmb/MiniCPM-V-4.6", minicpm),
856
  ("NVIDIA Nemotron", "nvidia/NVIDIA-Nemotron-Parse-v1.2", nemotron),
 
945
  def render_status_bar(operator_state: dict | None = None) -> str:
946
  space = _space_runtime_status()
947
  operator_state = operator_state or {}
948
+ raw_provider_state = str(operator_state.get("provider_state", "idle"))
949
+ provider_state = _display_state(raw_provider_state)
950
  stop_class = "nw-stop-idle" if provider_state == "Idle" else "nw-stop-active"
951
  return f"""
952
  <footer class="nw-statusbar">
src/nexus_visual_weaver/styles.py CHANGED
@@ -281,8 +281,41 @@ footer { display: none !important; }
281
  white-space: nowrap;
282
  }
283
  .nw-mini-chip { width: fit-content; min-height: 22px; padding: 2px 7px; }
284
- .nw-canvas { overflow: hidden; height: 570px; }
285
- .nw-graph { width: 100%; min-height: 548px; display: block; background: #070b0f; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
286
  .nw-edges path {
287
  fill: none;
288
  stroke: var(--nw-cyan);
 
281
  white-space: nowrap;
282
  }
283
  .nw-mini-chip { width: fit-content; min-height: 22px; padding: 2px 7px; }
284
+ .nw-canvas { overflow: hidden; height: auto; min-height: 570px; }
285
+ .nw-run-summary {
286
+ margin: 10px 12px 0;
287
+ display: grid;
288
+ grid-template-columns: 1.1fr repeat(5, minmax(120px, 1fr));
289
+ gap: 8px;
290
+ align-items: stretch;
291
+ }
292
+ .nw-run-summary > strong,
293
+ .nw-run-summary > span {
294
+ min-height: 48px;
295
+ border: 1px solid var(--nw-line);
296
+ border-radius: 6px;
297
+ background:
298
+ linear-gradient(135deg, rgba(38,215,130,.08), transparent 46%),
299
+ rgba(255,255,255,.018);
300
+ padding: 8px 9px;
301
+ display: grid;
302
+ align-content: center;
303
+ gap: 2px;
304
+ color: var(--nw-text);
305
+ font-size: 11px;
306
+ line-height: 1.25;
307
+ }
308
+ .nw-run-summary > strong {
309
+ border-color: rgba(38,215,130,.34);
310
+ color: var(--nw-green);
311
+ font-size: 12px;
312
+ }
313
+ .nw-run-summary b {
314
+ color: var(--nw-muted);
315
+ font-size: 10px;
316
+ text-transform: uppercase;
317
+ }
318
+ .nw-graph { width: 100%; min-height: 470px; display: block; background: #070b0f; }
319
  .nw-edges path {
320
  fill: none;
321
  stroke: var(--nw-cyan);
tests/test_command_center.py CHANGED
@@ -158,20 +158,21 @@ def test_dashboard_regions_expose_artifacts_and_provider_cards() -> None:
158
  assert "nw-preview-ribbon" in regions["artifacts"]
159
  assert "PRIMARY OUTPUT STAGE" in regions["artifacts"]
160
  assert "JUDGE-SAFE DEMO OUTPUT" in regions["artifacts"]
161
- assert "state: dry-run / configured / blocked / failed" in regions["artifacts"]
162
  assert "Forge Operations" in regions["operations"]
163
- assert "Provider Handoff Cards" in regions["providers"]
164
  assert "nw-provider-meter" in regions["providers"]
165
  assert "optional gateway" in regions["providers"]
166
  assert "CHECKPOINTED" in regions["providers"]
167
  assert "Forge Operations" in regions["operations"]
168
- assert "Provider Handoff Cards" in regions["providers"]
169
  assert "nw-provider-meter" in regions["providers"]
170
  assert "Selected: Forge" in regions["command_rail"]
171
  assert "TRUST MODEL" in regions["topbar"]
172
  assert "Clean PNG -> pass" in regions["topbar"]
173
  assert "ST3GG Scan" in regions["inspector"]
174
  assert "nw-weave-console" in regions["workflow"]
 
175
  assert "Hackathon Signal" in regions["workflow"]
176
  assert "Boots / heels" in regions["drawer"]
177
  assert "checkpointed" in regions["drawer"]
@@ -284,7 +285,7 @@ def test_render_trust_strip_review_scan_shows_blocked_export() -> None:
284
  html = render_trust_strip(scan=scan)
285
 
286
  assert "ST3GG REVIEW" in html
287
- assert "EXPORT BLOCKED" in html
288
  assert "trailing data after IEND" in html
289
 
290
 
@@ -364,7 +365,7 @@ def test_render_inspector_with_missing_secret_shows_pending() -> None:
364
  }
365
  html = render_inspector(operator_state=operator_state)
366
 
367
- assert "MISSING_SECRET" in html
368
 
369
 
370
  def test_render_inspector_with_success_judge_shows_success_status() -> None:
@@ -407,7 +408,7 @@ def test_render_provider_cards_shows_missing_secret_for_unconfigured_sponsor(mon
407
  monkeypatch.delenv("NVIDIA_API_KEY", raising=False)
408
  html = render_provider_cards()
409
 
410
- assert "MISSING SECRET" in html
411
 
412
 
413
  def test_render_provider_cards_configured_openbmb_shows_configured(monkeypatch) -> None:
@@ -423,7 +424,7 @@ def test_render_provider_cards_configured_openbmb_shows_configured(monkeypatch)
423
  html = render_provider_cards()
424
 
425
  assert "CONFIGURED" not in html
426
- assert "MISSING SECRET" in html
427
 
428
 
429
  def test_render_provider_cards_configured_openbmb_requires_key_and_base_url(monkeypatch) -> None:
 
158
  assert "nw-preview-ribbon" in regions["artifacts"]
159
  assert "PRIMARY OUTPUT STAGE" in regions["artifacts"]
160
  assert "JUDGE-SAFE DEMO OUTPUT" in regions["artifacts"]
161
+ assert "state: dry-run / configured / gated / failed" in regions["artifacts"]
162
  assert "Forge Operations" in regions["operations"]
163
+ assert "Optional Provider Lanes" in regions["providers"]
164
  assert "nw-provider-meter" in regions["providers"]
165
  assert "optional gateway" in regions["providers"]
166
  assert "CHECKPOINTED" in regions["providers"]
167
  assert "Forge Operations" in regions["operations"]
168
+ assert "Optional Provider Lanes" in regions["providers"]
169
  assert "nw-provider-meter" in regions["providers"]
170
  assert "Selected: Forge" in regions["command_rail"]
171
  assert "TRUST MODEL" in regions["topbar"]
172
  assert "Clean PNG -> pass" in regions["topbar"]
173
  assert "ST3GG Scan" in regions["inspector"]
174
  assert "nw-weave-console" in regions["workflow"]
175
+ assert "Current Run Summary" in regions["workflow"]
176
  assert "Hackathon Signal" in regions["workflow"]
177
  assert "Boots / heels" in regions["drawer"]
178
  assert "checkpointed" in regions["drawer"]
 
285
  html = render_trust_strip(scan=scan)
286
 
287
  assert "ST3GG REVIEW" in html
288
+ assert "Export Blocked - Override Available" in html
289
  assert "trailing data after IEND" in html
290
 
291
 
 
365
  }
366
  html = render_inspector(operator_state=operator_state)
367
 
368
+ assert "Optional - Secret Required" in html
369
 
370
 
371
  def test_render_inspector_with_success_judge_shows_success_status() -> None:
 
408
  monkeypatch.delenv("NVIDIA_API_KEY", raising=False)
409
  html = render_provider_cards()
410
 
411
+ assert "Optional - Secret Required" in html
412
 
413
 
414
  def test_render_provider_cards_configured_openbmb_shows_configured(monkeypatch) -> None:
 
424
  html = render_provider_cards()
425
 
426
  assert "CONFIGURED" not in html
427
+ assert "Optional - Secret Required" in html
428
 
429
 
430
  def test_render_provider_cards_configured_openbmb_requires_key_and_base_url(monkeypatch) -> None: