Round-trip policy metadata, and read strategies fields by catalog alias - #65
Merged
Conversation
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
force-pushed
the
policy-metadata-and-zip-alias
branch
from
September 2, 2026 20:36
3ab1d96 to
71f1217
Compare
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>
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.
Two changes against schema 1.3.0 (philterd/phisql#39).
Policy metadata. The schema adds an optional top-level
metadataobject.Policynow carries it throughfrom_dict/to_dictas a raw dict, so keys beyonddescriptionsurvive 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_serviceresolves 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 newphileas_strategies_field_aliases, and the tests that pinned the old singular assert the alias contract instead.Verified: full suite passes (1901 tests).