Parameters for applyFixes.

interface ApplyFixesParams {
    codes?: string[];
    fixOverrides?: Record<string, unknown>;
    onProgress?: (progress: ApplyFixesProgress) => void;
    registry?: FixRegistry;
    report: inspect.sceneModel.InspectionReport;
    sceneModel: SceneModel;
    signal?: AbortSignal;
}

Properties

codes?: string[]

Whitelist of issue codes to fix. When omitted, every code that has a matching strategy in the registry is fixed. Useful when fixing incrementally — e.g. fix only OBJECT_DANGLING_MESH first to settle reference integrity, then re-inspect, then fix GEOMETRY_DUPLICATE once the report is clean of errors.

fixOverrides?: Record<string, unknown>

Flat per-call override bag for the registry's fix configs. Each fix that declares a ConfigSchema reads its keys from here — in the current shape, that's a single enable<FixName> boolean per fix that flips the strategy off (default: on). Future per-fix knobs (a degeneracy epsilon, a split-axis choice) get added to the same flat bag with whatever keys those fix schemas declare.

applyFixes({
sceneModel,
report,
fixOverrides: {
enableSplitDenseGeometry: false, // skip this fix
enableMergeDuplicateVertices: false,
},
});

Mirrors how inspection params surface inspection-side overrides as flat fields on the params bag. Unknown keys are ignored — the schema is the list of recognised knobs.

onProgress?: (progress: ApplyFixesProgress) => void

Optional progress callback fired by applyFixesAsync. Called with phase: "before" ahead of each issue's strategy dispatch, phase: "after" once it resolves, and once more at completion. The synchronous applyFixes ignores this field.

registry?: FixRegistry

FixRegistry the fix runner dispatches against. Default: DEFAULT_FIX_REGISTRY — the pre-populated singleton that plugins register their strategies into. Pass an explicit registry to use a custom dispatch table (e.g. tests, or a pipeline that wants only a subset of fixes).

Inspection report whose issues should be fed through the registered strategies.

sceneModel: SceneModel

SceneModel the fixes mutate. Same constraints as optimizeSceneModel — strategies that need SceneModel.createGeometry / createMesh will only succeed before the model is finalised.

signal?: AbortSignal

Optional AbortSignal. applyFixesAsync checks signal.aborted between issues and throws an AbortError when the caller aborts. Outcomes collected before the abort are discarded — the SceneModel keeps any mutations that did land before the abort, so a re-inspect after cancellation tells the truth about post-abort state. The synchronous applyFixes ignores this field.