Skip to content

Conversation

@rugeli
Copy link
Collaborator

@rugeli rugeli commented Jan 21, 2026

Problem

closes #441

Solution

  • replaced uuid-based job_id with dedup_hash(SHA256) for both params: recipe(the string path) and json_recipe(dict recipe data)
  • added firebase lookup to check for existing results before packing, return cached result_path if found
  • calculated dedup_hash via RecipeLoader.get_dedup_hash() after recipe normalization to make sure consistent hashing regardless of source (local_path, firebase_path, json body)

note: the previous approach hashes the normalized recipe, so the same semantic recipes from different sources(local_path, firebase_path, json body) would get the same hash. After chatting with @ascibisz, we simplified this to hash only the json body, aligning with server's planned use case

Type of change

  • New feature (non-breaking change which adds functionality)

Steps to Verify:

  1. run a packing job via the server and verify the document is created in job_status in firebase
  2. run the exact same job again, no new document should be created, and the result_path in the web response should reference the cached result

@github-actions
Copy link
Contributor

Packing analysis report

Analysis for packing results located at cellpack/tests/outputs/test_spheres/spheresSST

Ingredient name Encapsulating radius Average number packed
ext_A 25 236.0

Packing image

Packing image

Distance analysis

Expected minimum distance: 50.00
Actual minimum distance: 50.01

Ingredient key Pairwise distance distribution
ext_A Distance distribution ext_A

@rugeli rugeli marked this pull request as ready for review January 23, 2026 23:19
@rugeli rugeli requested a review from ascibisz January 23, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants