Draft
Infer deterministic IDs for rule modules (triggers, on_load)#532
Conversation
Agent-Logs-Url: https://github.com/openhab/openhab-jruby/sessions/d9c9a5cd-d6e9-4819-8e5a-38415ebe7788 Co-authored-by: ccutrer <191320+ccutrer@users.noreply.github.com>
Agent-Logs-Url: https://github.com/openhab/openhab-jruby/sessions/d9c9a5cd-d6e9-4819-8e5a-38415ebe7788 Co-authored-by: ccutrer <191320+ccutrer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add ID inference for all modules including triggers and conditions
Infer deterministic IDs for rule modules (triggers, on_load)
Apr 8, 2026
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.
Triggers and the
on_loadmodule were assigned random UUIDs, making them opaque in logs and tooling. This replaces random UUIDs with IDs derived from the rule's UID.Changes
{rule_uid}:{n}wherenis a 1-based sequential counter scoped to the rule. Falls back to a random UUID only when no rule UID is present in thread context (edge case).on_loadmodule ID: Uses{rule_uid}:on_loadinstead of a random UUID. Same fallback applies.Example
This makes module IDs human-readable and stable across script reloads, consistent with how rule IDs are already inferred from source location.