refactor: extract the shared manifest walk behind tracked_files (#8449)