comments: collect metadata in a scan-phase preprocess hook