Skip to main content

Module policy_migration

Module policy_migration 

Source
Expand description

Policy CSV migration from flat to dot-namespaced action strings.

Hyprstream 0.x policy files used flat action names (infer, manage, etc.). Version 0.y and later use dot-namespaced actions (infer.generate, ttt.writeback). This module provides a helper that rewrites flat action strings to their dot-namespaced equivalents in a policy.csv string.

Functions§

migrate_action
Map a flat action string to its canonical dot-namespaced equivalent. Returns None if the string is not a recognized flat action — this includes already dot-namespaced strings as well as completely unknown strings.
migrate_policy_csv
Rewrite a policy.csv string, upgrading flat action strings to dot-namespaced form.