Add StepName.BLENDER_CINEMATIC and full graph runtime support so cinematic
output types can be promoted from legacy_only to graph/shadow rollout mode.
- process_steps.py: add BLENDER_CINEMATIC = "blender_cinematic" enum value
- workflow_executor.py: map to render_cinematic_task in STEP_TASK_MAP
- workflow_node_registry.py: node definition with render/scene/camera fields
(no animation params — cinematic is fixed at 250 frames @ 25fps)
- workflow_graph_runtime.py: _ORDER_LINE_RENDER_STEPS, _CINEMATIC_TASK_KEYS,
shadow queue routing, predict_render_output_artifact (mp4),
_build_task_kwargs, _artifact_kind_override_for_step
- tasks.py: _normalize_cinematic_params + render_cinematic_task Celery task
(calls render_cinematic_to_file, publishes as turntable asset type since mp4)
No DB migration needed: admins can now manually set cinematic output types
to graph rollout mode via the admin panel and assign a workflow definition.
docs: learnings erfasst — BLENDER_CINEMATIC workflow graph node M1
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
L18: remove comingSoon from email notification channel (SMTP backend already exists).
L19: remove console.debug useEffect from InlineCadViewer.tsx.
L20: sync ROADMAP.md priority status sections (P1/P2/P3/P8) with status snapshot — all Done.
L22: replace 8 bare except blocks in step_processor.py with logger.debug/warning
so geometry calculation failures are visible in logs instead of silently discarded.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
M3: cors_origins setting in config.py (env CORS_ORIGINS); main.py reads from settings.
M4: add build_order_line_step_render_dir() to render_paths.py; tasks.py drops placeholder.mp4 trick.
M5: unknown workflow graph nodes now fail the run (status="failed" + logger.error) instead of silently skipping.
M6: invoice line description is now "{product} — {output_type}" instead of bare UUID; eager-loads relations.
M7: order_number_prefix setting in config.py (env ORDER_NUMBER_PREFIX, default "SA").
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
H1: model_validator in Settings raises ValueError when jwt_secret_key is
"changeme" and the process is running inside a container — fast-fail
prevents insecure deployments; local dev outside Docker is unaffected.
H7: generate_order_number now acquires pg_advisory_xact_lock before SELECT MAX,
matching the same pattern used in generate_invoice_number (billing/service.py).
Concurrent order creation can no longer race to produce duplicate numbers.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
H4: add internal_api_base_url setting to config.py (default http://localhost:8888,
env-overridable via INTERNAL_API_BASE_URL); replace all 5 hardcoded base_url
strings in chat_service.py.
H6: add post-read size check in both Excel and STEP upload handlers;
raises HTTP 413 when content exceeds settings.max_upload_size_mb.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
H2: list_invoices now passes tenant_id (from current_user) to get_invoices;
get_invoices applies WHERE tenant_id filter for non-global-admin users;
get_invoice_endpoint returns 404 when tenant mismatch for non-admins.
H3: InvoiceStatusUpdate.status changed to Literal["draft","sent","paid","cancelled"]
for schema-level validation; guard also added in update_invoice_status service.
H5: _settings_to_out masks smtp_password as "***" when set, "" when empty;
update_settings skips writing when value is the "***" sentinel.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
_render_turntable: Option B — resolved objects as params (render_invocation, step_path,
output_path, template, emit, pl). Session and PipelineLogger stay in the caller so
no second DB connection is opened and log steps roll up to the main task.
_handle_render_task_exhausted: extracted 68-line mark-as-failed block; retry/raise
logic with Celery self.retry stays in render_order_line_task since it needs the
bound-task context.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Save button disabled for non-admins (canSave prop threaded through
WorkflowEditor → WorkflowCanvas → WorkflowCanvasToolbar); tooltip
explains why when hovered
- Optimistic concurrency: migration 072 adds updated_at to
workflow_definitions; PUT /workflows/:id returns 409 when client sends
a stale updated_at; frontend shows a specific reload-prompt toast
- _legacy_dispatch now routes through dispatch_order_line_render instead
of calling render_order_line_task directly, so cancelled/rejected
order lines are skipped before queueing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
canonicalize_workflow_config was silently rebuilding any workflow with
ui.blueprint or ui.preset == still_graph from the canonical template on
every save, preflight, and read — making blueprint-based workflows
effectively read-only.
Add preserve_user_graph=True flag that skips the rebuild blocks. Only
create_workflow still uses preserve_user_graph=False so blueprints are
correctly expanded at creation time.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds app_name and app_subtitle as system settings with a dedicated
Branding tab in the Admin panel. Both values are served via a public
GET /api/admin/branding endpoint (no auth) so the login page can also
show the configured name before the user signs in.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Migration 070: seeds 'Cinematic Highlight' output type (legacy_only, no
workflow link) for fresh installs
- Migration 071: patches existing cinematic output types — clears
workflow_definition_id and forces legacy_only rollout mode. The row
existed since 2026-03 with shadow mode + a linked workflow def;
no BLENDER_CINEMATIC graph node exists so shadow execution would fail.
- API guard in output_types POST + PATCH: cinematic output types cannot
receive a workflow_definition_id (HTTP 400)
- Defense-in-depth in dispatch_service: early legacy exit if
render_settings.cinematic is true, regardless of rollout mode
- docs: learning erfasst — cinematic rollout mode footgun
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three bugs causing all cinematic renders to silently fall through to the
turntable path and then immediately crash:
1. is_cinematic read from filtered invocation-override dict — 'cinematic' key
is not in the allowed override key list for turntable_video, so it gets
stripped. Fixed: read directly from output_type.render_settings.
2. render_turntable_to_file and render_cinematic_to_file both call
usd_path.exists() but receive a str from the caller. Added the same
isinstance str→Path conversion that render_still_to_file already had.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Completed renders no longer overwrite a cancelled status — a Blender job
that finishes after a cancel is issued is now silently dropped instead of
flipping the line back to completed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- `render_cinematic_to_file` referenced undefined `stdout`/`stderr` in the
Blender error path; replaced with `log_lines`/`stderr_lines` so the real
Blender error is actually stored in render_log instead of a Python NameError
- Progress callback hardcoded 480 frames; now uses the `frame_count` variable
- Updated docstring to reflect actual 250 frames @ 25fps (not 480 @ 24fps)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Added product_material filter to find_product_renders:
- Searches cad_part_materials JSONB for materials assigned to CAD parts
- find_product_renders(transparent_only=true, product_material="Durotect")
→ finds 9 products that naturally have Durotect parts with transparent renders
Two material levels explained in system prompt rule 13:
- product_material: materials from STEP/Excel (Durotect_M, Stahl, Bronze)
- material_override: single material forced on ALL parts at render time
AI now searches product_material FIRST when user asks "with Durotect material"
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rule 13: when searching with multiple criteria (transparent + Durotect),
decompose the search. Show what exists (1220 transparent renders) and
explain what's missing (no Durotect material applied). Never say
"no renders found" when transparent renders DO exist.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
find_product_renders now reads actual render metadata from the
render_log JSONB (stored at render time) via COALESCE fallback:
- engine: render_log.engine_used > render_log.engine > output_type setting
- width/height: render_log > output_type.render_settings
- samples: render_log > output_type.render_settings
- render_type: still/turntable/cinematic from render_log.type
- has_template: whether a .blend template was used
All past renderings now have correct metadata without re-processing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
find_product_renders now returns full render job metadata:
- material_override (effective: line override > output type override)
- output_format (with render_overrides applied)
- resolution (width x height)
- engine, samples
- order_number + order_id (for linking)
- is_animation flag
New material_override filter: search renders by material name
(e.g. transparent_only=true, material_override="Durotect" finds
renders with Durotect material on transparent background)
AI can now answer: "Show me a transparent Durotect render" by filtering
both transparency AND material in one query.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Explicitly listed all write tools that require confirmation:
create_order, dispatch_renders, set_material_override, set_render_overrides
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split rules into read-only vs write actions:
- READ (search, list, show images, status): execute immediately
- WRITE (create orders, dispatch, set overrides): ALWAYS ask for
confirmation before executing
Prevents accidental render job creation from casual questions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
System prompt rule 12: always format product mentions as
[ProductName](/products/UUID) and orders as [OrderNumber](/orders/UUID).
ReactMarkdown in ChatPanel already renders these as clickable links
with accent color styling, so users can navigate directly from chat.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>