db: protean version of build_metadata().  now need build in token_mapping.