Skip to content

Round-trip policy metadata, and read strategies fields by catalog alias - #65

Merged
jzonthemtn merged 3 commits into
mainfrom
policy-metadata-and-zip-alias
Sep 2, 2026
Merged

Round-trip policy metadata, and read strategies fields by catalog alias#65
jzonthemtn merged 3 commits into
mainfrom
policy-metadata-and-zip-alias

Conversation

@jzonthemtn

Copy link
Copy Markdown
Member

Two changes against schema 1.3.0 (philterd/phisql#39).

Policy metadata. The schema adds an optional top-level metadata object. Policy now carries it through from_dict/to_dict as a raw dict, so keys beyond description survive a load-and-save round trip. Never read during filtering; a policy without it still serializes without the key.

Zip code strategies field. The catalog renamed the zip strategies array to the plural zipCodeFilterStrategies. filter_service resolves that name from the catalog, so a policy using the older singular silently produced a zip filter with no strategies. It now falls back to the catalog's new phileas_strategies_field_aliases, and the tests that pinned the old singular assert the alias contract instead.

Verified: full suite passes (1901 tests).

Kept as a raw dict so keys the engine does not model survive a load-and-save
round trip. Never read during filtering.

Signed-off-by: jzonthemtn <jeff.zemerick@philterd.ai>
The catalog renamed the zip code strategies array to the plural, so a policy
using the singular silently produced a filter with no strategies. Falls back to
the catalog's aliases when the primary name is absent.

Signed-off-by: jzonthemtn <jeff.zemerick@philterd.ai>
@jzonthemtn
jzonthemtn force-pushed the policy-metadata-and-zip-alias branch from 3ab1d96 to 71f1217 Compare September 2, 2026 20:36
The tests named the plural field directly, so they only passed once the catalog
shipped the rename. They now read the names from the catalog and assert every
one of them drives the filter, which holds on either catalog version.

Signed-off-by: jzonthemtn <jeff.zemerick@philterd.ai>
@jzonthemtn
jzonthemtn merged commit 1570d10 into main Sep 2, 2026
2 checks passed
@jzonthemtn
jzonthemtn deleted the policy-metadata-and-zip-alias branch September 2, 2026 20:41
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.

1 participant