Skip to content

fix(match): save friendly design + facility name with solutions#219

Merged
touchthesun merged 1 commit into
mainfrom
fix/solution-okh-title-metadata
Jul 3, 2026
Merged

fix(match): save friendly design + facility name with solutions#219
touchthesun merged 1 commit into
mainfrom
fix/solution-okh-title-metadata

Conversation

@touchthesun

Copy link
Copy Markdown
Contributor

What

Auto-saved supply-tree solutions only recorded okh_id + matching_mode in 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 records okh_title (from the supply-tree metadata) and facility_name (from the matched solution) alongside okh_id, so a solution carries a human-readable identity the moment it's saved.
  • storage_service.py — persists facility_name in the saved metadata and returns it in the list summary, next to the okh_title it already read (the null was flowing from the match-save gap above, not the storage layer).
  • regression testtests/integration/test_solution_friendly_name.py round-trips a solution through save -> list on a local-backed StorageService and asserts both okh_title and facility_name survive. It constructs its own service rather than the process-wide singleton (StorageService keeps its own _instance that the integration client fixture 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_name lands separately on frontend-dev.

🤖 Generated with Claude Code

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>
@touchthesun touchthesun merged commit 7a5212f into main Jul 3, 2026
5 checks passed
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