Follow-up to #912 (wildcard topic subscriptions, flag TOPICS_ALLOW_WILDCARDS).
The flag is only consulted at validation time (Topics.Validate, called from the destination create/update handlers). Topic matching on the delivery path (Topics.MatchTopic → matchTopicPattern) honors * unconditionally.
Consequences of flipping enabled → disabled with existing wildcard destinations
- Existing wildcard subscriptions keep matching and delivering. Disabling the flag stops new wildcards from being created but does not stop stored ones from expanding on the hot path.
- Those destinations become un-updatable. Update re-validates the full destination, so any PATCH — including one that doesn't touch topics — fails with invalid topics until the caller also replaces the wildcard topics.
- Portal inconsistency. The portal receives the flag and stops offering wildcard input, but existing wildcard subscriptions still render and behave as wildcards.
Net: the toggle reads like a kill switch but behaves as "stop new wildcards" with grandfathered data that delivers fine yet can't be edited.
Possible mitigations to evaluate
- Only validate topics on update when the update actually changes them (removes the PATCH trap, keeps grandfathering) — likely the minimal fix.
- Gate
MatchTopic on the flag so wildcards stop matching when disabled — makes the flag a true kill switch, but silently drops deliveries for existing subscriptions.
- Document the current semantics if grandfathering is the intended behavior.
Follow-up to #912 (wildcard topic subscriptions, flag
TOPICS_ALLOW_WILDCARDS).The flag is only consulted at validation time (
Topics.Validate, called from the destination create/update handlers). Topic matching on the delivery path (Topics.MatchTopic→matchTopicPattern) honors*unconditionally.Consequences of flipping enabled → disabled with existing wildcard destinations
Net: the toggle reads like a kill switch but behaves as "stop new wildcards" with grandfathered data that delivers fine yet can't be edited.
Possible mitigations to evaluate
MatchTopicon the flag so wildcards stop matching when disabled — makes the flag a true kill switch, but silently drops deliveries for existing subscriptions.