TARGET PROJECT: importer — HANDOFF NOTE

Current configuration (later importer updates supersede earlier ones; archived projects are unrelated and excluded):
{
  "duplicate_policy": "last",
  "fold_case": false,
  "tombstone_wins": false,
  "trim_ids": false,
  "list_merge": "unique",
  "nested_merge": false,
  "null_mode": "delete",
  "version_floor": 3,
  "audit_all": false,
  "empty_id": "error",
  "order": "id",
  "unknown_fields": "keep"
}

Fixed interface:
evaluate(payload) returns {records: [{id, fields}], audit: [string]}.
Events have: id string, integer version, deleted boolean, fields JSON object.

Required processing:
- Normalize each event id: no trimming (trim_ids=false) and no ASCII case folding (fold_case=false).
- If the normalized id is empty, raise ValueError (empty_id="error"). Perform normalization and the empty-id check before discarding events below the version floor.
- Discard events with version below 3 (version_floor=3).
- Deduplicate by normalized (id, version), retaining the first insertion position for grouping but selecting the last event (duplicate_policy="last"); subsequent sorting uses the selected event's actual original index.
- Process events by (version, selected original index).
- Save each normalized id's first processed index (needed for input ordering, although current record order is by id).
- Deletion: removes an existing record. Because tombstone_wins=false, a deletion does not permanently block later non-deletion events. A deletion is applied only if a record existed or it installs a new sticky tombstone; redundant deletions are blocked/no-change.
- Non-deletion: merge fields into the record, creating {} if needed.
- Null field values delete the existing key (null_mode="delete").
- Nested objects are replaced rather than recursively merged (nested_merge=false).
- Arrays under list_merge="unique": concatenate only new-array items not structurally equal (JSON equality) to any item in the existing old array. Do not deduplicate among the new-array items themselves.
- Keep all top-level fields (unknown_fields="keep"); do not restrict to name, tags, meta.
- Audit: because audit_all=false, record only applied processed events. Format is normalized_id:version:applied or normalized_id:version:blocked. Preserve audit in processing order.
- Sort final records lexically by normalized id (order="id").
- Do not mutate the input.

Exceptions/unresolved items:
- No project-specific exceptions remain beyond the behavior above.
- No unresolved configuration keys: all 12 keys above are currently set.