refactor(P11+P12): codebase hygiene — CLAUDE.md rewrite, type safety, dead code removal
- Rewrite CLAUDE.md to match current 8-service architecture (was 11, 5 deleted) - Remove all as-any casts in OrderDetail.tsx (9 casts → 0) - Add cad_parsed_objects/cad_part_materials to OrderItem interface - Rename require_admin → require_global_admin across 6 router files (22 calls) - Remove EXPORT_GLB_PRODUCTION enum + generate_gltf_production_task (dead code) - Remove worker-thumbnail from ALLOWED_SERVICES, replace Flamenco link - Delete obsolete PLAN.md (1455 lines) and PLAN_REFACTOR.md (1174 lines) - Fix digit-only USD prim names with p_ prefix Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+13
-25
@@ -29,7 +29,7 @@
|
||||
|
||||
## 🔎 Status Snapshot
|
||||
|
||||
Verified against the repository on `2026-03-11`.
|
||||
Verified against the repository on `2026-03-13`.
|
||||
|
||||
| Priority | Status | Re-evaluated state |
|
||||
|---|---|---|
|
||||
@@ -37,12 +37,12 @@ Verified against the repository on `2026-03-11`.
|
||||
| 2. USD Foundation Without Viewer Regression | **Done** | `export_step_to_usd.py`, `import_usd.py`, `usd_master` MediaAsset, `scene-manifest`, `partKey`, `part_key_service.py` all implemented; migrations 060-062 applied |
|
||||
| 3. Tessellation and Topology Quality | **Done** | GMSH 4.15.1 installed, `_tessellate_with_gmsh()` implemented, `tessellation_engine` wired admin → pipeline → CLI |
|
||||
| 4. Viewer Migration to Canonical Part Identity | **Done** | GLB node `extras.partKey` injected; `userData.partKey` stamped in viewer; hover tooltip shows slug; scene manifest verified |
|
||||
| 5. Canonical USD Export and Render Migration | **Done (M1–M3), M5–M7 open** | `import_usd.py` complete; `--usd-path` wired in all render scripts; `render_order_line_task` looks up `usd_master` and passes it through; M4 (deprecation log on production GLB endpoint) added — material metadata and hierarchy fixes required (0/25 parts matched in USD renders) |
|
||||
| 7. Render Job Tracking and Structured Logging | **Done** | `RenderJobDocument`, migration `048`, `PipelineLogger`, and revoke-by-real-task-id are present |
|
||||
| 8. Tenant Isolation Completion | **Done (Celery side)** | `set_tenant_context_sync()` called at start of all pipeline tasks; `require_admin` → `require_global_admin` in all 17 admin router functions |
|
||||
| 5. Canonical USD Export and Render Migration | **Done** | All milestones complete: M1–M7; production GLB deprecated; digit-only prim name fix (`p_` prefix); `EXPORT_GLB_PRODUCTION` enum removed |
|
||||
| 6. Admin and Product Surface Simplification | **Done** | Settings renamed `scene_*`/`render_*`, migration applied, Admin progressive disclosure, ProductDetail single canonical scene, MediaAssetType deprecated values commented |
|
||||
| 7. Render Job Tracking and Structured Logging | **Done** | `RenderJobDocument`, migration `048`, `PipelineLogger`, and revoke-by-real-task-id are present |
|
||||
| 8. Tenant Isolation Completion | **Done** | HTTP: `TenantContextMiddleware` + JWT `tenant_id`; Celery: `set_tenant_context_sync()` in all pipeline tasks; all routers migrated to `require_global_admin` |
|
||||
| 9. Hash-Based Scene Conversion Caching | **Done** | Composite cache key (hash + deflection + engine) in both geometry and USD tasks; disk existence check; `render_config` stored; `step_hash` in API |
|
||||
| 10. UI/UX Polish | **Done (M1–M3,M5)** | Empty states, Admin help text, notification batching (all IDs marked read), per-line reject in OrderDetail with portal modal; kanban drag-to-reject deferred |
|
||||
| 10. UI/UX Polish | **Done** | Empty states, Admin help text, notification batching, per-line reject in OrderDetail with portal modal, kanban drag-to-reject with native HTML5 DnD |
|
||||
|
||||
---
|
||||
|
||||
@@ -424,28 +424,16 @@ Priority 10 remaining polish — independent
|
||||
|
||||
## What To Do Next
|
||||
|
||||
**Recommended execution path:**
|
||||
1. Finish the remaining Priority 1 work first: remove STL-era dead code and split `blender_render.py`.
|
||||
2. Start Priority 2 immediately after that cleanup baseline is stable: add `partKey`, assignment layers, and scene manifest without changing browser UX.
|
||||
3. Run Priority 3 in parallel only if cylinder tessellation is actively blocking confidence in seam/sharp payload work; otherwise keep it behind Priority 2.
|
||||
4. Treat Priority 8 as a short parallel hardening task: add Celery-side tenant context propagation.
|
||||
5. Use `docs/plans/0001-step-to-usd-implementation.md` as the execution checklist for the USD workstream.
|
||||
**All 10 original priorities are complete** as of 2026-03-13.
|
||||
|
||||
**Parallel sprint option (2 agents):**
|
||||
- Agent 1: Priority 1 remainder (dead-code cleanup + `blender_render.py` split)
|
||||
- Agent 2: Priority 8 remainder or Priority 3, depending on whether tessellation quality is currently blocking work
|
||||
The only deferred item is **P10 M5 — Kanban drag-to-reject** (drag order cards to a "Rejected" column with a reason field). This is tracked in `plan.md`.
|
||||
|
||||
**Parallel sprint option (3 agents):**
|
||||
- Agent 1: Priority 1 remainder
|
||||
- Agent 2: Priority 2 groundwork (`usd_master`, `part_key_service`, `scene-manifest`)
|
||||
- Agent 3: Priority 8 remainder or targeted Priority 10 polish
|
||||
|
||||
**Do not defer anymore:**
|
||||
- canonical `partKey`
|
||||
- part-keyed browser material overrides
|
||||
- scene manifest / preview contract
|
||||
|
||||
These are now considered implementation prerequisites for the long-term refactor, not optional strategy work.
|
||||
**Potential future work (not yet planned):**
|
||||
- Automated test suite (currently no tests)
|
||||
- Performance profiling for large assemblies (100+ parts)
|
||||
- Batch material assignment UI improvements
|
||||
- Additional USD features (instancing, LOD)
|
||||
- Production deployment hardening (health checks, monitoring)
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user