fix(match): save friendly design + facility name with solutions#219
Merged
Conversation
Auto-saved supply-tree solutions only recorded okh_id + matching_mode in their metadata, so the UI's Solutions list rendered them by bare UUID with a null title (web-ui review note #2). - match.py single-level auto-save now records okh_title (from the tree metadata) and facility_name (from the matched solution) alongside okh_id. - storage_service persists facility_name in the saved metadata and returns it in the list summary, next to the okh_title it already carried. - Add a hermetic integration regression test: a local-backed StorageService round-trips a solution through save -> list and asserts both okh_title and facility_name survive. It builds its own StorageService instead of the process-wide singleton, so a provider left configured by an earlier test can't bleed in. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Auto-saved supply-tree solutions only recorded
okh_id+matching_modein their metadata, so the web UI's Solutions list rendered each saved solution by a bare UUID with a null title (web-ui review note #2 — "solutions listed by UUID need friendly names").Changes
match.py— the single-level auto-save now recordsokh_title(from the supply-tree metadata) andfacility_name(from the matched solution) alongsideokh_id, so a solution carries a human-readable identity the moment it's saved.storage_service.py— persistsfacility_namein the saved metadata and returns it in the list summary, next to theokh_titleit already read (the null was flowing from the match-save gap above, not the storage layer).tests/integration/test_solution_friendly_name.pyround-trips a solution throughsave -> liston a local-backedStorageServiceand asserts bothokh_titleandfacility_namesurvive. It constructs its own service rather than the process-wide singleton (StorageServicekeeps its own_instancethat the integrationclientfixture does not reset), keeping it hermetic against whatever provider an earlier test left configured.Verification
make ready— all gates green (523 passed, parity 4/4, docs ✓).The frontend Solutions-list display of
okh_title → facility_namelands separately onfrontend-dev.🤖 Generated with Claude Code