feat: geometry repair pipeline backend (inspect/repair, repair decisions, simulation compatibility) - #143
Open
dhimashary wants to merge 42 commits into
Open
Conversation
…eSchema fix(geometry_service): update issue file naming convention in inspect pipeline
…e repair pipeline return value
…t repair status handling
- Add GeometryProcessingStatus enum and Model.geometryStatus/geometryProgress columns - Move inspect+repair pipeline into process_model_geometry @shared_task - create_new_model now commits the model then dispatches the task (returns immediately, avoids gunicorn worker timeout and rolled-back transactions) - Build upload URLs via file_service.upload_dir() instead of request.host_url (no request context in worker) - Report coarse stage-based progress (5/35/90/100) - Expose geometryStatus/geometryProgress in model schemas - Add plan.md documenting the strategy
…with failed pipelines
… inspect and repair tasks
…l and repaired geometry stages
…epaired geometry based on repair status
…t for specific geometry version
- Add _load_validation_callable() to dynamically import validation modules - Add _run_method_validation() to execute validation and handle errors safely - Update _method_result() to apply validation override with reason - Update _compatibility_block() to resolve geometry input file for validation - Update get_simulation_compatibility() to carry methodValidation in method dict - Add reason field to ModelMethodCompatibilitySchema
- Validation result now combines with generic verdict using AND logic - Result is compatible only if BOTH generic and validation are compatible - If either is incompatible, final result is incompatible - Reason is included when validation runs - Uses worst-case severity ranking for merged verdict
…te processing logic
…or response for non-existent model
… libraries from dev
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Geometry Repair Pipeline – Backend
Adds backend support for the geometry inspection & repair workflow: a unified
inspect+repair pipeline run in the background, per-model repair decisions,
stage-aware simulation compatibility, and variant-aware model downloads.
New endpoints
POST /models/:id/repair-decision— accept/reject repaired geometry.Accepting switches the model's active geometry (viewer URL + simulation
.geo/.msh) to the repaired files; rejecting reverts to the original.POST /models/:id/reprocess-geometry— re-run the pipeline (e.g. after afailure). Clears stale issues + repair decision, resets status to
Pending,redispatches the background task (202).
GET /models/:id/simulation-compatibility— per-method compatibility forthe model, returning both
initialCompatibility(AfterUpload) andrepairedCompatibility(AfterRepair).GET /models/:id/download?variant=repaired|initial— download the model's.obj; defaults to repaired if accepted, else original.GET /geometry/simulation-compatibility— baseline per-method compatibilitymerged with each method's override.
Pipeline & processing
background Celery task.
GeometryProcessingStatus(Pending / Processing /Completed / Failed),
RepairStatus(Pending / Accepted / Rejected),DetectionStage(AfterUpload / AfterRepair).geometry_compatibility_serviceresolving method-specific geometryvalidation across stages.
Data model / schemas
Model: added geometry processing status + repair status tracking.ModelIssue: addedgeometryPath,modelFileUrl/fileUrlexposure, andissueCount(fixed initialization viadump_default).variant), simulationcompatibility (model + baseline).
Fixes
Number→Integer; unknown-model responses404→400.obj → 3dm/geoconversion no longer creates unneeded/merged triangles.builderstage compilesthe native
volume_detector(CGAL/Eigen) from the geometry-pipeline submoduleand the
finalstage copies just the binary.notes