id: ml_reassemble
name: Reassemble Chips
description: >
  Stitch per-chip model outputs back into a full-extent raster.
  Handles overlap blending (linear feathering) and edge padding removal.
version: 1.0.0
category: prepare
type: raster-to-raster
default_implementation: native

inputs:
  - name: chips
    type: raster
    format: tif
    description: Directory of chip results
    required: true

# Structural op — stitches any chip raster regardless of concept or bands.
requires: {}

outputs:
  - name: raster
    type: raster
    format: cog
    description: Full-extent reassembled raster

params:
  chip_size:
    type: integer
    default: 224
  overlap:
    type: integer
    default: 0
  blend_mode:
    type: select
    options: [linear, max, first]
    default: linear
    description: How to blend overlap zones

execution:
  realtime_max_km2: 1000
  memory_profile: medium

# backends: audited 2026-08-14 (defect 50). NOTHING dispatches this op: no arm in folia-engine
# `dispatch_op`, no `registerOp`/OP_TABLE entry in packages/compute, no `_BUILTIN_OP_MAP`
# key in folia/compute.py, no backend manifest. Declared EMPTY on purpose — an absent
# block would be indistinguishable from one nobody ever wrote.
backends: {}
