From 862b224dd7e4e770804ffad3411255166daa4501 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Fri, 25 Sep 2026 16:19:59 +0300 Subject: [PATCH 01/43] Reject non-user JWT scopes on WebSocket API --- .../controller/plugin/TbWebSocketHandler.java | 17 +++++++- .../server/controller/TwoFactorAuthTest.java | 42 +++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java b/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java index a7e3ed4ba9..2e8dda4d32 100644 --- a/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java +++ b/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java @@ -19,6 +19,7 @@ import org.springframework.beans.factory.BeanCreationNotAllowedException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Lazy; +import org.springframework.security.authentication.BadCredentialsException; import org.springframework.stereotype.Service; import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.PongMessage; @@ -34,6 +35,7 @@ import org.thingsboard.server.common.data.id.CustomerId; import org.thingsboard.server.common.data.id.TenantId; import org.thingsboard.server.common.data.id.UserId; import org.thingsboard.server.common.data.limit.LimitedApi; +import org.thingsboard.server.common.data.security.Authority; import org.thingsboard.server.common.data.tenant.profile.DefaultTenantProfileConfiguration; import org.thingsboard.server.config.WebSocketConfiguration; import org.thingsboard.server.dao.tenant.TbTenantProfileCache; @@ -55,6 +57,7 @@ import org.thingsboard.server.service.ws.telemetry.cmd.TelemetryCmdsWrapper; import java.io.IOException; import java.security.InvalidParameterException; +import java.util.EnumSet; import java.util.Optional; import java.util.Queue; import java.util.Set; @@ -76,6 +79,8 @@ import static org.thingsboard.server.service.ws.DefaultWebSocketService.NUMBER_O @RequiredArgsConstructor public class TbWebSocketHandler extends TextWebSocketHandler implements WebSocketMsgEndpoint { + private static final Set USER_AUTHORITIES = EnumSet.of(Authority.SYS_ADMIN, Authority.TENANT_ADMIN, Authority.CUSTOMER_USER); + private final ConcurrentMap internalSessionMap = new ConcurrentHashMap<>(); private final ConcurrentMap externalSessionMap = new ConcurrentHashMap<>(); @@ -181,7 +186,7 @@ public class TbWebSocketHandler extends TextWebSocketHandler implements WebSocke log.trace("{} Authenticating session", sessionRef); SecurityUser securityCtx; try { - securityCtx = authenticationProvider.authenticate(authCmd.getToken()); + securityCtx = authenticate(authCmd.getToken()); } catch (Exception e) { close(sessionRef, CloseStatus.BAD_DATA.withReason(e.getMessage())); return; @@ -317,7 +322,7 @@ public class TbWebSocketHandler extends TextWebSocketHandler implements WebSocke SecurityUser securityCtx = null; String token = StringUtils.substringAfter(session.getUri().getQuery(), "token="); if (StringUtils.isNotEmpty(token)) { - securityCtx = authenticationProvider.authenticate(token); + securityCtx = authenticate(token); } return WebSocketSessionRef.builder() .sessionId(UUID.randomUUID().toString()) @@ -328,6 +333,14 @@ public class TbWebSocketHandler extends TextWebSocketHandler implements WebSocke .build(); } + private SecurityUser authenticate(String token) { + SecurityUser securityUser = authenticationProvider.authenticate(token); + if (!USER_AUTHORITIES.contains(securityUser.getAuthority())) { + throw new BadCredentialsException("Token is invalid"); + } + return securityUser; + } + private SessionMetaData getSessionMd(String internalSessionId) { SessionMetaData sessionMd = internalSessionMap.get(internalSessionId); if (sessionMd == null) { diff --git a/application/src/test/java/org/thingsboard/server/controller/TwoFactorAuthTest.java b/application/src/test/java/org/thingsboard/server/controller/TwoFactorAuthTest.java index 3170d9480f..4618ebf4e0 100644 --- a/application/src/test/java/org/thingsboard/server/controller/TwoFactorAuthTest.java +++ b/application/src/test/java/org/thingsboard/server/controller/TwoFactorAuthTest.java @@ -13,6 +13,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.bean.override.mockito.MockitoBean; import org.springframework.test.context.bean.override.mockito.MockitoSpyBean; import org.thingsboard.rule.engine.api.SmsService; +import org.thingsboard.server.common.data.Device; +import org.thingsboard.server.common.data.EntityType; import org.thingsboard.server.common.data.StringUtils; import org.thingsboard.server.common.data.User; import org.thingsboard.server.common.data.audit.ActionStatus; @@ -23,6 +25,8 @@ import org.thingsboard.server.common.data.id.TenantId; import org.thingsboard.server.common.data.page.PageLink; import org.thingsboard.server.common.data.page.SortOrder; import org.thingsboard.server.common.data.page.TimePageLink; +import org.thingsboard.server.common.data.query.EntityData; +import org.thingsboard.server.common.data.query.EntityTypeFilter; import org.thingsboard.server.common.data.security.Authority; import org.thingsboard.server.common.data.security.model.JwtPair; import org.thingsboard.server.common.data.security.model.mfa.PlatformTwoFaSettings; @@ -40,6 +44,7 @@ import org.thingsboard.server.dao.user.UserService; import org.thingsboard.server.service.security.auth.mfa.TwoFactorAuthService; import org.thingsboard.server.service.security.auth.mfa.config.TwoFaConfigManager; import org.thingsboard.server.service.security.auth.rest.LoginRequest; +import org.thingsboard.server.service.ws.telemetry.cmd.v2.EntityDataUpdate; import java.time.Duration; import java.util.Arrays; @@ -141,6 +146,43 @@ public class TwoFactorAuthTest extends AbstractControllerTest { assertThat(currentUser.getId()).isEqualTo(user.getId()); } + @Test + public void testWsAuthCmd_preVerificationTokenRejected() throws Exception { + configureTotpTwoFa(); + logInWithPreVerificationToken(username, password); + + wsClient = buildAndConnectWebSocketClient(); + + await().atMost(TIMEOUT, TimeUnit.SECONDS).until(wsClient::isClosed); + } + + @Test + public void testWsQueryToken_preVerificationTokenRejected() throws Exception { + configureTotpTwoFa(); + logInWithPreVerificationToken(username, password); + + wsClient = buildAndConnectWebSocketClient("/api/ws?token=" + token); + + await().atMost(TIMEOUT, TimeUnit.SECONDS).until(wsClient::isClosed); + } + + @Test + public void testWs_accessTokenAcceptedAfterTwoFa() throws Exception { + TotpTwoFaAccountConfig totpTwoFaAccountConfig = configureTotpTwoFa(); + logInWithPreVerificationToken(username, password); + JsonNode tokenPair = readResponse(doPost("/api/auth/2fa/verification/check?providerType=TOTP&verificationCode=" + getCorrectTotp(totpTwoFaAccountConfig)) + .andExpect(status().isOk()), JsonNode.class); + validateAndSetJwtToken(tokenPair, username); + Device device = createDevice("2FA device", "2FA device token"); + + EntityTypeFilter deviceFilter = new EntityTypeFilter(); + deviceFilter.setEntityType(EntityType.DEVICE); + EntityDataUpdate update = getWsClient().sendEntityDataQuery(deviceFilter); + + assertThat(update.getData().getData()).singleElement() + .extracting(EntityData::getEntityId).isEqualTo(device.getId()); + } + @Test public void testTwoFaPreVerificationTokenLifetime() throws Exception { configureTotpTwoFa(twoFaSettings -> { From f817fbb123da8a9ffc2068eb4a83613905831183 Mon Sep 17 00:00:00 2001 From: Dmytro Skarzhynets Date: Wed, 30 Sep 2026 17:04:26 +0300 Subject: [PATCH 02/43] fix: check license headers against CE history in the unified codebase The check compared each branch against a CE counterpart branch fetched from thingsboard/thingsboard, which is now the unified codebase itself, so every file was compared with itself and 5,468 files were reported with a wrong header. CE is now the history that does not contain the relicensing commit 31936b09d24. The check compares each file against the latest CE commits merged into the branch: - a path that exists in CE is apache when its content equals a CE version or a clean merge of its CE versions, and ce-modified otherwise; - a new path is busl unless it is at least 50% similar to a CE file or CE history had this path, which needs a decision; - --ce-ref keeps the previous mode of comparing against a fetched CE ref. The third header kind is named after its template, license-header-busl.txt, and curations use busl instead of pe-only. --fix also removes redundant curations and curations of files that are no longer in scope, and the check lists redundant curations. --- .github/workflows/check-license-headers.yml | 26 +- check-license-headers.sh | 19 +- .../src/main/python/license-headers/README.md | 54 +- .../license-headers/check_license_headers.py | 503 +++++++-------- .../python/license-headers/curations.json | 546 ++++++++-------- .../test_check_license_headers.py | 610 +++++++++++------- 6 files changed, 953 insertions(+), 805 deletions(-) diff --git a/.github/workflows/check-license-headers.yml b/.github/workflows/check-license-headers.yml index ca5cec2d04..753a9c565d 100644 --- a/.github/workflows/check-license-headers.yml +++ b/.github/workflows/check-license-headers.yml @@ -11,19 +11,12 @@ on: - master - rc - 'lts-[0-9]+.[0-9]+' - - 'license-lts-[0-9]+.[0-9]+' pull_request: branches: - master - rc - 'lts-[0-9]+.[0-9]+' - - 'license-lts-[0-9]+.[0-9]+' workflow_dispatch: - inputs: - ce-branch: - description: CE branch to compare against; defaults to the counterpart of the current branch - required: false - type: string permissions: contents: read @@ -53,27 +46,10 @@ jobs: java-version: 21 cache: maven - - name: Resolve CE branch - id: ce - env: - PE_BRANCH: ${{ github.base_ref || github.ref_name }} - CE_BRANCH: ${{ inputs.ce-branch }} - run: | - if [[ -z "$CE_BRANCH" ]]; then - case "$PE_BRANCH" in - master|rc) CE_BRANCH="$PE_BRANCH" ;; - lts-*|license-lts-*) CE_BRANCH="${PE_BRANCH#license-}" ;; - *) echo "::error::No CE counterpart is defined for branch $PE_BRANCH"; exit 1 ;; - esac - fi - echo "branch=$CE_BRANCH" >> "$GITHUB_OUTPUT" - - name: Check license headers - env: - CE_BRANCH: ${{ steps.ce.outputs.branch }} run: | mkdir -p target/license-provenance - ./check-license-headers.sh "${CE_BRANCH}" 2>&1 | tee target/license-provenance/console.log + ./check-license-headers.sh 2>&1 | tee target/license-provenance/console.log - name: Add findings to the job summary if: failure() && hashFiles('target/license-provenance/console.log') != '' diff --git a/check-license-headers.sh b/check-license-headers.sh index 4103afa0f8..6176d4d7e9 100755 --- a/check-license-headers.sh +++ b/check-license-headers.sh @@ -8,21 +8,18 @@ set -euo pipefail usage() { echo "Checks SPDX license headers against CE provenance." - echo "usage: $0 [--fix] [--ce-remote ] [--output target/...]" - echo " ce-ref CE branch, tag or commit matching this PE branch, e.g. lts-4.2;" - echo " fetched from the CE repository on every run" + echo "usage: $0 [--fix] [--ce-ref ] [--ce-remote ] [--output target/...]" echo " --fix restamp files whose expected header the check determined" - echo " --ce-remote CE repository to fetch from (default: https://github.com/thingsboard/thingsboard.git)" + echo " and remove redundant or orphaned curations" + echo " --ce-ref CE branch, tag or commit that this branch integrates, fetched on every run;" + echo " without it, CE is the history that does not contain the relicensing commit" + echo " --ce-remote CE repository to fetch --ce-ref from (default: https://github.com/thingsboard/thingsboard.git)" } -if [[ $# -eq 0 || "$1" == "-h" || "$1" == "--help" || "$1" == -* ]]; then +if [[ $# -gt 0 && ( "$1" == "-h" || "$1" == "--help" ) ]]; then usage - [[ $# -gt 0 && ( "$1" == "-h" || "$1" == "--help" ) ]] && exit 0 - exit 2 + exit 0 fi -ce_ref="$1" -shift - cd "$(git rev-parse --show-toplevel)" -exec python3 tools/src/main/python/license-headers/check_license_headers.py check --ce-ref "$ce_ref" "$@" +exec python3 tools/src/main/python/license-headers/check_license_headers.py check "$@" diff --git a/tools/src/main/python/license-headers/README.md b/tools/src/main/python/license-headers/README.md index 3e198be6f3..6597faad14 100644 --- a/tools/src/main/python/license-headers/README.md +++ b/tools/src/main/python/license-headers/README.md @@ -1,29 +1,50 @@ # License header provenance check Verifies that every file carries the SPDX header its origin requires: `apache` -for unchanged CE files, `ce-modified` for CE files with PE changes, `pe-only` -for files that do not exist in CE. A `pom.xml` added in PE under a directory -that has no files in CE is `pe-only` even when it resembles a CE `pom.xml`: -module identity, dependencies and packaging define the PE artifact. +for unchanged CE files, `ce-modified` for CE files with changes, and the third +header of this repository, `busl`, for files that do not come from CE. The +third header is the only `templates/license-header-.txt` besides the +`ce-modified` one, and its `` names it in the output and in curations. + +CE is the history of the ThingsBoard Community Edition under Apache-2.0. The +check compares against the latest CE commits merged into the current branch: + +- By default, CE commits are the ones that do not have the relicensing commit + `31936b09d24` in their history, for example pre-4.4 master and the lts-4.3 + commits merged into lts-4.4. +- With `--ce-ref`, CE commits are the history of the given CE branch, tag, or + commit. It is fetched from `https://github.com/thingsboard/thingsboard.git` + on every run; pass `--ce-remote` to fetch from another URL or a local clone. + +## Rules + +A file whose path exists in CE is `apache` when its content without the +header equals a CE version of it, or a clean merge of its CE versions, and +`ce-modified` otherwise. + +A file whose path does not exist in CE is `busl`, except when it needs a +decision: its content is at least 50% similar to a CE file, or CE history once +had this path. A `pom.xml` added under a directory that has no files in CE is +`busl` even when it resembles a CE `pom.xml`: module identity, dependencies and +packaging define the new artifact. ## Run ```sh -./check-license-headers.sh lts-4.2 +./check-license-headers.sh ``` -The argument is the CE branch, tag, or commit matching the current PE branch. It -is fetched from `https://github.com/thingsboard/thingsboard.git` on every run, so -the clone needs network access but no CE remote of its own. Pass `--ce-remote` -to fetch from another URL or a local CE clone instead. +The check needs the full Git history of the clone. ## Fix automatically ```sh -./check-license-headers.sh lts-4.2 --fix +./check-license-headers.sh --fix ``` -Restamps every file whose expected header the check determined by itself. +Restamps every file whose expected header the check determined by itself and +removes curations that are redundant, because the check decides the same header +by itself, or that belong to files no longer in scope. ## Add a curation @@ -31,15 +52,18 @@ For files the check cannot decide ("Needs a decision"), record the decision in `curations.json` next to this file: 1. Put the correct header on the file. A file that exists in CE, even renamed - or moved, is `ce-modified`; a file that does not exist in CE is `pe-only`. + or moved, is `ce-modified`; a file that does not exist in CE is `busl`. 2. Run `sha256sum path/to/File.java`. 3. Add an entry and rerun the check: ```json { "path": "path/to/File.java", - "contentHash": "sha256:<64 hex digits>", - "header": "pe-only", - "reason": "Which CE file this was compared against and why the header follows." + "header": "busl", + "reason": "Which CE file this was compared against and why the header follows.", + "contentHash": "sha256:<64 hex digits>" } ``` + +A curation whose file changed since the review is stale and fails the check +until someone reviews the file again and updates `contentHash`. diff --git a/tools/src/main/python/license-headers/check_license_headers.py b/tools/src/main/python/license-headers/check_license_headers.py index 13ff9f75ad..d59e6dffa1 100644 --- a/tools/src/main/python/license-headers/check_license_headers.py +++ b/tools/src/main/python/license-headers/check_license_headers.py @@ -24,11 +24,24 @@ import uuid import xml.etree.ElementTree as ET +TEMPLATE_DIRECTORY = "tools/src/main/python/license-headers/templates" + + +def non_ce_header(directory): + kinds = sorted(path.name[len("license-header-"):-len(".txt")] for path in directory.glob("license-header-*.txt")) + kinds = [kind for kind in kinds if kind != "ce-modified"] + if len(kinds) != 1: + raise RuntimeError(f"Expected exactly one license-header-.txt besides the ce-modified one in {directory}") + return kinds[0] + + +NON_CE = non_ce_header(Path(__file__).resolve().parent / "templates") TEMPLATES = { - "apache": "tools/src/main/python/license-headers/templates/license-header.txt", - "ce-modified": "tools/src/main/python/license-headers/templates/license-header-ce-modified.txt", - "pe-only": "tools/src/main/python/license-headers/templates/license-header-busl.txt", + "apache": f"{TEMPLATE_DIRECTORY}/license-header.txt", + "ce-modified": f"{TEMPLATE_DIRECTORY}/license-header-ce-modified.txt", + NON_CE: f"{TEMPLATE_DIRECTORY}/license-header-{NON_CE}.txt", } +RELICENSING_COMMIT = "31936b09d24871e421f212502a8342f9d8aabb20" CE_REMOTE = "https://github.com/thingsboard/thingsboard.git" CURATIONS = "tools/src/main/python/license-headers/curations.json" README = "tools/src/main/python/license-headers/README.md" @@ -152,16 +165,35 @@ def fetch(repo, remote, ref): return resolve(repo, "FETCH_HEAD") -def unique_base(repo, left, right): - bases = git(repo, "merge-base", "--all", left, right).decode().splitlines() - if len(bases) != 1: - raise Failure(f"found {len(bases)} merge bases between PE HEAD and the CE ref, expected exactly one. " - "Check that the right CE branch was passed.") - return bases[0] +def independent(repo, commits): + return sorted(git(repo, "merge-base", "--independent", *commits).decode().split()) + + +def contains(repo, ancestor, descendant): + return run(["git", "merge-base", "--is-ancestor", ancestor, descendant], repo, ok=(0, 1, 128)).returncode == 0 -def first_parent_commits(repo, revision): - return git(repo, "rev-list", "--first-parent", revision).decode().splitlines() +def relicensed_ce_bases(repo, head): + if not contains(repo, RELICENSING_COMMIT, head): + raise Failure(f"the relicensing commit {RELICENSING_COMMIT[:11]} is not in the history of HEAD. " + "Pass --ce-ref with the CE branch that this branch integrates.") + records = git(repo, "rev-list", "--parents", "--ancestry-path", f"{RELICENSING_COMMIT}..{head}").decode().splitlines() + records.append(git(repo, "rev-list", "--parents", "-1", RELICENSING_COMMIT).decode().strip()) + commits = {record.split()[0] for record in records} + parents = {parent for record in records for parent in record.split()[1:]} + return independent(repo, sorted(parents - commits)) + + +def merged_ce_bases(repo, head, baseline): + bases = run(["git", "merge-base", "--all", head, baseline], repo, ok=(0, 1)).stdout.decode().split() + if not bases: + raise Failure("HEAD shares no history with the CE ref. Check that the right CE branch was passed.") + return independent(repo, bases) + + +def merge_blobs(repo, ours, base, theirs): + result = run(["git", "merge-file", "-p", "--object-id", ours, base, theirs], repo, ok=range(0, 256)) + return result.stdout if result.returncode == 0 else None def tree(repo, revision): @@ -203,10 +235,6 @@ class Change: new: str status: str - @property - def deleted(self): - return self.status == "D" - def history(repo, revision, *options): raw = git(repo, "log", "--first-parent", "--diff-merges=first-parent", "--root", "--raw", "--no-abbrev", @@ -239,21 +267,6 @@ def parse_history(raw): raise Failure(f"Unexpected Git history token: {token[:80]!r}") -def integration_boundary(repo, anchor, head): - chain = first_parent_commits(repo, head) - low, high = 0, len(chain) - while low < high: - middle = (low + high) // 2 - code = run(["git", "merge-base", "--is-ancestor", anchor, chain[middle]], repo, ok=(0, 1)).returncode - if code == 0: - low = middle + 1 - else: - high = middle - if not low: - raise Failure("CE anchor is not in PE history") - return chain[low - 1] - - def git_ignored(repo, paths): if not paths: return set() @@ -513,7 +526,7 @@ class Mycila: (directory / name).write_bytes(self.templates[header]) def add(self, key, name, content): - group = "pe" if key[0] == "pe" else "ce" + group = "head" if key[0] == "head" else "ce" path = self.root / "files" / group / str(len(self.paths)) / PurePosixPath(name).name path.parent.mkdir(parents=True) path.write_bytes(content) @@ -561,11 +574,11 @@ class Mycila: def remove_headers(self, keys): before = {key: self.contents[key] for key in keys} with self.guarded(keys): - results = self.invoke("remove", "pe-only", keys, styles=(STRICT_XML,)) + results = self.invoke("remove", NON_CE, keys, styles=(STRICT_XML,)) unchanged = [key for key, result in results.items() if result == "NOOP" and PurePosixPath(self.paths[key]).suffix in BLOCK_COMMENT_SUFFIXES] if unchanged: - self.invoke("remove", "pe-only", unchanged, styles=(STRICT_XML, STRICT_BLOCK)) + self.invoke("remove", NON_CE, unchanged, styles=(STRICT_XML, STRICT_BLOCK)) removed = {} for key in keys: content, removed[key] = split_removed(before[key], self.contents[key]) @@ -690,14 +703,14 @@ class Mycila: selected = set(keys) if selected == set(self.paths): return ["files/**"] - if selected == {key for key in self.paths if key[0] == "pe"}: - return ["files/pe/**"] + if selected == {key for key in self.paths if key[0] == "head"}: + return ["files/head/**"] return [str(PurePosixPath(self.paths[key]).parent) + "/*" for key in keys] def normalized_copies(mycila, source_refs, names, nonempty): sources = set(source_refs) & nonempty - destinations = {("pe", name) for name in names} & nonempty + destinations = {("head", name) for name in names} & nonempty if not sources or not destinations: return {} git(mycila.root, "init", "--quiet") @@ -712,7 +725,7 @@ def normalized_copies(mycila, source_refs, names, nonempty): for source, destination, similarity in parse_copies(raw): source_key, destination_key = keys[source], keys[destination] if source_key not in sources or destination_key not in destinations: - raise Failure("Normalized copy escaped the selected CE/PE inputs") + raise Failure("Normalized copy escaped the selected CE and HEAD inputs") copies[destination_key[1]].append({"path": source_key[0], "blob": source_key[1], "ref": source_refs[source_key], "similarity": similarity}) return dict(copies) @@ -742,160 +755,78 @@ class Evidence: path: str content_hash: str current: str - curation: dict | None - inherited: bool - recreated: bool - ce_hash: str | None - pe_hash: str - candidates: list - historical: list - in_comparison: bool - pe_addition: bool = False + curation: dict | None = None + ce_versions: tuple = () + identical: dict | None = None copies: tuple = () + deleted: dict | None = None directory_in_ce: bool = True - ce_ref: str | None = None - ce_blob: str | None = None - - @property - def strong(self): - return [c for c in self.historical if c["path"] == self.path or c.get("contentMatches")] - - def ce_traces(self): - return bool(self.candidates or self.copies or self.in_comparison or self.strong) - def pe_module_descriptor(self): + def module_descriptor(self): return (PurePosixPath(self.path).name == MODULE_DESCRIPTOR and not self.directory_in_ce - and not (self.candidates or self.in_comparison or self.strong)) + and self.deleted is None and all(copy["similarity"] < 100 for copy in self.copies)) def decide(evidence): row = {"path": evidence.path, "contentHash": evidence.content_hash, "currentHeader": evidence.current} - if evidence.curation is not None: - return row | curated_verdict(evidence) - if evidence.recreated: - return row | {"status": "unresolved", "expectedHeader": None, - "reason": "deleted and recreated at this path, origin unclear"} - if evidence.inherited and evidence.ce_hash is not None: - comparison = {"comparison": {"path": evidence.path, "ref": evidence.ce_ref, "blob": evidence.ce_blob}} - if evidence.pe_hash == evidence.ce_hash: - return row | verdict(evidence.current, "apache", "same path in CE, content identical") | comparison - return row | verdict(evidence.current, "ce-modified", "same path in CE, content differs") | comparison - if evidence.pe_addition and not evidence.ce_traces(): - return row | verdict(evidence.current, "pe-only", "added in PE, no CE evidence") - if evidence.pe_addition and evidence.pe_module_descriptor(): - return row | verdict(evidence.current, "pe-only", "build descriptor of a module that does not exist in CE") - return row | open_question(evidence) + inferred = infer(evidence) + curation = evidence.curation + if curation is None: + return row | inferred + if curation["contentHash"] != evidence.content_hash: + return row | {"status": "stale-curation", "expectedHeader": None, + "reason": "file changed since the curation, re-review and update contentHash"} + if inferred["expectedHeader"] == curation["header"]: + return row | inferred | {"redundantCuration": True} + return row | verdict(evidence.current, curation["header"], "curation: " + curation["reason"]) + + +def infer(evidence): + if evidence.ce_versions: + versions = {"ceVersions": list(evidence.ce_versions)} + if evidence.identical is None: + return verdict(evidence.current, "ce-modified", "same path in CE, content differs") | versions + reason = ("same path in CE, content identical" if "blob" in evidence.identical + else "same path in CE, content identical to a clean merge of its CE versions") + return verdict(evidence.current, "apache", reason) | versions | {"identicalTo": evidence.identical} + if evidence.module_descriptor(): + return verdict(evidence.current, NON_CE, "build descriptor of a module that does not exist in CE") + if evidence.copies: + suggested = "apache" if evidence.copies[0]["similarity"] == 100 else None + return unresolved("similar content exists in CE under another path", suggested, + copyCandidates=list(evidence.copies)) + if evidence.deleted is not None: + return unresolved("CE history had this path", None, historicalCandidate=evidence.deleted) + return verdict(evidence.current, NON_CE, "not in CE, no CE evidence") def verdict(current, expected, reason): return {"status": "match" if current == expected else "mismatch", "expectedHeader": expected, "reason": reason} -def curated_verdict(evidence): - curation = evidence.curation - if curation["contentHash"] != evidence.content_hash: - return {"status": "stale-curation", "expectedHeader": None, - "reason": "file changed since the curation, re-review and update contentHash"} - return verdict(evidence.current, curation["header"], "curation: " + curation["reason"]) - - -def open_question(evidence): - strong = evidence.strong - ranked = [ - (evidence.candidates, "identical content exists in CE under another path", "apache"), - (evidence.copies, "similar content exists in CE under another path", None), - (strong, "CE history has this path or content", None), - (evidence.in_comparison, "present in CE, but not in the shared ancestry", None), - (True, "no CE evidence, but not proven to be added in PE", "pe-only"), - ] - _, reason, suggested = next(item for item in ranked if item[0]) - return { - "status": "unresolved", - "expectedHeader": None, - "suggestedHeader": suggested, - "reason": reason, - "candidates": evidence.candidates[:10], - "historicalCandidates": strong[:10], - "copyCandidates": list(evidence.copies), - "candidateCount": len(evidence.candidates), - "historicalCandidateCount": len(strong), - } +def unresolved(reason, suggested, **candidates): + return {"status": "unresolved", "expectedHeader": None, "suggestedHeader": suggested, "reason": reason} | candidates @dataclass(frozen=True) class Lineage: head: str - baseline: str - anchor: str - boundary: str - ce_commits: frozenset - ce_changes: list - comparison: dict - shared: dict - pe_tree: dict - additions: dict - recreated: frozenset + bases: tuple + trees: dict + deleted: dict @classmethod - def load(cls, repo, head, baseline): + def load(cls, repo, head, bases): if git(repo, "rev-parse", "--is-shallow-repository").decode().strip() == "true": raise Failure("this clone is shallow and the check needs full history. Run git fetch --unshallow.") - anchor = unique_base(repo, head, baseline) - ce_chain = first_parent_commits(repo, baseline) - ce_commits = frozenset(ce_chain) - if anchor not in ce_commits: - raise Failure("the shared ancestor is not on the CE ref's first-parent chain. " - "Pass the CE mainline branch that the PE branch integrates.") - boundary = integration_boundary(repo, anchor, head) - shared = tree(repo, anchor) - additions = {} - for change in history(repo, head, "--diff-filter=A"): - additions.setdefault(change.path, change.commit) - ce_changes = history(repo, baseline) - divergent = frozenset(ce_chain[:ce_chain.index(anchor)]) - divergence = (history(repo, f"{boundary}..{head}") - + [change for change in ce_changes if change.commit in divergent]) - return cls( - head=head, - baseline=baseline, - anchor=anchor, - boundary=boundary, - ce_commits=ce_commits, - ce_changes=ce_changes, - comparison=tree(repo, baseline), - shared=shared, - pe_tree=tree(repo, head), - additions=additions, - recreated=frozenset(change.path for change in divergence - if change.status in {"A", "D"} and change.path in shared), - ) - - def unmatched(self, names): - return {name for name in names - if name not in self.shared or name not in self.comparison or name in self.recreated} - - def pe_addition(self, name): - if name not in self.pe_tree: - return True - return name in self.additions and self.additions[name] not in self.ce_commits - - def added_by(self, name): - if name not in self.pe_tree: - return self.additions.get(name, "working-tree addition") - return self.additions.get(name) - - -def historical_versions(ce_changes, unmatched): - basenames = {PurePosixPath(name).name for name in unmatched} - versions = {} - for change in ce_changes: - if change.path not in unmatched and PurePosixPath(change.path).name not in basenames: - continue - oid = change.old if change.deleted else change.new - if set(oid) == {"0"}: - continue - versions.setdefault((change.path, oid), change.commit + "^1" if change.deleted else change.commit) - return versions + deleted = {} + for base in bases: + for change in history(repo, base, "--diff-filter=D"): + deleted.setdefault(change.path, {"path": change.path, "ref": change.commit + "^1", "blob": change.old}) + return cls(head=head, bases=tuple(bases), trees={base: tree(repo, base) for base in bases}, deleted=deleted) + + def versions(self, name): + return [(base, files[name]) for base, files in self.trees.items() if name in files] def comparable_ce_files(comparison, names): @@ -909,108 +840,114 @@ def comparable_ce_files(comparison, names): class Comparison: lineage: Lineage contents: dict - unmatched: set headers: dict normalized: dict - nonempty: set copies: dict - exact_index: dict - historic_index: dict + merges: dict ce_directories: frozenset def classify(self, name, curation): - key = ("pe", name) - lineage = self.lineage - unmatched = name in self.unmatched - historic = self.historical_candidates(name) if unmatched else [] - evidence = Evidence( + key = ("head", name) + versions = self.lineage.versions(name) + identical = next(({"path": name, "ref": base, "blob": oid} for base, oid in versions + if self.normalized[(name, oid)] == self.normalized[key]), self.merges.get(name)) + copies = sorted(self.copies.get(name, []), key=lambda copy: (-copy["similarity"], copy["path"])) + return decide(Evidence( path=name, content_hash=raw_hash(self.contents[name]), current=self.headers[key], curation=curation, - inherited=name in lineage.shared, - recreated=name in lineage.recreated, - ce_hash=self.normalized.get((name, lineage.comparison.get(name))), - pe_hash=self.normalized[key], - candidates=self.exact_index.get(self.normalized[key], []) if unmatched else [], - historical=historic, - in_comparison=name in lineage.comparison, - pe_addition=lineage.pe_addition(name), - copies=self.copies.get(name, []), + ce_versions=tuple({"path": name, "ref": base, "blob": oid} for base, oid in versions), + identical=identical, + copies=tuple(copies), + deleted=self.lineage.deleted.get(name), directory_in_ce=str(PurePosixPath(name).parent) in self.ce_directories, - ce_ref=lineage.baseline, - ce_blob=lineage.comparison.get(name), - ) - row = decide(evidence) - if unmatched: - row["peAddition"] = lineage.added_by(name) - row["basenameHintCount"] = len(historic) - len(evidence.strong) - return row - - def historical_candidates(self, name): - key = ("pe", name) - candidates = [] - for version in self.historic_index.get(PurePosixPath(name).name, []): - matches = (key in self.nonempty - and self.normalized[key] == self.normalized[(version["path"], version["blob"])]) - candidates.append(version | {"contentMatches": matches}) - candidates.sort(key=lambda candidate: (not candidate["contentMatches"], candidate["path"] != name)) - return candidates + )) def compare(repo, plugin, lineage, contents): names = list(contents) - unmatched = lineage.unmatched(names) - versions = historical_versions(lineage.ce_changes, unmatched) - counterparts = comparable_ce_files(lineage.comparison, names) - source_refs = versions | {key: lineage.baseline for key in counterparts.items()} - bytes_by_id = blobs(repo, [oid for _, oid in source_refs]) + new_paths = {name for name in names if not lineage.versions(name)} + sources = {} + for base, files in lineage.trees.items(): + for name in names: + if name in files: + sources.setdefault((name, files[name]), base) + for key in comparable_ce_files(files, new_paths).items(): + sources.setdefault(key, base) + bytes_by_id = blobs(repo, [oid for _, oid in sources]) with tempfile.TemporaryDirectory(prefix="license-provenance-") as temporary: mycila = Mycila(repo, Path(temporary), plugin) for name, content in contents.items(): - mycila.add(("pe", name), name, content) - for path, oid in sorted(source_refs): + mycila.add(("head", name), name, content) + for path, oid in sorted(sources): mycila.add((path, oid), path, bytes_by_id[oid]) console.begin("Recognizing headers") - recognized = mycila.current_headers([("pe", name) for name in names]) + recognized = mycila.current_headers([("head", name) for name in names]) console.end() console.begin("Comparing against CE") normalized = mycila.strip_headers() headers = mycila.header_states(recognized) - nonempty = mycila.nonempty() - copies = normalized_copies(mycila, source_refs, unmatched, nonempty) - exact_index = defaultdict(list) - for path, oid in counterparts.items(): - if (path, oid) in nonempty: - exact_index[normalized[(path, oid)]].append({"path": path, "ref": lineage.baseline, "blob": oid}) - historic_index = defaultdict(list) - for (path, oid), ref in versions.items(): - historic_index[PurePosixPath(path).name].append({"path": path, "ref": ref, "blob": oid}) + copies = normalized_copies(mycila, sources, new_paths, mycila.nonempty()) + merges = clean_merges(repo, plugin, lineage, names, normalized) console.end(f"done ({len(normalized)} file versions)") return Comparison( lineage=lineage, contents=contents, - unmatched=unmatched, headers=headers, normalized=normalized, - nonempty=nonempty, copies=copies, - exact_index=dict(exact_index), - historic_index=dict(historic_index), - ce_directories=frozenset(str(parent) for path in lineage.comparison for parent in PurePosixPath(path).parents), + merges=merges, + ce_directories=frozenset(str(parent) for files in lineage.trees.values() + for path in files for parent in PurePosixPath(path).parents), ) +def clean_merges(repo, plugin, lineage, names, normalized): + merged = {} + for index, left in enumerate(lineage.bases): + for right in lineage.bases[index + 1:]: + ancestors = git(repo, "merge-base", "--all", left, right).decode().split() + if len(ancestors) != 1: + continue + ancestry = tree(repo, ancestors[0]) + for name in names: + ours, theirs = lineage.trees[left].get(name), lineage.trees[right].get(name) + if ours is None or theirs is None or ours == theirs or name not in ancestry: + continue + if normalized[("head", name)] in {normalized[(name, ours)], normalized[(name, theirs)]}: + continue + content = merge_blobs(repo, ours, ancestry[name], theirs) + if content is not None: + merged[(name, left, right)] = (content, {"path": name, "merge": [left, right], + "base": ancestors[0]}) + if not merged: + return {} + with tempfile.TemporaryDirectory(prefix="license-provenance-") as temporary: + mycila = Mycila(repo, Path(temporary), plugin) + for key, (content, _) in merged.items(): + mycila.add(key, key[0], content) + hashes = mycila.strip_headers() + result = {} + for key, (_, description) in merged.items(): + if hashes[key] == normalized[("head", key[0])]: + result.setdefault(key[0], description) + return result + + def current_branch(repo): branch = git(repo, "rev-parse", "--abbrev-ref", "HEAD").decode().strip() return "" if branch == "HEAD" else branch -def print_banner(repo, head, ce_remote, ce_ref, baseline): +def print_banner(repo, head, ce): console.line("License header provenance check") - console.line(f" PE head {head[:11]} {current_branch(repo)}".rstrip()) - console.line(f" CE remote {ce_remote}") - console.line(f" CE ref {ce_ref}" + (f" → {baseline[:11]}" if baseline != ce_ref else "")) + console.line(f" HEAD {head[:11]} {current_branch(repo)}".rstrip()) + if "ref" in ce: + console.line(f" CE remote {ce['remote']}") + console.line(f" CE ref {ce['ref']}" + (f" → {ce['commit'][:11]}" if ce["commit"] != ce["ref"] else "")) + else: + console.line(f" CE commits without the relicensing commit {ce['relicensingCommit'][:11]} in their history") console.line() @@ -1039,16 +976,15 @@ def describe_mismatch(row): def describe_unresolved(row, ref_names): hint = f" (hint: {row['suggestedHeader']})" if row.get("suggestedHeader") else "" details = [f"has {header_name(row['currentHeader'])}, no expected header yet{hint}"] - evidence = ([("exact CE match", candidate) for candidate in row.get("candidates", [])] - + [(f"similar CE file ({candidate['similarity']}%)", candidate) - for candidate in row.get("copyCandidates", [])] - + [("CE history", candidate) for candidate in row.get("historicalCandidates", [])]) + evidence = [(f"similar CE file ({candidate['similarity']}%)", candidate) + for candidate in row.get("copyCandidates", [])] + if "historicalCandidate" in row: + evidence.append(("CE history", row["historicalCandidate"])) if not evidence: return details + [row["reason"]] label, candidate = evidence[0] details.append(f"{label}: {candidate['path']} at {ref_name(candidate['ref'], ref_names)}") - others = (row.get("candidateCount", 0) + len(row.get("copyCandidates", [])) - + row.get("historicalCandidateCount", 0) - 1) + others = len(evidence) - 1 if others > 0: details.append(f"another {others} candidate{'s' if others != 1 else ''} in the report") return details @@ -1058,8 +994,12 @@ def describe_stale(row): return [row["reason"]] -def print_group(title, rows, describe, hint): - console.line(f"{title} ({len(rows)})", "red") +def describe_redundant(row): + return [f"curated {row['expectedHeader']}, the check decides {row['expectedHeader']} by itself"] + + +def print_group(title, rows, describe, hint, style="red"): + console.line(f"{title} ({len(rows)})", style) for row in rows: console.line(f" {row['path']}") for detail in describe(row): @@ -1084,6 +1024,16 @@ def print_restamped(rows): console.line() +def print_removed_curations(removed): + if not removed: + return + console.line(f"Removed curations ({len(removed)})", "green") + for entry in removed: + console.line(f" {entry['path']}") + console.line(f" {entry['reason']}") + console.line() + + def print_findings(rows, curation_issues, ref_names): mismatches = [row for row in rows if row["status"] == "mismatch"] unresolved = [row for row in rows if row["status"] == "unresolved"] @@ -1096,7 +1046,14 @@ def print_findings(rows, curation_issues, ref_names): print_group("Needs a decision", unresolved, lambda row: describe_unresolved(row, ref_names), f"Decide the origin and add a curation, see {README}") if stale: - print_group("Stale curations", stale, describe_stale, f"Remove or update the entry in {CURATIONS}") + hint = (f"Review the file and update the entry in {CURATIONS}; --fix removes entries of files no longer in scope" + if any(row["status"] == "stale-curation" and "contentHash" in row for row in stale) + else "Rerun with --fix to remove them") + print_group("Stale curations", stale, describe_stale, hint) + redundant = [row for row in rows if row.get("redundantCuration")] + if redundant: + print_group("Redundant curations", redundant, describe_redundant, + f"Rerun with --fix to remove them from {CURATIONS}", style=None) def print_summary(rows, curation_issues, report): @@ -1145,8 +1102,8 @@ def restamp(repo, plugin, rows, contents): templates = {header: template_lines(content) for header, content in mycila.templates.items()} for name, header in current.items(): if header not in TEMPLATES: - expected[("pe", name)] = wanted[name] - mycila.add(("pe", name), name, contents[name]) + expected[("head", name)] = wanted[name] + mycila.add(("head", name), name, contents[name]) continue try: stamped[name] = swap_header(contents[name], templates[header], templates[wanted[name]]) @@ -1157,9 +1114,9 @@ def restamp(repo, plugin, rows, contents): stamped |= {key[1]: content for key, content in results.items()} skipped |= {key[1]: reason for key, reason in rejected.items()} for name, content in stamped.items(): - if ("pe", name) not in mycila.paths: - mycila.add(("pe", name), name, content) - headers = mycila.current_headers([("pe", name) for name in stamped]) + if ("head", name) not in mycila.paths: + mycila.add(("head", name), name, content) + headers = mycila.current_headers([("head", name) for name in stamped]) wrong = sorted(key[1] for key, header in headers.items() if header != wanted[key[1]]) if wrong: raise Failure(f"Restamping did not produce the expected header: {wrong[:20]}") @@ -1174,13 +1131,32 @@ def restamp(repo, plugin, rows, contents): console.end(f"{len(stamped)} files" + (f", {len(skipped)} skipped" if skipped else "")) +def prune_curations(path, rows, orphaned): + obsolete = {row["path"]: "the check decides the same header by itself" for row in rows if row.get("redundantCuration")} + obsolete |= {row["path"]: row["reason"] for row in orphaned} + if not obsolete: + return [] + data = json.loads(path.read_text(encoding="utf-8")) + data["curations"] = [entry for entry in data["curations"] if entry["path"] not in obsolete] + path.write_text(json.dumps(data, indent=2, ensure_ascii=False) + "\n", encoding="utf-8") + for row in rows: + row.pop("redundantCuration", None) + return [{"path": name, "reason": reason} for name, reason in sorted(obsolete.items())] + + def check(args): repo = repository_root() head = resolve(repo, "HEAD") - console.begin(f"Fetching {args.ce_ref} from {args.ce_remote}") - baseline = fetch(repo, args.ce_remote, args.ce_ref) - console.end() - print_banner(repo, head, args.ce_remote, args.ce_ref, baseline) + if args.ce_ref: + console.begin(f"Fetching {args.ce_ref} from {args.ce_remote}") + baseline = fetch(repo, args.ce_remote, args.ce_ref) + console.end() + ce = {"remote": args.ce_remote, "ref": args.ce_ref, "commit": baseline} + ref_names = {baseline: args.ce_ref} + else: + ce = {"relicensingCommit": RELICENSING_COMMIT} + ref_names = {} + print_banner(repo, head, ce) destination = report_destination(repo, args.output) plugin = read_plugin(repo) reject_module_overrides(repo) @@ -1188,8 +1164,9 @@ def check(args): curation_bytes = curation_path.read_bytes() curations = load_curations(curation_path) console.begin("Resolving Git history") - lineage = Lineage.load(repo, head, baseline) - console.end() + bases = merged_ce_bases(repo, head, ce["commit"]) if "ref" in ce else relicensed_ce_bases(repo, head) + lineage = Lineage.load(repo, head, bases) + console.end("done (CE base " + ", ".join(ref_name(base, ref_names) for base in bases) + ")") console.begin("Collecting Mycila scope") scope = discover_scope(repo, plugin) console.end(f"{len(scope.eligible)} files ({scope.ignored} Git-ignored skipped)") @@ -1200,19 +1177,21 @@ def check(args): orphaned = [{"path": name, "status": "stale-curation", "reason": "file is no longer in scope"} for name in sorted(set(curations) - set(scope.eligible))] ensure_inputs_unchanged(repo, lineage, curation_path, curation_bytes, contents) + removed = [] if args.fix: restamp(repo, plugin, rows, contents) + removed = prune_curations(curation_path, rows, orphaned) + orphaned = [] summary = Counter(row["status"] for row in rows) result = { - "schemaVersion": 1, - "peHead": lineage.head, - "ceComparison": {"remote": args.ce_remote, "input": args.ce_ref, "commit": lineage.baseline}, - "ceHistory": {"tip": lineage.baseline, "firstParent": True}, - "sharedAncestor": lineage.anchor, - "peIntegrationBoundary": lineage.boundary, + "schemaVersion": 2, + "head": lineage.head, + "ce": ce | {"bases": list(lineage.bases)}, "scope": {"supported": len(scope.eligible), "unknown": scope.unknown, "modules": scope.modules}, "summary": dict(summary), "restamped": sorted(row["path"] for row in rows if "previousHeader" in row), + "removedCurations": removed, + "redundantCurations": sorted(row["path"] for row in rows if row.get("redundantCuration")), "curationIssues": orphaned, "files": rows, } @@ -1220,7 +1199,8 @@ def check(args): destination.write_text(json.dumps(result, indent=2, ensure_ascii=False) + "\n", encoding="utf-8") report = destination.relative_to(repo) if destination.is_relative_to(repo) else destination print_restamped(rows) - print_findings(rows, orphaned, {baseline: args.ce_ref}) + print_removed_curations(removed) + print_findings(rows, orphaned, ref_names) print_summary(rows, orphaned, report) return 1 if orphaned or summary.keys() - {"match"} else 0 @@ -1228,14 +1208,15 @@ def check(args): def main(argv=None): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("command", choices=["check"]) - parser.add_argument("--ce-ref", required=True, - help="CE tree and first-parent history to check against; a branch, tag, or commit " - "of the CE repository, fetched from --ce-remote on every run") + parser.add_argument("--ce-ref", + help="CE branch, tag, or commit that this branch integrates, fetched from --ce-remote; " + "without it, CE is the history that does not contain the relicensing commit") parser.add_argument("--ce-remote", default=CE_REMOTE, help=f"Git URL or path of the CE repository to fetch --ce-ref from (default: {CE_REMOTE})") parser.add_argument("--output", default="target/license-provenance/report.json") parser.add_argument("--fix", action="store_true", - help="restamp files whose expected header the check determined; unrecognized headers are kept") + help="restamp files whose expected header the check determined and remove redundant or " + "orphaned curations; unrecognized headers are kept") args = parser.parse_args(argv) try: return check(args) diff --git a/tools/src/main/python/license-headers/curations.json b/tools/src/main/python/license-headers/curations.json index 24d666cad7..349b467ed5 100644 --- a/tools/src/main/python/license-headers/curations.json +++ b/tools/src/main/python/license-headers/curations.json @@ -21,43 +21,43 @@ }, { "path": "application/src/main/java/org/thingsboard/server/service/edge/rpc/fetch/IntegrationsEdgeEventFetcher.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message IntegrationsEdgeEventFetcher.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/edge/rpc/fetch/DevicesEdgeEventFetcher.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob a5461f8dbad84f4fe8c7fbededef00b55194dc60).", "contentHash": "sha256:be65c16d06ead4246c0f643391006aa1f94f03ce1ae2d6204e8f2296af5a1b27" }, { "path": "application/src/main/java/org/thingsboard/server/service/edge/rpc/fetch/PublicCustomerUserGroupEdgeEventFetcher.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message PublicCustomerUserGroupEdgeEventFetcher.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/edge/rpc/fetch/CustomerEdgeEventFetcher.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 43b4cb4d874eae2dedfd1c5f37e6de36b086a934).", "contentHash": "sha256:010b08d77586afad2bf0a4275f58d3b2288663b70e155fd4843b2ff0a26bbc85" }, { "path": "application/src/main/java/org/thingsboard/server/service/edge/rpc/fetch/SchedulerEventsEdgeEventFetcher.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message SchedulerEventsEdgeEventFetcher.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/edge/rpc/fetch/OtaPackagesEdgeEventFetcher.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 1e4579338841150ec1ec3a92a94aa92bb5ce0a4d).", "contentHash": "sha256:517a1c83d0f0152606cf20f08eabd9000d1eb69b24e364513f6d1de6f7129c0e" }, { "path": "application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/ek/EncryptionKeyEdgeProcessor.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message EncryptionKeyEdgeProcessor.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/tenant/TenantProfileEdgeProcessor.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob c9ae94086dae1febc08dbfa31ef5c06f07ec54f7).", "contentHash": "sha256:6c92f974c7d8fc9670126f7aab0b9f0dde82fd6c9ca4661cfc1f7d8d59ecb41f" }, { "path": "application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/secret/SecretEdgeProcessor.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message SecretEdgeProcessor.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/queue/QueueEdgeProcessor.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8e5a65b588937e5703ff87f301be023d27ce1808).", "contentHash": "sha256:6f960791993777f636b230e3829422af292370a5b5a113b082dc2d05ee151491" }, { "path": "application/src/main/java/org/thingsboard/server/service/integration/rpc/IntegrationSessionCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate application/src/main/java/org/thingsboard/server/service/sync/vc/VersionControlTaskCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d234314aee9f02efb853f0a3372f9e0de1b7869c).", "contentHash": "sha256:c9a90236fcf1d34d67c1fce37580b30be8f0bfea4cd2f6c1f0a49ba38203f0ec" }, { "path": "application/src/main/java/org/thingsboard/server/service/integration/rpc/IntegrationSessionRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate application/src/main/java/org/thingsboard/server/service/sync/vc/repository/RepositorySettingsRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob e7ca801e138a16a706d25723ffb7983b2e7850ee).", "contentHash": "sha256:7493855212ea1a169ca6746df584c829fb40ca834259fa6381b38cf84dba2345" }, @@ -69,25 +69,25 @@ }, { "path": "application/src/main/java/org/thingsboard/server/service/solutions/data/definition/EdgeEntityGroupDefinition.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message EdgeEntityGroupDefinition.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/solutions/data/definition/DashboardUserDetailsDefinition.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 2ec470182985b893360eda095d9b3bf4d68652bd).", "contentHash": "sha256:5655c383fe30473d814ba43fb456e8f5324954fe00a1faf6f69d2295df00727f" }, { "path": "application/src/main/java/org/thingsboard/server/service/solutions/data/definition/SchedulerEventDefinition.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message SchedulerEventDefinition.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/solutions/data/definition/DeviceDefinition.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 81239c46dd5f0e3c24c9fc52dff3ba1075dbbd1e).", "contentHash": "sha256:8135b6d076e6d6381428bd0992aa8f216260ecacec165cbb8d7e2e40f137601d" }, { "path": "application/src/main/java/org/thingsboard/server/service/sync/ie/exporting/impl/CustomerExportService.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message CustomerExportService.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/sync/ie/exporting/impl/NotificationTemplateExportService.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob c3fc08f097f8e8ec1c90406211ad433947c5ecdd).", "contentHash": "sha256:ae8c3bbc5fbb804a32fc2fb7d5aef7be5c6bd11e434e5f0d41226f5099e3696b" }, { "path": "application/src/main/java/org/thingsboard/server/service/sync/ie/exporting/impl/RoleExportService.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message RoleExportService.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/sync/ie/exporting/impl/NotificationTemplateExportService.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob c3fc08f097f8e8ec1c90406211ad433947c5ecdd).", "contentHash": "sha256:a7ede744921df38436eeab40ce73847e0c04e95c469cfb61c593439466ac1aae" }, @@ -105,25 +105,25 @@ }, { "path": "application/src/main/java/org/thingsboard/server/service/ws/log/cmd/LogsSubscriptionCmd.java", - "header": "pe-only", + "header": "busl", "reason": "PE WebSocket logs subscription command added in 4005afabb81 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE application/src/main/java/org/thingsboard/server/service/ws/notification/cmd/MarkAllNotificationsAsReadCmd.java shares only the WebSocket command boilerplate. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 47cb85519d0).", "contentHash": "sha256:8b74007cf36b206be04ea7f1ca385b34c58256647a645a88d2e90188f8b3fd3f" }, { "path": "application/src/main/java/org/thingsboard/server/service/ws/log/cmd/LogsUnsubscribeCmd.java", - "header": "pe-only", + "header": "busl", "reason": "PE WebSocket logs subscription command added in 4005afabb81 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE application/src/main/java/org/thingsboard/server/service/ws/notification/cmd/NotificationsUnsubCmd.java shares only the WebSocket command boilerplate. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 1a7a6119358).", "contentHash": "sha256:fd319f8910fa50f4db8dd30fe3f90e60e34910e1ddc0bb9db390db64f56b27db" }, { "path": "application/src/test/java/org/thingsboard/server/service/install/update/DefaultDataUpdateServiceTest.java", - "header": "pe-only", + "header": "busl", "reason": "CE deleted its DefaultDataUpdateServiceTest (version 3.3.0 device profile conversion tests) in ba440ba7c1f. PE recreated a test at the same path in cdae38adc6b with entirely new content covering the CE-to-PE upgrade chain; nothing of the CE file (last CE version 40527f3da02^1, blob abfab844917) remains beyond the class name.", "contentHash": "sha256:c0ebbc47ce2ff97d2e00182781ed38ca137ad54393e706c064c0ca6919b27eb8" }, { "path": "application/src/test/java/org/thingsboard/server/service/integration/rpc/IntegrationRpcSslTest.java", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE application/src/test/java/org/thingsboard/server/service/edge/rpc/EdgeGrpcSslTest.java, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:ee00a93535d92e1b048a3c79b90e9741c8091a3db7c794eb3dd2aa38aee18142" }, @@ -153,79 +153,79 @@ }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentAppProfileCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in 41416ebe327 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE dao/src/main/java/org/thingsboard/server/dao/dashboard/DashboardTitlesCaffeineCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob f2e2f32f037).", "contentHash": "sha256:7fd51b57a41b929355ecef4546c78a3f93512341dbb7cc945ad4ffefbb2ab387" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentAppProfileRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in 41416ebe327 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE dao/src/main/java/org/thingsboard/server/dao/dashboard/DashboardTitlesRedisCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 4c1bf7dedbe).", "contentHash": "sha256:031627cc6dcd58cf6c6d6716354b44683c9941f3df7de5e402553c85dc3b2d95" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentAppUnitCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in ad644d12571 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE application/src/main/java/org/thingsboard/server/service/mobile/secret/MobileSecretCaffeineCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 54a7dbffd4a).", "contentHash": "sha256:990761d74d185d7a442431414535c9d17fda135fbc277bdf47aa2d96f19fd05b" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentAppUnitRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in ad644d12571 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE application/src/main/java/org/thingsboard/server/service/mobile/secret/MobileSecretRedisCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 93fd57a5349).", "contentHash": "sha256:a47374fba6bde5c35994d2032c4a411800a182f6cb6839143d3a682161a078df" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentApplicationCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in af7fd5a1e48 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE application/src/main/java/org/thingsboard/server/service/mobile/secret/MobileSecretCaffeineCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 54a7dbffd4a).", "contentHash": "sha256:155d0c7a83e8d7ed9b286aacde0c4a38678683c274b266cea76aa0df28ed497b" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentApplicationRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in af7fd5a1e48 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE application/src/main/java/org/thingsboard/server/service/mobile/secret/MobileSecretRedisCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 93fd57a5349).", "contentHash": "sha256:e21a3ff66992dbd39dcf90beac995d995021589e4704bbee562a7939386ec2d0" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in 7a16579509e as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/cache/src/main/java/org/thingsboard/server/cache/user/UserCaffeineCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 3eb9c3f16f6).", "contentHash": "sha256:2dc0d5327adb18a679896841e5513b1de0cf818737e227d5cd95089902d2ed1f" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentProfileCacheEvictEvent.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache evict event added in 6c303b45f74 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE dao/src/main/java/org/thingsboard/server/dao/asset/AssetCacheEvictEvent.java shares only the cache evict event boilerplate. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob b3fcac6e36b).", "contentHash": "sha256:9f304ce36c924585ac28fea987f026555f550c77db5272c43a2b0144eb89d34b" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentProfileCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in 6c303b45f74 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/cache/src/main/java/org/thingsboard/server/cache/edge/RelatedEdgesCaffeineCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 5227ae6ab4b).", "contentHash": "sha256:a3e5ff4080061f355876a3578e239dd3897178155b48a8f9891549422a5ce868" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentProfileRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in 6c303b45f74 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE dao/src/main/java/org/thingsboard/server/dao/asset/AssetProfileRedisCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 2e200a04882).", "contentHash": "sha256:5d2b42b22d657f1db2afa6e1ad3edaccabc0f44ed0a1d13ea3423aafcaff9d50" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in 7a16579509e as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE dao/src/main/java/org/thingsboard/server/dao/asset/AssetRedisCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 488c9f37404).", "contentHash": "sha256:479b7a977e88848a1990e583ffafa3cc21661b5541be191225638ae32267c8ea" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/secret/SecretCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate common/cache/src/main/java/org/thingsboard/server/cache/user/UserCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 3eb9c3f16f619210d6ccdf4e3084ee36ec954796).", "contentHash": "sha256:f1e0248aa094af0c672f09ef90f85787d0a3133c50ea65be357a732ea7205c04" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/secret/SecretRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/tenant/TenantRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob ce21e1ffbb0b41ca7d6272d469bd4b8e436debeb).", "contentHash": "sha256:57d9b4ecaf1793a33a3df7df6a3eae5e1327e5e31cee77ef4fd6da3b4163c707" }, @@ -237,187 +237,187 @@ }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/CustomMenuDeleteResult.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type CustomMenuDeleteResult.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/TbImageDeleteResult.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 85c2cdacc01a8a75e3daa236ff7a698817a3a162).", "contentHash": "sha256:23f6394bb5203ef9d3334bf3089f07fe41ab673d9345f356f602bf65fcca33d1" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/SecretType.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type SecretType.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/HasName.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 24d65f5772e82f4a4a408e21aaf0fd051080c547).", "contentHash": "sha256:3a8512446f1164abbbcca0e424e8da1ec16cef85520d280ca1c42650acbce2d9" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/TbSecretDeleteResult.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type TbSecretDeleteResult.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/TbResourceDeleteResult.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d2b359f23bb29e608b20ab8b9859c8f0ddc2d66a).", "contentHash": "sha256:9c8df7fb5c8b07d9ebdf6cc46c98efee2134b867f1f92d738b0843c7b0a944a1" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/agent/AgentInstructions.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent installation instructions model added in e0db7ac7154 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/data/src/main/java/org/thingsboard/server/common/data/edge/EdgeInstructions.java shares only the instructions model boilerplate. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 409985284c6).", "contentHash": "sha256:ce067f7aad61fb79c44ac80ceda3b26e9908a8a648380097754ff9ee097256b1" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/BlobEntityFields.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type BlobEntityFields.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/EntityViewFields.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d21d495cf1871bdeca471f00d92c73d4d444a12a).", "contentHash": "sha256:0fc26ec79e200fe6bf97b58993a9830be23175c260155764408f3f3b7d84bed1" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/ConverterFields.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type ConverterFields.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/RuleChainFields.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d8dd1c8a433275ae690d5ca9296a55b5c23bf464).", "contentHash": "sha256:660e6258198919edbbc5a08704fb9eee5dbaf797d248da0c96987957ae03ca16" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/IntegrationFields.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type IntegrationFields.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/RuleChainFields.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d8dd1c8a433275ae690d5ca9296a55b5c23bf464).", "contentHash": "sha256:7c07ebe99b44c9d69f05eb88cdc680b03f30cbc26d115e74980fa9a5df2e2c70" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/RoleFields.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type RoleFields.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/EntityViewFields.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d21d495cf1871bdeca471f00d92c73d4d444a12a).", "contentHash": "sha256:603f0ba6af402c8f7bc499bfa09e88472bcab45f4d1b5fe55efd29cc3b1af194" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/event/IntegrationDebugEvent.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type IntegrationDebugEvent.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/event/RuleChainDebugEvent.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob c6b34615adad82d53a1a913956f7517064548c35).", "contentHash": "sha256:5e585c566be6b92d56bd6331144861c1b0a0d5529c07dbc6de340ed805bc23e0" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/event/RawDataEvent.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type RawDataEvent.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/event/RuleChainDebugEvent.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob c6b34615adad82d53a1a913956f7517064548c35).", "contentHash": "sha256:c0e10159c33bea76a60a6f0f62d756ae181d1a3bac045c10978f2b7aaa82223b" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/event/RawDataEventFilter.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type RawDataEventFilter.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/event/ErrorEventFilter.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8b1a03b8480db898d3d6182de8f9cd91588daaf9).", "contentHash": "sha256:9329939e43514544231b9329f3f190ada2872780773c3bbb60fadcec8726174d" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/housekeeper/EntitiesCleanupHousekeeperTask.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type EntitiesCleanupHousekeeperTask.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/housekeeper/TenantEntitiesDeletionHousekeeperTask.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob be7ff6f7ecaee9e9afe78f097a8945d92a0dae88).", "contentHash": "sha256:b568f724c8f1ba201545a387c302af3a3376288d5bb8101c3151cd1d421eb38f" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/AgentAppEventId.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity id added in c17541e44d6 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/data/src/main/java/org/thingsboard/server/common/data/id/CalculatedFieldId.java shares only the entity id boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 094df0e9354).", "contentHash": "sha256:0c99ed7caf9ec1e379c26d9cdf43be0dd82ed0a91c5dee58f1786ffd97123e57" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/AgentAppProfileId.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity id added in 41416ebe327 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/data/src/main/java/org/thingsboard/server/common/data/id/OtaPackageId.java shares only the entity id boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob f9f508f13f2).", "contentHash": "sha256:ce4de69553918cb1630f5efbc255fb767490927b54713d6c828e81c5fa5e59f1" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/AgentAppUnitId.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity id added in ad644d12571 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/data/src/main/java/org/thingsboard/server/common/data/id/OtaPackageId.java shares only the entity id boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob f9f508f13f2).", "contentHash": "sha256:afef46f334d3bc87fe2a8959d12b8c8032861e084421119836160d73a90ef953" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/AgentApplicationId.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity id added in af7fd5a1e48 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/data/src/main/java/org/thingsboard/server/common/data/id/CalculatedFieldId.java shares only the entity id boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 094df0e9354).", "contentHash": "sha256:ac7ba9e268ea1806fb8a589b108f1e60f86696170fea1787f2bca12cf2fc76bb" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/AgentBulkActionId.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity id added in bd59c7ca3b1 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/data/src/main/java/org/thingsboard/server/common/data/id/CalculatedFieldId.java shares only the entity id boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 094df0e9354).", "contentHash": "sha256:72511cab888de959c7d07a447c1e75d6422634bf4a40f0bf3c8acb252bb29fa3" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/AgentId.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity id added in 297416ceb40 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/data/src/main/java/org/thingsboard/server/common/data/id/CalculatedFieldId.java shares only the entity id boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 094df0e9354).", "contentHash": "sha256:6802bd0d22005158617e0dafb29a0594b3a8f6a6a48bf76aa3c2e55094cf06d0" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/AgentProfileId.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity id added in 6c303b45f74 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/data/src/main/java/org/thingsboard/server/common/data/id/OtaPackageId.java shares only the entity id boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob f9f508f13f2).", "contentHash": "sha256:3b401949924a7959176f33288586ebaa9d5faad8c6b9512c9388b42ad628502b" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/BlobEntityId.java", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/id/QueueStatsId.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 7a921e875505b9f45e1074958631ba146263c31b).", "contentHash": "sha256:f9f618191dabbebf321eed10073d66f2e8179d46866a797b13905f120e5994d3" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/ConverterId.java", - "header": "pe-only", + "header": "busl", "reason": "PE-only entity ID wrapper introduced in 7914c997a70cd903ac248f896c0fb27ea96cef18. Its similarity to common/data/src/main/java/org/thingsboard/server/common/data/id/AssetId.java reflects the shared ID-wrapper template. Maintainer explicitly resolved ConverterId as PE-authored because converters are a PE-only feature; the same resolution applies to this comparable PE-only entity wrapper.", "contentHash": "sha256:8deda011e1724896c0de879f8c0222f741d830a47e906bdad2b1d88529ed6f61" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/CustomMenuId.java", - "header": "pe-only", + "header": "busl", "reason": "PE-only entity ID wrapper introduced in 60c8fb1928699c07128c3e6beb43964687a5333c. Its similarity to common/data/src/main/java/org/thingsboard/server/common/data/id/AdminSettingsId.java reflects the shared ID-wrapper template. Maintainer explicitly resolved ConverterId as PE-authored because converters are a PE-only feature; the same resolution applies to this comparable PE-only entity wrapper.", "contentHash": "sha256:6a1db9c609fe31e1dfb256bfb6ada0eb8e93168ad5c55f31dc37d66fc6b75c11" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/EncryptionKeyId.java", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/id/UserCredentialsId.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 6c17ba5aec7d3e4b1e07f3a5e89fe144441fb0a4).", "contentHash": "sha256:7e225578277de32f0d700b6aecd1e6a65b9295e866a268e392c1bf1a2655c65e" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/EntityGroupId.java", - "header": "pe-only", + "header": "busl", "reason": "PE-only entity ID wrapper introduced in 887106583064b1bc0383d25614fbeda418e3d6d6. Its similarity to common/data/src/main/java/org/thingsboard/server/common/data/id/AssetId.java reflects the shared ID-wrapper template. Maintainer explicitly resolved ConverterId as PE-authored because converters are a PE-only feature; the same resolution applies to this comparable PE-only entity wrapper.", "contentHash": "sha256:05abfcc7a496011ddbceaa4f3de74be4c3ee2501ea58c00415be583ed3150dd3" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/GroupPermissionId.java", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/id/DeviceId.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 7dd840815b540966a1dc57440cf5108a35119552).", "contentHash": "sha256:63be26285040fa04f1a6013308facf49230e5f84926faeb16c6ed580b7a983c7" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/IntegrationId.java", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/id/QueueId.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob c7ee46da2adae547e4b7714d7070bb610274f571).", "contentHash": "sha256:0e7a96c5a4887b56312319e305a991fd6bd73d6659e668b0a75d0a7d91d1cd34" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/ReportId.java", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/id/UserId.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d4f113bef57ca782c35511ea2a8fbd3e364b9d9b).", "contentHash": "sha256:6abcc328dcb3049873c5b1a193b642b7cb25848740aaa98e5250ad44cd7bfed6" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/ReportTemplateId.java", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/id/DeviceId.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 7dd840815b540966a1dc57440cf5108a35119552).", "contentHash": "sha256:73395faf888c2d8f87478352625208900a16d4a2be3f025e118fe93fc1b67992" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/RoleId.java", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/id/QueueId.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob c7ee46da2adae547e4b7714d7070bb610274f571).", "contentHash": "sha256:e79ad6b47c787958d36ef4907e3b5f7710df51aeca037fcb930558910a074b6c" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/SchedulerEventId.java", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/id/DeviceId.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 7dd840815b540966a1dc57440cf5108a35119552).", "contentHash": "sha256:154a64d766ce75dcf9be0838b6996cfe7112ee77416c33ec08a2db209088b1a3" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/SecretId.java", - "header": "pe-only", + "header": "busl", "reason": "PE-only entity ID wrapper introduced in 2d5a5b65587edb42acf3b415b1689065c905d493. Its similarity to common/data/src/main/java/org/thingsboard/server/common/data/id/NotificationTemplateId.java reflects the shared ID-wrapper template. Maintainer explicitly resolved ConverterId as PE-authored because converters are a PE-only feature; the same resolution applies to this comparable PE-only entity wrapper.", "contentHash": "sha256:03a67a1bea463f9ad641dfc4f27f82ef1936a47745dbd019d9f9ea0a88623db8" }, @@ -429,49 +429,49 @@ }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/menu/CustomMenuConfig.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type CustomMenuConfig.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/mobile/layout/MobileLayoutConfig.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8cf0bfb6182c8d094f765109db4e901222cb6448).", "contentHash": "sha256:8dd8c85820f87b3a6c97440bf3df112e4f5f74f109ced154d2a129ac89f54147" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/menu/MenuItem.java", - "header": "pe-only", + "header": "busl", "reason": "PE custom menu model interface introduced in 2eb81a2baa9 alongside CustomMenuConfig. The candidate CE DeviceConfiguration.java matches only on Jackson polymorphism annotations, not on the menu model. Reviewed candidate at 317a75614137ab5ddd1aecef1abd4c2fcdcb8710 (blob 6fe689d17c0).", "contentHash": "sha256:da19b1162913a636119fcc953d6366b990d24a6fda8df540497653bb317407b0" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/notification/info/IntegrationLifecycleEventNotificationInfo.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type IntegrationLifecycleEventNotificationInfo.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/notification/info/RuleEngineComponentLifecycleEventNotificationInfo.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob aa71e620bd31d4520a52f12a4968542407f3b649).", "contentHash": "sha256:dfaccc965ece5db3133d1b9615190c56cd288f91da82cd98313a23d4733e2252" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/notification/info/PlanUpgradeRequestNotificationInfo.java", - "header": "pe-only", + "header": "busl", "reason": "PE plan upgrade request notification added in 358c8ec5e5f for the PE solution template level check. The candidate CE EntitiesLimitIncreaseRequestNotificationInfo.java shares only the NotificationInfo and Lombok boilerplate and carries different fields. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob f00014567d9).", "contentHash": "sha256:42eceb50f497f9f0b5022b1fdc06157926f458d59376d24c285fb5fbb590617f" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/notification/info/ReportGeneratedNotificationInfo.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type ReportGeneratedNotificationInfo.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/notification/info/EdgeConnectionNotificationInfo.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 05fa093fb717fabbac402bf1255fba78b86fbef1).", "contentHash": "sha256:8eeb130cc283f525cf47d693e61fbdec0c29b32c2912e51473a909042c7ab812" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/IntegrationLifecycleEventTrigger.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type IntegrationLifecycleEventTrigger.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/RuleEngineComponentLifecycleEventTrigger.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob e4c967c19792ecf5fa6409973459efe5ce73cb8d).", "contentHash": "sha256:c5da9a11ed196635c09972733cf511bee2bd111242c0d084d115d37e2e7524c5" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/notification/targets/platform/UserGroupListFilter.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type UserGroupListFilter.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/notification/targets/platform/UserListFilter.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob e0adb26d59bf493b3e53444327c6da6255806853).", "contentHash": "sha256:64563fbc6ee416025b555c14cf3c517c5027bfc112a883078cc717ed471c5b52" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/notification/targets/platform/UserRoleFilter.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type UserRoleFilter.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/notification/targets/platform/UserListFilter.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob e0adb26d59bf493b3e53444327c6da6255806853).", "contentHash": "sha256:007e94e798f25a9d0ccd1716b8a68eada4fe3ced71e531bd0538c2c56e24ecb7" }, @@ -489,43 +489,43 @@ }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/query/EntityGroupListFilter.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type EntityGroupListFilter.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/query/EntityListFilter.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 43feb031908aaabba3677d8bc78aaa814bb03010).", "contentHash": "sha256:7c6b5eaa41feb8a6e50e808da65c682b2b28e9b8736510fd50e5371f0856c91e" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/query/EntityGroupNameFilter.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type EntityGroupNameFilter.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/query/EntityNameFilter.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob a3889bc7c07de44917eac165a9c4e8578bbbcd62).", "contentHash": "sha256:46cc0073210fb81fb1a71f44604042da6056f78f62468cf45bdc78cdaf8cdd09" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/query/StateEntityFilter.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type StateEntityFilter.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/query/SingleEntityFilter.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 046f86f4146154859564ad3aa69aa84aadc47139).", "contentHash": "sha256:46835b82b0320007209a5d53528f9fdb534af41c2fcb5a528754c316c530394a" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/query/StateEntityOwnerFilter.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type StateEntityOwnerFilter.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/query/SingleEntityFilter.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 046f86f4146154859564ad3aa69aa84aadc47139).", "contentHash": "sha256:7a975a7d8a09186888ef9c4bda1153d9a07b0e05a7229b05d1fd949fc969dc76" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/report/configuration/AlarmFilterConfig.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type AlarmFilterConfig.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/query/AlarmCountQuery.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 77003a9452ddada65e857f343fcdb952a16b88c9).", "contentHash": "sha256:96317b71595643540f2a5311ab9328e88a54e764fa56d9ba36b8be48a6af69de" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/setup/LicenseClaimInfo.java", - "header": "pe-only", + "header": "busl", "reason": "New PE DTO for in-product license activation, added with the setup flow in 973423dc272. The only similarity to CE common/data/src/main/java/org/thingsboard/server/common/data/TbProperty.java is Lombok annotation boilerplate.", "contentHash": "sha256:b3e742bbbe86fc3f050320c7f84a4db986130d94db0648384b8138b8f0a30b23" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/setup/SetupInfo.java", - "header": "pe-only", + "header": "busl", "reason": "New PE DTO for the first-time system setup state, added with the setup flow in 973423dc272. The only similarity to CE common/data/src/main/java/org/thingsboard/server/common/data/TbProperty.java is Lombok annotation boilerplate.", "contentHash": "sha256:270369239ea8a5fac515ab759903b9f993268b5d32cf830afcb210cba1783a97" }, @@ -537,85 +537,85 @@ }, { "path": "common/integration/cluster-integration-api/src/main/java/org/thingsboard/server/service/integration/downlink/DownlinkCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate common/cache/src/main/java/org/thingsboard/server/cache/user/UserCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 3eb9c3f16f619210d6ccdf4e3084ee36ec954796).", "contentHash": "sha256:a9d0227cd25ad5c855d8c7c44096974883ab975cc518ead6c816e6d8d5710621" }, { "path": "common/integration/cluster-integration-api/src/main/java/org/thingsboard/server/service/integration/downlink/DownlinkRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/relation/RelationRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 11ef52d606360951413466ee2ae966f8f7a0181b).", "contentHash": "sha256:d354b1117c635eefc6d2abd6ca574ef2f738cdf06b52fa2c92a64548f5826973" }, { "path": "common/integration/integration-api/src/main/java/org/thingsboard/integration/api/util/ExceptionUtil.java", - "header": "pe-only", + "header": "busl", "reason": "The PE integration utility was introduced in e3e90e9a96a9ade8e4dc8f97dccd9e6c4b71a839 (2021-11-03), before the matching common/util CE path appeared on the selected mainline in 95f07b39942 (2023-08-15). The later CE match does not establish that this PE utility was inherited from that CE path. Reviewed CE candidate common/util/src/main/java/org/thingsboard/common/util/ExceptionUtil.java at 95f07b39942cdf63d6cb8c95b05d2abe9de2601e (blob 2ec15f3724b7eaa46d5016485d087535570cdb4e).", "contentHash": "sha256:694f9344df39779e731ca8bced08184b4d364b172f7da9b4a3050a1b851c3d37" }, { "path": "common/integration/integration-api/src/main/java/org/thingsboard/integration/api/util/TbIntegrationExecutorOrIntegrationComponent.java", - "header": "pe-only", + "header": "busl", "reason": "PE service activation annotation. Conditional component wiring identifies PE integration processes; shared Spring annotation syntax is launch scaffolding, which the maintainer resolved as PE-only. Reviewed similarity candidate common/queue/src/main/java/org/thingsboard/server/queue/util/TbCoreComponent.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 224f52fb329eedd5b6be37d9625c17f81032086c).", "contentHash": "sha256:2532fe77ca3458baffa12c317daff7af64e72ae3b74509dbf4ca7295378e2417" }, { "path": "common/integration/mqtt-integrations/src/main/java/org/thingsboard/integration/mqtt/azure/AzureIotHubSasCredentials.java", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/mqtt/azure/AzureIotHubSasCredentials.java, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:8e35a5cf2c10fcfa6a922a60aabdd0864358dc9efdc73f6db76eab58153cb9c0" }, { "path": "common/integration/mqtt-integrations/src/main/java/org/thingsboard/integration/mqtt/credentials/AnonymousCredentials.java", - "header": "pe-only", + "header": "busl", "reason": "The MQTT integration credential family originated in PE application/service/integration/mqtt in d601117d0fa (2017-12-25) and moved into the integration module in 72a187ee116 (2019-06-11). The matching CE rule-engine family appeared later on the selected CE mainline in 9fce3e068e4 (2018-05-28); this is retained PE integration code. Reviewed CE candidate rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/mqtt/credentials/AnonymousCredentials.java at 1265a9a1e364aed339377b05f93354f01fa949f5 (blob dfbba93de5a7c073e09582db5ffae79f02fa8df4).", "contentHash": "sha256:eb7bf7aaa4d8670c119c148af47fabfe66edbe3c544d0a04185a3943ff090d71" }, { "path": "common/integration/mqtt-integrations/src/main/java/org/thingsboard/integration/mqtt/credentials/BasicCredentials.java", - "header": "pe-only", + "header": "busl", "reason": "Retained PE MQTT integration credentials from the original application/service/integration/mqtt credential family, moved into common/integration by 72a187ee116. The later CE rule-engine credential counterpart is not evidence that the earlier PE integration family was inherited from CE. Reviewed CE candidate rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/mqtt/credentials/BasicCredentials.java at 1265a9a1e364aed339377b05f93354f01fa949f5 (blob 9674115d7572c1b3d9eee2015dc73de4b6ca555c).", "contentHash": "sha256:5523afe4ef62be834ceba35909248ebcaf85b657d765c536376273aae6e50126" }, { "path": "common/integration/mqtt-integrations/src/main/java/org/thingsboard/integration/mqtt/credentials/CertPemClientCredentials.java", - "header": "pe-only", + "header": "busl", "reason": "Retained PE MQTT integration client-certificate credentials from the original integration credential family. Similar CE rule-engine credential implementations do not establish CE origin for that earlier PE family; PE supplies its client-certificate configuration. Reviewed CE candidate rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/credentials/CertPemCredentials.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 46d844d2c4aff3d5af24802dfee974f0af416113).", "contentHash": "sha256:d4ae03b84f499bede7580d21ed131995793ee01d9a5bbd602f48a1a47325e896" }, { "path": "common/integration/mqtt-integrations/src/main/java/org/thingsboard/integration/mqtt/credentials/MqttClientCredentials.java", - "header": "pe-only", + "header": "busl", "reason": "PE integration credential interface and subtype registration, retained from the integration family introduced in d601117d0fa before its CE rule-engine counterpart. Its Jackson subtype declarations identify PE integration credential implementations. Reviewed CE candidate rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/mqtt/credentials/MqttClientCredentials.java at c041b3f44d100acf6289bc0a8f4004f9854f533e^1 (blob 1c397614ea5a08d5caf132dcd3b22c08e9194b0e).", "contentHash": "sha256:e5bf626f0429ecf2aee0a251d48ce96338d726271ab78fd3dcbdd5060f6a52cc" }, { "path": "common/queue/src/main/java/org/thingsboard/server/queue/provider/KafkaTbIntegrationExecutorQueueFactory.java", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE common/queue/src/main/java/org/thingsboard/server/queue/provider/KafkaTbRuleEngineQueueFactory.java, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:23520476f4bc1b69a96abb6fc37d5988d00ef874d7bc769be4b60c316926d1dc" }, { "path": "common/queue/src/main/java/org/thingsboard/server/queue/settings/TbQueueIntegrationApiSettings.java", - "header": "pe-only", + "header": "busl", "reason": "Configuration value holder for the PE integration API queue. Shared Spring property/queue-settings syntax is PE service scaffolding; it does not establish inheritance from transport API settings. Reviewed candidate common/queue/src/main/java/org/thingsboard/server/queue/settings/TbQueueTransportApiSettings.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 2cf2465e0489576f87dbbf9eb58928aac4964682).", "contentHash": "sha256:824e280c760c6765eb5a18c10497e001aec3e1dc2c4c3bd78a7de3c771675dec" }, { "path": "common/queue/src/main/java/org/thingsboard/server/queue/util/TbCoreOrIntegrationExecutorComponent.java", - "header": "pe-only", + "header": "busl", "reason": "PE service activation annotation. Conditional component wiring identifies PE integration processes; shared Spring annotation syntax is launch scaffolding, which the maintainer resolved as PE-only. Reviewed similarity candidate common/queue/src/main/java/org/thingsboard/server/queue/util/TbCoreComponent.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 224f52fb329eedd5b6be37d9625c17f81032086c).", "contentHash": "sha256:a947f906aa032b9d76b794ec6e0a1efa7e0738f2be7d53306b71b02652e73095" }, { "path": "common/queue/src/main/java/org/thingsboard/server/queue/util/TbIntegrationComponent.java", - "header": "pe-only", + "header": "busl", "reason": "PE service activation annotation. Conditional component wiring identifies PE integration processes; shared Spring annotation syntax is launch scaffolding, which the maintainer resolved as PE-only. Reviewed similarity candidate common/queue/src/main/java/org/thingsboard/server/queue/util/TbCoreComponent.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 224f52fb329eedd5b6be37d9625c17f81032086c).", "contentHash": "sha256:9b51d060dbba0e2955286a26aedea80c0f90321c80256028f28e543098cbd9f7" }, { "path": "common/queue/src/main/java/org/thingsboard/server/queue/util/TbIntegrationExecutorComponent.java", - "header": "pe-only", + "header": "busl", "reason": "PE service activation annotation. Conditional component wiring identifies PE integration processes; shared Spring annotation syntax is launch scaffolding, which the maintainer resolved as PE-only. Reviewed similarity candidate common/queue/src/main/java/org/thingsboard/server/queue/util/TbCoreComponent.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 224f52fb329eedd5b6be37d9625c17f81032086c).", "contentHash": "sha256:ab1938bf307d633bebb4653d4ad2ed7d9da046e3c52ed4feb5eefca2fa21542b" }, @@ -663,67 +663,67 @@ }, { "path": "dao/src/main/java/org/thingsboard/server/dao/agent/AgentSessionCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in 0860d0b3960 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/cache/src/main/java/org/thingsboard/server/cache/edge/RelatedEdgesCaffeineCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 5227ae6ab4b).", "contentHash": "sha256:aafceb8b51bf36086486d42fda7a649a641d5f445d98c7a15ff8ad02bdabbac2" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/agent/AgentSessionRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in 0860d0b3960 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/cache/src/main/java/org/thingsboard/server/cache/edge/RelatedEdgesRedisCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 992d730c040).", "contentHash": "sha256:fec697d4d3b9bef98b9bc70409c3686ba113e3b105648ce50b5b9d11bd9a56dd" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/alarm/AlarmTypeNamesCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE alarm type names cache added in 96e98fab02d (PR #4809), a new cache of HashSet per tenant. The candidate CE TenantExistsCaffeineCache.java shares only the Caffeine cache boilerplate. Reviewed candidate at 317a75614137ab5ddd1aecef1abd4c2fcdcb8710 (blob 3012eba487d).", "contentHash": "sha256:45395fcd7c6fe21de78753964c237c0eca266b98fb45585a2c93db4127ac9ffe" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/alarm/AlarmTypeNamesRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE alarm type names cache added in 96e98fab02d (PR #4809), a new cache of HashSet per tenant. The candidate CE AlarmTypesRedisCache.java shares only the Redis cache boilerplate and caches a different value type. Reviewed candidate at 317a75614137ab5ddd1aecef1abd4c2fcdcb8710 (blob 5a194f53c90).", "contentHash": "sha256:b81968eeb66338075a41b39a4cc23969afc1549034ec8d22ee271db558ecabd3" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/group/EntityGroupCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate application/src/main/java/org/thingsboard/server/service/sync/vc/VersionControlTaskCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d234314aee9f02efb853f0a3372f9e0de1b7869c).", "contentHash": "sha256:56211a47297025cb13f32ff0084ff83a05c2ab9867d8899c75f1864091146719" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/group/EntityGroupRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/edge/EdgeSessionRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 5815e6a2b12e512aee3840fcf5854cd7a356323c).", "contentHash": "sha256:83d5b9463bc6c4ea25507b3b39bfe2f8074aee086d3bca6fded23c1b5be051f5" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/integration/IntegrationCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/asset/AssetProfileCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob b8f7ffb2999a137d289e9770a5bba49cfc8d2586).", "contentHash": "sha256:362ff6b017d0194cca8a0c5dea141f6dededb69bf869bc5bfafdc5c3d4ce6352" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/integration/IntegrationRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/edge/EdgeSessionRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 5815e6a2b12e512aee3840fcf5854cd7a356323c).", "contentHash": "sha256:5b0efbb6186386c04a4e3a3b945bb14a5076da308219b7605db4b3ed8614cda1" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/mail/MailOauth2StateCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/tenant/TenantExistsCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 3012eba487d178cfd04ae4daa8836ff3c682fc10).", "contentHash": "sha256:1e3416c13ff454bf0a715e2077eb8319f0c2e2486d55dfee545335787d723f05" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/mail/MailOauth2StateRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/dashboard/DashboardTitlesRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 4c1bf7dedbe2011e9e4f64438b54abfb13c5ea9c).", "contentHash": "sha256:0b87f32876ccabf2e3556ca55a2601069df02cffb5176c9401b5dcfb950d2ec5" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/menu/CustomMenuRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/ota/OtaPackageRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob f6d3be49ad455d23778055b73a2b4e173b6af2e6).", "contentHash": "sha256:cbb54a6efdf2def2c28508ac213452548f0ddb86d39f3680dad3f4eb89dd5014" }, @@ -747,73 +747,73 @@ }, { "path": "dao/src/main/java/org/thingsboard/server/dao/model/sql/RawDataEventEntity.java", - "header": "pe-only", + "header": "busl", "reason": "PE raw-event persistence mapping. Fields, event type and construction of RawDataEvent implement the PE event model; shared EventEntity/JPA boilerplate is a template pattern rather than a relocated CE entity. Reviewed candidate dao/src/main/java/org/thingsboard/server/dao/model/sql/RuleChainDebugEventEntity.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob aaf7ff2b6e51339993941058855269fd4d9bdc57).", "contentHash": "sha256:cfa8ba902a093c7d70c5feade1a9b234d138f4732999ceb7c171db66d36d5cde" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/role/RoleCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/entityview/EntityViewCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 2c6fa38067b1eb54a9ffe38403aa468e3b7a969b).", "contentHash": "sha256:12900991af3126054c70c7728f7eca028d7d99be2012327bec5d8f1c92de8950" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/role/RoleRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate common/cache/src/main/java/org/thingsboard/server/cache/user/UserRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d29adee75fa437835aff754e546988e96634462b).", "contentHash": "sha256:c7655f346e31d8246589338841e355e26e2214b7756cb1df86182c1b94904b96" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/sql/encryptionkey/EncryptionKeyRepository.java", - "header": "pe-only", + "header": "busl", "reason": "PE persistence interface EncryptionKeyRepository.java. Reviewed Spring Data declarations/query bindings target PE entities and event tables; shared repository declaration/query conventions do not establish CE file lineage. Reviewed candidate dao/src/main/java/org/thingsboard/server/dao/sql/mobile/QrCodeSettingsRepository.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 1c3698a65321ae135c121273cffad1823037efc6).", "contentHash": "sha256:2f21444816a51a96ca08b86deaae88752cd06a15ed77090bd23d95c2322c8237" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/sql/event/ConverterDebugEventRepository.java", - "header": "pe-only", + "header": "busl", "reason": "PE persistence interface ConverterDebugEventRepository.java. Reviewed Spring Data declarations/query bindings target PE entities and event tables; shared repository declaration/query conventions do not establish CE file lineage. Reviewed candidate dao/src/main/java/org/thingsboard/server/dao/sql/event/RuleChainDebugEventRepository.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d78a927584d361e4e493b0350deea08e0cbcffae).", "contentHash": "sha256:127aa93c838e333ee9cfd46ff9d7cc3115a4c2fae494e15c164ba48f3b1f5ce2" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/sql/event/IntegrationDebugEventRepository.java", - "header": "pe-only", + "header": "busl", "reason": "PE persistence interface IntegrationDebugEventRepository.java. Reviewed Spring Data declarations/query bindings target PE entities and event tables; shared repository declaration/query conventions do not establish CE file lineage. Reviewed candidate dao/src/main/java/org/thingsboard/server/dao/sql/event/RuleChainDebugEventRepository.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d78a927584d361e4e493b0350deea08e0cbcffae).", "contentHash": "sha256:0811f9b5587cd522b098029ffeda922cbcb787d9559b9de95ca5c96df73bcc9b" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/sql/event/RawEventRepository.java", - "header": "pe-only", + "header": "busl", "reason": "PE persistence interface RawEventRepository.java. Reviewed Spring Data declarations/query bindings target PE entities and event tables; shared repository declaration/query conventions do not establish CE file lineage. Reviewed candidate dao/src/main/java/org/thingsboard/server/dao/sql/event/ErrorEventRepository.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob bed19b008d18634d8e4c35fcbe059bad3a51ae51).", "contentHash": "sha256:a89153896cfac844fdc9747b211715273fbdb3ec57e368df2537a6e9c8178b3e" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/sql/secret/SecretRepository.java", - "header": "pe-only", + "header": "busl", "reason": "PE persistence interface SecretRepository.java. Reviewed Spring Data declarations/query bindings target PE entities and event tables; shared repository declaration/query conventions do not establish CE file lineage. Reviewed candidate dao/src/main/java/org/thingsboard/server/dao/sql/domain/DomainRepository.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob fc35b71fb97fa795345886a607a01cedac36b43a).", "contentHash": "sha256:6eb360663c17d9dba72b69a858ca199c45644ea63c2a9519c1421e302479f2b5" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/translation/CustomTranslationRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/device/DeviceCredentialsRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob a3521a8e79ce09595ae48480d4883378af97510c).", "contentHash": "sha256:93b54abaf0465bfe2bdd36cabc3fce721d23136c0d2b107bd2c8de911f16b846" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/user/UserPermissionCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/user/UserSettingsCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 3aee29656141d963210ac1fa2732fd7cc9ef4242).", "contentHash": "sha256:5922b2b6e7fff8efc57de90dd591617c6dd96697bda52ff820545aa80afe6311" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/wl/WhiteLabelingCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/tenant/TenantProfileCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 1cf96e785a610b8ddf08c3743ee8ccf1c94737b4).", "contentHash": "sha256:293c4b75b530ae131651fc0282a26695709f47d3d9a847d7cb04be880d2603e6" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/wl/WhiteLabelingRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/tenant/TenantProfileRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob b70176297a970343f9c824cb823d0a0ecfe19188).", "contentHash": "sha256:141ab2848c00ab580599bc175dee897549c7454633f13fa31e5feb203fb361b0" }, @@ -825,385 +825,385 @@ }, { "path": "integration/apache-pulsar/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/apache-pulsar/src/main/conf/tb-apache-pulsar-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/apache-pulsar/src/main/java/org/thingsboard/integration/ThingsboardApachePulsarIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:e936a600d1f54ca816ecd3ddf0a4b2b332067766655e2af824615f3d6bb27460" }, { "path": "integration/apache-pulsar/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/aws/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/aws/src/main/conf/tb-aws-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/aws/src/main/java/org/thingsboard/integration/ThingsboardAwsSqsIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:6db6655a9081907a488c37863bcfee9caf51580cf50a4f67ccfeb7b9306eee99" }, { "path": "integration/aws/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/azure/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/azure/src/main/conf/tb-azure-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/azure/src/main/java/org/thingsboard/integration/ThingsboardAzureIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:25141e16043e4890a099837f6aca125b5d67726ad7b14886b88b289493d38292" }, { "path": "integration/azure/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/coap/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/coap/src/main/conf/tb-coap-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/coap/src/main/java/org/thingsboard/integration/ThingsboardCoapIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:691ed1e7c96845e81ccfdcf522c836794f4045180c74d50be1613122517397c4" }, { "path": "integration/coap/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/executor/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate msa/tb/docker/logback.xml at 64332ecaa07735ee5bc6e5d7e644cf0aec396dd8 (blob 01fc5d30a832ee07355a38acf32823b3dd1b9e34).", "contentHash": "sha256:3771054bb15eb923916b680806c34710c166152c75e02180ebe5d59c119d3e11" }, { "path": "integration/executor/src/main/conf/tb-integration-executor.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate msa/vc-executor/src/main/conf/tb-vc-executor.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:07b101062bdea0f8e83c43bf23e31611b95e253320b7764d6be3e50c2a1a3578" }, { "path": "integration/executor/src/main/java/org/thingsboard/integration/ThingsboardIntegrationExecutorApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:e90986dc965608a6880ae3af8dbf5ffb1c0c980f6237f274cddbaf68daf557f1" }, { "path": "integration/executor/src/main/java/org/thingsboard/integration/service/IntegrationQueueRoutingInfoService.java", - "header": "pe-only", + "header": "busl", "reason": "PE integration-executor wiring: this dummy routing implementation returns no rule-engine queues/routing because the integration executor does not produce rule-engine messages. Shared service-interface syntax is PE launch scaffolding. Reviewed candidate msa/vc-executor/src/main/java/org/thingsboard/server/vc/service/VersionControlQueueRoutingInfoService.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 5ad54b92f7318c9b181ba7ccbbf65d14e3fa5558).", "contentHash": "sha256:6f249d1322eaf2d54074772efa5467c8ce5a77353d7ea6c05ee12057b37831cf" }, { "path": "integration/executor/src/main/java/org/thingsboard/integration/service/IntegrationTenantRoutingInfoService.java", - "header": "pe-only", + "header": "busl", "reason": "PE integration-executor wiring: this dummy routing implementation returns no rule-engine queues/routing because the integration executor does not produce rule-engine messages. Shared service-interface syntax is PE launch scaffolding. Reviewed candidate msa/vc-executor/src/main/java/org/thingsboard/server/vc/service/VersionControlTenantRoutingInfoService.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 397eecf629f9b8296ad846d71a7a971006b25d3d).", "contentHash": "sha256:e1059ec007348a1020278d34ee67613d814d16d639c1c27e5f731fddfb0e4299" }, { "path": "integration/executor/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate msa/vc-executor/src/main/resources/logback.xml at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob c868af4b6c1fbb8e65d18387d577ddf5d8c9dd71).", "contentHash": "sha256:82f1e20adbaeadfe9fcc4b5fa65580e48cbf26d39dd0e8bd205db3bfb2842b7b" }, { "path": "integration/executor/src/main/resources/tb-integration-executor.yml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/tb-coap-transport.yml at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob f9909e5fdc19ee9137cbbb45d775c72337a106c5).", "contentHash": "sha256:6c0f39b89e3c6ede1649cebaa652ebe06f8680c157b2e85d1788bd4fb777c138" }, { "path": "integration/http/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/http/src/main/conf/tb-http-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/http/src/main/java/org/thingsboard/integration/ThingsboardHttpIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:59f8ead9c9b6253a580f01a239eda2ccc43a851aeebaec97a37d23230ab66ef3" }, { "path": "integration/http/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/kafka/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/kafka/src/main/conf/tb-kafka-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/kafka/src/main/java/org.thingsboard.integration/ThingsboardKafkaIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:27244242d6347081f7df657de86a0094141fcd531d19c23ea05598662274c393" }, { "path": "integration/kafka/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/mqtt/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/mqtt/src/main/conf/tb-mqtt-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/mqtt/src/main/java/org/thingsboard/integration/ThingsboardMqttIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:d86b071123017296f700b39fd782125f3781f752000e7b682f5b5d19b47ca786" }, { "path": "integration/mqtt/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/opc-ua/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/opc-ua/src/main/conf/tb-opc-ua-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/opc-ua/src/main/java/org/thingsboard/integration/ThingsboardOpcUaIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:90d84265a8162ad0c7a41af520eea332d30860b6b7bc5b7fc1bbd26a0b79a872" }, { "path": "integration/opc-ua/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/pubsub/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/pubsub/src/main/conf/tb-pubsub-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/pubsub/src/main/java/org.thingsboard.integration/ThingsboardPubsubIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:3094ee2d2c68ec0d8a9408c94fc0e0a4b10ce509a13c017f87863ca5dc16cf7a" }, { "path": "integration/pubsub/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/rabbitmq/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/rabbitmq/src/main/conf/tb-rabbitmq-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/rabbitmq/src/main/java/org.thingsboard.integration/ThingsboardRabbitMQIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:ed34f503030a866f28185e57e49f587c0d9e60ac920b8d1f04f70a92709f1be9" }, { "path": "integration/rabbitmq/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/tcp-udp/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/tcp-udp/src/main/conf/tb-tcp-udp-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/tcp-udp/src/main/java/org/thingsboard/integration/ThingsboardTcpUdpIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:ee08452a0831c93e2a1ff1bfd94cb59555b98942fbdfcb4f380a7aba0560cd21" }, { "path": "integration/tcp-udp/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/tuya/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/tuya/src/main/conf/tb-tuya-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/tuya/src/main/java/org.thingsboard.integration/ThingsboardTuyaIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:4b2e581ef56329a1697517256829c3414da7c759db9584737583d09efe6c6cbf" }, { "path": "integration/tuya/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "migrator/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate msa/black-box-tests/src/test/resources/logback.xml at 5cf26d485143c27f8d445a6f5c91d0d71dab69ec (blob 305a2d2df4890c446daf6a9d6a295aaa26a94b4f).", "contentHash": "sha256:48892851f4af439ea2710cb51547b6e19e498a845361081a13602da0cd0291ee" }, { "path": "migrator/src/main/conf/tb-migrator.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate msa/vc-executor/src/main/conf/tb-vc-executor.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:c0c3e9f37faf24271c879fe6da9f309ff0d1e79625a4c0f047f006f77186121a" }, { "path": "migrator/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate msa/black-box-tests/src/test/resources/logback.xml at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob ceb1aa9a969295acae909a08bc69335635994c08).", "contentHash": "sha256:2e3102a6f69e2a198581f84619160003dbee70b236b9782a6bcb44b3ff7c040a" }, { "path": "monitoring/src/main/java/org/thingsboard/monitoring/config/integration/IntegrationMonitoringTarget.java", - "header": "pe-only", + "header": "busl", "reason": "Data holder for PE integration-monitoring targets. Its integration/device configuration fields and simple interface accessors are a PE feature type, analogous to the maintainer-resolved PE entity wrappers. Reviewed CE candidate monitoring/src/main/java/org/thingsboard/monitoring/config/transport/TransportMonitoringTarget.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 7fa6ec3f461008043d90cdadec4d1bc18da2e238).", "contentHash": "sha256:25f4ef99a14df1d2e94444440be0ac3c78f11eab18b4fef95ba7045fea2659f2" }, { "path": "monitoring/src/main/java/org/thingsboard/monitoring/service/integration/impl/CoapIntegrationHealthChecker.java", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE monitoring/src/main/java/org/thingsboard/monitoring/service/transport/impl/CoapTransportHealthChecker.java, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:d052fff33aea9d375bbfa2c1655bc016a7d4232cc1aed77be9534dc23f6068e9" }, { "path": "monitoring/src/main/java/org/thingsboard/monitoring/service/integration/impl/HttpIntegrationHealthChecker.java", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE monitoring/src/main/java/org/thingsboard/monitoring/service/transport/impl/HttpTransportHealthChecker.java, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:7a4b0c71c3185997d717d3ff197f7734826141bb89347b054dd5277a5979e8da" }, { "path": "monitoring/src/main/java/org/thingsboard/monitoring/service/integration/impl/MqttIntegrationHealthChecker.java", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE monitoring/src/main/java/org/thingsboard/monitoring/service/transport/impl/MqttTransportHealthChecker.java, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:cb5c91b3db565f7378a2e4876568d438492c46dd212fb34a82fa99cb40a7ddf5" }, { "path": "msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomerEntityView.java", - "header": "pe-only", + "header": "busl", "reason": "New PE customer/entity-view UI scenario; shared TestNG/Selenium customer setup and navigation conventions do not make it the CE customer-user management test. Reviewed CE candidate msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomersUsersTest.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 6207b643a76b1101e57a8ec3165f7e10e23289bc).", "contentHash": "sha256:0ad2805b0448e73070dc19dcd848470c213e0fb18da4b0798ab1021c9e311d1f" }, { "path": "msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomerGroupsTest.java", - "header": "pe-only", + "header": "busl", "reason": "New PE customer-group UI scenario. Groups are a PE feature; shared TestNG/Selenium setup and customer navigation are test scaffolding, not the candidate CE customer-user scenario. Reviewed CE candidate msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomersUsersTest.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 6207b643a76b1101e57a8ec3165f7e10e23289bc).", "contentHash": "sha256:d28050eb87aeb2e254427bec8b9a4a827d355624c867457f3ab8b05868ce89cd" }, @@ -1215,193 +1215,193 @@ }, { "path": "msa/black-box-tests/src/test/resources/advanced/mosquitto/mosquitto.conf", - "header": "pe-only", + "header": "busl", "reason": "PE integration-test broker fixture introduced in 295c81a3b6a (2021-11-01); the matching CE test path appeared later on this mainline in fb66d2fdfd8 (2024-01-10). Its two-line listener/anonymous-access configuration is test scaffolding, not meaningful proof of CE inheritance. Reviewed CE candidate msa/black-box-tests/src/test/resources/mosquitto/mosquitto.conf at fb66d2fdfd837cb094668e04355251269feadeac (blob 7136ad64b0374eac9f46beb35d033a2f97eeb448).", "contentHash": "sha256:b16ddb9bcfd179a9348c678e530e50924d8d678f2c9e1c05012deae7cb7969ea" }, { "path": "msa/black-box-tests/src/test/resources/black-box.xml", - "header": "pe-only", + "header": "busl", "reason": "PE black-box test setup and logging/suite configuration. This selects the PE test environment and scenarios using shared configuration syntax. Curated as PE-only test scaffolding consistently with the maintainer decision for PE module launch/logging files. Reviewed similarity candidate msa/black-box-tests/src/test/resources/connectivity.xml at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 7cd96bb429343ed9153b67281b1e48602beb28c7).", "contentHash": "sha256:2a0dca3720c2f97ea0c782b69e2ff574656838600f459b31ff2ccff857147695" }, { "path": "msa/black-box-tests/src/test/resources/solutionTemplates.xml", - "header": "pe-only", + "header": "busl", "reason": "PE black-box test setup and logging/suite configuration. This selects the PE test environment and scenarios using shared configuration syntax. Curated as PE-only test scaffolding consistently with the maintainer decision for PE module launch/logging files. Reviewed similarity candidate msa/black-box-tests/src/test/resources/smokeDevices.xml at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob cfcd51065f974c4474ffc02b1912edd5ae6e4ff9).", "contentHash": "sha256:9640476817a2a1ef28061a3694a4363984449f489c576385fe1528dd4a626dc0" }, { "path": "msa/black-box-tests/src/test/resources/tb-integration/coap/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "PE black-box test setup and logging/suite configuration. This selects the PE test environment and scenarios using shared configuration syntax. Curated as PE-only test scaffolding consistently with the maintainer decision for PE module launch/logging files. Reviewed similarity candidate docker/tb-transports/lwm2m/conf/logback.xml at 7667afaeae02ab3dcc6a8bb389ad6f0ab14cb441 (blob 199e138fc165b8522bc723ad1cd947fc927afeaa).", "contentHash": "sha256:34387c217c4f5832535c8e13006d9298af50daad948d9ec1f5e1d6b1592719e8" }, { "path": "msa/black-box-tests/src/test/resources/tb-integration/http/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "PE black-box test setup and logging/suite configuration. This selects the PE test environment and scenarios using shared configuration syntax. Curated as PE-only test scaffolding consistently with the maintainer decision for PE module launch/logging files. Reviewed similarity candidate docker/tb-transports/lwm2m/conf/logback.xml at 7667afaeae02ab3dcc6a8bb389ad6f0ab14cb441 (blob 199e138fc165b8522bc723ad1cd947fc927afeaa).", "contentHash": "sha256:0a3de0e8a98fdf8a8d2ded9be1d30617d15b6ac60868d9244752943264e02c13" }, { "path": "msa/black-box-tests/src/test/resources/tb-integration/mqtt/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "PE black-box test setup and logging/suite configuration. This selects the PE test environment and scenarios using shared configuration syntax. Curated as PE-only test scaffolding consistently with the maintainer decision for PE module launch/logging files. Reviewed similarity candidate docker/tb-transports/lwm2m/conf/logback.xml at 7667afaeae02ab3dcc6a8bb389ad6f0ab14cb441 (blob 199e138fc165b8522bc723ad1cd947fc927afeaa).", "contentHash": "sha256:e5c4bb50d6d47ad700882c8a243ba60b07919afb4cfafddcfa1bee26ac5af49e" }, { "path": "msa/black-box-tests/src/test/resources/tb-integration/tcp/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "PE black-box test setup and logging/suite configuration. This selects the PE test environment and scenarios using shared configuration syntax. Curated as PE-only test scaffolding consistently with the maintainer decision for PE module launch/logging files. Reviewed similarity candidate docker/tb-transports/lwm2m/conf/logback.xml at da4c74287216fc6962c74f084c2eedebf06e1a64 (blob d2485675ee170b4f4b050d055c7941d0dae5cc65).", "contentHash": "sha256:d39d097a880dc0286dbcf123ecd1c5f65dac7ebf5a955cffce09c2726279f936" }, { "path": "msa/black-box-tests/src/test/resources/tb-integration/udp/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "PE black-box test setup and logging/suite configuration. This selects the PE test environment and scenarios using shared configuration syntax. Curated as PE-only test scaffolding consistently with the maintainer decision for PE module launch/logging files. Reviewed similarity candidate docker/tb-transports/lwm2m/conf/logback.xml at da4c74287216fc6962c74f084c2eedebf06e1a64 (blob d2485675ee170b4f4b050d055c7941d0dae5cc65).", "contentHash": "sha256:d39d097a880dc0286dbcf123ecd1c5f65dac7ebf5a955cffce09c2726279f936" }, { "path": "msa/black-box-tests/src/test/resources/tb-transports/lwm2m.conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "PE black-box test setup and logging/suite configuration. This selects the PE test environment and scenarios using shared configuration syntax. Curated as PE-only test scaffolding consistently with the maintainer decision for PE module launch/logging files. Reviewed similarity candidate msa/black-box-tests/src/test/resources/tb-transports/http/conf/logback.xml at c5a72ed8dfc6d857521d270f43227eea14aae72c (blob 0408be6bd3d60dcb52ea33d848d59a64b9f05f4a).", "contentHash": "sha256:07215daf98184b8a76b9acba083f49e8c623a0be25660c859dcd8b29677672ce" }, { "path": "msa/web-report/config/logger.ts", - "header": "pe-only", + "header": "busl", "reason": "New PE module for the PE web-report service. Its body is identical to CE msa/web-ui/config/logger.ts, which PE still carries and which is a week older; the PE file is a copy for a PE-only service, not the CE file. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:aec71ee9557d9b8f0691e46617d923403e73b03cb204c3e8c837200487337398" }, { "path": "msa/web-report/config/tb-web-report.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate msa/js-executor/config/tb-js-executor.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 95e43f9ea9875eaed7e06ef3559914a901727636).", "contentHash": "sha256:f4568fd8a8158238c9d60bf6fce8ea4c7a3d98959bcf1e9fb3ef91aced0a3c46" }, { "path": "report/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:2199b91f2b4129821cda9a07a4e5bc694069d0e570ec2ff8700cdf470766158d" }, { "path": "report/src/main/conf/tb-report.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/tb-edqs.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:ebb59345cb5fe92e9fdd8cd2c7f51b7b80274d42e0b1a8ba668b00b880f33773" }, { "path": "report/src/main/java/org/thingsboard/server/report/ThingsboardReportApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/java/org/thingsboard/server/edqs/ThingsboardEdqsApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 334a36dec0f8a3820749d7a228ce2908738d4bf7).", "contentHash": "sha256:2bec03b3d69af065c3e7d6f25dbcf5b9cb735a43718fd150bd586a6f59b283e0" }, { "path": "report/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/resources/logback.xml at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 2e1f143c71a3625cea9407fc59969f5ba8ab027e).", "contentHash": "sha256:a8318968283848ae237b61382d2413c1afb0532fd9d3c9eec3e55989cb52d170" }, { "path": "report/src/main/resources/tb-report.yml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/resources/edqs.yml at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob cad0fcaccc785af0853c77f05d385adb4c102f67).", "contentHash": "sha256:64e2775735521015bd88c79f68db101ff69f536c681db8239764c434205a0583" }, { "path": "rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetCustomerAttributeNodeConfiguration.java", - "header": "pe-only", + "header": "busl", "reason": "Configuration holder for the PE customer-attribute rule node. Reviewed property defaults configure this PE node; common rule-node configuration/clone patterns do not establish derivation from the CE entity-data node. Reviewed candidate rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetEntityDataNodeConfiguration.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob f68fdf321b69b24e3e15bd2a311e2ccfa86ff890).", "contentHash": "sha256:0b91a00b698884c6654781d43c0debb2e61dcfcb9898811e27dc13baafde2bb0" }, { "path": "rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/transform/TbAbstractDuplicateMsgNode.java", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/transform/TbAbstractTransformNode.java, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:ca13fdc9263fd9dbd0637547d192cd80b01454f0e8aca719460e30fe392427e1" }, { "path": "ui-ngx/src/app/modules/home/components/converter/converter-autocomplete.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE converter autocomplete styling. The entire body is a host-scoped Material icon-link border/color reset, also present in unrelated CE autocomplete controls. This trivial shared UI style does not establish CE provenance for a PE converter component. Reviewed candidate ui-ngx/src/app/modules/home/components/profile/tenant-profile-autocomplete.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 95fd62939ec09897ed96164f7a2a47d6805c3245).", "contentHash": "sha256:03445abafd2f4f71cd541c2ee3c33e195e37ad711630971fc35fd393c66419ff" }, { "path": "ui-ngx/src/app/modules/home/components/converter/converter-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template converter-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/components/entity/add-entity-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 955f8f58be2d9d462570164005f4a2ee693b0dd7).", "contentHash": "sha256:845e3846f9f41be29dc209df6c28c8870c3886886018155735affb0c49c5a9f9" }, { "path": "ui-ngx/src/app/modules/home/components/converter/converter-test-dialog.component.scss", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/shared/components/dialog/node-script-test-dialog.component.scss, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:0d83f8ec2da9c911f51d8e5eebe7da1b5db1f3100c483aa24769dc58ea75c3ad" }, { "path": "ui-ngx/src/app/modules/home/components/group/add-group-entity-dialog.component.scss", - "header": "pe-only", + "header": "busl", "reason": "New PE stylesheet for the PE group feature. At authoring it was a verbatim copy of CE ui-ngx/src/app/modules/home/components/entity/add-entity-dialog.component.scss, which PE still carries; CE later reduced its own file. Copying a CE stylesheet into a new PE-feature file does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:95cf2c6fb04db4641bda522c6a9a5c9e3faab6626e14ce4b9942417ae5379b8b" }, { "path": "ui-ngx/src/app/modules/home/components/group/entity-group.component.scss", - "header": "pe-only", + "header": "busl", "reason": "Empty :host selector in a PE component stylesheet. Identical empty selector boilerplate at multiple unrelated CE paths supplies no meaningful derivation evidence. Reviewed candidate ui-ngx/src/app/modules/home/components/relation/relation-dialog.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 16bc26c7e2a0cc952ac46e0b6edd105c17c402c5).", "contentHash": "sha256:a5a5674d23eaffbd00a99169958c14939b326ad5a68a1c614c1d3dec1635ef2b" }, { "path": "ui-ngx/src/app/modules/home/components/group/group-contact-based.component.ts", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/modules/home/components/entity/contact-based.component.ts, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:56a6d5bf2593d2e7801cb1e357b8de9073334e7f2d053bd118182ef4dae2181a" }, { "path": "ui-ngx/src/app/modules/home/components/group/manage-owner-and-groups-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template manage-owner-and-groups-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/dialogs/assign-to-customer-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 4af3aa07a136de6f06469ab94134f84552ed0f80).", "contentHash": "sha256:6663727de4d162e6fc966c2e36dd771058655f0a801232a56e3425825f6cbe54" }, { "path": "ui-ngx/src/app/modules/home/components/integration/integration-credentials/integration-credentials.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet integration-credentials.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/components/vc/repository-settings.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 3afa2cb78cc2f392a082443fd322d95ba39420f9).", "contentHash": "sha256:2efcf5a42fc436b3e0d3170b04d3636c62ded1e37d48133328216fa05cdb015f" }, { "path": "ui-ngx/src/app/modules/home/components/rule-node/action/integration-downlink-config.component.ts", - "header": "pe-only", + "header": "busl", "reason": "PE typed UI adapter integration-downlink-config.component.ts. Reviewed implementation only registers the PE component, supplies typed framework inputs or constructs its PE configuration form; matching generic Angular/ThingsBoard component hooks are template use. Reviewed CE candidate ui-ngx/src/app/modules/home/components/rule-node/flow/rule-chain-input.component.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 0403a37563356ff2843d9e87610dcad9a7d50169).", "contentHash": "sha256:7e5a32c33b1e1e45e9fec84e17be78be867f0e03db1d6cf004b84a1aac3fb51a" }, { "path": "ui-ngx/src/app/modules/home/components/rule-node/transformation/duplicate-to-related-config.component.ts", - "header": "pe-only", + "header": "busl", "reason": "PE typed UI adapter duplicate-to-related-config.component.ts. Reviewed implementation only registers the PE component, supplies typed framework inputs or constructs its PE configuration form; matching generic Angular/ThingsBoard component hooks are template use. Reviewed CE candidate ui-ngx/src/app/modules/home/components/rule-node/action/rpc-request-config.component.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 546f344863860f44a1387c1bc6c90db3645deb91).", "contentHash": "sha256:c0649f9045eb6dbafa55e5550713acc0e9d67f6f6e13e52fa0074fdbbb273548" }, { "path": "ui-ngx/src/app/modules/home/components/scheduler/config/attribute-key-value-table.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet attribute-key-value-table.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/shared/components/kv-map.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 1edb7e50bae24728db678a8e7fb2c125cc3f4bfe).", "contentHash": "sha256:4e0a33867eb7f194e3730470d67d96d75f96919fbc9e71a636e67a4b35743b31" }, { "path": "ui-ngx/src/app/modules/home/components/scheduler/config/attribute-key-value-table.component.ts", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/shared/components/kv-map.component.ts, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:aa1d298b5af277bb5d67d87630717443d35830a787e725d442e0ec3de4173f0b" }, { "path": "ui-ngx/src/app/modules/home/components/task/cancel-task-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template cancel-task-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/shared/components/dialog/confirm-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 5c8ea6eea22ccdf1a4b13f995e9c6e3421930e17).", "contentHash": "sha256:022ea913628bc1f57a62725f79121c2ea4a63ed1d6a4e36d872fbac189526d15" }, { "path": "ui-ngx/src/app/modules/home/components/task/cancel-task-dialog.component.ts", - "header": "pe-only", + "header": "busl", "reason": "PE typed UI adapter cancel-task-dialog.component.ts. Reviewed implementation only registers the PE component, supplies typed framework inputs or constructs its PE configuration form; matching generic Angular/ThingsBoard component hooks are template use. Reviewed CE candidate ui-ngx/src/app/shared/components/dialog/confirm-dialog.component.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob b2f1ed3fe90cc938948859dd8632916395b03c10).", "contentHash": "sha256:8d455120aedd994c624b5a988d50190543bc4cc14bd175c92aa9bc7ab093095c" }, @@ -1443,67 +1443,67 @@ }, { "path": "ui-ngx/src/app/modules/home/components/widget/lib/settings/common/dynamic-form/dynamic-form-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template dynamic-form-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/shared/components/dialog/json-object-edit-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 289cf0f05bdd688553a048d086c9d9777af22adc).", "contentHash": "sha256:6c778dd93549307431435beb68b13b78b98c1e2c02fb453ec25a9485656d60dc" }, { "path": "ui-ngx/src/app/modules/home/components/widget/lib/settings/scheduler/custom-scheduler-event-type.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet custom-scheduler-event-type.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/label-data-key.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 07a8abe1a493414539469c0939c01c5572e7618e).", "contentHash": "sha256:50b35b72e6f2065f1defd1f06be189cf1786d5d1cfb5ce079a12b70d8dd8ef5f" }, { "path": "ui-ngx/src/app/modules/home/components/wizard/entity-group-wizard-dialog.component.scss", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.scss, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:c0370968c3b22e8c69b22cb6d94d77c8265aea5ec4376ee2051f5159b343dea0" }, { "path": "ui-ngx/src/app/modules/home/dialogs/add-entity-groups-to-edge-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template add-entity-groups-to-edge-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/dialogs/assign-to-customer-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 4af3aa07a136de6f06469ab94134f84552ed0f80).", "contentHash": "sha256:a388333c5d948f47324c0a03f0a16cd1e2ee4baab27c8a851553f97a1ca3fe44" }, { "path": "ui-ngx/src/app/modules/home/dialogs/select-owner-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template select-owner-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/dialogs/assign-to-customer-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 4af3aa07a136de6f06469ab94134f84552ed0f80).", "contentHash": "sha256:df68ce9ec827575d8a46e9602df0b3b5bfbd755441cfc0322d7ec0ea95352186" }, { "path": "ui-ngx/src/app/modules/home/dialogs/share-entity-group-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template share-entity-group-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/components/entity/add-entity-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 955f8f58be2d9d462570164005f4a2ee693b0dd7).", "contentHash": "sha256:e36c42e81593ec7f224cbf8be4dce11a594a28085c81c49c860c1132f19b3920" }, { "path": "ui-ngx/src/app/modules/home/pages/admin/custom-css-dialog.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet custom-css-dialog.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/shared/components/protobuf-content.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 0633395c0a9e8241a8ea678aa45e58d86b8bc03d).", "contentHash": "sha256:f93050686508da34bf976a8705f94f4e9dacc48d80bcbd486e0cc83df80d3558" }, { "path": "ui-ngx/src/app/modules/home/pages/admin/oauth2/domains/domain-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template domain-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/mobile/applications/mobile-app-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d984ac99c9941ea1420c0e922d867cddf89b30c1).", "contentHash": "sha256:bf1d2015aa9eaecbd24f5ba2fc5a9e3f3fb5cf39901170e4d9d1cb9e9a25bf27" }, { "path": "ui-ngx/src/app/modules/home/pages/agent/agent-profile-tabs.component.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity tabs component added in 6c303b45f74 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/modules/home/pages/edge/edge-tabs.component.ts shares only the entity tabs component boilerplate. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 58bc88a8db4).", "contentHash": "sha256:285dd70a9a6dc12120df933e9ba8d6cc9b453571eb6c6390c9646bfc7c2fb52e" }, { "path": "ui-ngx/src/app/modules/home/pages/agent/agent-tabs.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity tabs component added in f5e28c9cc42 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/modules/home/pages/edge/edge-tabs.component.html shares only the entity tabs component boilerplate. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 3f298aff3d1).", "contentHash": "sha256:b96f8ce0a2df420a7411d8ff9e26409c530ecc3ff7fa35dd32db75792e130720" }, { "path": "ui-ngx/src/app/modules/home/pages/agent/agent-tabs.component.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity tabs component added in f5e28c9cc42 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/modules/home/pages/edge/edge-tabs.component.ts shares only the entity tabs component boilerplate. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 58bc88a8db4).", "contentHash": "sha256:774979b5f77b5d58e1d7dfabc31f6271a46cfa346b8f43e6bb18db92e0cb2429" }, @@ -1515,61 +1515,61 @@ }, { "path": "ui-ngx/src/app/modules/home/pages/converter/converter-tabs.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template converter-tabs.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/rulechain/rulechain-tabs.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob cd93367fc0cf1a7b4cdb66a7b2cbdebf54c6b9c4).", "contentHash": "sha256:a262251d15be697e4a048aefa756b376fd3cdca7093d3ff486f4e632c24d145c" }, { "path": "ui-ngx/src/app/modules/home/pages/converter/converter.module.ts", - "header": "pe-only", + "header": "busl", "reason": "Angular module/routing registration for a PE feature. Imports, declarations and routes select PE components using common Angular module scaffolding; no CE feature implementation is relocated. Reviewed candidate ui-ngx/src/app/modules/home/pages/asset/asset.module.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d6dcf2b0b4232555f55d4ab649e8fe10b1dd1a2e).", "contentHash": "sha256:92d96e89c654fa7d0e000083169e992e709ed6a050ce180f71fa11970479bdb2" }, { "path": "ui-ngx/src/app/modules/home/pages/custom-menu/add-custom-menu-item-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template add-custom-menu-item-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/admin/oauth2/clients/client-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 168100e58624f5c65473ab68270ae19842eef2ea).", "contentHash": "sha256:9a924655c21da389103bb38a050aefc51c15440cc78dfa7ef35ca0061bfc86b6" }, { "path": "ui-ngx/src/app/modules/home/pages/custom-menu/custom-menu-is-assigned-dialog.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet custom-menu-is-assigned-dialog.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/components/entity/entity-filter.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 5b9bc415b1673aef9b04efc49fbba6e6e60f9542).", "contentHash": "sha256:8a466986f9717ef42218e90101e674dc0957d8ed808e2c70323d1aef92889b6c" }, { "path": "ui-ngx/src/app/modules/home/pages/custom-menu/custom-menu-item-panel.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet custom-menu-item-panel.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/mobile/bundes/layout/custom-mobile-page-panel.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 436a97786ff0da99ec5ba041f9bd1ac93d9ba9f1).", "contentHash": "sha256:e1a151ac24400139741d18b999c89ba128f89fc39fb465000a5a14c20fb4ad8d" }, { "path": "ui-ngx/src/app/modules/home/pages/custom-menu/default-menu-item-panel.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet default-menu-item-panel.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/mobile/bundes/layout/default-mobile-page-panel.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 2aa92b7fc991e197c659586893635c0161acacd7).", "contentHash": "sha256:f6c5562d4b8fde74a83b406f9216e33db4be95dc706029fea299686e4f0f1d9a" }, { "path": "ui-ngx/src/app/modules/home/pages/custom-menu/edit-custom-menu-name-panel.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet edit-custom-menu-name-panel.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/mobile/common/editor-panel.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob f25f26b1499b0d43cbcc272e7f5f96c1a916402d).", "contentHash": "sha256:4db1893e34f34d9dec7534d0a0b937a8a667a154cf10aa201beda605e7bf7de8" }, { "path": "ui-ngx/src/app/modules/home/pages/custom-translation/add-new-language-dialog.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet add-new-language-dialog.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/device/device-credentials-dialog.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 4fa7a8e072bf9c5a830b04cb8af04d6fd5dd6650).", "contentHash": "sha256:8f197828a805fb07ae43bd26c9ccc9b0eb676d2d3ea8fce41380f1bc4f98d615" }, { "path": "ui-ngx/src/app/modules/home/pages/dashboard/public-dashboard-link.dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/modules/home/pages/dashboard/make-dashboard-public-dialog.component.html, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:32d3a2ee42bc23949a121a100dc09125891341255f5c1cd8a0d69d447fc5f78d" }, { "path": "ui-ngx/src/app/modules/home/pages/dashboard/public-dashboard-link.dialog.component.ts", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/modules/home/pages/dashboard/make-dashboard-public-dialog.component.ts, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:07f295f637db24d600798215d33391f4e966954899f644a41b9735f5ed5392db" }, @@ -1581,271 +1581,271 @@ }, { "path": "ui-ngx/src/app/modules/home/pages/iframe/iframe-view.module.ts", - "header": "pe-only", + "header": "busl", "reason": "Angular module/routing registration for a PE feature. Imports, declarations and routes select PE components using common Angular module scaffolding; no CE feature implementation is relocated. Reviewed candidate ui-ngx/src/app/modules/home/pages/gateways/gateways.module.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 06642bcec58f37ba9aabcb21906cae8ea6882ef4).", "contentHash": "sha256:04319dafb2225682d3e837e066951ca560774754b002bf17e69949c44e40392f" }, { "path": "ui-ngx/src/app/modules/home/pages/integration/integration-tabs.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template integration-tabs.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/rulechain/rulechain-tabs.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob cd93367fc0cf1a7b4cdb66a7b2cbdebf54c6b9c4).", "contentHash": "sha256:04789ea4b1719b43a5a2d6e2a99732ca15f0e383e4ba9f0efd13f8f4fe8b5f22" }, { "path": "ui-ngx/src/app/modules/home/pages/integration/integrations-center.module.ts", - "header": "pe-only", + "header": "busl", "reason": "Angular module/routing registration for a PE feature. Imports, declarations and routes select PE components using common Angular module scaffolding; no CE feature implementation is relocated. Reviewed candidate ui-ngx/src/app/modules/home/pages/features/features.module.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 666a51c1c5c17a5371d1a917f7affd80727f3b24).", "contentHash": "sha256:47fe9e43f0f7eb6a01565c41e911ae9a451cab2bc27b03cfef45a074932f30ad" }, { "path": "ui-ngx/src/app/modules/home/pages/reporting/components/report-components.module.ts", - "header": "pe-only", + "header": "busl", "reason": "Angular module/routing registration for a PE feature. Imports, declarations and routes select PE components using common Angular module scaffolding; no CE feature implementation is relocated. Reviewed candidate ui-ngx/src/app/modules/home/pages/tenant-profile/tenant-profile.module.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob df9e721af53a3071547aceaacbda46ccf2473cbb).", "contentHash": "sha256:45d76d1fb0aaeb307752c285aa2f37b01ea21da4d41a0891a71ad1e65dbe311f" }, { "path": "ui-ngx/src/app/modules/home/pages/reporting/components/report-filter.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet report-filter.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/components/device/device-info-filter.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 3ae672c7127931e4e4319d5dc7e71141376f0748).", "contentHash": "sha256:da626900ef28ef02b905929e282ee584ca15bf67b4d4e459f70b08453411fca9" }, { "path": "ui-ngx/src/app/modules/home/pages/reporting/template/report-template-filter.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet report-template-filter.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/components/device/device-info-filter.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 3ae672c7127931e4e4319d5dc7e71141376f0748).", "contentHash": "sha256:dea9f1bf653bbcdce195758ffbc6ec4094fec81815ed56546bd87db12dc59744" }, { "path": "ui-ngx/src/app/modules/home/pages/reporting/template/report-template-tabs.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template report-template-tabs.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/admin/resource/resource-tabs.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 1d98f4be180a627825f67cd728c7573df21c460a).", "contentHash": "sha256:da2f62bffceff569b198cfa0d3c0e79bd48205d7b447570a29f2eda17e065f51" }, { "path": "ui-ngx/src/app/modules/home/pages/role/role-routing.module.ts", - "header": "pe-only", + "header": "busl", "reason": "Angular module/routing registration for a PE feature. Imports, declarations and routes select PE components using common Angular module scaffolding; no CE feature implementation is relocated. Reviewed candidate ui-ngx/src/app/modules/home/pages/asset/asset-routing.module.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 54d492c26c4155d0245f0bfc2fff83692134e37e).", "contentHash": "sha256:aa8d2de86008837f6dec87ce12ffbca38549a270a904a0527aa8889b78411ddf" }, { "path": "ui-ngx/src/app/modules/home/pages/role/role-tabs.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template role-tabs.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/rulechain/rulechain-tabs.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob cd93367fc0cf1a7b4cdb66a7b2cbdebf54c6b9c4).", "contentHash": "sha256:b2ae43c7b2ab71c5d5df9cd75ce6a1ff953e385309b7af81a9c600a38831d3c6" }, { "path": "ui-ngx/src/app/modules/home/pages/role/role-tabs.component.ts", - "header": "pe-only", + "header": "busl", "reason": "PE typed UI adapter role-tabs.component.ts. Reviewed implementation only registers the PE component, supplies typed framework inputs or constructs its PE configuration form; matching generic Angular/ThingsBoard component hooks are template use. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/user/user-tabs.component.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 298af6f0de496cda1e6df834eee45dd41bb9a23e).", "contentHash": "sha256:929f68d9553ebdc6f8f326503c0e5308cde763e18dedebd80a38d96c14a493a5" }, { "path": "ui-ngx/src/app/modules/home/pages/role/role.module.ts", - "header": "pe-only", + "header": "busl", "reason": "Angular module/routing registration for a PE feature. Imports, declarations and routes select PE components using common Angular module scaffolding; no CE feature implementation is relocated. Reviewed candidate ui-ngx/src/app/modules/home/pages/alarm/alarm.module.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 9438e743d19cc4234935fed2a42ef0d8e7b9558f).", "contentHash": "sha256:7d8e38e285631d2a7a74ba52a9eb1bc050101a9460df8d1e7d635242acde7fa3" }, { "path": "ui-ngx/src/app/modules/home/pages/rulechain/rulechains-table-config.ts", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/modules/home/pages/rulechain/rulechains-table-config.resolver.ts, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:f155dcd3181ac77f5a8ea303eeda6a8471b298c3cce8f496d2b4945630b3ed18" }, { "path": "ui-ngx/src/app/modules/home/pages/scheduler/scheduler.module.ts", - "header": "pe-only", + "header": "busl", "reason": "Angular module/routing registration for a PE feature. Imports, declarations and routes select PE components using common Angular module scaffolding; no CE feature implementation is relocated. Reviewed candidate ui-ngx/src/app/modules/home/pages/alarm/alarm.module.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 9438e743d19cc4234935fed2a42ef0d8e7b9558f).", "contentHash": "sha256:f508ee1debcd3c5ee023ebad3ee947341c1e95cdd7c88785cef9e03eb37e23fe" }, { "path": "ui-ngx/src/app/modules/home/pages/secret-storage/edit-secret-description-panel.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE secret storage description panel added in 77ae0916f57. The similar CE api-key/edit-api-key-description-panel.component.html was added later in fba08a32126 and derives from this PE component, not the reverse. Reviewed candidate at 317a75614137ab5ddd1aecef1abd4c2fcdcb8710 (blob 1a3f159af48).", "contentHash": "sha256:a3572174fc3c63d9389f20ea55a7c0219a67c6325bdc56ccb894048925f62978" }, { "path": "ui-ngx/src/app/modules/home/pages/secret-storage/edit-secret-description-panel.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet edit-secret-description-panel.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/mobile/common/editor-panel.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob f25f26b1499b0d43cbcc272e7f5f96c1a916402d).", "contentHash": "sha256:82f20a273c21c5170ff6f3ad9ff2324e603da4eb36459a51dcbc3895110cdebd" }, { "path": "ui-ngx/src/app/modules/home/pages/secret-storage/edit-secret-description-panel.component.ts", - "header": "pe-only", + "header": "busl", "reason": "PE secret storage description panel added in 77ae0916f57. The similar CE api-key/edit-api-key-description-panel.component.ts was added later in fba08a32126 and derives from this PE component, not the reverse. Reviewed candidate at 317a75614137ab5ddd1aecef1abd4c2fcdcb8710 (blob 8f05a755f4b).", "contentHash": "sha256:cf1053f3738a80ab4581710b5baa7019cd230e9ab1991334de6fdb599fa7fdfb" }, { "path": "ui-ngx/src/app/modules/home/pages/secret-storage/secret-storage-table-header.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template secret-storage-table-header.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/admin/oauth2/domains/domain-table-header.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 020f728f8f65de07090b5009fb2bc4bd6392bd42).", "contentHash": "sha256:091faa8d74ea1100ee5f053507ecddd0f9394b0062f7daabf388f65ed80b8303" }, { "path": "ui-ngx/src/app/modules/home/pages/secret-storage/secret-storage-table-header.component.ts", - "header": "pe-only", + "header": "busl", "reason": "PE typed UI adapter secret-storage-table-header.component.ts. Reviewed implementation only registers the PE component, supplies typed framework inputs or constructs its PE configuration form; matching generic Angular/ThingsBoard component hooks are template use. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/admin/oauth2/domains/domain-table-header.component.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob ff947407912f1f20e387908f81b6793f6d63329d).", "contentHash": "sha256:83242ac9bc768c1ced27bcd492129edbd269bd51a22dc77a6a95d854148c20f5" }, { "path": "ui-ngx/src/app/modules/home/pages/task-manager/task-filter-config.component.scss", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/modules/home/components/alarm/alarm-filter-config.component.scss, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:61fa659a2477b7372421b810654383ac280f932ef41ab9b9ff912b8b5fcccae5" }, { "path": "ui-ngx/src/app/modules/home/pages/task-manager/task-manager-header.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE task manager page header stylesheet added in 61d991bde83. The candidate CE audit-log-header.component.scss matches only on generic host layout properties. Reviewed candidate at 317a75614137ab5ddd1aecef1abd4c2fcdcb8710 (blob 0d057f16ca9).", "contentHash": "sha256:c97d917157cdbed82ac411d7e6a69a1c8590ac8dedace15ad8b1959f917cb6bf" }, { "path": "ui-ngx/src/app/modules/signup/pages/signup/signup-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template signup-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/components/entity/add-entity-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 955f8f58be2d9d462570164005f4a2ee693b0dd7).", "contentHash": "sha256:07fb450cc0a3d66a35fcb5e56089294ad1181e741f87eef9a76ae38cbbc74882" }, { "path": "ui-ngx/src/app/modules/signup/pages/signup/signup-dialog.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet signup-dialog.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/shared/components/dialog/alert-dialog.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 47d8bacd5a1553261a5270fdbe20483feaefe019).", "contentHash": "sha256:4f7db5013f99b1ff93b7b52ed1ac046bffcc29c5b134e4ac94d58b231125b792" }, { "path": "ui-ngx/src/app/shared/components/role/group-permission-dialog.component.scss", - "header": "pe-only", + "header": "busl", "reason": "Empty :host selector in a PE component stylesheet. Identical empty selector boilerplate at multiple unrelated CE paths supplies no meaningful derivation evidence. Reviewed candidate ui-ngx/src/app/modules/home/components/relation/relation-dialog.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 16bc26c7e2a0cc952ac46e0b6edd105c17c402c5).", "contentHash": "sha256:a5a5674d23eaffbd00a99169958c14939b326ad5a68a1c614c1d3dec1635ef2b" }, { "path": "ui-ngx/src/app/shared/components/role/group-permissions.component.scss", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/modules/home/components/relation/relation-table.component.scss, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:51982e085e708736d820e335c4a5e5680d0310242cc0d88924e4dd0df9d165d3" }, { "path": "ui-ngx/src/app/shared/components/secret-storage/secret-file-input.component.scss", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/shared/components/image/scada-symbol-input.component.scss, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:1f70e7b2aa179ef028828fc8ec07322cbc3030fd416c3998905b9bdad5b82fe0" }, { "path": "ui-ngx/src/app/shared/components/secret-storage/secrets-datasource.ts", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/modules/home/pages/admin/resource/resources-datasource.ts, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:835c6fa6c2148c1559c789560141edc94266081bb7a0e40b5eafe0ae3c5c8e5c" }, { "path": "ui-ngx/src/app/shared/models/id/agent-app-event-id.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent id model added in d4b8d886666 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/shared/models/id/api-key-id.ts shares only the id model boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 4fdaf78cc8c).", "contentHash": "sha256:5394bb91dcfa542c6b1ed9b66b02cdfa9c39cf9040ace8a82b549a934439e53a" }, { "path": "ui-ngx/src/app/shared/models/id/agent-app-profile-id.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent id model added in d4b8d886666 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/shared/models/id/api-key-id.ts shares only the id model boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 4fdaf78cc8c).", "contentHash": "sha256:c98507fd6db9721528ca966240c425e4912fced4c75946287128e0f6443570a5" }, { "path": "ui-ngx/src/app/shared/models/id/agent-app-unit-id.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent id model added in d4b8d886666 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/shared/models/id/api-key-id.ts shares only the id model boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 4fdaf78cc8c).", "contentHash": "sha256:0fc9b5ff2357b5a4c0cfef0b8587e06b729af597171b3ef3176b896fe10dadaa" }, { "path": "ui-ngx/src/app/shared/models/id/agent-application-id.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent id model added in d4b8d886666 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/shared/models/id/api-key-id.ts shares only the id model boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 4fdaf78cc8c).", "contentHash": "sha256:b9e4599aa9331025fd1d3acdc0e5517b9fdb5da1de42a53191403ac309910e86" }, { "path": "ui-ngx/src/app/shared/models/id/agent-bulk-action-id.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent id model added in d4b8d886666 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/shared/models/id/api-key-id.ts shares only the id model boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 4fdaf78cc8c).", "contentHash": "sha256:d296382d0c5b61cb4dbd838d76723dcb55ab076a9723fbbfe0adef69cd773caf" }, { "path": "ui-ngx/src/app/shared/models/id/agent-id.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent id model added in d4b8d886666 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/shared/models/id/edge-id.ts shares only the id model boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob d498fac3fd4).", "contentHash": "sha256:f506cf21dbc6beb6dca58fec54c94b930b24acd67d493d71480372414795a6a4" }, { "path": "ui-ngx/src/app/shared/models/id/agent-profile-id.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent id model added in 6c303b45f74 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/shared/models/id/api-key-id.ts shares only the id model boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 4fdaf78cc8c).", "contentHash": "sha256:94e21066461722c588d1236d7987d56d401bc6db57c988d7bdcede47f69f6d59" }, { "path": "ui-ngx/src/app/shared/models/id/blob-entity-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:fbc3242e2779a0efef79b7eb712a9ea7d8a005cfd1e8911b04ac519550a9e4b8" }, { "path": "ui-ngx/src/app/shared/models/id/converter-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:026023794900881beb9d750c09677069e168c2d2197c8761c984025634bae9d3" }, { "path": "ui-ngx/src/app/shared/models/id/custom-menu-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/audit-log-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 0b71456990b38a79ab3ca4b7a16ddb14028b7826).", "contentHash": "sha256:64061a7b1ea13d059e6d5b0540f09cd92fbe4579b1e4ae723ccce406d4be29a6" }, { "path": "ui-ngx/src/app/shared/models/id/entity-group-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:67845a93ddf3538fcfa441462dcee91323a919ba7ddc1976893d990c5c7f75a2" }, { "path": "ui-ngx/src/app/shared/models/id/group-permission-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:a7da045fd161a17762972c7ee408ce1451fe0c49e57eb9a1442cdf57df826990" }, { "path": "ui-ngx/src/app/shared/models/id/integration-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:b9c27683121e76bdc532adaac53358ad580773a1d1eed8976f4d55bf6e80ebfc" }, { "path": "ui-ngx/src/app/shared/models/id/job-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/rpc-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob aec7fdfd20624ec695fc1e9887a8d1b2a71a7b08).", "contentHash": "sha256:01cfdef0179068bc653191fa66379c1f11cf26cdd7217f698d49b8402f65ce94" }, { "path": "ui-ngx/src/app/shared/models/id/report-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:70dc05081708c87753a03174402e008fe78a7200f08c6d10b7f400d4f38f9aa4" }, { "path": "ui-ngx/src/app/shared/models/id/report-template-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:892ed8adcc467a827946c4bf2ff276b08d3bc75305e86dc9edf5c7022b067ad9" }, { "path": "ui-ngx/src/app/shared/models/id/role-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/user-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 74174fe25b19f9abd2bea3a8b5f5740ce005566b).", "contentHash": "sha256:9179b142fe0c7f3ef567afcef917dd4822b04652802aa9fb20b98bca725d116b" }, { "path": "ui-ngx/src/app/shared/models/id/scheduler-event-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:9a8cf3df121815fd26f958ed542b2ee6b064c7671c234652b9615eba1b5aa662" }, { "path": "ui-ngx/src/app/shared/models/id/secret-storage-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:5427b1c6bf59f9e9372c47717fee96bf94bddeaf65ad920b77647b16539bf5f9" } diff --git a/tools/src/main/python/license-headers/test_check_license_headers.py b/tools/src/main/python/license-headers/test_check_license_headers.py index e017fad801..88968a1b91 100644 --- a/tools/src/main/python/license-headers/test_check_license_headers.py +++ b/tools/src/main/python/license-headers/test_check_license_headers.py @@ -54,72 +54,91 @@ class GitFixture: class DecisionTests(unittest.TestCase): + VERSION = {"path": "a.java", "ref": "b" * 40, "blob": "c" * 40} + COPY = {"path": "source.java", "ref": "a" * 40, "blob": "c" * 40, "similarity": 78} + def decide(self, **changes): - evidence = dict(path="a.java", content_hash=p.raw_hash(b"reviewed"), current="pe-only", curation=None, - inherited=True, recreated=False, ce_hash="same", pe_hash="same", - candidates=[], historical=[], in_comparison=True) + evidence = dict(path="a.java", content_hash=p.raw_hash(b"reviewed"), current=p.NON_CE, + ce_versions=(self.VERSION,), identical=self.VERSION) return p.decide(p.Evidence(**(evidence | changes))) + def new(self, **changes): + return self.decide(**(dict(ce_versions=(), identical=None) | changes)) + def test_current_header_does_not_establish_origin(self): row = self.decide() - self.assertEqual("apache", row["expectedHeader"]) - self.assertEqual("mismatch", row["status"]) - self.assertEqual("ce-modified", self.decide(pe_hash="changed")["expectedHeader"]) + self.assertEqual(("mismatch", "apache"), (row["status"], row["expectedHeader"])) + self.assertEqual(self.VERSION, row["identicalTo"]) + row = self.decide(identical=None) + self.assertEqual(("ce-modified", "same path in CE, content differs"), (row["expectedHeader"], row["reason"])) + self.assertEqual([self.VERSION], row["ceVersions"]) + + def test_clean_merge_of_ce_versions_is_apache(self): + merge = {"path": "a.java", "merge": ["b" * 40, "d" * 40], "base": "e" * 40} + row = self.decide(current="apache", identical=merge) + self.assertEqual(("match", "apache"), (row["status"], row["expectedHeader"])) + self.assertEqual("same path in CE, content identical to a clean merge of its CE versions", row["reason"]) + self.assertEqual(merge, row["identicalTo"]) + + def test_new_path_without_ce_evidence_is_non_ce(self): + row = self.new() + self.assertEqual(("match", p.NON_CE, "not in CE, no CE evidence"), + (row["status"], row["expectedHeader"], row["reason"])) + + def test_ce_evidence_for_a_new_path_needs_a_decision(self): + row = self.new(copies=(self.COPY,)) + self.assertEqual(("unresolved", None, None), (row["status"], row["expectedHeader"], row["suggestedHeader"])) + self.assertEqual([self.COPY], row["copyCandidates"]) + self.assertEqual("apache", self.new(copies=(self.COPY | {"similarity": 100},))["suggestedHeader"]) + deleted = {"path": "a.java", "ref": "f" * 40 + "^1", "blob": "c" * 40} + row = self.new(deleted=deleted) + self.assertEqual(("unresolved", "CE history had this path"), (row["status"], row["reason"])) + self.assertEqual(deleted, row["historicalCandidate"]) + + def test_descriptor_of_a_module_absent_in_ce_is_non_ce_despite_similar_ce_descriptors(self): + copy = self.COPY | {"path": "transport/mqtt/pom.xml"} + descriptor = dict(path="integration/mqtt/pom.xml", copies=(copy,), directory_in_ce=False) + row = self.new(**descriptor) + self.assertEqual(("match", p.NON_CE), (row["status"], row["expectedHeader"])) + for evidence in (dict(directory_in_ce=True), + dict(path="integration/mqtt/Mqtt.java"), + dict(copies=(copy | {"similarity": 100},)), + dict(deleted={"path": "integration/mqtt/pom.xml", "ref": "f" * 40, "blob": "c" * 40})): + self.assertEqual("unresolved", self.new(**(descriptor | evidence))["status"], evidence) def test_matching_curation_precedes_inference(self): - curation = dict(contentHash=p.raw_hash(b"reviewed"), header="pe-only", reason="Independent replacement") - self.assertEqual("match", self.decide(curation=curation)["status"]) + curation = dict(contentHash=p.raw_hash(b"reviewed"), header="ce-modified", reason="Reviewed") + row = self.decide(current="ce-modified", curation=curation) + self.assertEqual(("match", "ce-modified", "curation: Reviewed"), + (row["status"], row["expectedHeader"], row["reason"])) + self.assertNotIn("redundantCuration", row) + row = self.new(copies=(self.COPY,), curation=curation | {"header": p.NON_CE}) + self.assertEqual(("match", p.NON_CE), (row["status"], row["expectedHeader"])) + self.assertNotIn("redundantCuration", row) curation["contentHash"] = p.raw_hash(b"different") self.assertEqual("stale-curation", self.decide(curation=curation)["status"]) - def test_recreated_and_missing_ce_files_do_not_silently_pass(self): - self.assertEqual("unresolved", self.decide(recreated=True)["status"]) - row = self.decide(inherited=False, in_comparison=False, ce_hash=None) - self.assertEqual("unresolved", row["status"]) - self.assertEqual("pe-only", row["suggestedHeader"]) - self.assertIsNone(row["expectedHeader"]) - - def test_identical_cross_path_source_is_not_proof(self): - row = self.decide(inherited=False, candidates=[{"path": "original.java"}]) - self.assertEqual("unresolved", row["status"]) - self.assertEqual("apache", row["suggestedHeader"]) - - def test_pe_additions_pass_without_strong_ce_evidence(self): - added = dict(inherited=False, in_comparison=False, ce_hash=None, pe_addition=True) - self.assertEqual("match", self.decide(**added)["status"]) - self.assertEqual("match", self.decide(**added, historical=[{"path": "other/a.java"}])["status"]) - for evidence in (dict(historical=[{"path": "a.java"}]), - dict(historical=[{"path": "other/a.java", "contentMatches": True}]), - dict(copies=[{"path": "other.java", "similarity": 78}])): - self.assertEqual("unresolved", self.decide(**added, **evidence)["status"]) - - def test_descriptor_of_a_module_absent_in_ce_is_pe_only_despite_similar_ce_descriptors(self): - descriptor = dict(path="integration/mqtt/pom.xml", inherited=False, in_comparison=False, ce_hash=None, - pe_addition=True, copies=[{"path": "transport/mqtt/pom.xml", "similarity": 78}], - directory_in_ce=False) - row = self.decide(**descriptor) - self.assertEqual("match", row["status"]) - self.assertEqual("pe-only", row["expectedHeader"]) - for evidence in (dict(directory_in_ce=True), - dict(path="integration/mqtt/Mqtt.java"), - dict(pe_addition=False), - dict(candidates=[{"path": "transport/mqtt/pom.xml"}]), - dict(historical=[{"path": "transport/mqtt/pom.xml", "contentMatches": True}])): - self.assertEqual("unresolved", self.decide(**(descriptor | evidence))["status"]) + def test_curation_that_repeats_the_inferred_header_is_redundant(self): + curation = dict(contentHash=p.raw_hash(b"reviewed"), header="apache", reason="Reviewed") + row = self.decide(current="apache", curation=curation) + self.assertEqual(("match", "apache", "same path in CE, content identical", True), + (row["status"], row["expectedHeader"], row["reason"], row["redundantCuration"])) + row = self.new(curation=curation | {"header": p.NON_CE}) + self.assertTrue(row["redundantCuration"]) def test_console_groups_findings_by_required_action(self): missing = self.decide(current=p.MISSING) foreign = self.decide(path="vendored.java", current=p.FOREIGN) - candidate = {"path": "original.java", "ref": "b" * 40, "blob": "c" * 40} - renamed = self.decide(path="new.java", inherited=False, candidates=[candidate, candidate]) - copied = self.decide(path="copied.java", inherited=False, in_comparison=False, ce_hash=None, - copies=[{"path": "source.java", "ref": "a" * 40, "similarity": 78}]) - changed = self.decide(curation=dict(contentHash=p.raw_hash(b"other"), header="pe-only", reason="Reviewed")) + copied = self.new(path="copied.java", copies=(self.COPY, self.COPY | {"path": "other.java", "similarity": 60})) + historical = self.new(path="gone.java", deleted={"path": "gone.java", "ref": "d" * 40 + "^1", "blob": "c" * 40}) + changed = self.decide(curation=dict(contentHash=p.raw_hash(b"other"), header=p.NON_CE, reason="Reviewed")) clean = self.decide(path="clean.java", current="apache") + redundant = self.decide(path="curated.java", current="apache", + curation=dict(contentHash=p.raw_hash(b"reviewed"), header="apache", reason="Reviewed")) orphaned = dict(path="deleted.java", status="stale-curation", reason="file is no longer in scope") stderr, stdout = io.StringIO(), io.StringIO() with redirect_stderr(stderr), redirect_stdout(stdout): - rows = [missing, foreign, renamed, copied, changed, clean] + rows = [missing, foreign, copied, historical, changed, clean, redundant] p.print_findings(rows, [orphaned], {"a" * 40: "ce/lts-4.2"}) p.print_summary(rows, [orphaned], "target/report.json") output = stderr.getvalue() @@ -135,13 +154,13 @@ class DecisionTests(unittest.TestCase): → Rerun with --fix to restamp automatically Needs a decision (2) - new.java - has pe-only, no expected header yet (hint: apache) - exact CE match: original.java at {"b" * 11} - another 1 candidate in the report copied.java - has pe-only, no expected header yet + has {p.NON_CE}, no expected header yet similar CE file (78%): source.java at ce/lts-4.2 + another 1 candidate in the report + gone.java + has {p.NON_CE}, no expected header yet + CE history: gone.java at {"d" * 11}^1 → Decide the origin and add a curation, see {p.README} Stale curations (2) @@ -149,12 +168,31 @@ class DecisionTests(unittest.TestCase): file changed since the curation, re-review and update contentHash deleted.java file is no longer in scope - → Remove or update the entry in {p.CURATIONS} + → Review the file and update the entry in {p.CURATIONS}; --fix removes entries of files no longer in scope - 6 findings in 6 files. Report: target/report.json + Redundant curations (1) + curated.java + curated apache, the check decides apache by itself + → Rerun with --fix to remove them from {p.CURATIONS} + + 6 findings in 7 files. Report: target/report.json """), output) self.assertEqual("", stdout.getvalue()) + def test_orphaned_curations_alone_point_to_fix(self): + orphaned = dict(path="deleted.java", status="stale-curation", reason="file is no longer in scope") + stderr = io.StringIO() + with redirect_stderr(stderr): + p.print_findings([self.decide(current="apache")], [orphaned], {}) + self.assertIn(" → Rerun with --fix to remove them\n", stderr.getvalue()) + + def test_console_lists_removed_curations(self): + stderr = io.StringIO() + with redirect_stderr(stderr): + p.print_removed_curations([{"path": "a.java", "reason": "file is no longer in scope"}]) + p.print_removed_curations([]) + self.assertEqual("Removed curations (1)\n a.java\n file is no longer in scope\n\n", stderr.getvalue()) + def test_console_closes_an_interrupted_phase_before_reporting(self): stderr = io.StringIO() with redirect_stderr(stderr): @@ -164,7 +202,7 @@ class DecisionTests(unittest.TestCase): self.assertEqual("Resolving Git history ... failed\n\nError: boom\n", stderr.getvalue()) def test_console_summarizes_a_clean_run(self): - rows = [self.decide(current="apache"), self.decide(path="b.java", pe_hash="changed", current="ce-modified")] + rows = [self.decide(current="apache"), self.decide(path="b.java", identical=None, current="ce-modified")] stderr = io.StringIO() with redirect_stderr(stderr): p.print_restamped(rows) @@ -173,7 +211,7 @@ class DecisionTests(unittest.TestCase): "Report: target/report.json\n", stderr.getvalue()) def test_console_lists_restamped_files(self): - rows = [self.decide(current="apache"), self.decide(path="b.java", pe_hash="changed", current="ce-modified")] + rows = [self.decide(current="apache"), self.decide(path="b.java", identical=None, current="ce-modified")] rows[1]["previousHeader"] = p.LEGACY stderr = io.StringIO() with redirect_stderr(stderr): @@ -297,11 +335,26 @@ class InputTests(unittest.TestCase): write([entry]) self.assertEqual({"a.java"}, set(p.load_curations(path))) for entries in ([entry, entry], [entry | {"reason": " "}], - [entry | {"path": "../a.java"}], [entry | {"header": "MIT"}]): + [entry | {"path": "../a.java"}], [entry | {"header": "MIT"}], + [entry | {"header": "pe-only"}]): write(entries) with self.assertRaises(p.Failure): p.load_curations(path) + def test_non_ce_header_is_the_only_other_template(self): + directory = temporary_directory(self) + for name in ("license-header.txt", "license-header-ce-modified.txt", "notes.txt"): + (directory / name).write_text("header\n") + with self.assertRaises(RuntimeError): + p.non_ce_header(directory) + (directory / "license-header-busl.txt").write_text("header\n") + self.assertEqual("busl", p.non_ce_header(directory)) + (directory / "license-header-pe.txt").write_text("header\n") + with self.assertRaises(RuntimeError): + p.non_ce_header(directory) + self.assertEqual(f"{p.TEMPLATE_DIRECTORY}/license-header-{p.NON_CE}.txt", p.TEMPLATES[p.NON_CE]) + self.assertTrue((this_repository() / p.TEMPLATES[p.NON_CE]).is_file()) + def test_plugin_version_and_configuration_come_from_root_pom(self): repo = temporary_directory(self) p.git(repo, "init") @@ -341,33 +394,105 @@ class GitHistoryTests(unittest.TestCase): self.assertEqual({initial, merged}, {change.commit for change in changes}) self.assertEqual(source, changes[0].path) - git("checkout", "side") - git.write("side-only.java", "not integrated\n") - git.commit("side only") - git("checkout", "lts-4.2") - self.assertNotIn("side-only.java", {change.path for change in p.history(git.root, "HEAD")}) - git("rm", source) git.commit("delete") - deleted = p.history(git.root, "HEAD")[0] - self.assertTrue(deleted.deleted) - self.assertEqual(b"merged result\n", p.blobs(git.root, [deleted.old])[deleted.old]) - - def test_integration_boundary_does_not_walk_preintegration_pe_history(self): + deleted = p.history(git.root, "HEAD", "--diff-filter=D") + self.assertEqual(["D"], [change.status for change in deleted]) + self.assertEqual(b"merged result\n", p.blobs(git.root, [deleted[0].old])[deleted[0].old]) + + def relicensed_fixture(self): + git = GitFixture(temporary_directory(self), "master") + git.write("Base.java", "base\n") + git.commit("CE base") + git("checkout", "-b", "lts-4.3") + git.write("Fix.java", "lts fix\n") + fix = git.commit("CE fix") + git("checkout", "master") + git.write("Feature.java", "CE feature\n") + last = git.commit("last Apache commit") + git.write("Tb.java", "TB feature\n") + relicensing = git.commit("relicensing") + git("merge", "--no-ff", "lts-4.3", "-m", "integrate CE fix") + return git, fix, last, relicensing + + def test_relicensed_ce_bases_are_the_latest_ce_commits_merged_into_the_branch(self): + git, fix, last, relicensing = self.relicensed_fixture() + with patch.object(p, "RELICENSING_COMMIT", relicensing): + self.assertEqual(sorted([fix, last]), p.relicensed_ce_bases(git.root, git("rev-parse", "HEAD"))) + git("checkout", "lts-4.3") + git.write("Fix.java", "second lts fix\n") + second = git.commit("second CE fix") + git("checkout", "master") + self.assertEqual(sorted([fix, last]), p.relicensed_ce_bases(git.root, git("rev-parse", "HEAD"))) + git("merge", "--no-ff", "lts-4.3", "-m", "integrate second CE fix") + self.assertEqual(sorted([second, last]), p.relicensed_ce_bases(git.root, git("rev-parse", "HEAD"))) + self.assertEqual([last], p.relicensed_ce_bases(git.root, relicensing)) + + def test_relicensed_ce_bases_need_the_relicensing_commit_in_history(self): + git, _, _, relicensing = self.relicensed_fixture() + with patch.object(p, "RELICENSING_COMMIT", relicensing), self.assertRaisesRegex(p.Failure, "Pass --ce-ref"): + p.relicensed_ce_bases(git.root, git("rev-parse", "lts-4.3")) + with patch.object(p, "RELICENSING_COMMIT", "0" * 40), self.assertRaisesRegex(p.Failure, "Pass --ce-ref"): + p.relicensed_ce_bases(git.root, git("rev-parse", "HEAD")) + + def test_merged_ce_bases_follow_the_integrated_ce_commit(self): git = GitFixture(temporary_directory(self), "ce") - git.write("initial", "initial") - git.commit("initial") - git("branch", "pe") - git.write("ce-file", "CE") - anchor = git.commit("CE addition") - git("checkout", "pe") - git.write("pe-file", "PE") - git.commit("PE addition") - git("merge", "ce", "-m", "CE integration") - boundary = git("rev-parse", "HEAD") - git.write("pe-file", "PE edit") - git.commit("PE edit") - self.assertEqual(boundary, p.integration_boundary(git.root, anchor, "HEAD")) + git.write("Base.java", "base\n") + git.commit("CE base") + git("checkout", "-b", "integrating") + git.write("Own.java", "own\n") + git.commit("own addition") + git("checkout", "ce") + git.write("Base.java", "CE fix\n") + integrated = git.commit("CE fix") + git("checkout", "integrating") + git("merge", "--no-ff", "ce", "-m", "integrate CE") + git("checkout", "ce") + git.write("Base.java", "later CE fix\n") + tip = git.commit("not yet integrated") + self.assertEqual([integrated], p.merged_ce_bases(git.root, git("rev-parse", "integrating"), tip)) + git("checkout", "--orphan", "unrelated") + git.write("Other.java", "other\n") + unrelated = git.commit("unrelated history") + with self.assertRaisesRegex(p.Failure, "shares no history"): + p.merged_ce_bases(git.root, unrelated, tip) + + def test_lineage_records_first_parent_ce_deletions(self): + git = GitFixture(temporary_directory(self), "ce") + git.write("Gone.java", "removed from CE\n") + git.write("Kept.java", "kept\n") + git.commit("CE base") + git("checkout", "-b", "side") + git.write("Temporary.java", "never on the mainline\n") + git.commit("side addition") + git("rm", "Temporary.java") + git.commit("side removal") + git("checkout", "ce") + git("merge", "--no-ff", "side", "-m", "integrate side") + git("rm", "Gone.java") + removal = git.commit("CE removal") + lineage = p.Lineage.load(git.root, removal, [removal]) + self.assertEqual({"Gone.java"}, set(lineage.deleted)) + self.assertEqual(removal + "^1", lineage.deleted["Gone.java"]["ref"]) + self.assertEqual(b"removed from CE\n", p.blobs(git.root, [lineage.deleted["Gone.java"]["blob"]]) + [lineage.deleted["Gone.java"]["blob"]]) + self.assertEqual([(removal, git("rev-parse", f"{removal}:Kept.java"))], lineage.versions("Kept.java")) + self.assertEqual([], lineage.versions("Gone.java")) + + def test_merge_blobs_returns_only_clean_merges(self): + git = GitFixture(temporary_directory(self), "main") + git.write("File.java", "one\ntwo\nthree\nfour\nfive\n") + git.commit("base") + base = git("rev-parse", "HEAD:File.java") + + def blob(content): + git.write("File.java", content) + git.commit(content.splitlines()[0]) + return git("rev-parse", "HEAD:File.java") + + ours, theirs = blob("ONE\ntwo\nthree\nfour\nfive\n"), blob("one\ntwo\nthree\nfour\nFIVE\n") + self.assertEqual(b"ONE\ntwo\nthree\nfour\nFIVE\n", p.merge_blobs(git.root, ours, base, theirs)) + self.assertIsNone(p.merge_blobs(git.root, ours, base, blob("uno\ntwo\nthree\nfour\nfive\n"))) def test_ignore_filter_keeps_tracked_and_unignored_files(self): repo = temporary_directory(self) @@ -393,10 +518,10 @@ class GitHistoryTests(unittest.TestCase): original = b"class Source {\n" + b" void action() { doUsefulWork(); }\n" * 20 + b"}\n" tool.add(source, "Source.java", original) tool.add(empty, "Empty.java", b"\n") - tool.add(("pe", "Renamed.java"), "Renamed.java", + tool.add(("head", "Renamed.java"), "Renamed.java", original.replace(b"Source", b"Renamed").replace(b"\n", b"\r\n")) - tool.add(("pe", "Other.java"), "Other.java", b"independent PE implementation\n") - tool.add(("pe", "Blank.java"), "Blank.java", b"\r\n") + tool.add(("head", "Other.java"), "Other.java", b"independent implementation\n") + tool.add(("head", "Blank.java"), "Blank.java", b"\r\n") found = p.normalized_copies(tool, {source: "selected-mainline", empty: "selected-mainline"}, ["Renamed.java", "Other.java", "Blank.java"], tool.nonempty()) self.assertEqual({"Renamed.java"}, set(found)) @@ -412,19 +537,19 @@ class FetchTests(unittest.TestCase): self.ce("tag", "-a", "v4.2.0", "-m", "release") self.ce.write("Base.java", "second\n") self.second = self.ce.commit("second") - self.pe = GitFixture(temporary_directory(self), "pe") - self.pe.write("Pe.java", "pe\n") - self.pe.commit("pe base") + self.local = GitFixture(temporary_directory(self), "main") + self.local.write("Own.java", "own\n") + self.local.commit("own base") def fetch(self, ref): - return p.fetch(self.pe.root, str(self.ce.root), ref) + return p.fetch(self.local.root, str(self.ce.root), ref) def test_fetches_branches_tags_and_commits(self): self.assertEqual(self.second, self.fetch("lts-4.2")) self.assertEqual(self.second, self.fetch("refs/heads/lts-4.2")) self.assertEqual(self.first, self.fetch("v4.2.0")) self.assertEqual(self.first, self.fetch(self.first)) - self.assertEqual("second", self.pe("show", f"{self.second}:Base.java")) + self.assertEqual("second", self.local("show", f"{self.second}:Base.java")) def test_every_run_fetches_the_current_tip(self): self.assertEqual(self.second, self.fetch("lts-4.2")) @@ -440,33 +565,39 @@ class FetchTests(unittest.TestCase): class CheckCommandTests(unittest.TestCase): + LINES = "".join(f"line {index}\n" for index in range(10)) + def setUp(self): self.repo = temporary_directory(self) - self.git = git = GitFixture(self.repo, "lts-4.2") - self.body = "new CE feature implementation\n" * 20 - git.write("Base.java", "base implementation\n") - git.commit("release base") - git("branch", "pe") - git("checkout", "-b", "fix/my-fix") - git.write("Feature.java", self.body) - git.write("Deleted.java", "historical CE feature source\n") - git.commit("CE fix sources") - git("rm", "Deleted.java") - self.feature = git.commit("remove temporary source") - git("checkout", "-b", "unrelated", "lts-4.2") - git.write("Unrelated.java", "unrelated source\n") - git.commit("unrelated source") - git("checkout", "pe") - git.write("Renamed.java", fixture("pe-only") + self.body) - git.write("Deleted.java", fixture("pe-only") + "historical CE feature source\n") - git.write("Local.java", fixture("pe-only") + "unrelated source\n") - git.write("Swapped.java", fixture("apache") + "swapped source\n") + self.git = git = GitFixture(self.repo, "master") + self.body = "CE source implementation\n" * 20 + git.write(".gitignore", "target/\n") for category, name in p.TEMPLATES.items(): git.write(name, f"fixture {category}\n") git.write(p.CURATIONS, '{"schemaVersion": 1, "curations": []}') + git.write("Base.java", fixture("apache") + "base implementation\n") + git.write("Changed.java", fixture("apache") + "CE implementation\n") + git.write("Merged.java", fixture("apache") + self.LINES) + git.write("Source.java", fixture("apache") + self.body) + self.base = git.commit("CE base") + git("checkout", "-b", "lts-4.3") + git.write("Merged.java", fixture("apache") + self.LINES.replace("line 9", "lts fix")) + git.write("Fixed.java", fixture("apache") + "lts addition\n") + self.fix = git.commit("CE fix") + git("checkout", "master") + git.write("Deleted.java", fixture("apache") + "removed CE source\n") + self.addition = git.commit("CE addition") + git.write("Merged.java", fixture("apache") + self.LINES.replace("line 0", "master change")) + git("rm", "-q", "Deleted.java") + self.last = git.commit("last Apache commit") + git.write("Changed.java", fixture("ce-modified") + "CE implementation\nTB change\n") + git.write("New.java", fixture(p.NON_CE) + "TB feature\n") + self.relicensing = git.commit("relicensing") + git("merge", "--no-ff", "lts-4.3", "-m", "integrate CE fix") + self.scope = ["Base.java", "Changed.java", "Fixed.java", "Merged.java", "New.java", "Source.java"] self.output = self.repo / "target/report.json" - def check(self, ref, scope, fix=False): + def check(self, *args, scope=None): def recognized(content): for header in p.TEMPLATES: if content.startswith(fixture(header).encode()): @@ -483,30 +614,134 @@ class CheckCommandTests(unittest.TestCase): def strip_headers(tool): tool.removed = {key: split(body)[0] for key, body in tool.contents.items()} tool.stacked = set() - return {key: p.comparison_hash(split(body)[1]) for key, body in tool.contents.items()} + for key, body in list(tool.contents.items()): + tool.write(key, split(body)[1]) + return {key: p.comparison_hash(body) for key, body in tool.contents.items()} def restamp(tool, expected): for key, header in expected.items(): (tool.root / tool.paths[key]).write_bytes(fixture(header).encode() + split(tool.contents[key])[1]) return {key: (tool.root / tool.paths[key]).read_bytes() for key in expected}, {} + stderr = io.StringIO() with (patch.object(p.Path, "cwd", return_value=self.repo), + patch.object(p, "RELICENSING_COMMIT", self.relicensing), patch.object(p, "read_plugin", return_value=fixture_plugin()), - patch.object(p, "discover_scope", return_value=p.Scope(scope, [], [], 0)), + patch.object(p, "discover_scope", return_value=p.Scope(scope or self.scope, [], [], 0)), patch.object(p.Mycila, "current_headers", current_headers), patch.object(p.Mycila, "strip_headers", strip_headers), patch.object(p.Mycila, "restamp", restamp), - redirect_stdout(io.StringIO()), redirect_stderr(io.StringIO())): - code = p.main(["check", "--ce-ref", ref, "--ce-remote", str(self.repo), "--output", str(self.output)] - + (["--fix"] if fix else [])) - return code, json.loads(self.output.read_text()) + redirect_stdout(io.StringIO()), redirect_stderr(stderr)): + code = p.main(["check", "--output", str(self.output), *args]) + report = json.loads(self.output.read_text()) if self.output.exists() else None + return code, report, stderr.getvalue() - def test_matching_mainline_passes(self): - code, report = self.check("lts-4.2", ["Renamed.java", "Deleted.java", "Local.java"]) + def rows(self, report): + return {row["path"]: row for row in report["files"]} + + def test_relicensed_branch_passes(self): + code, report, _ = self.check() self.assertEqual(0, code) - self.assertEqual({"match": 3}, report["summary"]) - self.assertEqual({"remote": str(self.repo), "input": "lts-4.2", "commit": self.git("rev-parse", "lts-4.2")}, - report["ceComparison"]) + self.assertEqual({"match": 6}, report["summary"]) + bases = sorted([self.fix, self.last]) + self.assertEqual({"relicensingCommit": self.relicensing, "bases": bases}, report["ce"]) + rows = self.rows(report) + self.assertEqual({"Base.java": "apache", "Changed.java": "ce-modified", "Fixed.java": "apache", + "Merged.java": "apache", "New.java": p.NON_CE, "Source.java": "apache"}, + {name: row["expectedHeader"] for name, row in rows.items()}) + self.assertEqual({"path": "Merged.java", "merge": bases, "base": self.base}, rows["Merged.java"]["identicalTo"]) + self.assertEqual({"path": "Fixed.java", "ref": self.fix, "blob": self.git("rev-parse", f"{self.fix}:Fixed.java")}, + rows["Fixed.java"]["identicalTo"]) + + def test_fix_restamps_decided_headers_only(self): + self.git.write("Base.java", FOREIGN_LINE.decode() + "base implementation\n") + self.git.write("New.java", fixture("apache") + "TB feature\n") + shortened = self.body.replace("CE source implementation\n", "", 1) + self.git.write("Source.java", fixture("apache") + shortened) + code, report, _ = self.check() + self.assertEqual(1, code) + self.assertEqual({"match": 3, "mismatch": 3}, report["summary"]) + rows = self.rows(report) + self.assertEqual((p.FOREIGN, "apache"), (rows["Base.java"]["currentHeader"], rows["Base.java"]["expectedHeader"])) + self.assertEqual(("apache", p.NON_CE), (rows["New.java"]["currentHeader"], rows["New.java"]["expectedHeader"])) + self.assertEqual(("apache", "ce-modified"), + (rows["Source.java"]["currentHeader"], rows["Source.java"]["expectedHeader"])) + + code, report, _ = self.check("--fix") + + self.assertEqual(1, code) + self.assertEqual(["New.java", "Source.java"], report["restamped"]) + self.assertEqual({"match": 5, "mismatch": 1}, report["summary"]) + self.assertEqual(fixture(p.NON_CE) + "TB feature\n", (self.repo / "New.java").read_text()) + self.assertEqual(fixture("ce-modified") + shortened, (self.repo / "Source.java").read_text()) + self.assertEqual(FOREIGN_LINE.decode() + "base implementation\n", (self.repo / "Base.java").read_text()) + code, report, _ = self.check("--fix") + self.assertEqual([], report["restamped"]) + self.assertEqual({"match": 5, "mismatch": 1}, report["summary"]) + + def test_ce_evidence_for_new_paths_needs_a_decision(self): + self.git.write("Copy.java", fixture(p.NON_CE) + self.body) + self.git.write("Deleted.java", fixture(p.NON_CE) + "removed CE source\n") + code, report, output = self.check(scope=self.scope + ["Copy.java", "Deleted.java"]) + self.assertEqual(1, code) + self.assertEqual({"match": 6, "unresolved": 2}, report["summary"]) + rows = self.rows(report) + self.assertEqual("Source.java", rows["Copy.java"]["copyCandidates"][0]["path"]) + self.assertEqual({"path": "Deleted.java", "ref": self.last + "^1", + "blob": self.git("rev-parse", f"{self.addition}:Deleted.java")}, + rows["Deleted.java"]["historicalCandidate"]) + self.assertIn("Needs a decision (2)\n", output) + + def test_fix_removes_redundant_and_orphaned_curations(self): + self.git.write("Copy.java", fixture(p.NON_CE) + self.body) + + def curation(name, header): + return dict(path=name, header=header, reason="Reviewed", + contentHash=p.raw_hash((self.repo / name).read_bytes())) + + needed, redundant = curation("Copy.java", p.NON_CE), curation("New.java", p.NON_CE) + orphaned = dict(path="Gone.java", header=p.NON_CE, reason="Reviewed", contentHash=p.raw_hash(b"gone")) + self.git.write(p.CURATIONS, json.dumps(dict(schemaVersion=1, curations=[needed, redundant, orphaned]), + indent=2) + "\n") + scope = self.scope + ["Copy.java"] + code, report, output = self.check(scope=scope) + self.assertEqual(1, code) + self.assertEqual({"match": 7}, report["summary"]) + self.assertEqual(["New.java"], report["redundantCurations"]) + self.assertEqual([dict(path="Gone.java", status="stale-curation", reason="file is no longer in scope")], + report["curationIssues"]) + self.assertIn("Redundant curations (1)\n", output) + + code, report, output = self.check("--fix", scope=scope) + + self.assertEqual(0, code) + self.assertEqual([{"path": "Gone.java", "reason": "file is no longer in scope"}, + {"path": "New.java", "reason": "the check decides the same header by itself"}], + report["removedCurations"]) + self.assertEqual(([], []), (report["redundantCurations"], report["curationIssues"])) + self.assertEqual(json.dumps(dict(schemaVersion=1, curations=[needed]), indent=2) + "\n", + (self.repo / p.CURATIONS).read_text()) + self.assertIn("Removed curations (2)\n", output) + code, report, _ = self.check("--fix", scope=scope) + self.assertEqual((0, []), (code, report["removedCurations"])) + + def test_missing_relicensing_commit_fails_before_the_scan(self): + self.relicensing = "0" * 40 + code, report, output = self.check() + self.assertEqual((2, None), (code, report)) + self.assertIn("Resolving Git history ... failed\n", output) + self.assertIn("Pass --ce-ref", output) + + def test_ce_ref_mode_compares_against_the_merged_ce_commit(self): + code, report, output = self.check("--ce-ref", "lts-4.3", "--ce-remote", str(self.repo)) + self.assertEqual(1, code) + self.assertEqual({"remote": str(self.repo), "ref": "lts-4.3", "commit": self.fix, "bases": [self.fix]}, + report["ce"]) + rows = self.rows(report) + self.assertEqual(("mismatch", "ce-modified"), (rows["Merged.java"]["status"], rows["Merged.java"]["expectedHeader"])) + self.assertEqual({"match": 5, "mismatch": 1}, report["summary"]) + self.assertIn(f" CE ref lts-4.3 → {self.fix[:11]}\n", output) + self.assertIn("Resolving Git history ... done (CE base lts-4.3)\n", output) def test_ce_ref_is_fetched_from_the_public_ce_repository_by_default(self): fetched = [] @@ -520,9 +755,9 @@ class CheckCommandTests(unittest.TestCase): patch.object(p, "read_plugin", return_value=fixture_plugin()), patch.object(p, "discover_scope", return_value=p.Scope([], [], [], 0)), redirect_stdout(io.StringIO()), redirect_stderr(io.StringIO())): - code = p.main(["check", "--ce-ref", "lts-4.2", "--output", str(self.output)]) + code = p.main(["check", "--ce-ref", "lts-4.3", "--output", str(self.output)]) self.assertEqual(0, code) - self.assertEqual([(p.CE_REMOTE, "lts-4.2")], fetched) + self.assertEqual([(p.CE_REMOTE, "lts-4.3")], fetched) def test_unfetchable_ce_ref_fails_before_the_history_walk(self): stderr = io.StringIO() @@ -535,71 +770,6 @@ class CheckCommandTests(unittest.TestCase): self.assertIn(f"Fetching missing from {self.repo} ... failed\n", stderr.getvalue()) self.assertIn(f"Error: cannot fetch 'missing' from {self.repo}.", stderr.getvalue()) - def test_feature_ref_exposes_rename_and_history_candidates(self): - code, report = self.check("fix/my-fix", ["Renamed.java", "Deleted.java", "Local.java"]) - self.assertEqual(1, code) - rows = {row["path"]: row for row in report["files"]} - self.assertEqual("unresolved", rows["Renamed.java"]["status"]) - candidate = rows["Renamed.java"]["candidates"][0] - self.assertEqual(("Feature.java", self.feature), (candidate["path"], candidate["ref"])) - self.assertEqual("unresolved", rows["Deleted.java"]["status"]) - self.assertTrue(rows["Deleted.java"]["historicalCandidates"]) - self.assertEqual("pe-only", rows["Local.java"]["expectedHeader"]) - self.assertEqual({"tip": self.feature, "firstParent": True}, report["ceHistory"]) - - def test_curation_for_deleted_file_fails_the_check(self): - curation = dict(path="Gone.java", contentHash=p.raw_hash(b"gone"), header="pe-only", reason="Reviewed") - self.git.write(p.CURATIONS, json.dumps(dict(schemaVersion=1, curations=[curation]))) - code, report = self.check("lts-4.2", ["Renamed.java", "Deleted.java", "Local.java"]) - self.assertEqual(1, code) - self.assertEqual({"match": 3}, report["summary"]) - self.assertEqual([dict(path="Gone.java", status="stale-curation", reason="file is no longer in scope")], - report["curationIssues"]) - - def test_fix_restamps_decided_headers_only(self): - self.git("merge", "--no-ff", "fix/my-fix", "-m", "integrate CE fix") - self.git.write("Base.java", FOREIGN_LINE.decode() + "base implementation\n") - scope = ["Base.java", "Feature.java", "Renamed.java", "Swapped.java"] - code, report = self.check(self.feature, scope) - self.assertEqual(1, code) - self.assertEqual({"mismatch": 3, "unresolved": 1}, report["summary"]) - self.assertEqual([], report["restamped"]) - rows = {row["path"]: row for row in report["files"]} - self.assertEqual((p.FOREIGN, "apache"), (rows["Base.java"]["currentHeader"], rows["Base.java"]["expectedHeader"])) - self.assertEqual((p.MISSING, "apache"), - (rows["Feature.java"]["currentHeader"], rows["Feature.java"]["expectedHeader"])) - self.assertEqual(("apache", "pe-only"), - (rows["Swapped.java"]["currentHeader"], rows["Swapped.java"]["expectedHeader"])) - - code, report = self.check(self.feature, scope, fix=True) - - self.assertEqual(1, code) - self.assertEqual(["Feature.java", "Swapped.java"], report["restamped"]) - self.assertEqual({"match": 2, "mismatch": 1, "unresolved": 1}, report["summary"]) - rows = {row["path"]: row for row in report["files"]} - self.assertEqual(("match", "apache", p.MISSING), - (rows["Feature.java"]["status"], rows["Feature.java"]["currentHeader"], - rows["Feature.java"]["previousHeader"])) - self.assertEqual(fixture("apache") + self.body, (self.repo / "Feature.java").read_text()) - self.assertEqual(fixture("pe-only") + "swapped source\n", (self.repo / "Swapped.java").read_text()) - self.assertEqual("apache", rows["Swapped.java"]["previousHeader"]) - self.assertEqual("mismatch", rows["Base.java"]["status"]) - self.assertNotIn("previousHeader", rows["Base.java"]) - self.assertEqual(FOREIGN_LINE.decode() + "base implementation\n", (self.repo / "Base.java").read_text()) - self.assertEqual(fixture("pe-only") + self.body, (self.repo / "Renamed.java").read_text()) - code, report = self.check(self.feature, scope, fix=True) - self.assertEqual([], report["restamped"]) - self.assertEqual({"match": 2, "mismatch": 1, "unresolved": 1}, report["summary"]) - - def test_integrated_ce_file_compares_against_shared_ancestor(self): - self.git("merge", "--no-ff", "fix/my-fix", "-m", "integrate CE fix") - _, report = self.check(self.feature, ["Feature.java"]) - self.assertEqual("apache", report["files"][0]["expectedHeader"]) - self.assertEqual(self.feature, report["sharedAncestor"]) - self.git.write("Feature.java", self.body + "PE-specific addition\n") - _, report = self.check(self.feature, ["Feature.java"]) - self.assertEqual("ce-modified", report["files"][0]["expectedHeader"]) - MANAGED_POM = textwrap.dedent("""\ @@ -748,30 +918,30 @@ class MavenTests(unittest.TestCase): header = (repo / template).read_text() for extension in SAMPLE_BODY: for eol in ("\n", "\r\n"): - key = ("pe", category + extension + repr(eol)) + key = ("head", category + extension + repr(eol)) sample = SAMPLE_PREFIX[extension] + commented(header, extension) + SAMPLE_BODY[extension] tool.add(key, "sample." + extension, sample.replace("\n", eol).encode()) expected[key] = p.comparison_hash((SAMPLE_PREFIX[extension] + SAMPLE_BODY[extension]).encode()) - missing = ("pe", "missing") + missing = ("head", "missing") tool.add(missing, "missing.java", b"// Ordinary documentation\nclass Missing {}\n") expected[missing] = p.comparison_hash(b"// Ordinary documentation\nclass Missing {}\n") legacy = ("ce", "legacy") tool.add(legacy, "legacy.java", LEGACY_JAVA) expected[legacy] = p.comparison_hash(b"class Legacy {}\n") - foreign = ("pe", "foreign") + foreign = ("head", "foreign") tool.add(foreign, "foreign.java", FOREIGN_LINE + b"class Foreign {}\n") expected[foreign] = p.comparison_hash(b"class Foreign {}\n") - one_line = ("pe", "one-line") + one_line = ("head", "one-line") tool.add(one_line, "one.sh", b"#!/bin/sh\n# Copyright 2024 The Thingsboard Authors\nset -e\necho x\n") expected[one_line] = p.comparison_hash(b"#!/bin/sh\nset -e\necho x\n") spdx = stamped((repo / p.TEMPLATES["apache"]).read_text(), "java").encode() - stacked = ("pe", "stacked") + stacked = ("head", "stacked") tool.add(stacked, "stacked.java", spdx + LEGACY_JAVA) expected[stacked] = p.comparison_hash(b"class Legacy {}\n") - reversed_stack = ("pe", "reversed") + reversed_stack = ("head", "reversed") tool.add(reversed_stack, "reversed.java", LEGACY_JAVA.replace(b"class Legacy {}\n", spdx + b"class Legacy {}\n")) expected[reversed_stack] = p.comparison_hash(b"class Legacy {}\n") - mentioned = ("pe", "mentioned") + mentioned = ("head", "mentioned") tool.add(mentioned, "mentioned.java", spdx + b"\n" + FOREIGN_LINE + b"class Mentioned {}\n") expected[mentioned] = p.comparison_hash(FOREIGN_LINE + b"class Mentioned {}\n") pairs = {} @@ -780,18 +950,18 @@ class MavenTests(unittest.TestCase): new = stamped((repo / p.TEMPLATES["apache"]).read_text(), extension).encode() old = legacy_file[:-len(body)] for order, content in (("new-old", new + old + body), ("old-new", old + new + body)): - key = ("pe", order + "." + extension) + key = ("head", order + "." + extension) pairs[key] = content tool.add(key, key[1], content) expected[key] = p.comparison_hash(body) header_only = {} for extension in SAMPLE_BODY: - key = ("pe", "only." + extension) - header_only[key] = SAMPLE_PREFIX[extension] + commented((repo / p.TEMPLATES["pe-only"]).read_text(), extension) + key = ("head", "only." + extension) + header_only[key] = SAMPLE_PREFIX[extension] + commented((repo / p.TEMPLATES[p.NON_CE]).read_text(), extension) tool.add(key, "only." + extension, header_only[key].encode()) expected[key] = p.comparison_hash(SAMPLE_PREFIX[extension].encode()) - headers = tool.current_headers([key for key in expected if key[0] == "pe"]) + headers = tool.current_headers([key for key in expected if key[0] == "head"]) recognized = dict(headers) self.assertEqual(p.UNRECOGNIZED, headers.pop(missing)) @@ -803,7 +973,7 @@ class MavenTests(unittest.TestCase): for key in pairs: headers.pop(key) for key in header_only: - self.assertEqual("pe-only", headers.pop(key), key) + self.assertEqual(p.NON_CE, headers.pop(key), key) for key, header in headers.items(): self.assertTrue(key[1].startswith(header), (key, header)) self.assertEqual(expected, tool.strip_headers()) @@ -832,55 +1002,55 @@ class MavenTests(unittest.TestCase): for extension in SAMPLE_BODY: for eol in ("\n", "\r\n"): body = (SAMPLE_PREFIX[extension] + SAMPLE_BODY[extension]).replace("\n", eol) - key = ("pe", "missing-" + category + extension + repr(eol)) + key = ("head", "missing-" + category + extension + repr(eol)) tool.add(key, "sample." + extension, body.encode()) wanted[key] = category expected[key] = (SAMPLE_PREFIX[extension] + stamped(header, extension) + SAMPLE_BODY[extension]).replace("\n", eol).encode() - legacy = ("pe", "legacy") + legacy = ("head", "legacy") tool.add(legacy, "legacy.java", LEGACY_JAVA) wanted[legacy], expected[legacy] = "apache", (stamped(templates["apache"], "java") + "class Legacy {}\n").encode() - confidential = ("pe", "confidential") + confidential = ("head", "confidential") tool.add(confidential, "start.sh", b"#!/bin/bash\n#\n# ThingsBoard, Inc. (\"COMPANY\") CONFIDENTIAL\n#\n" b"# Copyright \xc2\xa9 2016-2026 ThingsBoard, Inc. All Rights Reserved.\n#\n\nset -e\n") - wanted[confidential], expected[confidential] = "pe-only", ("#!/bin/bash\n" + stamped(templates["pe-only"], "sh") + "set -e\n").encode() - header_only = ("pe", "only") + wanted[confidential], expected[confidential] = p.NON_CE, ("#!/bin/bash\n" + stamped(templates[p.NON_CE], "sh") + "set -e\n").encode() + header_only = ("head", "only") tool.add(header_only, "only.java", b"/**\n * Copyright 2024 The Thingsboard Authors\n */\n") wanted[header_only], expected[header_only] = "ce-modified", stamped(templates["ce-modified"], "java").encode() - shebang = ("pe", "shebang") + shebang = ("head", "shebang") tool.add(shebang, "shebang.sh", b"#!/bin/sh\n#\n# Copyright 2024 The Thingsboard Authors\n#\n") - wanted[shebang], expected[shebang] = "pe-only", ("#!/bin/sh\n" + stamped(templates["pe-only"], "sh")).encode() - glued = ("pe", "glued") + wanted[shebang], expected[shebang] = p.NON_CE, ("#!/bin/sh\n" + stamped(templates[p.NON_CE], "sh")).encode() + glued = ("head", "glued") tool.add(glued, "glued.sh", b"#\n# Copyright 2024 The Thingsboard Authors\n#\n# helper\nset -e\n") - wanted[glued] = "pe-only" - doubled = ("pe", "doubled") + wanted[glued] = p.NON_CE + doubled = ("head", "doubled") tool.add(doubled, "doubled.java", LEGACY_JAVA.replace(b"class Legacy {}\n", LEGACY_JAVA)) - wanted[doubled], expected[doubled] = "pe-only", (stamped(templates["pe-only"], "java") + "class Legacy {}\n").encode() - damaged = ("pe", "damaged") + wanted[doubled], expected[doubled] = p.NON_CE, (stamped(templates[p.NON_CE], "java") + "class Legacy {}\n").encode() + damaged = ("head", "damaged") tool.add(damaged, "damaged.java", stamped(templates["apache"], "java").replace("Apache-2.0", "Apache-2.0 test").encode() + b"class Damaged {}\n") wanted[damaged], expected[damaged] = "apache", (stamped(templates["apache"], "java") + "class Damaged {}\n").encode() - truncated = ("pe", "truncated") + truncated = ("head", "truncated") tool.add(truncated, "truncated.java", b"// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors\nclass Truncated {}\n") wanted[truncated], expected[truncated] = "apache", (stamped(templates["apache"], "java") + "class Truncated {}\n").encode() - vendored = ("pe", "vendored") + vendored = ("head", "vendored") tool.add(vendored, "vendored.java", LEGACY_JAVA.replace(b"class Legacy {}\n", FOREIGN_LINE + b"// MIT\nclass Legacy {}\n")) - wanted[vendored] = "pe-only" + wanted[vendored] = p.NON_CE spdx = stamped(templates["apache"], "java").encode() - stacked = ("pe", "stacked") + stacked = ("head", "stacked") tool.add(stacked, "stacked.java", spdx + LEGACY_JAVA) wanted[stacked], expected[stacked] = "ce-modified", (stamped(templates["ce-modified"], "java") + "class Legacy {}\n").encode() - reversed_stack = ("pe", "reversed") + reversed_stack = ("head", "reversed") tool.add(reversed_stack, "reversed.java", LEGACY_JAVA.replace(b"class Legacy {}\n", spdx + b"\nclass Legacy {}\n")) wanted[reversed_stack], expected[reversed_stack] = "apache", (stamped(templates["apache"], "java") + "class Legacy {}\n").encode() - mentioned = ("pe", "mentioned") + mentioned = ("head", "mentioned") tool.add(mentioned, "mentioned.java", spdx + b"\n" + FOREIGN_LINE + b"class Mentioned {}\n") - wanted[mentioned] = "pe-only" + wanted[mentioned] = p.NON_CE for extension, legacy_file, body in (("ts", LEGACY_TS, b"export const legacy = 1;\n"), ("xml", LEGACY_XML, b"\n")): new = stamped(templates["apache"], extension).encode() old = legacy_file[:-len(body)] for order, content in (("new-old", new + old + body), ("old-new", old + new + body)): - key = ("pe", order + "." + extension) + key = ("head", order + "." + extension) tool.add(key, key[1], content) wanted[key] = "ce-modified" expected[key] = stamped(templates["ce-modified"], extension).encode() + body From d1725588fbc4acf1a4c7bba4125f27ef31518df7 Mon Sep 17 00:00:00 2001 From: Dmytro Skarzhynets Date: Wed, 30 Sep 2026 17:04:35 +0300 Subject: [PATCH 03/43] fix: correct license headers reported by the provenance check - Restamp ten files whose header does not match their CE provenance: EntityDatabaseSchemaService.java, js-resource.component.ts and DataValidationException.java are identical to CE and take the Apache header; the 4.3.1.6 cluster migration, TbClusterStore and their tests exist in CE lts-4.3 and common/transport/snmp/pom.xml lost a CE dependency, so they take the ce-modified header. - Remove the DataValidationException.java curation: CE has had an identical file at the same path since December 2025. - Remove 29 curations that repeat the header the check decides by itself. - Delete trendz-settings.component.html and comparison-keys-table.component.html at their old locations: their components moved and no longer reference them, and the relicensing commit left only a license header in them. --- .../upgrade/lts/4.3.1.6/schema_update.sql | 5 +- .../install/EntityDatabaseSchemaService.java | 3 +- .../install/lts/V4_3_1_6Migration.java | 5 +- .../ThingsboardInstallServiceTest.java | 5 +- ...ityDatabaseSchemaServiceClusterIdTest.java | 5 +- .../exception/DataValidationException.java | 3 +- common/transport/snmp/pom.xml | 3 +- .../dao/subscription/TbClusterStore.java | 5 +- .../dao/subscription/TbClusterStoreTest.java | 5 +- .../python/license-headers/curations.json | 180 ------------------ .../comparison-keys-table.component.html | 8 - .../admin/resource/js-resource.component.ts | 3 +- .../admin/trendz-settings.component.html | 8 - 13 files changed, 23 insertions(+), 215 deletions(-) delete mode 100644 ui-ngx/src/app/modules/home/components/widget/config/basic/chart/comparison-keys-table.component.html delete mode 100644 ui-ngx/src/app/modules/home/pages/admin/trendz-settings.component.html diff --git a/application/src/main/data/upgrade/lts/4.3.1.6/schema_update.sql b/application/src/main/data/upgrade/lts/4.3.1.6/schema_update.sql index c57c9ab598..fb95b9b15f 100644 --- a/application/src/main/data/upgrade/lts/4.3.1.6/schema_update.sql +++ b/application/src/main/data/upgrade/lts/4.3.1.6/schema_update.sql @@ -1,6 +1,7 @@ -- --- SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. --- SPDX-License-Identifier: BUSL-1.1 +-- SPDX-FileCopyrightText: Copyright The ThingsBoard Authors +-- SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +-- SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 -- -- A copy of the tb_cluster block in dao/src/main/resources/sql/schema-entities.sql, because the no-downtime patch diff --git a/application/src/main/java/org/thingsboard/server/service/install/EntityDatabaseSchemaService.java b/application/src/main/java/org/thingsboard/server/service/install/EntityDatabaseSchemaService.java index 0382b1205a..4b08361076 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/EntityDatabaseSchemaService.java +++ b/application/src/main/java/org/thingsboard/server/service/install/EntityDatabaseSchemaService.java @@ -1,6 +1,5 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors -// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. -// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 +// SPDX-License-Identifier: Apache-2.0 package org.thingsboard.server.service.install; public interface EntityDatabaseSchemaService extends DatabaseSchemaService { diff --git a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_6Migration.java b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_6Migration.java index 7a16cf6195..1756033ef1 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_6Migration.java +++ b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_6Migration.java @@ -1,5 +1,6 @@ -// SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors +// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 package org.thingsboard.server.service.install.lts; import lombok.RequiredArgsConstructor; diff --git a/application/src/test/java/org/thingsboard/server/install/ThingsboardInstallServiceTest.java b/application/src/test/java/org/thingsboard/server/install/ThingsboardInstallServiceTest.java index 0fe371aa77..8591952462 100644 --- a/application/src/test/java/org/thingsboard/server/install/ThingsboardInstallServiceTest.java +++ b/application/src/test/java/org/thingsboard/server/install/ThingsboardInstallServiceTest.java @@ -1,5 +1,6 @@ -// SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors +// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 package org.thingsboard.server.install; import org.junit.jupiter.api.BeforeEach; diff --git a/application/src/test/java/org/thingsboard/server/service/install/SqlEntityDatabaseSchemaServiceClusterIdTest.java b/application/src/test/java/org/thingsboard/server/service/install/SqlEntityDatabaseSchemaServiceClusterIdTest.java index 88d6bfba03..f8f1cd800d 100644 --- a/application/src/test/java/org/thingsboard/server/service/install/SqlEntityDatabaseSchemaServiceClusterIdTest.java +++ b/application/src/test/java/org/thingsboard/server/service/install/SqlEntityDatabaseSchemaServiceClusterIdTest.java @@ -1,5 +1,6 @@ -// SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors +// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 package org.thingsboard.server.service.install; import org.junit.jupiter.api.BeforeEach; diff --git a/common/data/src/main/java/org/thingsboard/server/exception/DataValidationException.java b/common/data/src/main/java/org/thingsboard/server/exception/DataValidationException.java index 42a6b1af56..034dfa82a4 100644 --- a/common/data/src/main/java/org/thingsboard/server/exception/DataValidationException.java +++ b/common/data/src/main/java/org/thingsboard/server/exception/DataValidationException.java @@ -1,6 +1,5 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors -// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. -// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 +// SPDX-License-Identifier: Apache-2.0 package org.thingsboard.server.exception; public class DataValidationException extends RuntimeException { diff --git a/common/transport/snmp/pom.xml b/common/transport/snmp/pom.xml index fa24bc6e3c..97e47ab761 100644 --- a/common/transport/snmp/pom.xml +++ b/common/transport/snmp/pom.xml @@ -1,7 +1,8 @@ ---> diff --git a/ui-ngx/src/app/modules/home/pages/admin/resource/js-resource.component.ts b/ui-ngx/src/app/modules/home/pages/admin/resource/js-resource.component.ts index bce969df3a..e29bb3660c 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/resource/js-resource.component.ts +++ b/ui-ngx/src/app/modules/home/pages/admin/resource/js-resource.component.ts @@ -1,6 +1,5 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors -// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. -// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 +// SPDX-License-Identifier: Apache-2.0 import { ChangeDetectorRef, Component, Inject, OnDestroy, OnInit } from '@angular/core'; import { Subject } from 'rxjs'; import { Store } from '@ngrx/store'; diff --git a/ui-ngx/src/app/modules/home/pages/admin/trendz-settings.component.html b/ui-ngx/src/app/modules/home/pages/admin/trendz-settings.component.html deleted file mode 100644 index 12bc46fef7..0000000000 --- a/ui-ngx/src/app/modules/home/pages/admin/trendz-settings.component.html +++ /dev/null @@ -1,8 +0,0 @@ - ---> From 2d40cc633221a71e0eaab37581c7a84569d74173 Mon Sep 17 00:00:00 2001 From: Dmytro Skarzhynets Date: Wed, 30 Sep 2026 18:10:20 +0300 Subject: [PATCH 04/43] fix: exclude relicensed commits of the CE ref from CE With --ce-ref, CE was the history of the merge bases of HEAD and the CE ref. When the CE ref is a branch of the unified codebase, such as master, those merge bases are relicensed commits themselves, so a downstream repository whose history does not come from CE alone compared against the unified code. The CE bases below a relicensed merge base are now the CE commits beneath it, found with the relicensing commit as without --ce-ref. --- tools/src/main/python/license-headers/README.md | 4 +++- .../python/license-headers/check_license_headers.py | 6 ++++-- .../license-headers/test_check_license_headers.py | 12 ++++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/tools/src/main/python/license-headers/README.md b/tools/src/main/python/license-headers/README.md index 6597faad14..4f2eab2a1e 100644 --- a/tools/src/main/python/license-headers/README.md +++ b/tools/src/main/python/license-headers/README.md @@ -13,7 +13,9 @@ check compares against the latest CE commits merged into the current branch: `31936b09d24` in their history, for example pre-4.4 master and the lts-4.3 commits merged into lts-4.4. - With `--ce-ref`, CE commits are the history of the given CE branch, tag, or - commit. It is fetched from `https://github.com/thingsboard/thingsboard.git` + commit, without the commits that have the relicensing commit in their + history. Use it when the history of the current branch does not come from CE + alone. The ref is fetched from `https://github.com/thingsboard/thingsboard.git` on every run; pass `--ce-remote` to fetch from another URL or a local clone. ## Rules diff --git a/tools/src/main/python/license-headers/check_license_headers.py b/tools/src/main/python/license-headers/check_license_headers.py index d59e6dffa1..1ff6faf77c 100644 --- a/tools/src/main/python/license-headers/check_license_headers.py +++ b/tools/src/main/python/license-headers/check_license_headers.py @@ -188,7 +188,9 @@ def merged_ce_bases(repo, head, baseline): bases = run(["git", "merge-base", "--all", head, baseline], repo, ok=(0, 1)).stdout.decode().split() if not bases: raise Failure("HEAD shares no history with the CE ref. Check that the right CE branch was passed.") - return independent(repo, bases) + ce = [ce_base for base in bases + for ce_base in (relicensed_ce_bases(repo, base) if contains(repo, RELICENSING_COMMIT, base) else [base])] + return independent(repo, ce) def merge_blobs(repo, ours, base, theirs): @@ -1210,7 +1212,7 @@ def main(argv=None): parser.add_argument("command", choices=["check"]) parser.add_argument("--ce-ref", help="CE branch, tag, or commit that this branch integrates, fetched from --ce-remote; " - "without it, CE is the history that does not contain the relicensing commit") + "without it, CE is the history of HEAD that does not contain the relicensing commit") parser.add_argument("--ce-remote", default=CE_REMOTE, help=f"Git URL or path of the CE repository to fetch --ce-ref from (default: {CE_REMOTE})") parser.add_argument("--output", default="target/license-provenance/report.json") diff --git a/tools/src/main/python/license-headers/test_check_license_headers.py b/tools/src/main/python/license-headers/test_check_license_headers.py index 88968a1b91..a025443e75 100644 --- a/tools/src/main/python/license-headers/test_check_license_headers.py +++ b/tools/src/main/python/license-headers/test_check_license_headers.py @@ -457,6 +457,18 @@ class GitHistoryTests(unittest.TestCase): with self.assertRaisesRegex(p.Failure, "shares no history"): p.merged_ce_bases(git.root, unrelated, tip) + def test_merged_ce_bases_below_a_relicensed_ce_ref_exclude_relicensed_commits(self): + git, fix, last, relicensing = self.relicensed_fixture() + ce_tip = git("rev-parse", "HEAD") + git("checkout", "-b", "downstream", git("rev-list", "--max-parents=0", "HEAD")) + git.write("Own.java", "own\n") + own = git.commit("own history without the relicensing commit") + git("merge", "--no-ff", "master", "-m", "integrate CE master") + head = git("rev-parse", "HEAD") + with patch.object(p, "RELICENSING_COMMIT", relicensing): + self.assertIn(own, p.relicensed_ce_bases(git.root, head)) + self.assertEqual(sorted([fix, last]), p.merged_ce_bases(git.root, head, ce_tip)) + def test_lineage_records_first_parent_ce_deletions(self): git = GitFixture(temporary_directory(self), "ce") git.write("Gone.java", "removed from CE\n") From 12cddf58d168886432cc71b6bbf7b2b4eb46793a Mon Sep 17 00:00:00 2001 From: Dmytro Skarzhynets Date: Wed, 30 Sep 2026 17:04:26 +0300 Subject: [PATCH 05/43] fix: check license headers against CE history in the unified codebase The check compared each branch against a CE counterpart branch fetched from thingsboard/thingsboard, which is now the unified codebase itself, so every file was compared with itself and 5,468 files were reported with a wrong header. CE is now the history that does not contain the relicensing commit 31936b09d24. The check compares each file against the latest CE commits merged into the branch: - a path that exists in CE is apache when its content equals a CE version or a clean merge of its CE versions, and ce-modified otherwise; - a new path is busl unless it is at least 50% similar to a CE file or CE history had this path, which needs a decision; - --ce-ref keeps the previous mode of comparing against a fetched CE ref. The third header kind is named after its template, license-header-busl.txt, and curations use busl instead of pe-only. --fix also removes redundant curations and curations of files that are no longer in scope, and the check lists redundant curations. --- .github/workflows/check-license-headers.yml | 26 +- check-license-headers.sh | 19 +- .../src/main/python/license-headers/README.md | 54 +- .../license-headers/check_license_headers.py | 503 +++++++-------- .../python/license-headers/curations.json | 546 ++++++++-------- .../test_check_license_headers.py | 610 +++++++++++------- 6 files changed, 953 insertions(+), 805 deletions(-) diff --git a/.github/workflows/check-license-headers.yml b/.github/workflows/check-license-headers.yml index ca5cec2d04..753a9c565d 100644 --- a/.github/workflows/check-license-headers.yml +++ b/.github/workflows/check-license-headers.yml @@ -11,19 +11,12 @@ on: - master - rc - 'lts-[0-9]+.[0-9]+' - - 'license-lts-[0-9]+.[0-9]+' pull_request: branches: - master - rc - 'lts-[0-9]+.[0-9]+' - - 'license-lts-[0-9]+.[0-9]+' workflow_dispatch: - inputs: - ce-branch: - description: CE branch to compare against; defaults to the counterpart of the current branch - required: false - type: string permissions: contents: read @@ -53,27 +46,10 @@ jobs: java-version: 21 cache: maven - - name: Resolve CE branch - id: ce - env: - PE_BRANCH: ${{ github.base_ref || github.ref_name }} - CE_BRANCH: ${{ inputs.ce-branch }} - run: | - if [[ -z "$CE_BRANCH" ]]; then - case "$PE_BRANCH" in - master|rc) CE_BRANCH="$PE_BRANCH" ;; - lts-*|license-lts-*) CE_BRANCH="${PE_BRANCH#license-}" ;; - *) echo "::error::No CE counterpart is defined for branch $PE_BRANCH"; exit 1 ;; - esac - fi - echo "branch=$CE_BRANCH" >> "$GITHUB_OUTPUT" - - name: Check license headers - env: - CE_BRANCH: ${{ steps.ce.outputs.branch }} run: | mkdir -p target/license-provenance - ./check-license-headers.sh "${CE_BRANCH}" 2>&1 | tee target/license-provenance/console.log + ./check-license-headers.sh 2>&1 | tee target/license-provenance/console.log - name: Add findings to the job summary if: failure() && hashFiles('target/license-provenance/console.log') != '' diff --git a/check-license-headers.sh b/check-license-headers.sh index 4103afa0f8..6176d4d7e9 100755 --- a/check-license-headers.sh +++ b/check-license-headers.sh @@ -8,21 +8,18 @@ set -euo pipefail usage() { echo "Checks SPDX license headers against CE provenance." - echo "usage: $0 [--fix] [--ce-remote ] [--output target/...]" - echo " ce-ref CE branch, tag or commit matching this PE branch, e.g. lts-4.2;" - echo " fetched from the CE repository on every run" + echo "usage: $0 [--fix] [--ce-ref ] [--ce-remote ] [--output target/...]" echo " --fix restamp files whose expected header the check determined" - echo " --ce-remote CE repository to fetch from (default: https://github.com/thingsboard/thingsboard.git)" + echo " and remove redundant or orphaned curations" + echo " --ce-ref CE branch, tag or commit that this branch integrates, fetched on every run;" + echo " without it, CE is the history that does not contain the relicensing commit" + echo " --ce-remote CE repository to fetch --ce-ref from (default: https://github.com/thingsboard/thingsboard.git)" } -if [[ $# -eq 0 || "$1" == "-h" || "$1" == "--help" || "$1" == -* ]]; then +if [[ $# -gt 0 && ( "$1" == "-h" || "$1" == "--help" ) ]]; then usage - [[ $# -gt 0 && ( "$1" == "-h" || "$1" == "--help" ) ]] && exit 0 - exit 2 + exit 0 fi -ce_ref="$1" -shift - cd "$(git rev-parse --show-toplevel)" -exec python3 tools/src/main/python/license-headers/check_license_headers.py check --ce-ref "$ce_ref" "$@" +exec python3 tools/src/main/python/license-headers/check_license_headers.py check "$@" diff --git a/tools/src/main/python/license-headers/README.md b/tools/src/main/python/license-headers/README.md index 3e198be6f3..6597faad14 100644 --- a/tools/src/main/python/license-headers/README.md +++ b/tools/src/main/python/license-headers/README.md @@ -1,29 +1,50 @@ # License header provenance check Verifies that every file carries the SPDX header its origin requires: `apache` -for unchanged CE files, `ce-modified` for CE files with PE changes, `pe-only` -for files that do not exist in CE. A `pom.xml` added in PE under a directory -that has no files in CE is `pe-only` even when it resembles a CE `pom.xml`: -module identity, dependencies and packaging define the PE artifact. +for unchanged CE files, `ce-modified` for CE files with changes, and the third +header of this repository, `busl`, for files that do not come from CE. The +third header is the only `templates/license-header-.txt` besides the +`ce-modified` one, and its `` names it in the output and in curations. + +CE is the history of the ThingsBoard Community Edition under Apache-2.0. The +check compares against the latest CE commits merged into the current branch: + +- By default, CE commits are the ones that do not have the relicensing commit + `31936b09d24` in their history, for example pre-4.4 master and the lts-4.3 + commits merged into lts-4.4. +- With `--ce-ref`, CE commits are the history of the given CE branch, tag, or + commit. It is fetched from `https://github.com/thingsboard/thingsboard.git` + on every run; pass `--ce-remote` to fetch from another URL or a local clone. + +## Rules + +A file whose path exists in CE is `apache` when its content without the +header equals a CE version of it, or a clean merge of its CE versions, and +`ce-modified` otherwise. + +A file whose path does not exist in CE is `busl`, except when it needs a +decision: its content is at least 50% similar to a CE file, or CE history once +had this path. A `pom.xml` added under a directory that has no files in CE is +`busl` even when it resembles a CE `pom.xml`: module identity, dependencies and +packaging define the new artifact. ## Run ```sh -./check-license-headers.sh lts-4.2 +./check-license-headers.sh ``` -The argument is the CE branch, tag, or commit matching the current PE branch. It -is fetched from `https://github.com/thingsboard/thingsboard.git` on every run, so -the clone needs network access but no CE remote of its own. Pass `--ce-remote` -to fetch from another URL or a local CE clone instead. +The check needs the full Git history of the clone. ## Fix automatically ```sh -./check-license-headers.sh lts-4.2 --fix +./check-license-headers.sh --fix ``` -Restamps every file whose expected header the check determined by itself. +Restamps every file whose expected header the check determined by itself and +removes curations that are redundant, because the check decides the same header +by itself, or that belong to files no longer in scope. ## Add a curation @@ -31,15 +52,18 @@ For files the check cannot decide ("Needs a decision"), record the decision in `curations.json` next to this file: 1. Put the correct header on the file. A file that exists in CE, even renamed - or moved, is `ce-modified`; a file that does not exist in CE is `pe-only`. + or moved, is `ce-modified`; a file that does not exist in CE is `busl`. 2. Run `sha256sum path/to/File.java`. 3. Add an entry and rerun the check: ```json { "path": "path/to/File.java", - "contentHash": "sha256:<64 hex digits>", - "header": "pe-only", - "reason": "Which CE file this was compared against and why the header follows." + "header": "busl", + "reason": "Which CE file this was compared against and why the header follows.", + "contentHash": "sha256:<64 hex digits>" } ``` + +A curation whose file changed since the review is stale and fails the check +until someone reviews the file again and updates `contentHash`. diff --git a/tools/src/main/python/license-headers/check_license_headers.py b/tools/src/main/python/license-headers/check_license_headers.py index 13ff9f75ad..d59e6dffa1 100644 --- a/tools/src/main/python/license-headers/check_license_headers.py +++ b/tools/src/main/python/license-headers/check_license_headers.py @@ -24,11 +24,24 @@ import uuid import xml.etree.ElementTree as ET +TEMPLATE_DIRECTORY = "tools/src/main/python/license-headers/templates" + + +def non_ce_header(directory): + kinds = sorted(path.name[len("license-header-"):-len(".txt")] for path in directory.glob("license-header-*.txt")) + kinds = [kind for kind in kinds if kind != "ce-modified"] + if len(kinds) != 1: + raise RuntimeError(f"Expected exactly one license-header-.txt besides the ce-modified one in {directory}") + return kinds[0] + + +NON_CE = non_ce_header(Path(__file__).resolve().parent / "templates") TEMPLATES = { - "apache": "tools/src/main/python/license-headers/templates/license-header.txt", - "ce-modified": "tools/src/main/python/license-headers/templates/license-header-ce-modified.txt", - "pe-only": "tools/src/main/python/license-headers/templates/license-header-busl.txt", + "apache": f"{TEMPLATE_DIRECTORY}/license-header.txt", + "ce-modified": f"{TEMPLATE_DIRECTORY}/license-header-ce-modified.txt", + NON_CE: f"{TEMPLATE_DIRECTORY}/license-header-{NON_CE}.txt", } +RELICENSING_COMMIT = "31936b09d24871e421f212502a8342f9d8aabb20" CE_REMOTE = "https://github.com/thingsboard/thingsboard.git" CURATIONS = "tools/src/main/python/license-headers/curations.json" README = "tools/src/main/python/license-headers/README.md" @@ -152,16 +165,35 @@ def fetch(repo, remote, ref): return resolve(repo, "FETCH_HEAD") -def unique_base(repo, left, right): - bases = git(repo, "merge-base", "--all", left, right).decode().splitlines() - if len(bases) != 1: - raise Failure(f"found {len(bases)} merge bases between PE HEAD and the CE ref, expected exactly one. " - "Check that the right CE branch was passed.") - return bases[0] +def independent(repo, commits): + return sorted(git(repo, "merge-base", "--independent", *commits).decode().split()) + + +def contains(repo, ancestor, descendant): + return run(["git", "merge-base", "--is-ancestor", ancestor, descendant], repo, ok=(0, 1, 128)).returncode == 0 -def first_parent_commits(repo, revision): - return git(repo, "rev-list", "--first-parent", revision).decode().splitlines() +def relicensed_ce_bases(repo, head): + if not contains(repo, RELICENSING_COMMIT, head): + raise Failure(f"the relicensing commit {RELICENSING_COMMIT[:11]} is not in the history of HEAD. " + "Pass --ce-ref with the CE branch that this branch integrates.") + records = git(repo, "rev-list", "--parents", "--ancestry-path", f"{RELICENSING_COMMIT}..{head}").decode().splitlines() + records.append(git(repo, "rev-list", "--parents", "-1", RELICENSING_COMMIT).decode().strip()) + commits = {record.split()[0] for record in records} + parents = {parent for record in records for parent in record.split()[1:]} + return independent(repo, sorted(parents - commits)) + + +def merged_ce_bases(repo, head, baseline): + bases = run(["git", "merge-base", "--all", head, baseline], repo, ok=(0, 1)).stdout.decode().split() + if not bases: + raise Failure("HEAD shares no history with the CE ref. Check that the right CE branch was passed.") + return independent(repo, bases) + + +def merge_blobs(repo, ours, base, theirs): + result = run(["git", "merge-file", "-p", "--object-id", ours, base, theirs], repo, ok=range(0, 256)) + return result.stdout if result.returncode == 0 else None def tree(repo, revision): @@ -203,10 +235,6 @@ class Change: new: str status: str - @property - def deleted(self): - return self.status == "D" - def history(repo, revision, *options): raw = git(repo, "log", "--first-parent", "--diff-merges=first-parent", "--root", "--raw", "--no-abbrev", @@ -239,21 +267,6 @@ def parse_history(raw): raise Failure(f"Unexpected Git history token: {token[:80]!r}") -def integration_boundary(repo, anchor, head): - chain = first_parent_commits(repo, head) - low, high = 0, len(chain) - while low < high: - middle = (low + high) // 2 - code = run(["git", "merge-base", "--is-ancestor", anchor, chain[middle]], repo, ok=(0, 1)).returncode - if code == 0: - low = middle + 1 - else: - high = middle - if not low: - raise Failure("CE anchor is not in PE history") - return chain[low - 1] - - def git_ignored(repo, paths): if not paths: return set() @@ -513,7 +526,7 @@ class Mycila: (directory / name).write_bytes(self.templates[header]) def add(self, key, name, content): - group = "pe" if key[0] == "pe" else "ce" + group = "head" if key[0] == "head" else "ce" path = self.root / "files" / group / str(len(self.paths)) / PurePosixPath(name).name path.parent.mkdir(parents=True) path.write_bytes(content) @@ -561,11 +574,11 @@ class Mycila: def remove_headers(self, keys): before = {key: self.contents[key] for key in keys} with self.guarded(keys): - results = self.invoke("remove", "pe-only", keys, styles=(STRICT_XML,)) + results = self.invoke("remove", NON_CE, keys, styles=(STRICT_XML,)) unchanged = [key for key, result in results.items() if result == "NOOP" and PurePosixPath(self.paths[key]).suffix in BLOCK_COMMENT_SUFFIXES] if unchanged: - self.invoke("remove", "pe-only", unchanged, styles=(STRICT_XML, STRICT_BLOCK)) + self.invoke("remove", NON_CE, unchanged, styles=(STRICT_XML, STRICT_BLOCK)) removed = {} for key in keys: content, removed[key] = split_removed(before[key], self.contents[key]) @@ -690,14 +703,14 @@ class Mycila: selected = set(keys) if selected == set(self.paths): return ["files/**"] - if selected == {key for key in self.paths if key[0] == "pe"}: - return ["files/pe/**"] + if selected == {key for key in self.paths if key[0] == "head"}: + return ["files/head/**"] return [str(PurePosixPath(self.paths[key]).parent) + "/*" for key in keys] def normalized_copies(mycila, source_refs, names, nonempty): sources = set(source_refs) & nonempty - destinations = {("pe", name) for name in names} & nonempty + destinations = {("head", name) for name in names} & nonempty if not sources or not destinations: return {} git(mycila.root, "init", "--quiet") @@ -712,7 +725,7 @@ def normalized_copies(mycila, source_refs, names, nonempty): for source, destination, similarity in parse_copies(raw): source_key, destination_key = keys[source], keys[destination] if source_key not in sources or destination_key not in destinations: - raise Failure("Normalized copy escaped the selected CE/PE inputs") + raise Failure("Normalized copy escaped the selected CE and HEAD inputs") copies[destination_key[1]].append({"path": source_key[0], "blob": source_key[1], "ref": source_refs[source_key], "similarity": similarity}) return dict(copies) @@ -742,160 +755,78 @@ class Evidence: path: str content_hash: str current: str - curation: dict | None - inherited: bool - recreated: bool - ce_hash: str | None - pe_hash: str - candidates: list - historical: list - in_comparison: bool - pe_addition: bool = False + curation: dict | None = None + ce_versions: tuple = () + identical: dict | None = None copies: tuple = () + deleted: dict | None = None directory_in_ce: bool = True - ce_ref: str | None = None - ce_blob: str | None = None - - @property - def strong(self): - return [c for c in self.historical if c["path"] == self.path or c.get("contentMatches")] - - def ce_traces(self): - return bool(self.candidates or self.copies or self.in_comparison or self.strong) - def pe_module_descriptor(self): + def module_descriptor(self): return (PurePosixPath(self.path).name == MODULE_DESCRIPTOR and not self.directory_in_ce - and not (self.candidates or self.in_comparison or self.strong)) + and self.deleted is None and all(copy["similarity"] < 100 for copy in self.copies)) def decide(evidence): row = {"path": evidence.path, "contentHash": evidence.content_hash, "currentHeader": evidence.current} - if evidence.curation is not None: - return row | curated_verdict(evidence) - if evidence.recreated: - return row | {"status": "unresolved", "expectedHeader": None, - "reason": "deleted and recreated at this path, origin unclear"} - if evidence.inherited and evidence.ce_hash is not None: - comparison = {"comparison": {"path": evidence.path, "ref": evidence.ce_ref, "blob": evidence.ce_blob}} - if evidence.pe_hash == evidence.ce_hash: - return row | verdict(evidence.current, "apache", "same path in CE, content identical") | comparison - return row | verdict(evidence.current, "ce-modified", "same path in CE, content differs") | comparison - if evidence.pe_addition and not evidence.ce_traces(): - return row | verdict(evidence.current, "pe-only", "added in PE, no CE evidence") - if evidence.pe_addition and evidence.pe_module_descriptor(): - return row | verdict(evidence.current, "pe-only", "build descriptor of a module that does not exist in CE") - return row | open_question(evidence) + inferred = infer(evidence) + curation = evidence.curation + if curation is None: + return row | inferred + if curation["contentHash"] != evidence.content_hash: + return row | {"status": "stale-curation", "expectedHeader": None, + "reason": "file changed since the curation, re-review and update contentHash"} + if inferred["expectedHeader"] == curation["header"]: + return row | inferred | {"redundantCuration": True} + return row | verdict(evidence.current, curation["header"], "curation: " + curation["reason"]) + + +def infer(evidence): + if evidence.ce_versions: + versions = {"ceVersions": list(evidence.ce_versions)} + if evidence.identical is None: + return verdict(evidence.current, "ce-modified", "same path in CE, content differs") | versions + reason = ("same path in CE, content identical" if "blob" in evidence.identical + else "same path in CE, content identical to a clean merge of its CE versions") + return verdict(evidence.current, "apache", reason) | versions | {"identicalTo": evidence.identical} + if evidence.module_descriptor(): + return verdict(evidence.current, NON_CE, "build descriptor of a module that does not exist in CE") + if evidence.copies: + suggested = "apache" if evidence.copies[0]["similarity"] == 100 else None + return unresolved("similar content exists in CE under another path", suggested, + copyCandidates=list(evidence.copies)) + if evidence.deleted is not None: + return unresolved("CE history had this path", None, historicalCandidate=evidence.deleted) + return verdict(evidence.current, NON_CE, "not in CE, no CE evidence") def verdict(current, expected, reason): return {"status": "match" if current == expected else "mismatch", "expectedHeader": expected, "reason": reason} -def curated_verdict(evidence): - curation = evidence.curation - if curation["contentHash"] != evidence.content_hash: - return {"status": "stale-curation", "expectedHeader": None, - "reason": "file changed since the curation, re-review and update contentHash"} - return verdict(evidence.current, curation["header"], "curation: " + curation["reason"]) - - -def open_question(evidence): - strong = evidence.strong - ranked = [ - (evidence.candidates, "identical content exists in CE under another path", "apache"), - (evidence.copies, "similar content exists in CE under another path", None), - (strong, "CE history has this path or content", None), - (evidence.in_comparison, "present in CE, but not in the shared ancestry", None), - (True, "no CE evidence, but not proven to be added in PE", "pe-only"), - ] - _, reason, suggested = next(item for item in ranked if item[0]) - return { - "status": "unresolved", - "expectedHeader": None, - "suggestedHeader": suggested, - "reason": reason, - "candidates": evidence.candidates[:10], - "historicalCandidates": strong[:10], - "copyCandidates": list(evidence.copies), - "candidateCount": len(evidence.candidates), - "historicalCandidateCount": len(strong), - } +def unresolved(reason, suggested, **candidates): + return {"status": "unresolved", "expectedHeader": None, "suggestedHeader": suggested, "reason": reason} | candidates @dataclass(frozen=True) class Lineage: head: str - baseline: str - anchor: str - boundary: str - ce_commits: frozenset - ce_changes: list - comparison: dict - shared: dict - pe_tree: dict - additions: dict - recreated: frozenset + bases: tuple + trees: dict + deleted: dict @classmethod - def load(cls, repo, head, baseline): + def load(cls, repo, head, bases): if git(repo, "rev-parse", "--is-shallow-repository").decode().strip() == "true": raise Failure("this clone is shallow and the check needs full history. Run git fetch --unshallow.") - anchor = unique_base(repo, head, baseline) - ce_chain = first_parent_commits(repo, baseline) - ce_commits = frozenset(ce_chain) - if anchor not in ce_commits: - raise Failure("the shared ancestor is not on the CE ref's first-parent chain. " - "Pass the CE mainline branch that the PE branch integrates.") - boundary = integration_boundary(repo, anchor, head) - shared = tree(repo, anchor) - additions = {} - for change in history(repo, head, "--diff-filter=A"): - additions.setdefault(change.path, change.commit) - ce_changes = history(repo, baseline) - divergent = frozenset(ce_chain[:ce_chain.index(anchor)]) - divergence = (history(repo, f"{boundary}..{head}") - + [change for change in ce_changes if change.commit in divergent]) - return cls( - head=head, - baseline=baseline, - anchor=anchor, - boundary=boundary, - ce_commits=ce_commits, - ce_changes=ce_changes, - comparison=tree(repo, baseline), - shared=shared, - pe_tree=tree(repo, head), - additions=additions, - recreated=frozenset(change.path for change in divergence - if change.status in {"A", "D"} and change.path in shared), - ) - - def unmatched(self, names): - return {name for name in names - if name not in self.shared or name not in self.comparison or name in self.recreated} - - def pe_addition(self, name): - if name not in self.pe_tree: - return True - return name in self.additions and self.additions[name] not in self.ce_commits - - def added_by(self, name): - if name not in self.pe_tree: - return self.additions.get(name, "working-tree addition") - return self.additions.get(name) - - -def historical_versions(ce_changes, unmatched): - basenames = {PurePosixPath(name).name for name in unmatched} - versions = {} - for change in ce_changes: - if change.path not in unmatched and PurePosixPath(change.path).name not in basenames: - continue - oid = change.old if change.deleted else change.new - if set(oid) == {"0"}: - continue - versions.setdefault((change.path, oid), change.commit + "^1" if change.deleted else change.commit) - return versions + deleted = {} + for base in bases: + for change in history(repo, base, "--diff-filter=D"): + deleted.setdefault(change.path, {"path": change.path, "ref": change.commit + "^1", "blob": change.old}) + return cls(head=head, bases=tuple(bases), trees={base: tree(repo, base) for base in bases}, deleted=deleted) + + def versions(self, name): + return [(base, files[name]) for base, files in self.trees.items() if name in files] def comparable_ce_files(comparison, names): @@ -909,108 +840,114 @@ def comparable_ce_files(comparison, names): class Comparison: lineage: Lineage contents: dict - unmatched: set headers: dict normalized: dict - nonempty: set copies: dict - exact_index: dict - historic_index: dict + merges: dict ce_directories: frozenset def classify(self, name, curation): - key = ("pe", name) - lineage = self.lineage - unmatched = name in self.unmatched - historic = self.historical_candidates(name) if unmatched else [] - evidence = Evidence( + key = ("head", name) + versions = self.lineage.versions(name) + identical = next(({"path": name, "ref": base, "blob": oid} for base, oid in versions + if self.normalized[(name, oid)] == self.normalized[key]), self.merges.get(name)) + copies = sorted(self.copies.get(name, []), key=lambda copy: (-copy["similarity"], copy["path"])) + return decide(Evidence( path=name, content_hash=raw_hash(self.contents[name]), current=self.headers[key], curation=curation, - inherited=name in lineage.shared, - recreated=name in lineage.recreated, - ce_hash=self.normalized.get((name, lineage.comparison.get(name))), - pe_hash=self.normalized[key], - candidates=self.exact_index.get(self.normalized[key], []) if unmatched else [], - historical=historic, - in_comparison=name in lineage.comparison, - pe_addition=lineage.pe_addition(name), - copies=self.copies.get(name, []), + ce_versions=tuple({"path": name, "ref": base, "blob": oid} for base, oid in versions), + identical=identical, + copies=tuple(copies), + deleted=self.lineage.deleted.get(name), directory_in_ce=str(PurePosixPath(name).parent) in self.ce_directories, - ce_ref=lineage.baseline, - ce_blob=lineage.comparison.get(name), - ) - row = decide(evidence) - if unmatched: - row["peAddition"] = lineage.added_by(name) - row["basenameHintCount"] = len(historic) - len(evidence.strong) - return row - - def historical_candidates(self, name): - key = ("pe", name) - candidates = [] - for version in self.historic_index.get(PurePosixPath(name).name, []): - matches = (key in self.nonempty - and self.normalized[key] == self.normalized[(version["path"], version["blob"])]) - candidates.append(version | {"contentMatches": matches}) - candidates.sort(key=lambda candidate: (not candidate["contentMatches"], candidate["path"] != name)) - return candidates + )) def compare(repo, plugin, lineage, contents): names = list(contents) - unmatched = lineage.unmatched(names) - versions = historical_versions(lineage.ce_changes, unmatched) - counterparts = comparable_ce_files(lineage.comparison, names) - source_refs = versions | {key: lineage.baseline for key in counterparts.items()} - bytes_by_id = blobs(repo, [oid for _, oid in source_refs]) + new_paths = {name for name in names if not lineage.versions(name)} + sources = {} + for base, files in lineage.trees.items(): + for name in names: + if name in files: + sources.setdefault((name, files[name]), base) + for key in comparable_ce_files(files, new_paths).items(): + sources.setdefault(key, base) + bytes_by_id = blobs(repo, [oid for _, oid in sources]) with tempfile.TemporaryDirectory(prefix="license-provenance-") as temporary: mycila = Mycila(repo, Path(temporary), plugin) for name, content in contents.items(): - mycila.add(("pe", name), name, content) - for path, oid in sorted(source_refs): + mycila.add(("head", name), name, content) + for path, oid in sorted(sources): mycila.add((path, oid), path, bytes_by_id[oid]) console.begin("Recognizing headers") - recognized = mycila.current_headers([("pe", name) for name in names]) + recognized = mycila.current_headers([("head", name) for name in names]) console.end() console.begin("Comparing against CE") normalized = mycila.strip_headers() headers = mycila.header_states(recognized) - nonempty = mycila.nonempty() - copies = normalized_copies(mycila, source_refs, unmatched, nonempty) - exact_index = defaultdict(list) - for path, oid in counterparts.items(): - if (path, oid) in nonempty: - exact_index[normalized[(path, oid)]].append({"path": path, "ref": lineage.baseline, "blob": oid}) - historic_index = defaultdict(list) - for (path, oid), ref in versions.items(): - historic_index[PurePosixPath(path).name].append({"path": path, "ref": ref, "blob": oid}) + copies = normalized_copies(mycila, sources, new_paths, mycila.nonempty()) + merges = clean_merges(repo, plugin, lineage, names, normalized) console.end(f"done ({len(normalized)} file versions)") return Comparison( lineage=lineage, contents=contents, - unmatched=unmatched, headers=headers, normalized=normalized, - nonempty=nonempty, copies=copies, - exact_index=dict(exact_index), - historic_index=dict(historic_index), - ce_directories=frozenset(str(parent) for path in lineage.comparison for parent in PurePosixPath(path).parents), + merges=merges, + ce_directories=frozenset(str(parent) for files in lineage.trees.values() + for path in files for parent in PurePosixPath(path).parents), ) +def clean_merges(repo, plugin, lineage, names, normalized): + merged = {} + for index, left in enumerate(lineage.bases): + for right in lineage.bases[index + 1:]: + ancestors = git(repo, "merge-base", "--all", left, right).decode().split() + if len(ancestors) != 1: + continue + ancestry = tree(repo, ancestors[0]) + for name in names: + ours, theirs = lineage.trees[left].get(name), lineage.trees[right].get(name) + if ours is None or theirs is None or ours == theirs or name not in ancestry: + continue + if normalized[("head", name)] in {normalized[(name, ours)], normalized[(name, theirs)]}: + continue + content = merge_blobs(repo, ours, ancestry[name], theirs) + if content is not None: + merged[(name, left, right)] = (content, {"path": name, "merge": [left, right], + "base": ancestors[0]}) + if not merged: + return {} + with tempfile.TemporaryDirectory(prefix="license-provenance-") as temporary: + mycila = Mycila(repo, Path(temporary), plugin) + for key, (content, _) in merged.items(): + mycila.add(key, key[0], content) + hashes = mycila.strip_headers() + result = {} + for key, (_, description) in merged.items(): + if hashes[key] == normalized[("head", key[0])]: + result.setdefault(key[0], description) + return result + + def current_branch(repo): branch = git(repo, "rev-parse", "--abbrev-ref", "HEAD").decode().strip() return "" if branch == "HEAD" else branch -def print_banner(repo, head, ce_remote, ce_ref, baseline): +def print_banner(repo, head, ce): console.line("License header provenance check") - console.line(f" PE head {head[:11]} {current_branch(repo)}".rstrip()) - console.line(f" CE remote {ce_remote}") - console.line(f" CE ref {ce_ref}" + (f" → {baseline[:11]}" if baseline != ce_ref else "")) + console.line(f" HEAD {head[:11]} {current_branch(repo)}".rstrip()) + if "ref" in ce: + console.line(f" CE remote {ce['remote']}") + console.line(f" CE ref {ce['ref']}" + (f" → {ce['commit'][:11]}" if ce["commit"] != ce["ref"] else "")) + else: + console.line(f" CE commits without the relicensing commit {ce['relicensingCommit'][:11]} in their history") console.line() @@ -1039,16 +976,15 @@ def describe_mismatch(row): def describe_unresolved(row, ref_names): hint = f" (hint: {row['suggestedHeader']})" if row.get("suggestedHeader") else "" details = [f"has {header_name(row['currentHeader'])}, no expected header yet{hint}"] - evidence = ([("exact CE match", candidate) for candidate in row.get("candidates", [])] - + [(f"similar CE file ({candidate['similarity']}%)", candidate) - for candidate in row.get("copyCandidates", [])] - + [("CE history", candidate) for candidate in row.get("historicalCandidates", [])]) + evidence = [(f"similar CE file ({candidate['similarity']}%)", candidate) + for candidate in row.get("copyCandidates", [])] + if "historicalCandidate" in row: + evidence.append(("CE history", row["historicalCandidate"])) if not evidence: return details + [row["reason"]] label, candidate = evidence[0] details.append(f"{label}: {candidate['path']} at {ref_name(candidate['ref'], ref_names)}") - others = (row.get("candidateCount", 0) + len(row.get("copyCandidates", [])) - + row.get("historicalCandidateCount", 0) - 1) + others = len(evidence) - 1 if others > 0: details.append(f"another {others} candidate{'s' if others != 1 else ''} in the report") return details @@ -1058,8 +994,12 @@ def describe_stale(row): return [row["reason"]] -def print_group(title, rows, describe, hint): - console.line(f"{title} ({len(rows)})", "red") +def describe_redundant(row): + return [f"curated {row['expectedHeader']}, the check decides {row['expectedHeader']} by itself"] + + +def print_group(title, rows, describe, hint, style="red"): + console.line(f"{title} ({len(rows)})", style) for row in rows: console.line(f" {row['path']}") for detail in describe(row): @@ -1084,6 +1024,16 @@ def print_restamped(rows): console.line() +def print_removed_curations(removed): + if not removed: + return + console.line(f"Removed curations ({len(removed)})", "green") + for entry in removed: + console.line(f" {entry['path']}") + console.line(f" {entry['reason']}") + console.line() + + def print_findings(rows, curation_issues, ref_names): mismatches = [row for row in rows if row["status"] == "mismatch"] unresolved = [row for row in rows if row["status"] == "unresolved"] @@ -1096,7 +1046,14 @@ def print_findings(rows, curation_issues, ref_names): print_group("Needs a decision", unresolved, lambda row: describe_unresolved(row, ref_names), f"Decide the origin and add a curation, see {README}") if stale: - print_group("Stale curations", stale, describe_stale, f"Remove or update the entry in {CURATIONS}") + hint = (f"Review the file and update the entry in {CURATIONS}; --fix removes entries of files no longer in scope" + if any(row["status"] == "stale-curation" and "contentHash" in row for row in stale) + else "Rerun with --fix to remove them") + print_group("Stale curations", stale, describe_stale, hint) + redundant = [row for row in rows if row.get("redundantCuration")] + if redundant: + print_group("Redundant curations", redundant, describe_redundant, + f"Rerun with --fix to remove them from {CURATIONS}", style=None) def print_summary(rows, curation_issues, report): @@ -1145,8 +1102,8 @@ def restamp(repo, plugin, rows, contents): templates = {header: template_lines(content) for header, content in mycila.templates.items()} for name, header in current.items(): if header not in TEMPLATES: - expected[("pe", name)] = wanted[name] - mycila.add(("pe", name), name, contents[name]) + expected[("head", name)] = wanted[name] + mycila.add(("head", name), name, contents[name]) continue try: stamped[name] = swap_header(contents[name], templates[header], templates[wanted[name]]) @@ -1157,9 +1114,9 @@ def restamp(repo, plugin, rows, contents): stamped |= {key[1]: content for key, content in results.items()} skipped |= {key[1]: reason for key, reason in rejected.items()} for name, content in stamped.items(): - if ("pe", name) not in mycila.paths: - mycila.add(("pe", name), name, content) - headers = mycila.current_headers([("pe", name) for name in stamped]) + if ("head", name) not in mycila.paths: + mycila.add(("head", name), name, content) + headers = mycila.current_headers([("head", name) for name in stamped]) wrong = sorted(key[1] for key, header in headers.items() if header != wanted[key[1]]) if wrong: raise Failure(f"Restamping did not produce the expected header: {wrong[:20]}") @@ -1174,13 +1131,32 @@ def restamp(repo, plugin, rows, contents): console.end(f"{len(stamped)} files" + (f", {len(skipped)} skipped" if skipped else "")) +def prune_curations(path, rows, orphaned): + obsolete = {row["path"]: "the check decides the same header by itself" for row in rows if row.get("redundantCuration")} + obsolete |= {row["path"]: row["reason"] for row in orphaned} + if not obsolete: + return [] + data = json.loads(path.read_text(encoding="utf-8")) + data["curations"] = [entry for entry in data["curations"] if entry["path"] not in obsolete] + path.write_text(json.dumps(data, indent=2, ensure_ascii=False) + "\n", encoding="utf-8") + for row in rows: + row.pop("redundantCuration", None) + return [{"path": name, "reason": reason} for name, reason in sorted(obsolete.items())] + + def check(args): repo = repository_root() head = resolve(repo, "HEAD") - console.begin(f"Fetching {args.ce_ref} from {args.ce_remote}") - baseline = fetch(repo, args.ce_remote, args.ce_ref) - console.end() - print_banner(repo, head, args.ce_remote, args.ce_ref, baseline) + if args.ce_ref: + console.begin(f"Fetching {args.ce_ref} from {args.ce_remote}") + baseline = fetch(repo, args.ce_remote, args.ce_ref) + console.end() + ce = {"remote": args.ce_remote, "ref": args.ce_ref, "commit": baseline} + ref_names = {baseline: args.ce_ref} + else: + ce = {"relicensingCommit": RELICENSING_COMMIT} + ref_names = {} + print_banner(repo, head, ce) destination = report_destination(repo, args.output) plugin = read_plugin(repo) reject_module_overrides(repo) @@ -1188,8 +1164,9 @@ def check(args): curation_bytes = curation_path.read_bytes() curations = load_curations(curation_path) console.begin("Resolving Git history") - lineage = Lineage.load(repo, head, baseline) - console.end() + bases = merged_ce_bases(repo, head, ce["commit"]) if "ref" in ce else relicensed_ce_bases(repo, head) + lineage = Lineage.load(repo, head, bases) + console.end("done (CE base " + ", ".join(ref_name(base, ref_names) for base in bases) + ")") console.begin("Collecting Mycila scope") scope = discover_scope(repo, plugin) console.end(f"{len(scope.eligible)} files ({scope.ignored} Git-ignored skipped)") @@ -1200,19 +1177,21 @@ def check(args): orphaned = [{"path": name, "status": "stale-curation", "reason": "file is no longer in scope"} for name in sorted(set(curations) - set(scope.eligible))] ensure_inputs_unchanged(repo, lineage, curation_path, curation_bytes, contents) + removed = [] if args.fix: restamp(repo, plugin, rows, contents) + removed = prune_curations(curation_path, rows, orphaned) + orphaned = [] summary = Counter(row["status"] for row in rows) result = { - "schemaVersion": 1, - "peHead": lineage.head, - "ceComparison": {"remote": args.ce_remote, "input": args.ce_ref, "commit": lineage.baseline}, - "ceHistory": {"tip": lineage.baseline, "firstParent": True}, - "sharedAncestor": lineage.anchor, - "peIntegrationBoundary": lineage.boundary, + "schemaVersion": 2, + "head": lineage.head, + "ce": ce | {"bases": list(lineage.bases)}, "scope": {"supported": len(scope.eligible), "unknown": scope.unknown, "modules": scope.modules}, "summary": dict(summary), "restamped": sorted(row["path"] for row in rows if "previousHeader" in row), + "removedCurations": removed, + "redundantCurations": sorted(row["path"] for row in rows if row.get("redundantCuration")), "curationIssues": orphaned, "files": rows, } @@ -1220,7 +1199,8 @@ def check(args): destination.write_text(json.dumps(result, indent=2, ensure_ascii=False) + "\n", encoding="utf-8") report = destination.relative_to(repo) if destination.is_relative_to(repo) else destination print_restamped(rows) - print_findings(rows, orphaned, {baseline: args.ce_ref}) + print_removed_curations(removed) + print_findings(rows, orphaned, ref_names) print_summary(rows, orphaned, report) return 1 if orphaned or summary.keys() - {"match"} else 0 @@ -1228,14 +1208,15 @@ def check(args): def main(argv=None): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("command", choices=["check"]) - parser.add_argument("--ce-ref", required=True, - help="CE tree and first-parent history to check against; a branch, tag, or commit " - "of the CE repository, fetched from --ce-remote on every run") + parser.add_argument("--ce-ref", + help="CE branch, tag, or commit that this branch integrates, fetched from --ce-remote; " + "without it, CE is the history that does not contain the relicensing commit") parser.add_argument("--ce-remote", default=CE_REMOTE, help=f"Git URL or path of the CE repository to fetch --ce-ref from (default: {CE_REMOTE})") parser.add_argument("--output", default="target/license-provenance/report.json") parser.add_argument("--fix", action="store_true", - help="restamp files whose expected header the check determined; unrecognized headers are kept") + help="restamp files whose expected header the check determined and remove redundant or " + "orphaned curations; unrecognized headers are kept") args = parser.parse_args(argv) try: return check(args) diff --git a/tools/src/main/python/license-headers/curations.json b/tools/src/main/python/license-headers/curations.json index 24d666cad7..349b467ed5 100644 --- a/tools/src/main/python/license-headers/curations.json +++ b/tools/src/main/python/license-headers/curations.json @@ -21,43 +21,43 @@ }, { "path": "application/src/main/java/org/thingsboard/server/service/edge/rpc/fetch/IntegrationsEdgeEventFetcher.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message IntegrationsEdgeEventFetcher.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/edge/rpc/fetch/DevicesEdgeEventFetcher.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob a5461f8dbad84f4fe8c7fbededef00b55194dc60).", "contentHash": "sha256:be65c16d06ead4246c0f643391006aa1f94f03ce1ae2d6204e8f2296af5a1b27" }, { "path": "application/src/main/java/org/thingsboard/server/service/edge/rpc/fetch/PublicCustomerUserGroupEdgeEventFetcher.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message PublicCustomerUserGroupEdgeEventFetcher.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/edge/rpc/fetch/CustomerEdgeEventFetcher.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 43b4cb4d874eae2dedfd1c5f37e6de36b086a934).", "contentHash": "sha256:010b08d77586afad2bf0a4275f58d3b2288663b70e155fd4843b2ff0a26bbc85" }, { "path": "application/src/main/java/org/thingsboard/server/service/edge/rpc/fetch/SchedulerEventsEdgeEventFetcher.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message SchedulerEventsEdgeEventFetcher.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/edge/rpc/fetch/OtaPackagesEdgeEventFetcher.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 1e4579338841150ec1ec3a92a94aa92bb5ce0a4d).", "contentHash": "sha256:517a1c83d0f0152606cf20f08eabd9000d1eb69b24e364513f6d1de6f7129c0e" }, { "path": "application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/ek/EncryptionKeyEdgeProcessor.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message EncryptionKeyEdgeProcessor.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/tenant/TenantProfileEdgeProcessor.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob c9ae94086dae1febc08dbfa31ef5c06f07ec54f7).", "contentHash": "sha256:6c92f974c7d8fc9670126f7aab0b9f0dde82fd6c9ca4661cfc1f7d8d59ecb41f" }, { "path": "application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/secret/SecretEdgeProcessor.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message SecretEdgeProcessor.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/edge/rpc/processor/queue/QueueEdgeProcessor.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8e5a65b588937e5703ff87f301be023d27ce1808).", "contentHash": "sha256:6f960791993777f636b230e3829422af292370a5b5a113b082dc2d05ee151491" }, { "path": "application/src/main/java/org/thingsboard/server/service/integration/rpc/IntegrationSessionCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate application/src/main/java/org/thingsboard/server/service/sync/vc/VersionControlTaskCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d234314aee9f02efb853f0a3372f9e0de1b7869c).", "contentHash": "sha256:c9a90236fcf1d34d67c1fce37580b30be8f0bfea4cd2f6c1f0a49ba38203f0ec" }, { "path": "application/src/main/java/org/thingsboard/server/service/integration/rpc/IntegrationSessionRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate application/src/main/java/org/thingsboard/server/service/sync/vc/repository/RepositorySettingsRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob e7ca801e138a16a706d25723ffb7983b2e7850ee).", "contentHash": "sha256:7493855212ea1a169ca6746df584c829fb40ca834259fa6381b38cf84dba2345" }, @@ -69,25 +69,25 @@ }, { "path": "application/src/main/java/org/thingsboard/server/service/solutions/data/definition/EdgeEntityGroupDefinition.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message EdgeEntityGroupDefinition.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/solutions/data/definition/DashboardUserDetailsDefinition.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 2ec470182985b893360eda095d9b3bf4d68652bd).", "contentHash": "sha256:5655c383fe30473d814ba43fb456e8f5324954fe00a1faf6f69d2295df00727f" }, { "path": "application/src/main/java/org/thingsboard/server/service/solutions/data/definition/SchedulerEventDefinition.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message SchedulerEventDefinition.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/solutions/data/definition/DeviceDefinition.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 81239c46dd5f0e3c24c9fc52dff3ba1075dbbd1e).", "contentHash": "sha256:8135b6d076e6d6381428bd0992aa8f216260ecacec165cbb8d7e2e40f137601d" }, { "path": "application/src/main/java/org/thingsboard/server/service/sync/ie/exporting/impl/CustomerExportService.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message CustomerExportService.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/sync/ie/exporting/impl/NotificationTemplateExportService.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob c3fc08f097f8e8ec1c90406211ad433947c5ecdd).", "contentHash": "sha256:ae8c3bbc5fbb804a32fc2fb7d5aef7be5c6bd11e434e5f0d41226f5099e3696b" }, { "path": "application/src/main/java/org/thingsboard/server/service/sync/ie/exporting/impl/RoleExportService.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific service adapter/message RoleExportService.java. Reviewed methods bind the common framework to PE integration, scheduler, encryption/secret, group, or customer-parent behavior. This is a new typed PE extension, not a relocation of the candidate CE implementation. Reviewed candidate application/src/main/java/org/thingsboard/server/service/sync/ie/exporting/impl/NotificationTemplateExportService.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob c3fc08f097f8e8ec1c90406211ad433947c5ecdd).", "contentHash": "sha256:a7ede744921df38436eeab40ce73847e0c04e95c469cfb61c593439466ac1aae" }, @@ -105,25 +105,25 @@ }, { "path": "application/src/main/java/org/thingsboard/server/service/ws/log/cmd/LogsSubscriptionCmd.java", - "header": "pe-only", + "header": "busl", "reason": "PE WebSocket logs subscription command added in 4005afabb81 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE application/src/main/java/org/thingsboard/server/service/ws/notification/cmd/MarkAllNotificationsAsReadCmd.java shares only the WebSocket command boilerplate. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 47cb85519d0).", "contentHash": "sha256:8b74007cf36b206be04ea7f1ca385b34c58256647a645a88d2e90188f8b3fd3f" }, { "path": "application/src/main/java/org/thingsboard/server/service/ws/log/cmd/LogsUnsubscribeCmd.java", - "header": "pe-only", + "header": "busl", "reason": "PE WebSocket logs subscription command added in 4005afabb81 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE application/src/main/java/org/thingsboard/server/service/ws/notification/cmd/NotificationsUnsubCmd.java shares only the WebSocket command boilerplate. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 1a7a6119358).", "contentHash": "sha256:fd319f8910fa50f4db8dd30fe3f90e60e34910e1ddc0bb9db390db64f56b27db" }, { "path": "application/src/test/java/org/thingsboard/server/service/install/update/DefaultDataUpdateServiceTest.java", - "header": "pe-only", + "header": "busl", "reason": "CE deleted its DefaultDataUpdateServiceTest (version 3.3.0 device profile conversion tests) in ba440ba7c1f. PE recreated a test at the same path in cdae38adc6b with entirely new content covering the CE-to-PE upgrade chain; nothing of the CE file (last CE version 40527f3da02^1, blob abfab844917) remains beyond the class name.", "contentHash": "sha256:c0ebbc47ce2ff97d2e00182781ed38ca137ad54393e706c064c0ca6919b27eb8" }, { "path": "application/src/test/java/org/thingsboard/server/service/integration/rpc/IntegrationRpcSslTest.java", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE application/src/test/java/org/thingsboard/server/service/edge/rpc/EdgeGrpcSslTest.java, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:ee00a93535d92e1b048a3c79b90e9741c8091a3db7c794eb3dd2aa38aee18142" }, @@ -153,79 +153,79 @@ }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentAppProfileCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in 41416ebe327 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE dao/src/main/java/org/thingsboard/server/dao/dashboard/DashboardTitlesCaffeineCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob f2e2f32f037).", "contentHash": "sha256:7fd51b57a41b929355ecef4546c78a3f93512341dbb7cc945ad4ffefbb2ab387" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentAppProfileRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in 41416ebe327 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE dao/src/main/java/org/thingsboard/server/dao/dashboard/DashboardTitlesRedisCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 4c1bf7dedbe).", "contentHash": "sha256:031627cc6dcd58cf6c6d6716354b44683c9941f3df7de5e402553c85dc3b2d95" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentAppUnitCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in ad644d12571 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE application/src/main/java/org/thingsboard/server/service/mobile/secret/MobileSecretCaffeineCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 54a7dbffd4a).", "contentHash": "sha256:990761d74d185d7a442431414535c9d17fda135fbc277bdf47aa2d96f19fd05b" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentAppUnitRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in ad644d12571 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE application/src/main/java/org/thingsboard/server/service/mobile/secret/MobileSecretRedisCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 93fd57a5349).", "contentHash": "sha256:a47374fba6bde5c35994d2032c4a411800a182f6cb6839143d3a682161a078df" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentApplicationCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in af7fd5a1e48 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE application/src/main/java/org/thingsboard/server/service/mobile/secret/MobileSecretCaffeineCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 54a7dbffd4a).", "contentHash": "sha256:155d0c7a83e8d7ed9b286aacde0c4a38678683c274b266cea76aa0df28ed497b" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentApplicationRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in af7fd5a1e48 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE application/src/main/java/org/thingsboard/server/service/mobile/secret/MobileSecretRedisCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 93fd57a5349).", "contentHash": "sha256:e21a3ff66992dbd39dcf90beac995d995021589e4704bbee562a7939386ec2d0" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in 7a16579509e as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/cache/src/main/java/org/thingsboard/server/cache/user/UserCaffeineCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 3eb9c3f16f6).", "contentHash": "sha256:2dc0d5327adb18a679896841e5513b1de0cf818737e227d5cd95089902d2ed1f" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentProfileCacheEvictEvent.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache evict event added in 6c303b45f74 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE dao/src/main/java/org/thingsboard/server/dao/asset/AssetCacheEvictEvent.java shares only the cache evict event boilerplate. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob b3fcac6e36b).", "contentHash": "sha256:9f304ce36c924585ac28fea987f026555f550c77db5272c43a2b0144eb89d34b" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentProfileCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in 6c303b45f74 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/cache/src/main/java/org/thingsboard/server/cache/edge/RelatedEdgesCaffeineCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 5227ae6ab4b).", "contentHash": "sha256:a3e5ff4080061f355876a3578e239dd3897178155b48a8f9891549422a5ce868" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentProfileRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in 6c303b45f74 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE dao/src/main/java/org/thingsboard/server/dao/asset/AssetProfileRedisCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 2e200a04882).", "contentHash": "sha256:5d2b42b22d657f1db2afa6e1ad3edaccabc0f44ed0a1d13ea3423aafcaff9d50" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/agent/AgentRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in 7a16579509e as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE dao/src/main/java/org/thingsboard/server/dao/asset/AssetRedisCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 488c9f37404).", "contentHash": "sha256:479b7a977e88848a1990e583ffafa3cc21661b5541be191225638ae32267c8ea" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/secret/SecretCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate common/cache/src/main/java/org/thingsboard/server/cache/user/UserCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 3eb9c3f16f619210d6ccdf4e3084ee36ec954796).", "contentHash": "sha256:f1e0248aa094af0c672f09ef90f85787d0a3133c50ea65be357a732ea7205c04" }, { "path": "common/cache/src/main/java/org/thingsboard/server/cache/secret/SecretRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/tenant/TenantRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob ce21e1ffbb0b41ca7d6272d469bd4b8e436debeb).", "contentHash": "sha256:57d9b4ecaf1793a33a3df7df6a3eae5e1327e5e31cee77ef4fd6da3b4163c707" }, @@ -237,187 +237,187 @@ }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/CustomMenuDeleteResult.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type CustomMenuDeleteResult.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/TbImageDeleteResult.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 85c2cdacc01a8a75e3daa236ff7a698817a3a162).", "contentHash": "sha256:23f6394bb5203ef9d3334bf3089f07fe41ab673d9345f356f602bf65fcca33d1" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/SecretType.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type SecretType.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/HasName.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 24d65f5772e82f4a4a408e21aaf0fd051080c547).", "contentHash": "sha256:3a8512446f1164abbbcca0e424e8da1ec16cef85520d280ca1c42650acbce2d9" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/TbSecretDeleteResult.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type TbSecretDeleteResult.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/TbResourceDeleteResult.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d2b359f23bb29e608b20ab8b9859c8f0ddc2d66a).", "contentHash": "sha256:9c8df7fb5c8b07d9ebdf6cc46c98efee2134b867f1f92d738b0843c7b0a944a1" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/agent/AgentInstructions.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent installation instructions model added in e0db7ac7154 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/data/src/main/java/org/thingsboard/server/common/data/edge/EdgeInstructions.java shares only the instructions model boilerplate. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 409985284c6).", "contentHash": "sha256:ce067f7aad61fb79c44ac80ceda3b26e9908a8a648380097754ff9ee097256b1" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/BlobEntityFields.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type BlobEntityFields.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/EntityViewFields.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d21d495cf1871bdeca471f00d92c73d4d444a12a).", "contentHash": "sha256:0fc26ec79e200fe6bf97b58993a9830be23175c260155764408f3f3b7d84bed1" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/ConverterFields.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type ConverterFields.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/RuleChainFields.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d8dd1c8a433275ae690d5ca9296a55b5c23bf464).", "contentHash": "sha256:660e6258198919edbbc5a08704fb9eee5dbaf797d248da0c96987957ae03ca16" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/IntegrationFields.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type IntegrationFields.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/RuleChainFields.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d8dd1c8a433275ae690d5ca9296a55b5c23bf464).", "contentHash": "sha256:7c07ebe99b44c9d69f05eb88cdc680b03f30cbc26d115e74980fa9a5df2e2c70" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/RoleFields.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type RoleFields.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/edqs/fields/EntityViewFields.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d21d495cf1871bdeca471f00d92c73d4d444a12a).", "contentHash": "sha256:603f0ba6af402c8f7bc499bfa09e88472bcab45f4d1b5fe55efd29cc3b1af194" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/event/IntegrationDebugEvent.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type IntegrationDebugEvent.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/event/RuleChainDebugEvent.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob c6b34615adad82d53a1a913956f7517064548c35).", "contentHash": "sha256:5e585c566be6b92d56bd6331144861c1b0a0d5529c07dbc6de340ed805bc23e0" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/event/RawDataEvent.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type RawDataEvent.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/event/RuleChainDebugEvent.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob c6b34615adad82d53a1a913956f7517064548c35).", "contentHash": "sha256:c0e10159c33bea76a60a6f0f62d756ae181d1a3bac045c10978f2b7aaa82223b" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/event/RawDataEventFilter.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type RawDataEventFilter.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/event/ErrorEventFilter.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8b1a03b8480db898d3d6182de8f9cd91588daaf9).", "contentHash": "sha256:9329939e43514544231b9329f3f190ada2872780773c3bbb60fadcec8726174d" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/housekeeper/EntitiesCleanupHousekeeperTask.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type EntitiesCleanupHousekeeperTask.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/housekeeper/TenantEntitiesDeletionHousekeeperTask.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob be7ff6f7ecaee9e9afe78f097a8945d92a0dae88).", "contentHash": "sha256:b568f724c8f1ba201545a387c302af3a3376288d5bb8101c3151cd1d421eb38f" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/AgentAppEventId.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity id added in c17541e44d6 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/data/src/main/java/org/thingsboard/server/common/data/id/CalculatedFieldId.java shares only the entity id boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 094df0e9354).", "contentHash": "sha256:0c99ed7caf9ec1e379c26d9cdf43be0dd82ed0a91c5dee58f1786ffd97123e57" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/AgentAppProfileId.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity id added in 41416ebe327 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/data/src/main/java/org/thingsboard/server/common/data/id/OtaPackageId.java shares only the entity id boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob f9f508f13f2).", "contentHash": "sha256:ce4de69553918cb1630f5efbc255fb767490927b54713d6c828e81c5fa5e59f1" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/AgentAppUnitId.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity id added in ad644d12571 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/data/src/main/java/org/thingsboard/server/common/data/id/OtaPackageId.java shares only the entity id boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob f9f508f13f2).", "contentHash": "sha256:afef46f334d3bc87fe2a8959d12b8c8032861e084421119836160d73a90ef953" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/AgentApplicationId.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity id added in af7fd5a1e48 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/data/src/main/java/org/thingsboard/server/common/data/id/CalculatedFieldId.java shares only the entity id boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 094df0e9354).", "contentHash": "sha256:ac7ba9e268ea1806fb8a589b108f1e60f86696170fea1787f2bca12cf2fc76bb" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/AgentBulkActionId.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity id added in bd59c7ca3b1 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/data/src/main/java/org/thingsboard/server/common/data/id/CalculatedFieldId.java shares only the entity id boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 094df0e9354).", "contentHash": "sha256:72511cab888de959c7d07a447c1e75d6422634bf4a40f0bf3c8acb252bb29fa3" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/AgentId.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity id added in 297416ceb40 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/data/src/main/java/org/thingsboard/server/common/data/id/CalculatedFieldId.java shares only the entity id boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 094df0e9354).", "contentHash": "sha256:6802bd0d22005158617e0dafb29a0594b3a8f6a6a48bf76aa3c2e55094cf06d0" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/AgentProfileId.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity id added in 6c303b45f74 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/data/src/main/java/org/thingsboard/server/common/data/id/OtaPackageId.java shares only the entity id boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob f9f508f13f2).", "contentHash": "sha256:3b401949924a7959176f33288586ebaa9d5faad8c6b9512c9388b42ad628502b" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/BlobEntityId.java", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/id/QueueStatsId.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 7a921e875505b9f45e1074958631ba146263c31b).", "contentHash": "sha256:f9f618191dabbebf321eed10073d66f2e8179d46866a797b13905f120e5994d3" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/ConverterId.java", - "header": "pe-only", + "header": "busl", "reason": "PE-only entity ID wrapper introduced in 7914c997a70cd903ac248f896c0fb27ea96cef18. Its similarity to common/data/src/main/java/org/thingsboard/server/common/data/id/AssetId.java reflects the shared ID-wrapper template. Maintainer explicitly resolved ConverterId as PE-authored because converters are a PE-only feature; the same resolution applies to this comparable PE-only entity wrapper.", "contentHash": "sha256:8deda011e1724896c0de879f8c0222f741d830a47e906bdad2b1d88529ed6f61" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/CustomMenuId.java", - "header": "pe-only", + "header": "busl", "reason": "PE-only entity ID wrapper introduced in 60c8fb1928699c07128c3e6beb43964687a5333c. Its similarity to common/data/src/main/java/org/thingsboard/server/common/data/id/AdminSettingsId.java reflects the shared ID-wrapper template. Maintainer explicitly resolved ConverterId as PE-authored because converters are a PE-only feature; the same resolution applies to this comparable PE-only entity wrapper.", "contentHash": "sha256:6a1db9c609fe31e1dfb256bfb6ada0eb8e93168ad5c55f31dc37d66fc6b75c11" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/EncryptionKeyId.java", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/id/UserCredentialsId.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 6c17ba5aec7d3e4b1e07f3a5e89fe144441fb0a4).", "contentHash": "sha256:7e225578277de32f0d700b6aecd1e6a65b9295e866a268e392c1bf1a2655c65e" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/EntityGroupId.java", - "header": "pe-only", + "header": "busl", "reason": "PE-only entity ID wrapper introduced in 887106583064b1bc0383d25614fbeda418e3d6d6. Its similarity to common/data/src/main/java/org/thingsboard/server/common/data/id/AssetId.java reflects the shared ID-wrapper template. Maintainer explicitly resolved ConverterId as PE-authored because converters are a PE-only feature; the same resolution applies to this comparable PE-only entity wrapper.", "contentHash": "sha256:05abfcc7a496011ddbceaa4f3de74be4c3ee2501ea58c00415be583ed3150dd3" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/GroupPermissionId.java", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/id/DeviceId.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 7dd840815b540966a1dc57440cf5108a35119552).", "contentHash": "sha256:63be26285040fa04f1a6013308facf49230e5f84926faeb16c6ed580b7a983c7" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/IntegrationId.java", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/id/QueueId.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob c7ee46da2adae547e4b7714d7070bb610274f571).", "contentHash": "sha256:0e7a96c5a4887b56312319e305a991fd6bd73d6659e668b0a75d0a7d91d1cd34" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/ReportId.java", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/id/UserId.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d4f113bef57ca782c35511ea2a8fbd3e364b9d9b).", "contentHash": "sha256:6abcc328dcb3049873c5b1a193b642b7cb25848740aaa98e5250ad44cd7bfed6" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/ReportTemplateId.java", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/id/DeviceId.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 7dd840815b540966a1dc57440cf5108a35119552).", "contentHash": "sha256:73395faf888c2d8f87478352625208900a16d4a2be3f025e118fe93fc1b67992" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/RoleId.java", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/id/QueueId.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob c7ee46da2adae547e4b7714d7070bb610274f571).", "contentHash": "sha256:e79ad6b47c787958d36ef4907e3b5f7710df51aeca037fcb930558910a074b6c" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/SchedulerEventId.java", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate common/data/src/main/java/org/thingsboard/server/common/data/id/DeviceId.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 7dd840815b540966a1dc57440cf5108a35119552).", "contentHash": "sha256:154a64d766ce75dcf9be0838b6996cfe7112ee77416c33ec08a2db209088b1a3" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/id/SecretId.java", - "header": "pe-only", + "header": "busl", "reason": "PE-only entity ID wrapper introduced in 2d5a5b65587edb42acf3b415b1689065c905d493. Its similarity to common/data/src/main/java/org/thingsboard/server/common/data/id/NotificationTemplateId.java reflects the shared ID-wrapper template. Maintainer explicitly resolved ConverterId as PE-authored because converters are a PE-only feature; the same resolution applies to this comparable PE-only entity wrapper.", "contentHash": "sha256:03a67a1bea463f9ad641dfc4f27f82ef1936a47745dbd019d9f9ea0a88623db8" }, @@ -429,49 +429,49 @@ }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/menu/CustomMenuConfig.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type CustomMenuConfig.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/mobile/layout/MobileLayoutConfig.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8cf0bfb6182c8d094f765109db4e901222cb6448).", "contentHash": "sha256:8dd8c85820f87b3a6c97440bf3df112e4f5f74f109ced154d2a129ac89f54147" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/menu/MenuItem.java", - "header": "pe-only", + "header": "busl", "reason": "PE custom menu model interface introduced in 2eb81a2baa9 alongside CustomMenuConfig. The candidate CE DeviceConfiguration.java matches only on Jackson polymorphism annotations, not on the menu model. Reviewed candidate at 317a75614137ab5ddd1aecef1abd4c2fcdcb8710 (blob 6fe689d17c0).", "contentHash": "sha256:da19b1162913a636119fcc953d6366b990d24a6fda8df540497653bb317407b0" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/notification/info/IntegrationLifecycleEventNotificationInfo.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type IntegrationLifecycleEventNotificationInfo.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/notification/info/RuleEngineComponentLifecycleEventNotificationInfo.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob aa71e620bd31d4520a52f12a4968542407f3b649).", "contentHash": "sha256:dfaccc965ece5db3133d1b9615190c56cd288f91da82cd98313a23d4733e2252" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/notification/info/PlanUpgradeRequestNotificationInfo.java", - "header": "pe-only", + "header": "busl", "reason": "PE plan upgrade request notification added in 358c8ec5e5f for the PE solution template level check. The candidate CE EntitiesLimitIncreaseRequestNotificationInfo.java shares only the NotificationInfo and Lombok boilerplate and carries different fields. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob f00014567d9).", "contentHash": "sha256:42eceb50f497f9f0b5022b1fdc06157926f458d59376d24c285fb5fbb590617f" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/notification/info/ReportGeneratedNotificationInfo.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type ReportGeneratedNotificationInfo.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/notification/info/EdgeConnectionNotificationInfo.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 05fa093fb717fabbac402bf1255fba78b86fbef1).", "contentHash": "sha256:8eeb130cc283f525cf47d693e61fbdec0c29b32c2912e51473a909042c7ab812" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/IntegrationLifecycleEventTrigger.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type IntegrationLifecycleEventTrigger.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/RuleEngineComponentLifecycleEventTrigger.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob e4c967c19792ecf5fa6409973459efe5ce73cb8d).", "contentHash": "sha256:c5da9a11ed196635c09972733cf511bee2bd111242c0d084d115d37e2e7524c5" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/notification/targets/platform/UserGroupListFilter.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type UserGroupListFilter.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/notification/targets/platform/UserListFilter.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob e0adb26d59bf493b3e53444327c6da6255806853).", "contentHash": "sha256:64563fbc6ee416025b555c14cf3c517c5027bfc112a883078cc717ed471c5b52" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/notification/targets/platform/UserRoleFilter.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type UserRoleFilter.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/notification/targets/platform/UserListFilter.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob e0adb26d59bf493b3e53444327c6da6255806853).", "contentHash": "sha256:007e94e798f25a9d0ccd1716b8a68eada4fe3ced71e531bd0538c2c56e24ecb7" }, @@ -489,43 +489,43 @@ }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/query/EntityGroupListFilter.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type EntityGroupListFilter.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/query/EntityListFilter.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 43feb031908aaabba3677d8bc78aaa814bb03010).", "contentHash": "sha256:7c6b5eaa41feb8a6e50e808da65c682b2b28e9b8736510fd50e5371f0856c91e" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/query/EntityGroupNameFilter.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type EntityGroupNameFilter.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/query/EntityNameFilter.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob a3889bc7c07de44917eac165a9c4e8578bbbcd62).", "contentHash": "sha256:46cc0073210fb81fb1a71f44604042da6056f78f62468cf45bdc78cdaf8cdd09" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/query/StateEntityFilter.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type StateEntityFilter.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/query/SingleEntityFilter.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 046f86f4146154859564ad3aa69aa84aadc47139).", "contentHash": "sha256:46835b82b0320007209a5d53528f9fdb534af41c2fcb5a528754c316c530394a" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/query/StateEntityOwnerFilter.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type StateEntityOwnerFilter.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/query/SingleEntityFilter.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 046f86f4146154859564ad3aa69aa84aadc47139).", "contentHash": "sha256:7a975a7d8a09186888ef9c4bda1153d9a07b0e05a7229b05d1fd949fc969dc76" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/report/configuration/AlarmFilterConfig.java", - "header": "pe-only", + "header": "busl", "reason": "PE-specific data/configuration type AlarmFilterConfig.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/query/AlarmCountQuery.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 77003a9452ddada65e857f343fcdb952a16b88c9).", "contentHash": "sha256:96317b71595643540f2a5311ab9328e88a54e764fa56d9ba36b8be48a6af69de" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/setup/LicenseClaimInfo.java", - "header": "pe-only", + "header": "busl", "reason": "New PE DTO for in-product license activation, added with the setup flow in 973423dc272. The only similarity to CE common/data/src/main/java/org/thingsboard/server/common/data/TbProperty.java is Lombok annotation boilerplate.", "contentHash": "sha256:b3e742bbbe86fc3f050320c7f84a4db986130d94db0648384b8138b8f0a30b23" }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/setup/SetupInfo.java", - "header": "pe-only", + "header": "busl", "reason": "New PE DTO for the first-time system setup state, added with the setup flow in 973423dc272. The only similarity to CE common/data/src/main/java/org/thingsboard/server/common/data/TbProperty.java is Lombok annotation boilerplate.", "contentHash": "sha256:270369239ea8a5fac515ab759903b9f993268b5d32cf830afcb210cba1783a97" }, @@ -537,85 +537,85 @@ }, { "path": "common/integration/cluster-integration-api/src/main/java/org/thingsboard/server/service/integration/downlink/DownlinkCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate common/cache/src/main/java/org/thingsboard/server/cache/user/UserCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 3eb9c3f16f619210d6ccdf4e3084ee36ec954796).", "contentHash": "sha256:a9d0227cd25ad5c855d8c7c44096974883ab975cc518ead6c816e6d8d5710621" }, { "path": "common/integration/cluster-integration-api/src/main/java/org/thingsboard/server/service/integration/downlink/DownlinkRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/relation/RelationRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 11ef52d606360951413466ee2ae966f8f7a0181b).", "contentHash": "sha256:d354b1117c635eefc6d2abd6ca574ef2f738cdf06b52fa2c92a64548f5826973" }, { "path": "common/integration/integration-api/src/main/java/org/thingsboard/integration/api/util/ExceptionUtil.java", - "header": "pe-only", + "header": "busl", "reason": "The PE integration utility was introduced in e3e90e9a96a9ade8e4dc8f97dccd9e6c4b71a839 (2021-11-03), before the matching common/util CE path appeared on the selected mainline in 95f07b39942 (2023-08-15). The later CE match does not establish that this PE utility was inherited from that CE path. Reviewed CE candidate common/util/src/main/java/org/thingsboard/common/util/ExceptionUtil.java at 95f07b39942cdf63d6cb8c95b05d2abe9de2601e (blob 2ec15f3724b7eaa46d5016485d087535570cdb4e).", "contentHash": "sha256:694f9344df39779e731ca8bced08184b4d364b172f7da9b4a3050a1b851c3d37" }, { "path": "common/integration/integration-api/src/main/java/org/thingsboard/integration/api/util/TbIntegrationExecutorOrIntegrationComponent.java", - "header": "pe-only", + "header": "busl", "reason": "PE service activation annotation. Conditional component wiring identifies PE integration processes; shared Spring annotation syntax is launch scaffolding, which the maintainer resolved as PE-only. Reviewed similarity candidate common/queue/src/main/java/org/thingsboard/server/queue/util/TbCoreComponent.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 224f52fb329eedd5b6be37d9625c17f81032086c).", "contentHash": "sha256:2532fe77ca3458baffa12c317daff7af64e72ae3b74509dbf4ca7295378e2417" }, { "path": "common/integration/mqtt-integrations/src/main/java/org/thingsboard/integration/mqtt/azure/AzureIotHubSasCredentials.java", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/mqtt/azure/AzureIotHubSasCredentials.java, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:8e35a5cf2c10fcfa6a922a60aabdd0864358dc9efdc73f6db76eab58153cb9c0" }, { "path": "common/integration/mqtt-integrations/src/main/java/org/thingsboard/integration/mqtt/credentials/AnonymousCredentials.java", - "header": "pe-only", + "header": "busl", "reason": "The MQTT integration credential family originated in PE application/service/integration/mqtt in d601117d0fa (2017-12-25) and moved into the integration module in 72a187ee116 (2019-06-11). The matching CE rule-engine family appeared later on the selected CE mainline in 9fce3e068e4 (2018-05-28); this is retained PE integration code. Reviewed CE candidate rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/mqtt/credentials/AnonymousCredentials.java at 1265a9a1e364aed339377b05f93354f01fa949f5 (blob dfbba93de5a7c073e09582db5ffae79f02fa8df4).", "contentHash": "sha256:eb7bf7aaa4d8670c119c148af47fabfe66edbe3c544d0a04185a3943ff090d71" }, { "path": "common/integration/mqtt-integrations/src/main/java/org/thingsboard/integration/mqtt/credentials/BasicCredentials.java", - "header": "pe-only", + "header": "busl", "reason": "Retained PE MQTT integration credentials from the original application/service/integration/mqtt credential family, moved into common/integration by 72a187ee116. The later CE rule-engine credential counterpart is not evidence that the earlier PE integration family was inherited from CE. Reviewed CE candidate rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/mqtt/credentials/BasicCredentials.java at 1265a9a1e364aed339377b05f93354f01fa949f5 (blob 9674115d7572c1b3d9eee2015dc73de4b6ca555c).", "contentHash": "sha256:5523afe4ef62be834ceba35909248ebcaf85b657d765c536376273aae6e50126" }, { "path": "common/integration/mqtt-integrations/src/main/java/org/thingsboard/integration/mqtt/credentials/CertPemClientCredentials.java", - "header": "pe-only", + "header": "busl", "reason": "Retained PE MQTT integration client-certificate credentials from the original integration credential family. Similar CE rule-engine credential implementations do not establish CE origin for that earlier PE family; PE supplies its client-certificate configuration. Reviewed CE candidate rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/credentials/CertPemCredentials.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 46d844d2c4aff3d5af24802dfee974f0af416113).", "contentHash": "sha256:d4ae03b84f499bede7580d21ed131995793ee01d9a5bbd602f48a1a47325e896" }, { "path": "common/integration/mqtt-integrations/src/main/java/org/thingsboard/integration/mqtt/credentials/MqttClientCredentials.java", - "header": "pe-only", + "header": "busl", "reason": "PE integration credential interface and subtype registration, retained from the integration family introduced in d601117d0fa before its CE rule-engine counterpart. Its Jackson subtype declarations identify PE integration credential implementations. Reviewed CE candidate rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/mqtt/credentials/MqttClientCredentials.java at c041b3f44d100acf6289bc0a8f4004f9854f533e^1 (blob 1c397614ea5a08d5caf132dcd3b22c08e9194b0e).", "contentHash": "sha256:e5bf626f0429ecf2aee0a251d48ce96338d726271ab78fd3dcbdd5060f6a52cc" }, { "path": "common/queue/src/main/java/org/thingsboard/server/queue/provider/KafkaTbIntegrationExecutorQueueFactory.java", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE common/queue/src/main/java/org/thingsboard/server/queue/provider/KafkaTbRuleEngineQueueFactory.java, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:23520476f4bc1b69a96abb6fc37d5988d00ef874d7bc769be4b60c316926d1dc" }, { "path": "common/queue/src/main/java/org/thingsboard/server/queue/settings/TbQueueIntegrationApiSettings.java", - "header": "pe-only", + "header": "busl", "reason": "Configuration value holder for the PE integration API queue. Shared Spring property/queue-settings syntax is PE service scaffolding; it does not establish inheritance from transport API settings. Reviewed candidate common/queue/src/main/java/org/thingsboard/server/queue/settings/TbQueueTransportApiSettings.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 2cf2465e0489576f87dbbf9eb58928aac4964682).", "contentHash": "sha256:824e280c760c6765eb5a18c10497e001aec3e1dc2c4c3bd78a7de3c771675dec" }, { "path": "common/queue/src/main/java/org/thingsboard/server/queue/util/TbCoreOrIntegrationExecutorComponent.java", - "header": "pe-only", + "header": "busl", "reason": "PE service activation annotation. Conditional component wiring identifies PE integration processes; shared Spring annotation syntax is launch scaffolding, which the maintainer resolved as PE-only. Reviewed similarity candidate common/queue/src/main/java/org/thingsboard/server/queue/util/TbCoreComponent.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 224f52fb329eedd5b6be37d9625c17f81032086c).", "contentHash": "sha256:a947f906aa032b9d76b794ec6e0a1efa7e0738f2be7d53306b71b02652e73095" }, { "path": "common/queue/src/main/java/org/thingsboard/server/queue/util/TbIntegrationComponent.java", - "header": "pe-only", + "header": "busl", "reason": "PE service activation annotation. Conditional component wiring identifies PE integration processes; shared Spring annotation syntax is launch scaffolding, which the maintainer resolved as PE-only. Reviewed similarity candidate common/queue/src/main/java/org/thingsboard/server/queue/util/TbCoreComponent.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 224f52fb329eedd5b6be37d9625c17f81032086c).", "contentHash": "sha256:9b51d060dbba0e2955286a26aedea80c0f90321c80256028f28e543098cbd9f7" }, { "path": "common/queue/src/main/java/org/thingsboard/server/queue/util/TbIntegrationExecutorComponent.java", - "header": "pe-only", + "header": "busl", "reason": "PE service activation annotation. Conditional component wiring identifies PE integration processes; shared Spring annotation syntax is launch scaffolding, which the maintainer resolved as PE-only. Reviewed similarity candidate common/queue/src/main/java/org/thingsboard/server/queue/util/TbCoreComponent.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 224f52fb329eedd5b6be37d9625c17f81032086c).", "contentHash": "sha256:ab1938bf307d633bebb4653d4ad2ed7d9da046e3c52ed4feb5eefca2fa21542b" }, @@ -663,67 +663,67 @@ }, { "path": "dao/src/main/java/org/thingsboard/server/dao/agent/AgentSessionCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in 0860d0b3960 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/cache/src/main/java/org/thingsboard/server/cache/edge/RelatedEdgesCaffeineCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 5227ae6ab4b).", "contentHash": "sha256:aafceb8b51bf36086486d42fda7a649a641d5f445d98c7a15ff8ad02bdabbac2" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/agent/AgentSessionRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE agent cache added in 0860d0b3960 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE common/cache/src/main/java/org/thingsboard/server/cache/edge/RelatedEdgesRedisCache.java shares only the Caffeine or Redis cache boilerplate and caches a different key and value type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 992d730c040).", "contentHash": "sha256:fec697d4d3b9bef98b9bc70409c3686ba113e3b105648ce50b5b9d11bd9a56dd" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/alarm/AlarmTypeNamesCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE alarm type names cache added in 96e98fab02d (PR #4809), a new cache of HashSet per tenant. The candidate CE TenantExistsCaffeineCache.java shares only the Caffeine cache boilerplate. Reviewed candidate at 317a75614137ab5ddd1aecef1abd4c2fcdcb8710 (blob 3012eba487d).", "contentHash": "sha256:45395fcd7c6fe21de78753964c237c0eca266b98fb45585a2c93db4127ac9ffe" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/alarm/AlarmTypeNamesRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "PE alarm type names cache added in 96e98fab02d (PR #4809), a new cache of HashSet per tenant. The candidate CE AlarmTypesRedisCache.java shares only the Redis cache boilerplate and caches a different value type. Reviewed candidate at 317a75614137ab5ddd1aecef1abd4c2fcdcb8710 (blob 5a194f53c90).", "contentHash": "sha256:b81968eeb66338075a41b39a4cc23969afc1549034ec8d22ee271db558ecabd3" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/group/EntityGroupCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate application/src/main/java/org/thingsboard/server/service/sync/vc/VersionControlTaskCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d234314aee9f02efb853f0a3372f9e0de1b7869c).", "contentHash": "sha256:56211a47297025cb13f32ff0084ff83a05c2ab9867d8899c75f1864091146719" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/group/EntityGroupRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/edge/EdgeSessionRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 5815e6a2b12e512aee3840fcf5854cd7a356323c).", "contentHash": "sha256:83d5b9463bc6c4ea25507b3b39bfe2f8074aee086d3bca6fded23c1b5be051f5" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/integration/IntegrationCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/asset/AssetProfileCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob b8f7ffb2999a137d289e9770a5bba49cfc8d2586).", "contentHash": "sha256:362ff6b017d0194cca8a0c5dea141f6dededb69bf869bc5bfafdc5c3d4ce6352" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/integration/IntegrationRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/edge/EdgeSessionRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 5815e6a2b12e512aee3840fcf5854cd7a356323c).", "contentHash": "sha256:5b0efbb6186386c04a4e3a3b945bb14a5076da308219b7605db4b3ed8614cda1" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/mail/MailOauth2StateCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/tenant/TenantExistsCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 3012eba487d178cfd04ae4daa8836ff3c682fc10).", "contentHash": "sha256:1e3416c13ff454bf0a715e2077eb8319f0c2e2486d55dfee545335787d723f05" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/mail/MailOauth2StateRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/dashboard/DashboardTitlesRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 4c1bf7dedbe2011e9e4f64438b54abfb13c5ea9c).", "contentHash": "sha256:0b87f32876ccabf2e3556ca55a2601069df02cffb5176c9401b5dcfb950d2ec5" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/menu/CustomMenuRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/ota/OtaPackageRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob f6d3be49ad455d23778055b73a2b4e173b6af2e6).", "contentHash": "sha256:cbb54a6efdf2def2c28508ac213452548f0ddb86d39f3680dad3f4eb89dd5014" }, @@ -747,73 +747,73 @@ }, { "path": "dao/src/main/java/org/thingsboard/server/dao/model/sql/RawDataEventEntity.java", - "header": "pe-only", + "header": "busl", "reason": "PE raw-event persistence mapping. Fields, event type and construction of RawDataEvent implement the PE event model; shared EventEntity/JPA boilerplate is a template pattern rather than a relocated CE entity. Reviewed candidate dao/src/main/java/org/thingsboard/server/dao/model/sql/RuleChainDebugEventEntity.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob aaf7ff2b6e51339993941058855269fd4d9bdc57).", "contentHash": "sha256:cfa8ba902a093c7d70c5feade1a9b234d138f4732999ceb7c171db66d36d5cde" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/role/RoleCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/entityview/EntityViewCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 2c6fa38067b1eb54a9ffe38403aa468e3b7a969b).", "contentHash": "sha256:12900991af3126054c70c7728f7eca028d7d99be2012327bec5d8f1c92de8950" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/role/RoleRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate common/cache/src/main/java/org/thingsboard/server/cache/user/UserRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d29adee75fa437835aff754e546988e96634462b).", "contentHash": "sha256:c7655f346e31d8246589338841e355e26e2214b7756cb1df86182c1b94904b96" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/sql/encryptionkey/EncryptionKeyRepository.java", - "header": "pe-only", + "header": "busl", "reason": "PE persistence interface EncryptionKeyRepository.java. Reviewed Spring Data declarations/query bindings target PE entities and event tables; shared repository declaration/query conventions do not establish CE file lineage. Reviewed candidate dao/src/main/java/org/thingsboard/server/dao/sql/mobile/QrCodeSettingsRepository.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 1c3698a65321ae135c121273cffad1823037efc6).", "contentHash": "sha256:2f21444816a51a96ca08b86deaae88752cd06a15ed77090bd23d95c2322c8237" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/sql/event/ConverterDebugEventRepository.java", - "header": "pe-only", + "header": "busl", "reason": "PE persistence interface ConverterDebugEventRepository.java. Reviewed Spring Data declarations/query bindings target PE entities and event tables; shared repository declaration/query conventions do not establish CE file lineage. Reviewed candidate dao/src/main/java/org/thingsboard/server/dao/sql/event/RuleChainDebugEventRepository.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d78a927584d361e4e493b0350deea08e0cbcffae).", "contentHash": "sha256:127aa93c838e333ee9cfd46ff9d7cc3115a4c2fae494e15c164ba48f3b1f5ce2" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/sql/event/IntegrationDebugEventRepository.java", - "header": "pe-only", + "header": "busl", "reason": "PE persistence interface IntegrationDebugEventRepository.java. Reviewed Spring Data declarations/query bindings target PE entities and event tables; shared repository declaration/query conventions do not establish CE file lineage. Reviewed candidate dao/src/main/java/org/thingsboard/server/dao/sql/event/RuleChainDebugEventRepository.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d78a927584d361e4e493b0350deea08e0cbcffae).", "contentHash": "sha256:0811f9b5587cd522b098029ffeda922cbcb787d9559b9de95ca5c96df73bcc9b" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/sql/event/RawEventRepository.java", - "header": "pe-only", + "header": "busl", "reason": "PE persistence interface RawEventRepository.java. Reviewed Spring Data declarations/query bindings target PE entities and event tables; shared repository declaration/query conventions do not establish CE file lineage. Reviewed candidate dao/src/main/java/org/thingsboard/server/dao/sql/event/ErrorEventRepository.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob bed19b008d18634d8e4c35fcbe059bad3a51ae51).", "contentHash": "sha256:a89153896cfac844fdc9747b211715273fbdb3ec57e368df2537a6e9c8178b3e" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/sql/secret/SecretRepository.java", - "header": "pe-only", + "header": "busl", "reason": "PE persistence interface SecretRepository.java. Reviewed Spring Data declarations/query bindings target PE entities and event tables; shared repository declaration/query conventions do not establish CE file lineage. Reviewed candidate dao/src/main/java/org/thingsboard/server/dao/sql/domain/DomainRepository.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob fc35b71fb97fa795345886a607a01cedac36b43a).", "contentHash": "sha256:6eb360663c17d9dba72b69a858ca199c45644ea63c2a9519c1421e302479f2b5" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/translation/CustomTranslationRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/device/DeviceCredentialsRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob a3521a8e79ce09595ae48480d4883378af97510c).", "contentHash": "sha256:93b54abaf0465bfe2bdd36cabc3fce721d23136c0d2b107bd2c8de911f16b846" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/user/UserPermissionCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/user/UserSettingsCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 3aee29656141d963210ac1fa2732fd7cc9ef4242).", "contentHash": "sha256:5922b2b6e7fff8efc57de90dd591617c6dd96697bda52ff820545aa80afe6311" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/wl/WhiteLabelingCaffeineCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/tenant/TenantProfileCaffeineCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 1cf96e785a610b8ddf08c3743ee8ccf1c94737b4).", "contentHash": "sha256:293c4b75b530ae131651fc0282a26695709f47d3d9a847d7cb04be880d2603e6" }, { "path": "dao/src/main/java/org/thingsboard/server/dao/wl/WhiteLabelingRedisCache.java", - "header": "pe-only", + "header": "busl", "reason": "Typed cache adapter for a PE feature. Reviewed as a new PE cache registration using the shared cache framework: service/cache identity and entity/key types are PE-specific. Constructor and Spring annotation overlap with CE cache adapters is framework template use, analogous to the maintainer-resolved PE entity ID wrappers. Reviewed similarity candidate dao/src/main/java/org/thingsboard/server/dao/tenant/TenantProfileRedisCache.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob b70176297a970343f9c824cb823d0a0ecfe19188).", "contentHash": "sha256:141ab2848c00ab580599bc175dee897549c7454633f13fa31e5feb203fb361b0" }, @@ -825,385 +825,385 @@ }, { "path": "integration/apache-pulsar/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/apache-pulsar/src/main/conf/tb-apache-pulsar-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/apache-pulsar/src/main/java/org/thingsboard/integration/ThingsboardApachePulsarIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:e936a600d1f54ca816ecd3ddf0a4b2b332067766655e2af824615f3d6bb27460" }, { "path": "integration/apache-pulsar/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/aws/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/aws/src/main/conf/tb-aws-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/aws/src/main/java/org/thingsboard/integration/ThingsboardAwsSqsIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:6db6655a9081907a488c37863bcfee9caf51580cf50a4f67ccfeb7b9306eee99" }, { "path": "integration/aws/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/azure/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/azure/src/main/conf/tb-azure-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/azure/src/main/java/org/thingsboard/integration/ThingsboardAzureIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:25141e16043e4890a099837f6aca125b5d67726ad7b14886b88b289493d38292" }, { "path": "integration/azure/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/coap/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/coap/src/main/conf/tb-coap-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/coap/src/main/java/org/thingsboard/integration/ThingsboardCoapIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:691ed1e7c96845e81ccfdcf522c836794f4045180c74d50be1613122517397c4" }, { "path": "integration/coap/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/executor/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate msa/tb/docker/logback.xml at 64332ecaa07735ee5bc6e5d7e644cf0aec396dd8 (blob 01fc5d30a832ee07355a38acf32823b3dd1b9e34).", "contentHash": "sha256:3771054bb15eb923916b680806c34710c166152c75e02180ebe5d59c119d3e11" }, { "path": "integration/executor/src/main/conf/tb-integration-executor.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate msa/vc-executor/src/main/conf/tb-vc-executor.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:07b101062bdea0f8e83c43bf23e31611b95e253320b7764d6be3e50c2a1a3578" }, { "path": "integration/executor/src/main/java/org/thingsboard/integration/ThingsboardIntegrationExecutorApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:e90986dc965608a6880ae3af8dbf5ffb1c0c980f6237f274cddbaf68daf557f1" }, { "path": "integration/executor/src/main/java/org/thingsboard/integration/service/IntegrationQueueRoutingInfoService.java", - "header": "pe-only", + "header": "busl", "reason": "PE integration-executor wiring: this dummy routing implementation returns no rule-engine queues/routing because the integration executor does not produce rule-engine messages. Shared service-interface syntax is PE launch scaffolding. Reviewed candidate msa/vc-executor/src/main/java/org/thingsboard/server/vc/service/VersionControlQueueRoutingInfoService.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 5ad54b92f7318c9b181ba7ccbbf65d14e3fa5558).", "contentHash": "sha256:6f249d1322eaf2d54074772efa5467c8ce5a77353d7ea6c05ee12057b37831cf" }, { "path": "integration/executor/src/main/java/org/thingsboard/integration/service/IntegrationTenantRoutingInfoService.java", - "header": "pe-only", + "header": "busl", "reason": "PE integration-executor wiring: this dummy routing implementation returns no rule-engine queues/routing because the integration executor does not produce rule-engine messages. Shared service-interface syntax is PE launch scaffolding. Reviewed candidate msa/vc-executor/src/main/java/org/thingsboard/server/vc/service/VersionControlTenantRoutingInfoService.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 397eecf629f9b8296ad846d71a7a971006b25d3d).", "contentHash": "sha256:e1059ec007348a1020278d34ee67613d814d16d639c1c27e5f731fddfb0e4299" }, { "path": "integration/executor/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate msa/vc-executor/src/main/resources/logback.xml at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob c868af4b6c1fbb8e65d18387d577ddf5d8c9dd71).", "contentHash": "sha256:82f1e20adbaeadfe9fcc4b5fa65580e48cbf26d39dd0e8bd205db3bfb2842b7b" }, { "path": "integration/executor/src/main/resources/tb-integration-executor.yml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/tb-coap-transport.yml at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob f9909e5fdc19ee9137cbbb45d775c72337a106c5).", "contentHash": "sha256:6c0f39b89e3c6ede1649cebaa652ebe06f8680c157b2e85d1788bd4fb777c138" }, { "path": "integration/http/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/http/src/main/conf/tb-http-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/http/src/main/java/org/thingsboard/integration/ThingsboardHttpIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:59f8ead9c9b6253a580f01a239eda2ccc43a851aeebaec97a37d23230ab66ef3" }, { "path": "integration/http/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/kafka/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/kafka/src/main/conf/tb-kafka-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/kafka/src/main/java/org.thingsboard.integration/ThingsboardKafkaIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:27244242d6347081f7df657de86a0094141fcd531d19c23ea05598662274c393" }, { "path": "integration/kafka/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/mqtt/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/mqtt/src/main/conf/tb-mqtt-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/mqtt/src/main/java/org/thingsboard/integration/ThingsboardMqttIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:d86b071123017296f700b39fd782125f3781f752000e7b682f5b5d19b47ca786" }, { "path": "integration/mqtt/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/opc-ua/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/opc-ua/src/main/conf/tb-opc-ua-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/opc-ua/src/main/java/org/thingsboard/integration/ThingsboardOpcUaIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:90d84265a8162ad0c7a41af520eea332d30860b6b7bc5b7fc1bbd26a0b79a872" }, { "path": "integration/opc-ua/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/pubsub/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/pubsub/src/main/conf/tb-pubsub-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/pubsub/src/main/java/org.thingsboard.integration/ThingsboardPubsubIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:3094ee2d2c68ec0d8a9408c94fc0e0a4b10ce509a13c017f87863ca5dc16cf7a" }, { "path": "integration/pubsub/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/rabbitmq/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/rabbitmq/src/main/conf/tb-rabbitmq-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/rabbitmq/src/main/java/org.thingsboard.integration/ThingsboardRabbitMQIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:ed34f503030a866f28185e57e49f587c0d9e60ac920b8d1f04f70a92709f1be9" }, { "path": "integration/rabbitmq/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/tcp-udp/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/tcp-udp/src/main/conf/tb-tcp-udp-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/tcp-udp/src/main/java/org/thingsboard/integration/ThingsboardTcpUdpIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:ee08452a0831c93e2a1ff1bfd94cb59555b98942fbdfcb4f380a7aba0560cd21" }, { "path": "integration/tcp-udp/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "integration/tuya/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:cf5c082afdeefe8e6a4d8194b55908e9fa169a048fa48583f1acbfa14772c5e9" }, { "path": "integration/tuya/src/main/conf/tb-tuya-integration.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/conf/tb-http-transport.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:7b979999dff4fd91053c080c1895b149887d7a65628c3fb1dda2594ba90f583d" }, { "path": "integration/tuya/src/main/java/org.thingsboard.integration/ThingsboardTuyaIntegrationApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", "contentHash": "sha256:4b2e581ef56329a1697517256829c3414da7c759db9584737583d09efe6c6cbf" }, { "path": "integration/tuya/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/coap/src/main/resources/logback.xml at 850d6d948c27bcc1b1b2393aafb79ec509808ec8 (blob 1172a89c280eb41bc351a79184b4ec70f7746c20).", "contentHash": "sha256:5803e6b88326e4a0dd5c6a0d556bed085828104c2b8f5dd8370f444da7ec0875" }, { "path": "migrator/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate msa/black-box-tests/src/test/resources/logback.xml at 5cf26d485143c27f8d445a6f5c91d0d71dab69ec (blob 305a2d2df4890c446daf6a9d6a295aaa26a94b4f).", "contentHash": "sha256:48892851f4af439ea2710cb51547b6e19e498a845361081a13602da0cd0291ee" }, { "path": "migrator/src/main/conf/tb-migrator.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate msa/vc-executor/src/main/conf/tb-vc-executor.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:c0c3e9f37faf24271c879fe6da9f309ff0d1e79625a4c0f047f006f77186121a" }, { "path": "migrator/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate msa/black-box-tests/src/test/resources/logback.xml at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob ceb1aa9a969295acae909a08bc69335635994c08).", "contentHash": "sha256:2e3102a6f69e2a198581f84619160003dbee70b236b9782a6bcb44b3ff7c040a" }, { "path": "monitoring/src/main/java/org/thingsboard/monitoring/config/integration/IntegrationMonitoringTarget.java", - "header": "pe-only", + "header": "busl", "reason": "Data holder for PE integration-monitoring targets. Its integration/device configuration fields and simple interface accessors are a PE feature type, analogous to the maintainer-resolved PE entity wrappers. Reviewed CE candidate monitoring/src/main/java/org/thingsboard/monitoring/config/transport/TransportMonitoringTarget.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 7fa6ec3f461008043d90cdadec4d1bc18da2e238).", "contentHash": "sha256:25f4ef99a14df1d2e94444440be0ac3c78f11eab18b4fef95ba7045fea2659f2" }, { "path": "monitoring/src/main/java/org/thingsboard/monitoring/service/integration/impl/CoapIntegrationHealthChecker.java", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE monitoring/src/main/java/org/thingsboard/monitoring/service/transport/impl/CoapTransportHealthChecker.java, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:d052fff33aea9d375bbfa2c1655bc016a7d4232cc1aed77be9534dc23f6068e9" }, { "path": "monitoring/src/main/java/org/thingsboard/monitoring/service/integration/impl/HttpIntegrationHealthChecker.java", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE monitoring/src/main/java/org/thingsboard/monitoring/service/transport/impl/HttpTransportHealthChecker.java, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:7a4b0c71c3185997d717d3ff197f7734826141bb89347b054dd5277a5979e8da" }, { "path": "monitoring/src/main/java/org/thingsboard/monitoring/service/integration/impl/MqttIntegrationHealthChecker.java", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE monitoring/src/main/java/org/thingsboard/monitoring/service/transport/impl/MqttTransportHealthChecker.java, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:cb5c91b3db565f7378a2e4876568d438492c46dd212fb34a82fa99cb40a7ddf5" }, { "path": "msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomerEntityView.java", - "header": "pe-only", + "header": "busl", "reason": "New PE customer/entity-view UI scenario; shared TestNG/Selenium customer setup and navigation conventions do not make it the CE customer-user management test. Reviewed CE candidate msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomersUsersTest.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 6207b643a76b1101e57a8ec3165f7e10e23289bc).", "contentHash": "sha256:0ad2805b0448e73070dc19dcd848470c213e0fb18da4b0798ab1021c9e311d1f" }, { "path": "msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomerGroupsTest.java", - "header": "pe-only", + "header": "busl", "reason": "New PE customer-group UI scenario. Groups are a PE feature; shared TestNG/Selenium setup and customer navigation are test scaffolding, not the candidate CE customer-user scenario. Reviewed CE candidate msa/black-box-tests/src/test/java/org/thingsboard/server/msa/ui/tests/customerSmoke/ManageCustomersUsersTest.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 6207b643a76b1101e57a8ec3165f7e10e23289bc).", "contentHash": "sha256:d28050eb87aeb2e254427bec8b9a4a827d355624c867457f3ab8b05868ce89cd" }, @@ -1215,193 +1215,193 @@ }, { "path": "msa/black-box-tests/src/test/resources/advanced/mosquitto/mosquitto.conf", - "header": "pe-only", + "header": "busl", "reason": "PE integration-test broker fixture introduced in 295c81a3b6a (2021-11-01); the matching CE test path appeared later on this mainline in fb66d2fdfd8 (2024-01-10). Its two-line listener/anonymous-access configuration is test scaffolding, not meaningful proof of CE inheritance. Reviewed CE candidate msa/black-box-tests/src/test/resources/mosquitto/mosquitto.conf at fb66d2fdfd837cb094668e04355251269feadeac (blob 7136ad64b0374eac9f46beb35d033a2f97eeb448).", "contentHash": "sha256:b16ddb9bcfd179a9348c678e530e50924d8d678f2c9e1c05012deae7cb7969ea" }, { "path": "msa/black-box-tests/src/test/resources/black-box.xml", - "header": "pe-only", + "header": "busl", "reason": "PE black-box test setup and logging/suite configuration. This selects the PE test environment and scenarios using shared configuration syntax. Curated as PE-only test scaffolding consistently with the maintainer decision for PE module launch/logging files. Reviewed similarity candidate msa/black-box-tests/src/test/resources/connectivity.xml at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 7cd96bb429343ed9153b67281b1e48602beb28c7).", "contentHash": "sha256:2a0dca3720c2f97ea0c782b69e2ff574656838600f459b31ff2ccff857147695" }, { "path": "msa/black-box-tests/src/test/resources/solutionTemplates.xml", - "header": "pe-only", + "header": "busl", "reason": "PE black-box test setup and logging/suite configuration. This selects the PE test environment and scenarios using shared configuration syntax. Curated as PE-only test scaffolding consistently with the maintainer decision for PE module launch/logging files. Reviewed similarity candidate msa/black-box-tests/src/test/resources/smokeDevices.xml at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob cfcd51065f974c4474ffc02b1912edd5ae6e4ff9).", "contentHash": "sha256:9640476817a2a1ef28061a3694a4363984449f489c576385fe1528dd4a626dc0" }, { "path": "msa/black-box-tests/src/test/resources/tb-integration/coap/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "PE black-box test setup and logging/suite configuration. This selects the PE test environment and scenarios using shared configuration syntax. Curated as PE-only test scaffolding consistently with the maintainer decision for PE module launch/logging files. Reviewed similarity candidate docker/tb-transports/lwm2m/conf/logback.xml at 7667afaeae02ab3dcc6a8bb389ad6f0ab14cb441 (blob 199e138fc165b8522bc723ad1cd947fc927afeaa).", "contentHash": "sha256:34387c217c4f5832535c8e13006d9298af50daad948d9ec1f5e1d6b1592719e8" }, { "path": "msa/black-box-tests/src/test/resources/tb-integration/http/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "PE black-box test setup and logging/suite configuration. This selects the PE test environment and scenarios using shared configuration syntax. Curated as PE-only test scaffolding consistently with the maintainer decision for PE module launch/logging files. Reviewed similarity candidate docker/tb-transports/lwm2m/conf/logback.xml at 7667afaeae02ab3dcc6a8bb389ad6f0ab14cb441 (blob 199e138fc165b8522bc723ad1cd947fc927afeaa).", "contentHash": "sha256:0a3de0e8a98fdf8a8d2ded9be1d30617d15b6ac60868d9244752943264e02c13" }, { "path": "msa/black-box-tests/src/test/resources/tb-integration/mqtt/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "PE black-box test setup and logging/suite configuration. This selects the PE test environment and scenarios using shared configuration syntax. Curated as PE-only test scaffolding consistently with the maintainer decision for PE module launch/logging files. Reviewed similarity candidate docker/tb-transports/lwm2m/conf/logback.xml at 7667afaeae02ab3dcc6a8bb389ad6f0ab14cb441 (blob 199e138fc165b8522bc723ad1cd947fc927afeaa).", "contentHash": "sha256:e5c4bb50d6d47ad700882c8a243ba60b07919afb4cfafddcfa1bee26ac5af49e" }, { "path": "msa/black-box-tests/src/test/resources/tb-integration/tcp/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "PE black-box test setup and logging/suite configuration. This selects the PE test environment and scenarios using shared configuration syntax. Curated as PE-only test scaffolding consistently with the maintainer decision for PE module launch/logging files. Reviewed similarity candidate docker/tb-transports/lwm2m/conf/logback.xml at da4c74287216fc6962c74f084c2eedebf06e1a64 (blob d2485675ee170b4f4b050d055c7941d0dae5cc65).", "contentHash": "sha256:d39d097a880dc0286dbcf123ecd1c5f65dac7ebf5a955cffce09c2726279f936" }, { "path": "msa/black-box-tests/src/test/resources/tb-integration/udp/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "PE black-box test setup and logging/suite configuration. This selects the PE test environment and scenarios using shared configuration syntax. Curated as PE-only test scaffolding consistently with the maintainer decision for PE module launch/logging files. Reviewed similarity candidate docker/tb-transports/lwm2m/conf/logback.xml at da4c74287216fc6962c74f084c2eedebf06e1a64 (blob d2485675ee170b4f4b050d055c7941d0dae5cc65).", "contentHash": "sha256:d39d097a880dc0286dbcf123ecd1c5f65dac7ebf5a955cffce09c2726279f936" }, { "path": "msa/black-box-tests/src/test/resources/tb-transports/lwm2m.conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "PE black-box test setup and logging/suite configuration. This selects the PE test environment and scenarios using shared configuration syntax. Curated as PE-only test scaffolding consistently with the maintainer decision for PE module launch/logging files. Reviewed similarity candidate msa/black-box-tests/src/test/resources/tb-transports/http/conf/logback.xml at c5a72ed8dfc6d857521d270f43227eea14aae72c (blob 0408be6bd3d60dcb52ea33d848d59a64b9f05f4a).", "contentHash": "sha256:07215daf98184b8a76b9acba083f49e8c623a0be25660c859dcd8b29677672ce" }, { "path": "msa/web-report/config/logger.ts", - "header": "pe-only", + "header": "busl", "reason": "New PE module for the PE web-report service. Its body is identical to CE msa/web-ui/config/logger.ts, which PE still carries and which is a week older; the PE file is a copy for a PE-only service, not the CE file. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:aec71ee9557d9b8f0691e46617d923403e73b03cb204c3e8c837200487337398" }, { "path": "msa/web-report/config/tb-web-report.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate msa/js-executor/config/tb-js-executor.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 95e43f9ea9875eaed7e06ef3559914a901727636).", "contentHash": "sha256:f4568fd8a8158238c9d60bf6fce8ea4c7a3d98959bcf1e9fb3ef91aced0a3c46" }, { "path": "report/src/main/conf/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/logback.xml at d23c8fc0d5a408f1bb560ec2b7af0622e93008fb (blob 850a28b2125c6fe56ce01769400e72d5ee58f7c4).", "contentHash": "sha256:2199b91f2b4129821cda9a07a4e5bc694069d0e570ec2ff8700cdf470766158d" }, { "path": "report/src/main/conf/tb-report.conf", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/conf/tb-edqs.conf at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 8dfd269ed6ccce1fda74b540f47f231d03bb550f).", "contentHash": "sha256:ebb59345cb5fe92e9fdd8cd2c7f51b7b80274d42e0b1a8ba668b00b880f33773" }, { "path": "report/src/main/java/org/thingsboard/server/report/ThingsboardReportApplication.java", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/java/org/thingsboard/server/edqs/ThingsboardEdqsApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 334a36dec0f8a3820749d7a228ce2908738d4bf7).", "contentHash": "sha256:2bec03b3d69af065c3e7d6f25dbcf5b9cb735a43718fd150bd586a6f59b283e0" }, { "path": "report/src/main/resources/logback.xml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/resources/logback.xml at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 2e1f143c71a3625cea9407fc59969f5ba8ab027e).", "contentHash": "sha256:a8318968283848ae237b61382d2413c1afb0532fd9d3c9eec3e55989cb52d170" }, { "path": "report/src/main/resources/tb-report.yml", - "header": "pe-only", + "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate edqs/src/main/resources/edqs.yml at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob cad0fcaccc785af0853c77f05d385adb4c102f67).", "contentHash": "sha256:64e2775735521015bd88c79f68db101ff69f536c681db8239764c434205a0583" }, { "path": "rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetCustomerAttributeNodeConfiguration.java", - "header": "pe-only", + "header": "busl", "reason": "Configuration holder for the PE customer-attribute rule node. Reviewed property defaults configure this PE node; common rule-node configuration/clone patterns do not establish derivation from the CE entity-data node. Reviewed candidate rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/metadata/TbGetEntityDataNodeConfiguration.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob f68fdf321b69b24e3e15bd2a311e2ccfa86ff890).", "contentHash": "sha256:0b91a00b698884c6654781d43c0debb2e61dcfcb9898811e27dc13baafde2bb0" }, { "path": "rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/transform/TbAbstractDuplicateMsgNode.java", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE rule-engine/rule-engine-components/src/main/java/org/thingsboard/rule/engine/transform/TbAbstractTransformNode.java, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:ca13fdc9263fd9dbd0637547d192cd80b01454f0e8aca719460e30fe392427e1" }, { "path": "ui-ngx/src/app/modules/home/components/converter/converter-autocomplete.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE converter autocomplete styling. The entire body is a host-scoped Material icon-link border/color reset, also present in unrelated CE autocomplete controls. This trivial shared UI style does not establish CE provenance for a PE converter component. Reviewed candidate ui-ngx/src/app/modules/home/components/profile/tenant-profile-autocomplete.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 95fd62939ec09897ed96164f7a2a47d6805c3245).", "contentHash": "sha256:03445abafd2f4f71cd541c2ee3c33e195e37ad711630971fc35fd393c66419ff" }, { "path": "ui-ngx/src/app/modules/home/components/converter/converter-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template converter-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/components/entity/add-entity-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 955f8f58be2d9d462570164005f4a2ee693b0dd7).", "contentHash": "sha256:845e3846f9f41be29dc209df6c28c8870c3886886018155735affb0c49c5a9f9" }, { "path": "ui-ngx/src/app/modules/home/components/converter/converter-test-dialog.component.scss", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/shared/components/dialog/node-script-test-dialog.component.scss, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:0d83f8ec2da9c911f51d8e5eebe7da1b5db1f3100c483aa24769dc58ea75c3ad" }, { "path": "ui-ngx/src/app/modules/home/components/group/add-group-entity-dialog.component.scss", - "header": "pe-only", + "header": "busl", "reason": "New PE stylesheet for the PE group feature. At authoring it was a verbatim copy of CE ui-ngx/src/app/modules/home/components/entity/add-entity-dialog.component.scss, which PE still carries; CE later reduced its own file. Copying a CE stylesheet into a new PE-feature file does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:95cf2c6fb04db4641bda522c6a9a5c9e3faab6626e14ce4b9942417ae5379b8b" }, { "path": "ui-ngx/src/app/modules/home/components/group/entity-group.component.scss", - "header": "pe-only", + "header": "busl", "reason": "Empty :host selector in a PE component stylesheet. Identical empty selector boilerplate at multiple unrelated CE paths supplies no meaningful derivation evidence. Reviewed candidate ui-ngx/src/app/modules/home/components/relation/relation-dialog.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 16bc26c7e2a0cc952ac46e0b6edd105c17c402c5).", "contentHash": "sha256:a5a5674d23eaffbd00a99169958c14939b326ad5a68a1c614c1d3dec1635ef2b" }, { "path": "ui-ngx/src/app/modules/home/components/group/group-contact-based.component.ts", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/modules/home/components/entity/contact-based.component.ts, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:56a6d5bf2593d2e7801cb1e357b8de9073334e7f2d053bd118182ef4dae2181a" }, { "path": "ui-ngx/src/app/modules/home/components/group/manage-owner-and-groups-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template manage-owner-and-groups-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/dialogs/assign-to-customer-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 4af3aa07a136de6f06469ab94134f84552ed0f80).", "contentHash": "sha256:6663727de4d162e6fc966c2e36dd771058655f0a801232a56e3425825f6cbe54" }, { "path": "ui-ngx/src/app/modules/home/components/integration/integration-credentials/integration-credentials.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet integration-credentials.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/components/vc/repository-settings.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 3afa2cb78cc2f392a082443fd322d95ba39420f9).", "contentHash": "sha256:2efcf5a42fc436b3e0d3170b04d3636c62ded1e37d48133328216fa05cdb015f" }, { "path": "ui-ngx/src/app/modules/home/components/rule-node/action/integration-downlink-config.component.ts", - "header": "pe-only", + "header": "busl", "reason": "PE typed UI adapter integration-downlink-config.component.ts. Reviewed implementation only registers the PE component, supplies typed framework inputs or constructs its PE configuration form; matching generic Angular/ThingsBoard component hooks are template use. Reviewed CE candidate ui-ngx/src/app/modules/home/components/rule-node/flow/rule-chain-input.component.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 0403a37563356ff2843d9e87610dcad9a7d50169).", "contentHash": "sha256:7e5a32c33b1e1e45e9fec84e17be78be867f0e03db1d6cf004b84a1aac3fb51a" }, { "path": "ui-ngx/src/app/modules/home/components/rule-node/transformation/duplicate-to-related-config.component.ts", - "header": "pe-only", + "header": "busl", "reason": "PE typed UI adapter duplicate-to-related-config.component.ts. Reviewed implementation only registers the PE component, supplies typed framework inputs or constructs its PE configuration form; matching generic Angular/ThingsBoard component hooks are template use. Reviewed CE candidate ui-ngx/src/app/modules/home/components/rule-node/action/rpc-request-config.component.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 546f344863860f44a1387c1bc6c90db3645deb91).", "contentHash": "sha256:c0649f9045eb6dbafa55e5550713acc0e9d67f6f6e13e52fa0074fdbbb273548" }, { "path": "ui-ngx/src/app/modules/home/components/scheduler/config/attribute-key-value-table.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet attribute-key-value-table.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/shared/components/kv-map.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 1edb7e50bae24728db678a8e7fb2c125cc3f4bfe).", "contentHash": "sha256:4e0a33867eb7f194e3730470d67d96d75f96919fbc9e71a636e67a4b35743b31" }, { "path": "ui-ngx/src/app/modules/home/components/scheduler/config/attribute-key-value-table.component.ts", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/shared/components/kv-map.component.ts, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:aa1d298b5af277bb5d67d87630717443d35830a787e725d442e0ec3de4173f0b" }, { "path": "ui-ngx/src/app/modules/home/components/task/cancel-task-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template cancel-task-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/shared/components/dialog/confirm-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 5c8ea6eea22ccdf1a4b13f995e9c6e3421930e17).", "contentHash": "sha256:022ea913628bc1f57a62725f79121c2ea4a63ed1d6a4e36d872fbac189526d15" }, { "path": "ui-ngx/src/app/modules/home/components/task/cancel-task-dialog.component.ts", - "header": "pe-only", + "header": "busl", "reason": "PE typed UI adapter cancel-task-dialog.component.ts. Reviewed implementation only registers the PE component, supplies typed framework inputs or constructs its PE configuration form; matching generic Angular/ThingsBoard component hooks are template use. Reviewed CE candidate ui-ngx/src/app/shared/components/dialog/confirm-dialog.component.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob b2f1ed3fe90cc938948859dd8632916395b03c10).", "contentHash": "sha256:8d455120aedd994c624b5a988d50190543bc4cc14bd175c92aa9bc7ab093095c" }, @@ -1443,67 +1443,67 @@ }, { "path": "ui-ngx/src/app/modules/home/components/widget/lib/settings/common/dynamic-form/dynamic-form-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template dynamic-form-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/shared/components/dialog/json-object-edit-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 289cf0f05bdd688553a048d086c9d9777af22adc).", "contentHash": "sha256:6c778dd93549307431435beb68b13b78b98c1e2c02fb453ec25a9485656d60dc" }, { "path": "ui-ngx/src/app/modules/home/components/widget/lib/settings/scheduler/custom-scheduler-event-type.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet custom-scheduler-event-type.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/components/widget/lib/settings/chart/label-data-key.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 07a8abe1a493414539469c0939c01c5572e7618e).", "contentHash": "sha256:50b35b72e6f2065f1defd1f06be189cf1786d5d1cfb5ce079a12b70d8dd8ef5f" }, { "path": "ui-ngx/src/app/modules/home/components/wizard/entity-group-wizard-dialog.component.scss", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.scss, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:c0370968c3b22e8c69b22cb6d94d77c8265aea5ec4376ee2051f5159b343dea0" }, { "path": "ui-ngx/src/app/modules/home/dialogs/add-entity-groups-to-edge-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template add-entity-groups-to-edge-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/dialogs/assign-to-customer-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 4af3aa07a136de6f06469ab94134f84552ed0f80).", "contentHash": "sha256:a388333c5d948f47324c0a03f0a16cd1e2ee4baab27c8a851553f97a1ca3fe44" }, { "path": "ui-ngx/src/app/modules/home/dialogs/select-owner-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template select-owner-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/dialogs/assign-to-customer-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 4af3aa07a136de6f06469ab94134f84552ed0f80).", "contentHash": "sha256:df68ce9ec827575d8a46e9602df0b3b5bfbd755441cfc0322d7ec0ea95352186" }, { "path": "ui-ngx/src/app/modules/home/dialogs/share-entity-group-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template share-entity-group-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/components/entity/add-entity-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 955f8f58be2d9d462570164005f4a2ee693b0dd7).", "contentHash": "sha256:e36c42e81593ec7f224cbf8be4dce11a594a28085c81c49c860c1132f19b3920" }, { "path": "ui-ngx/src/app/modules/home/pages/admin/custom-css-dialog.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet custom-css-dialog.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/shared/components/protobuf-content.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 0633395c0a9e8241a8ea678aa45e58d86b8bc03d).", "contentHash": "sha256:f93050686508da34bf976a8705f94f4e9dacc48d80bcbd486e0cc83df80d3558" }, { "path": "ui-ngx/src/app/modules/home/pages/admin/oauth2/domains/domain-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template domain-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/mobile/applications/mobile-app-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d984ac99c9941ea1420c0e922d867cddf89b30c1).", "contentHash": "sha256:bf1d2015aa9eaecbd24f5ba2fc5a9e3f3fb5cf39901170e4d9d1cb9e9a25bf27" }, { "path": "ui-ngx/src/app/modules/home/pages/agent/agent-profile-tabs.component.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity tabs component added in 6c303b45f74 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/modules/home/pages/edge/edge-tabs.component.ts shares only the entity tabs component boilerplate. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 58bc88a8db4).", "contentHash": "sha256:285dd70a9a6dc12120df933e9ba8d6cc9b453571eb6c6390c9646bfc7c2fb52e" }, { "path": "ui-ngx/src/app/modules/home/pages/agent/agent-tabs.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity tabs component added in f5e28c9cc42 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/modules/home/pages/edge/edge-tabs.component.html shares only the entity tabs component boilerplate. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 3f298aff3d1).", "contentHash": "sha256:b96f8ce0a2df420a7411d8ff9e26409c530ecc3ff7fa35dd32db75792e130720" }, { "path": "ui-ngx/src/app/modules/home/pages/agent/agent-tabs.component.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent entity tabs component added in f5e28c9cc42 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/modules/home/pages/edge/edge-tabs.component.ts shares only the entity tabs component boilerplate. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 58bc88a8db4).", "contentHash": "sha256:774979b5f77b5d58e1d7dfabc31f6271a46cfa346b8f43e6bb18db92e0cb2429" }, @@ -1515,61 +1515,61 @@ }, { "path": "ui-ngx/src/app/modules/home/pages/converter/converter-tabs.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template converter-tabs.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/rulechain/rulechain-tabs.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob cd93367fc0cf1a7b4cdb66a7b2cbdebf54c6b9c4).", "contentHash": "sha256:a262251d15be697e4a048aefa756b376fd3cdca7093d3ff486f4e632c24d145c" }, { "path": "ui-ngx/src/app/modules/home/pages/converter/converter.module.ts", - "header": "pe-only", + "header": "busl", "reason": "Angular module/routing registration for a PE feature. Imports, declarations and routes select PE components using common Angular module scaffolding; no CE feature implementation is relocated. Reviewed candidate ui-ngx/src/app/modules/home/pages/asset/asset.module.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob d6dcf2b0b4232555f55d4ab649e8fe10b1dd1a2e).", "contentHash": "sha256:92d96e89c654fa7d0e000083169e992e709ed6a050ce180f71fa11970479bdb2" }, { "path": "ui-ngx/src/app/modules/home/pages/custom-menu/add-custom-menu-item-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template add-custom-menu-item-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/admin/oauth2/clients/client-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 168100e58624f5c65473ab68270ae19842eef2ea).", "contentHash": "sha256:9a924655c21da389103bb38a050aefc51c15440cc78dfa7ef35ca0061bfc86b6" }, { "path": "ui-ngx/src/app/modules/home/pages/custom-menu/custom-menu-is-assigned-dialog.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet custom-menu-is-assigned-dialog.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/components/entity/entity-filter.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 5b9bc415b1673aef9b04efc49fbba6e6e60f9542).", "contentHash": "sha256:8a466986f9717ef42218e90101e674dc0957d8ed808e2c70323d1aef92889b6c" }, { "path": "ui-ngx/src/app/modules/home/pages/custom-menu/custom-menu-item-panel.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet custom-menu-item-panel.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/mobile/bundes/layout/custom-mobile-page-panel.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 436a97786ff0da99ec5ba041f9bd1ac93d9ba9f1).", "contentHash": "sha256:e1a151ac24400139741d18b999c89ba128f89fc39fb465000a5a14c20fb4ad8d" }, { "path": "ui-ngx/src/app/modules/home/pages/custom-menu/default-menu-item-panel.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet default-menu-item-panel.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/mobile/bundes/layout/default-mobile-page-panel.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 2aa92b7fc991e197c659586893635c0161acacd7).", "contentHash": "sha256:f6c5562d4b8fde74a83b406f9216e33db4be95dc706029fea299686e4f0f1d9a" }, { "path": "ui-ngx/src/app/modules/home/pages/custom-menu/edit-custom-menu-name-panel.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet edit-custom-menu-name-panel.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/mobile/common/editor-panel.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob f25f26b1499b0d43cbcc272e7f5f96c1a916402d).", "contentHash": "sha256:4db1893e34f34d9dec7534d0a0b937a8a667a154cf10aa201beda605e7bf7de8" }, { "path": "ui-ngx/src/app/modules/home/pages/custom-translation/add-new-language-dialog.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet add-new-language-dialog.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/device/device-credentials-dialog.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 4fa7a8e072bf9c5a830b04cb8af04d6fd5dd6650).", "contentHash": "sha256:8f197828a805fb07ae43bd26c9ccc9b0eb676d2d3ea8fce41380f1bc4f98d615" }, { "path": "ui-ngx/src/app/modules/home/pages/dashboard/public-dashboard-link.dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/modules/home/pages/dashboard/make-dashboard-public-dialog.component.html, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:32d3a2ee42bc23949a121a100dc09125891341255f5c1cd8a0d69d447fc5f78d" }, { "path": "ui-ngx/src/app/modules/home/pages/dashboard/public-dashboard-link.dialog.component.ts", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/modules/home/pages/dashboard/make-dashboard-public-dialog.component.ts, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:07f295f637db24d600798215d33391f4e966954899f644a41b9735f5ed5392db" }, @@ -1581,271 +1581,271 @@ }, { "path": "ui-ngx/src/app/modules/home/pages/iframe/iframe-view.module.ts", - "header": "pe-only", + "header": "busl", "reason": "Angular module/routing registration for a PE feature. Imports, declarations and routes select PE components using common Angular module scaffolding; no CE feature implementation is relocated. Reviewed candidate ui-ngx/src/app/modules/home/pages/gateways/gateways.module.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 06642bcec58f37ba9aabcb21906cae8ea6882ef4).", "contentHash": "sha256:04319dafb2225682d3e837e066951ca560774754b002bf17e69949c44e40392f" }, { "path": "ui-ngx/src/app/modules/home/pages/integration/integration-tabs.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template integration-tabs.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/rulechain/rulechain-tabs.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob cd93367fc0cf1a7b4cdb66a7b2cbdebf54c6b9c4).", "contentHash": "sha256:04789ea4b1719b43a5a2d6e2a99732ca15f0e383e4ba9f0efd13f8f4fe8b5f22" }, { "path": "ui-ngx/src/app/modules/home/pages/integration/integrations-center.module.ts", - "header": "pe-only", + "header": "busl", "reason": "Angular module/routing registration for a PE feature. Imports, declarations and routes select PE components using common Angular module scaffolding; no CE feature implementation is relocated. Reviewed candidate ui-ngx/src/app/modules/home/pages/features/features.module.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 666a51c1c5c17a5371d1a917f7affd80727f3b24).", "contentHash": "sha256:47fe9e43f0f7eb6a01565c41e911ae9a451cab2bc27b03cfef45a074932f30ad" }, { "path": "ui-ngx/src/app/modules/home/pages/reporting/components/report-components.module.ts", - "header": "pe-only", + "header": "busl", "reason": "Angular module/routing registration for a PE feature. Imports, declarations and routes select PE components using common Angular module scaffolding; no CE feature implementation is relocated. Reviewed candidate ui-ngx/src/app/modules/home/pages/tenant-profile/tenant-profile.module.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob df9e721af53a3071547aceaacbda46ccf2473cbb).", "contentHash": "sha256:45d76d1fb0aaeb307752c285aa2f37b01ea21da4d41a0891a71ad1e65dbe311f" }, { "path": "ui-ngx/src/app/modules/home/pages/reporting/components/report-filter.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet report-filter.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/components/device/device-info-filter.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 3ae672c7127931e4e4319d5dc7e71141376f0748).", "contentHash": "sha256:da626900ef28ef02b905929e282ee584ca15bf67b4d4e459f70b08453411fca9" }, { "path": "ui-ngx/src/app/modules/home/pages/reporting/template/report-template-filter.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet report-template-filter.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/components/device/device-info-filter.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 3ae672c7127931e4e4319d5dc7e71141376f0748).", "contentHash": "sha256:dea9f1bf653bbcdce195758ffbc6ec4094fec81815ed56546bd87db12dc59744" }, { "path": "ui-ngx/src/app/modules/home/pages/reporting/template/report-template-tabs.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template report-template-tabs.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/admin/resource/resource-tabs.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 1d98f4be180a627825f67cd728c7573df21c460a).", "contentHash": "sha256:da2f62bffceff569b198cfa0d3c0e79bd48205d7b447570a29f2eda17e065f51" }, { "path": "ui-ngx/src/app/modules/home/pages/role/role-routing.module.ts", - "header": "pe-only", + "header": "busl", "reason": "Angular module/routing registration for a PE feature. Imports, declarations and routes select PE components using common Angular module scaffolding; no CE feature implementation is relocated. Reviewed candidate ui-ngx/src/app/modules/home/pages/asset/asset-routing.module.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 54d492c26c4155d0245f0bfc2fff83692134e37e).", "contentHash": "sha256:aa8d2de86008837f6dec87ce12ffbca38549a270a904a0527aa8889b78411ddf" }, { "path": "ui-ngx/src/app/modules/home/pages/role/role-tabs.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template role-tabs.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/rulechain/rulechain-tabs.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob cd93367fc0cf1a7b4cdb66a7b2cbdebf54c6b9c4).", "contentHash": "sha256:b2ae43c7b2ab71c5d5df9cd75ce6a1ff953e385309b7af81a9c600a38831d3c6" }, { "path": "ui-ngx/src/app/modules/home/pages/role/role-tabs.component.ts", - "header": "pe-only", + "header": "busl", "reason": "PE typed UI adapter role-tabs.component.ts. Reviewed implementation only registers the PE component, supplies typed framework inputs or constructs its PE configuration form; matching generic Angular/ThingsBoard component hooks are template use. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/user/user-tabs.component.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 298af6f0de496cda1e6df834eee45dd41bb9a23e).", "contentHash": "sha256:929f68d9553ebdc6f8f326503c0e5308cde763e18dedebd80a38d96c14a493a5" }, { "path": "ui-ngx/src/app/modules/home/pages/role/role.module.ts", - "header": "pe-only", + "header": "busl", "reason": "Angular module/routing registration for a PE feature. Imports, declarations and routes select PE components using common Angular module scaffolding; no CE feature implementation is relocated. Reviewed candidate ui-ngx/src/app/modules/home/pages/alarm/alarm.module.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 9438e743d19cc4234935fed2a42ef0d8e7b9558f).", "contentHash": "sha256:7d8e38e285631d2a7a74ba52a9eb1bc050101a9460df8d1e7d635242acde7fa3" }, { "path": "ui-ngx/src/app/modules/home/pages/rulechain/rulechains-table-config.ts", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/modules/home/pages/rulechain/rulechains-table-config.resolver.ts, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:f155dcd3181ac77f5a8ea303eeda6a8471b298c3cce8f496d2b4945630b3ed18" }, { "path": "ui-ngx/src/app/modules/home/pages/scheduler/scheduler.module.ts", - "header": "pe-only", + "header": "busl", "reason": "Angular module/routing registration for a PE feature. Imports, declarations and routes select PE components using common Angular module scaffolding; no CE feature implementation is relocated. Reviewed candidate ui-ngx/src/app/modules/home/pages/alarm/alarm.module.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 9438e743d19cc4234935fed2a42ef0d8e7b9558f).", "contentHash": "sha256:f508ee1debcd3c5ee023ebad3ee947341c1e95cdd7c88785cef9e03eb37e23fe" }, { "path": "ui-ngx/src/app/modules/home/pages/secret-storage/edit-secret-description-panel.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE secret storage description panel added in 77ae0916f57. The similar CE api-key/edit-api-key-description-panel.component.html was added later in fba08a32126 and derives from this PE component, not the reverse. Reviewed candidate at 317a75614137ab5ddd1aecef1abd4c2fcdcb8710 (blob 1a3f159af48).", "contentHash": "sha256:a3572174fc3c63d9389f20ea55a7c0219a67c6325bdc56ccb894048925f62978" }, { "path": "ui-ngx/src/app/modules/home/pages/secret-storage/edit-secret-description-panel.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet edit-secret-description-panel.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/mobile/common/editor-panel.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob f25f26b1499b0d43cbcc272e7f5f96c1a916402d).", "contentHash": "sha256:82f20a273c21c5170ff6f3ad9ff2324e603da4eb36459a51dcbc3895110cdebd" }, { "path": "ui-ngx/src/app/modules/home/pages/secret-storage/edit-secret-description-panel.component.ts", - "header": "pe-only", + "header": "busl", "reason": "PE secret storage description panel added in 77ae0916f57. The similar CE api-key/edit-api-key-description-panel.component.ts was added later in fba08a32126 and derives from this PE component, not the reverse. Reviewed candidate at 317a75614137ab5ddd1aecef1abd4c2fcdcb8710 (blob 8f05a755f4b).", "contentHash": "sha256:cf1053f3738a80ab4581710b5baa7019cd230e9ab1991334de6fdb599fa7fdfb" }, { "path": "ui-ngx/src/app/modules/home/pages/secret-storage/secret-storage-table-header.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template secret-storage-table-header.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/admin/oauth2/domains/domain-table-header.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 020f728f8f65de07090b5009fb2bc4bd6392bd42).", "contentHash": "sha256:091faa8d74ea1100ee5f053507ecddd0f9394b0062f7daabf388f65ed80b8303" }, { "path": "ui-ngx/src/app/modules/home/pages/secret-storage/secret-storage-table-header.component.ts", - "header": "pe-only", + "header": "busl", "reason": "PE typed UI adapter secret-storage-table-header.component.ts. Reviewed implementation only registers the PE component, supplies typed framework inputs or constructs its PE configuration form; matching generic Angular/ThingsBoard component hooks are template use. Reviewed CE candidate ui-ngx/src/app/modules/home/pages/admin/oauth2/domains/domain-table-header.component.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob ff947407912f1f20e387908f81b6793f6d63329d).", "contentHash": "sha256:83242ac9bc768c1ced27bcd492129edbd269bd51a22dc77a6a95d854148c20f5" }, { "path": "ui-ngx/src/app/modules/home/pages/task-manager/task-filter-config.component.scss", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/modules/home/components/alarm/alarm-filter-config.component.scss, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:61fa659a2477b7372421b810654383ac280f932ef41ab9b9ff912b8b5fcccae5" }, { "path": "ui-ngx/src/app/modules/home/pages/task-manager/task-manager-header.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE task manager page header stylesheet added in 61d991bde83. The candidate CE audit-log-header.component.scss matches only on generic host layout properties. Reviewed candidate at 317a75614137ab5ddd1aecef1abd4c2fcdcb8710 (blob 0d057f16ca9).", "contentHash": "sha256:c97d917157cdbed82ac411d7e6a69a1c8590ac8dedace15ad8b1959f917cb6bf" }, { "path": "ui-ngx/src/app/modules/signup/pages/signup/signup-dialog.component.html", - "header": "pe-only", + "header": "busl", "reason": "PE view template signup-dialog.component.html. Reviewed form fields, bindings and entity/component selection implement the PE feature; the candidate shares standard Material dialog/form/tab scaffolding rather than a CE feature implementation. Reviewed CE candidate ui-ngx/src/app/modules/home/components/entity/add-entity-dialog.component.html at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 955f8f58be2d9d462570164005f4a2ee693b0dd7).", "contentHash": "sha256:07fb450cc0a3d66a35fcb5e56089294ad1181e741f87eef9a76ae38cbbc74882" }, { "path": "ui-ngx/src/app/modules/signup/pages/signup/signup-dialog.component.scss", - "header": "pe-only", + "header": "busl", "reason": "PE component stylesheet signup-dialog.component.scss. Reviewed overlap consists of shared Material fieldset/panel/button typography, sizing, spacing or host-layout conventions; it does not identify a relocated CE component implementation. Curated as PE-specific UI template use. Reviewed CE candidate ui-ngx/src/app/shared/components/dialog/alert-dialog.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 47d8bacd5a1553261a5270fdbe20483feaefe019).", "contentHash": "sha256:4f7db5013f99b1ff93b7b52ed1ac046bffcc29c5b134e4ac94d58b231125b792" }, { "path": "ui-ngx/src/app/shared/components/role/group-permission-dialog.component.scss", - "header": "pe-only", + "header": "busl", "reason": "Empty :host selector in a PE component stylesheet. Identical empty selector boilerplate at multiple unrelated CE paths supplies no meaningful derivation evidence. Reviewed candidate ui-ngx/src/app/modules/home/components/relation/relation-dialog.component.scss at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 16bc26c7e2a0cc952ac46e0b6edd105c17c402c5).", "contentHash": "sha256:a5a5674d23eaffbd00a99169958c14939b326ad5a68a1c614c1d3dec1635ef2b" }, { "path": "ui-ngx/src/app/shared/components/role/group-permissions.component.scss", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/modules/home/components/relation/relation-table.component.scss, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:51982e085e708736d820e335c4a5e5680d0310242cc0d88924e4dd0df9d165d3" }, { "path": "ui-ngx/src/app/shared/components/secret-storage/secret-file-input.component.scss", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/shared/components/image/scada-symbol-input.component.scss, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:1f70e7b2aa179ef028828fc8ec07322cbc3030fd416c3998905b9bdad5b82fe0" }, { "path": "ui-ngx/src/app/shared/components/secret-storage/secrets-datasource.ts", - "header": "pe-only", + "header": "busl", "reason": "New PE file implementing a PE feature. It was written by adapting CE ui-ngx/src/app/modules/home/pages/admin/resource/resources-datasource.ts, which PE still carries at its own path, so this is not a CE file with PE modifications. Adaptation from CE does not make it CE-derived. Maintainer rule (2026-09-09): a file that exists in CE and carries PE changes is modified CE; a file that does not exist in CE and implements a PE feature is PE-only, however closely it resembles a CE file.", "contentHash": "sha256:835c6fa6c2148c1559c789560141edc94266081bb7a0e40b5eafe0ae3c5c8e5c" }, { "path": "ui-ngx/src/app/shared/models/id/agent-app-event-id.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent id model added in d4b8d886666 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/shared/models/id/api-key-id.ts shares only the id model boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 4fdaf78cc8c).", "contentHash": "sha256:5394bb91dcfa542c6b1ed9b66b02cdfa9c39cf9040ace8a82b549a934439e53a" }, { "path": "ui-ngx/src/app/shared/models/id/agent-app-profile-id.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent id model added in d4b8d886666 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/shared/models/id/api-key-id.ts shares only the id model boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 4fdaf78cc8c).", "contentHash": "sha256:c98507fd6db9721528ca966240c425e4912fced4c75946287128e0f6443570a5" }, { "path": "ui-ngx/src/app/shared/models/id/agent-app-unit-id.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent id model added in d4b8d886666 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/shared/models/id/api-key-id.ts shares only the id model boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 4fdaf78cc8c).", "contentHash": "sha256:0fc9b5ff2357b5a4c0cfef0b8587e06b729af597171b3ef3176b896fe10dadaa" }, { "path": "ui-ngx/src/app/shared/models/id/agent-application-id.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent id model added in d4b8d886666 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/shared/models/id/api-key-id.ts shares only the id model boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 4fdaf78cc8c).", "contentHash": "sha256:b9e4599aa9331025fd1d3acdc0e5517b9fdb5da1de42a53191403ac309910e86" }, { "path": "ui-ngx/src/app/shared/models/id/agent-bulk-action-id.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent id model added in d4b8d886666 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/shared/models/id/api-key-id.ts shares only the id model boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 4fdaf78cc8c).", "contentHash": "sha256:d296382d0c5b61cb4dbd838d76723dcb55ab076a9723fbbfe0adef69cd773caf" }, { "path": "ui-ngx/src/app/shared/models/id/agent-id.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent id model added in d4b8d886666 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/shared/models/id/edge-id.ts shares only the id model boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob d498fac3fd4).", "contentHash": "sha256:f506cf21dbc6beb6dca58fec54c94b930b24acd67d493d71480372414795a6a4" }, { "path": "ui-ngx/src/app/shared/models/id/agent-profile-id.ts", - "header": "pe-only", + "header": "busl", "reason": "PE agent id model added in 6c303b45f74 as part of the PE agent feature introduced on lts-4.4, which has no counterpart in CE. The candidate CE ui-ngx/src/app/shared/models/id/api-key-id.ts shares only the id model boilerplate for a different entity type. Reviewed candidate at a0aff29ef42d3636473b017115a9334b48d54d15 (blob 4fdaf78cc8c).", "contentHash": "sha256:94e21066461722c588d1236d7987d56d401bc6db57c988d7bdcede47f69f6d59" }, { "path": "ui-ngx/src/app/shared/models/id/blob-entity-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:fbc3242e2779a0efef79b7eb712a9ea7d8a005cfd1e8911b04ac519550a9e4b8" }, { "path": "ui-ngx/src/app/shared/models/id/converter-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:026023794900881beb9d750c09677069e168c2d2197c8761c984025634bae9d3" }, { "path": "ui-ngx/src/app/shared/models/id/custom-menu-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/audit-log-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 0b71456990b38a79ab3ca4b7a16ddb14028b7826).", "contentHash": "sha256:64061a7b1ea13d059e6d5b0540f09cd92fbe4579b1e4ae723ccce406d4be29a6" }, { "path": "ui-ngx/src/app/shared/models/id/entity-group-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:67845a93ddf3538fcfa441462dcee91323a919ba7ddc1976893d990c5c7f75a2" }, { "path": "ui-ngx/src/app/shared/models/id/group-permission-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:a7da045fd161a17762972c7ee408ce1451fe0c49e57eb9a1442cdf57df826990" }, { "path": "ui-ngx/src/app/shared/models/id/integration-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:b9c27683121e76bdc532adaac53358ad580773a1d1eed8976f4d55bf6e80ebfc" }, { "path": "ui-ngx/src/app/shared/models/id/job-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/rpc-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob aec7fdfd20624ec695fc1e9887a8d1b2a71a7b08).", "contentHash": "sha256:01cfdef0179068bc653191fa66379c1f11cf26cdd7217f698d49b8402f65ce94" }, { "path": "ui-ngx/src/app/shared/models/id/report-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:70dc05081708c87753a03174402e008fe78a7200f08c6d10b7f400d4f38f9aa4" }, { "path": "ui-ngx/src/app/shared/models/id/report-template-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:892ed8adcc467a827946c4bf2ff276b08d3bc75305e86dc9edf5c7022b067ad9" }, { "path": "ui-ngx/src/app/shared/models/id/role-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/user-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 74174fe25b19f9abd2bea3a8b5f5740ce005566b).", "contentHash": "sha256:9179b142fe0c7f3ef567afcef917dd4822b04652802aa9fb20b98bca725d116b" }, { "path": "ui-ngx/src/app/shared/models/id/scheduler-event-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:9a8cf3df121815fd26f958ed542b2ee6b064c7671c234652b9615eba1b5aa662" }, { "path": "ui-ngx/src/app/shared/models/id/secret-storage-id.ts", - "header": "pe-only", + "header": "busl", "reason": "ID wrapper for a PE-only entity. Maintainer resolved ConverterId and comparable PE-only entity wrappers as PE-authored; extending the common ID type and repeating its annotations/type tag is template use. Reviewed similarity candidate ui-ngx/src/app/shared/models/id/asset-id.ts at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 86ca874a92346a950b6912d78116f1f7ee6bb654).", "contentHash": "sha256:5427b1c6bf59f9e9372c47717fee96bf94bddeaf65ad920b77647b16539bf5f9" } diff --git a/tools/src/main/python/license-headers/test_check_license_headers.py b/tools/src/main/python/license-headers/test_check_license_headers.py index e017fad801..88968a1b91 100644 --- a/tools/src/main/python/license-headers/test_check_license_headers.py +++ b/tools/src/main/python/license-headers/test_check_license_headers.py @@ -54,72 +54,91 @@ class GitFixture: class DecisionTests(unittest.TestCase): + VERSION = {"path": "a.java", "ref": "b" * 40, "blob": "c" * 40} + COPY = {"path": "source.java", "ref": "a" * 40, "blob": "c" * 40, "similarity": 78} + def decide(self, **changes): - evidence = dict(path="a.java", content_hash=p.raw_hash(b"reviewed"), current="pe-only", curation=None, - inherited=True, recreated=False, ce_hash="same", pe_hash="same", - candidates=[], historical=[], in_comparison=True) + evidence = dict(path="a.java", content_hash=p.raw_hash(b"reviewed"), current=p.NON_CE, + ce_versions=(self.VERSION,), identical=self.VERSION) return p.decide(p.Evidence(**(evidence | changes))) + def new(self, **changes): + return self.decide(**(dict(ce_versions=(), identical=None) | changes)) + def test_current_header_does_not_establish_origin(self): row = self.decide() - self.assertEqual("apache", row["expectedHeader"]) - self.assertEqual("mismatch", row["status"]) - self.assertEqual("ce-modified", self.decide(pe_hash="changed")["expectedHeader"]) + self.assertEqual(("mismatch", "apache"), (row["status"], row["expectedHeader"])) + self.assertEqual(self.VERSION, row["identicalTo"]) + row = self.decide(identical=None) + self.assertEqual(("ce-modified", "same path in CE, content differs"), (row["expectedHeader"], row["reason"])) + self.assertEqual([self.VERSION], row["ceVersions"]) + + def test_clean_merge_of_ce_versions_is_apache(self): + merge = {"path": "a.java", "merge": ["b" * 40, "d" * 40], "base": "e" * 40} + row = self.decide(current="apache", identical=merge) + self.assertEqual(("match", "apache"), (row["status"], row["expectedHeader"])) + self.assertEqual("same path in CE, content identical to a clean merge of its CE versions", row["reason"]) + self.assertEqual(merge, row["identicalTo"]) + + def test_new_path_without_ce_evidence_is_non_ce(self): + row = self.new() + self.assertEqual(("match", p.NON_CE, "not in CE, no CE evidence"), + (row["status"], row["expectedHeader"], row["reason"])) + + def test_ce_evidence_for_a_new_path_needs_a_decision(self): + row = self.new(copies=(self.COPY,)) + self.assertEqual(("unresolved", None, None), (row["status"], row["expectedHeader"], row["suggestedHeader"])) + self.assertEqual([self.COPY], row["copyCandidates"]) + self.assertEqual("apache", self.new(copies=(self.COPY | {"similarity": 100},))["suggestedHeader"]) + deleted = {"path": "a.java", "ref": "f" * 40 + "^1", "blob": "c" * 40} + row = self.new(deleted=deleted) + self.assertEqual(("unresolved", "CE history had this path"), (row["status"], row["reason"])) + self.assertEqual(deleted, row["historicalCandidate"]) + + def test_descriptor_of_a_module_absent_in_ce_is_non_ce_despite_similar_ce_descriptors(self): + copy = self.COPY | {"path": "transport/mqtt/pom.xml"} + descriptor = dict(path="integration/mqtt/pom.xml", copies=(copy,), directory_in_ce=False) + row = self.new(**descriptor) + self.assertEqual(("match", p.NON_CE), (row["status"], row["expectedHeader"])) + for evidence in (dict(directory_in_ce=True), + dict(path="integration/mqtt/Mqtt.java"), + dict(copies=(copy | {"similarity": 100},)), + dict(deleted={"path": "integration/mqtt/pom.xml", "ref": "f" * 40, "blob": "c" * 40})): + self.assertEqual("unresolved", self.new(**(descriptor | evidence))["status"], evidence) def test_matching_curation_precedes_inference(self): - curation = dict(contentHash=p.raw_hash(b"reviewed"), header="pe-only", reason="Independent replacement") - self.assertEqual("match", self.decide(curation=curation)["status"]) + curation = dict(contentHash=p.raw_hash(b"reviewed"), header="ce-modified", reason="Reviewed") + row = self.decide(current="ce-modified", curation=curation) + self.assertEqual(("match", "ce-modified", "curation: Reviewed"), + (row["status"], row["expectedHeader"], row["reason"])) + self.assertNotIn("redundantCuration", row) + row = self.new(copies=(self.COPY,), curation=curation | {"header": p.NON_CE}) + self.assertEqual(("match", p.NON_CE), (row["status"], row["expectedHeader"])) + self.assertNotIn("redundantCuration", row) curation["contentHash"] = p.raw_hash(b"different") self.assertEqual("stale-curation", self.decide(curation=curation)["status"]) - def test_recreated_and_missing_ce_files_do_not_silently_pass(self): - self.assertEqual("unresolved", self.decide(recreated=True)["status"]) - row = self.decide(inherited=False, in_comparison=False, ce_hash=None) - self.assertEqual("unresolved", row["status"]) - self.assertEqual("pe-only", row["suggestedHeader"]) - self.assertIsNone(row["expectedHeader"]) - - def test_identical_cross_path_source_is_not_proof(self): - row = self.decide(inherited=False, candidates=[{"path": "original.java"}]) - self.assertEqual("unresolved", row["status"]) - self.assertEqual("apache", row["suggestedHeader"]) - - def test_pe_additions_pass_without_strong_ce_evidence(self): - added = dict(inherited=False, in_comparison=False, ce_hash=None, pe_addition=True) - self.assertEqual("match", self.decide(**added)["status"]) - self.assertEqual("match", self.decide(**added, historical=[{"path": "other/a.java"}])["status"]) - for evidence in (dict(historical=[{"path": "a.java"}]), - dict(historical=[{"path": "other/a.java", "contentMatches": True}]), - dict(copies=[{"path": "other.java", "similarity": 78}])): - self.assertEqual("unresolved", self.decide(**added, **evidence)["status"]) - - def test_descriptor_of_a_module_absent_in_ce_is_pe_only_despite_similar_ce_descriptors(self): - descriptor = dict(path="integration/mqtt/pom.xml", inherited=False, in_comparison=False, ce_hash=None, - pe_addition=True, copies=[{"path": "transport/mqtt/pom.xml", "similarity": 78}], - directory_in_ce=False) - row = self.decide(**descriptor) - self.assertEqual("match", row["status"]) - self.assertEqual("pe-only", row["expectedHeader"]) - for evidence in (dict(directory_in_ce=True), - dict(path="integration/mqtt/Mqtt.java"), - dict(pe_addition=False), - dict(candidates=[{"path": "transport/mqtt/pom.xml"}]), - dict(historical=[{"path": "transport/mqtt/pom.xml", "contentMatches": True}])): - self.assertEqual("unresolved", self.decide(**(descriptor | evidence))["status"]) + def test_curation_that_repeats_the_inferred_header_is_redundant(self): + curation = dict(contentHash=p.raw_hash(b"reviewed"), header="apache", reason="Reviewed") + row = self.decide(current="apache", curation=curation) + self.assertEqual(("match", "apache", "same path in CE, content identical", True), + (row["status"], row["expectedHeader"], row["reason"], row["redundantCuration"])) + row = self.new(curation=curation | {"header": p.NON_CE}) + self.assertTrue(row["redundantCuration"]) def test_console_groups_findings_by_required_action(self): missing = self.decide(current=p.MISSING) foreign = self.decide(path="vendored.java", current=p.FOREIGN) - candidate = {"path": "original.java", "ref": "b" * 40, "blob": "c" * 40} - renamed = self.decide(path="new.java", inherited=False, candidates=[candidate, candidate]) - copied = self.decide(path="copied.java", inherited=False, in_comparison=False, ce_hash=None, - copies=[{"path": "source.java", "ref": "a" * 40, "similarity": 78}]) - changed = self.decide(curation=dict(contentHash=p.raw_hash(b"other"), header="pe-only", reason="Reviewed")) + copied = self.new(path="copied.java", copies=(self.COPY, self.COPY | {"path": "other.java", "similarity": 60})) + historical = self.new(path="gone.java", deleted={"path": "gone.java", "ref": "d" * 40 + "^1", "blob": "c" * 40}) + changed = self.decide(curation=dict(contentHash=p.raw_hash(b"other"), header=p.NON_CE, reason="Reviewed")) clean = self.decide(path="clean.java", current="apache") + redundant = self.decide(path="curated.java", current="apache", + curation=dict(contentHash=p.raw_hash(b"reviewed"), header="apache", reason="Reviewed")) orphaned = dict(path="deleted.java", status="stale-curation", reason="file is no longer in scope") stderr, stdout = io.StringIO(), io.StringIO() with redirect_stderr(stderr), redirect_stdout(stdout): - rows = [missing, foreign, renamed, copied, changed, clean] + rows = [missing, foreign, copied, historical, changed, clean, redundant] p.print_findings(rows, [orphaned], {"a" * 40: "ce/lts-4.2"}) p.print_summary(rows, [orphaned], "target/report.json") output = stderr.getvalue() @@ -135,13 +154,13 @@ class DecisionTests(unittest.TestCase): → Rerun with --fix to restamp automatically Needs a decision (2) - new.java - has pe-only, no expected header yet (hint: apache) - exact CE match: original.java at {"b" * 11} - another 1 candidate in the report copied.java - has pe-only, no expected header yet + has {p.NON_CE}, no expected header yet similar CE file (78%): source.java at ce/lts-4.2 + another 1 candidate in the report + gone.java + has {p.NON_CE}, no expected header yet + CE history: gone.java at {"d" * 11}^1 → Decide the origin and add a curation, see {p.README} Stale curations (2) @@ -149,12 +168,31 @@ class DecisionTests(unittest.TestCase): file changed since the curation, re-review and update contentHash deleted.java file is no longer in scope - → Remove or update the entry in {p.CURATIONS} + → Review the file and update the entry in {p.CURATIONS}; --fix removes entries of files no longer in scope - 6 findings in 6 files. Report: target/report.json + Redundant curations (1) + curated.java + curated apache, the check decides apache by itself + → Rerun with --fix to remove them from {p.CURATIONS} + + 6 findings in 7 files. Report: target/report.json """), output) self.assertEqual("", stdout.getvalue()) + def test_orphaned_curations_alone_point_to_fix(self): + orphaned = dict(path="deleted.java", status="stale-curation", reason="file is no longer in scope") + stderr = io.StringIO() + with redirect_stderr(stderr): + p.print_findings([self.decide(current="apache")], [orphaned], {}) + self.assertIn(" → Rerun with --fix to remove them\n", stderr.getvalue()) + + def test_console_lists_removed_curations(self): + stderr = io.StringIO() + with redirect_stderr(stderr): + p.print_removed_curations([{"path": "a.java", "reason": "file is no longer in scope"}]) + p.print_removed_curations([]) + self.assertEqual("Removed curations (1)\n a.java\n file is no longer in scope\n\n", stderr.getvalue()) + def test_console_closes_an_interrupted_phase_before_reporting(self): stderr = io.StringIO() with redirect_stderr(stderr): @@ -164,7 +202,7 @@ class DecisionTests(unittest.TestCase): self.assertEqual("Resolving Git history ... failed\n\nError: boom\n", stderr.getvalue()) def test_console_summarizes_a_clean_run(self): - rows = [self.decide(current="apache"), self.decide(path="b.java", pe_hash="changed", current="ce-modified")] + rows = [self.decide(current="apache"), self.decide(path="b.java", identical=None, current="ce-modified")] stderr = io.StringIO() with redirect_stderr(stderr): p.print_restamped(rows) @@ -173,7 +211,7 @@ class DecisionTests(unittest.TestCase): "Report: target/report.json\n", stderr.getvalue()) def test_console_lists_restamped_files(self): - rows = [self.decide(current="apache"), self.decide(path="b.java", pe_hash="changed", current="ce-modified")] + rows = [self.decide(current="apache"), self.decide(path="b.java", identical=None, current="ce-modified")] rows[1]["previousHeader"] = p.LEGACY stderr = io.StringIO() with redirect_stderr(stderr): @@ -297,11 +335,26 @@ class InputTests(unittest.TestCase): write([entry]) self.assertEqual({"a.java"}, set(p.load_curations(path))) for entries in ([entry, entry], [entry | {"reason": " "}], - [entry | {"path": "../a.java"}], [entry | {"header": "MIT"}]): + [entry | {"path": "../a.java"}], [entry | {"header": "MIT"}], + [entry | {"header": "pe-only"}]): write(entries) with self.assertRaises(p.Failure): p.load_curations(path) + def test_non_ce_header_is_the_only_other_template(self): + directory = temporary_directory(self) + for name in ("license-header.txt", "license-header-ce-modified.txt", "notes.txt"): + (directory / name).write_text("header\n") + with self.assertRaises(RuntimeError): + p.non_ce_header(directory) + (directory / "license-header-busl.txt").write_text("header\n") + self.assertEqual("busl", p.non_ce_header(directory)) + (directory / "license-header-pe.txt").write_text("header\n") + with self.assertRaises(RuntimeError): + p.non_ce_header(directory) + self.assertEqual(f"{p.TEMPLATE_DIRECTORY}/license-header-{p.NON_CE}.txt", p.TEMPLATES[p.NON_CE]) + self.assertTrue((this_repository() / p.TEMPLATES[p.NON_CE]).is_file()) + def test_plugin_version_and_configuration_come_from_root_pom(self): repo = temporary_directory(self) p.git(repo, "init") @@ -341,33 +394,105 @@ class GitHistoryTests(unittest.TestCase): self.assertEqual({initial, merged}, {change.commit for change in changes}) self.assertEqual(source, changes[0].path) - git("checkout", "side") - git.write("side-only.java", "not integrated\n") - git.commit("side only") - git("checkout", "lts-4.2") - self.assertNotIn("side-only.java", {change.path for change in p.history(git.root, "HEAD")}) - git("rm", source) git.commit("delete") - deleted = p.history(git.root, "HEAD")[0] - self.assertTrue(deleted.deleted) - self.assertEqual(b"merged result\n", p.blobs(git.root, [deleted.old])[deleted.old]) - - def test_integration_boundary_does_not_walk_preintegration_pe_history(self): + deleted = p.history(git.root, "HEAD", "--diff-filter=D") + self.assertEqual(["D"], [change.status for change in deleted]) + self.assertEqual(b"merged result\n", p.blobs(git.root, [deleted[0].old])[deleted[0].old]) + + def relicensed_fixture(self): + git = GitFixture(temporary_directory(self), "master") + git.write("Base.java", "base\n") + git.commit("CE base") + git("checkout", "-b", "lts-4.3") + git.write("Fix.java", "lts fix\n") + fix = git.commit("CE fix") + git("checkout", "master") + git.write("Feature.java", "CE feature\n") + last = git.commit("last Apache commit") + git.write("Tb.java", "TB feature\n") + relicensing = git.commit("relicensing") + git("merge", "--no-ff", "lts-4.3", "-m", "integrate CE fix") + return git, fix, last, relicensing + + def test_relicensed_ce_bases_are_the_latest_ce_commits_merged_into_the_branch(self): + git, fix, last, relicensing = self.relicensed_fixture() + with patch.object(p, "RELICENSING_COMMIT", relicensing): + self.assertEqual(sorted([fix, last]), p.relicensed_ce_bases(git.root, git("rev-parse", "HEAD"))) + git("checkout", "lts-4.3") + git.write("Fix.java", "second lts fix\n") + second = git.commit("second CE fix") + git("checkout", "master") + self.assertEqual(sorted([fix, last]), p.relicensed_ce_bases(git.root, git("rev-parse", "HEAD"))) + git("merge", "--no-ff", "lts-4.3", "-m", "integrate second CE fix") + self.assertEqual(sorted([second, last]), p.relicensed_ce_bases(git.root, git("rev-parse", "HEAD"))) + self.assertEqual([last], p.relicensed_ce_bases(git.root, relicensing)) + + def test_relicensed_ce_bases_need_the_relicensing_commit_in_history(self): + git, _, _, relicensing = self.relicensed_fixture() + with patch.object(p, "RELICENSING_COMMIT", relicensing), self.assertRaisesRegex(p.Failure, "Pass --ce-ref"): + p.relicensed_ce_bases(git.root, git("rev-parse", "lts-4.3")) + with patch.object(p, "RELICENSING_COMMIT", "0" * 40), self.assertRaisesRegex(p.Failure, "Pass --ce-ref"): + p.relicensed_ce_bases(git.root, git("rev-parse", "HEAD")) + + def test_merged_ce_bases_follow_the_integrated_ce_commit(self): git = GitFixture(temporary_directory(self), "ce") - git.write("initial", "initial") - git.commit("initial") - git("branch", "pe") - git.write("ce-file", "CE") - anchor = git.commit("CE addition") - git("checkout", "pe") - git.write("pe-file", "PE") - git.commit("PE addition") - git("merge", "ce", "-m", "CE integration") - boundary = git("rev-parse", "HEAD") - git.write("pe-file", "PE edit") - git.commit("PE edit") - self.assertEqual(boundary, p.integration_boundary(git.root, anchor, "HEAD")) + git.write("Base.java", "base\n") + git.commit("CE base") + git("checkout", "-b", "integrating") + git.write("Own.java", "own\n") + git.commit("own addition") + git("checkout", "ce") + git.write("Base.java", "CE fix\n") + integrated = git.commit("CE fix") + git("checkout", "integrating") + git("merge", "--no-ff", "ce", "-m", "integrate CE") + git("checkout", "ce") + git.write("Base.java", "later CE fix\n") + tip = git.commit("not yet integrated") + self.assertEqual([integrated], p.merged_ce_bases(git.root, git("rev-parse", "integrating"), tip)) + git("checkout", "--orphan", "unrelated") + git.write("Other.java", "other\n") + unrelated = git.commit("unrelated history") + with self.assertRaisesRegex(p.Failure, "shares no history"): + p.merged_ce_bases(git.root, unrelated, tip) + + def test_lineage_records_first_parent_ce_deletions(self): + git = GitFixture(temporary_directory(self), "ce") + git.write("Gone.java", "removed from CE\n") + git.write("Kept.java", "kept\n") + git.commit("CE base") + git("checkout", "-b", "side") + git.write("Temporary.java", "never on the mainline\n") + git.commit("side addition") + git("rm", "Temporary.java") + git.commit("side removal") + git("checkout", "ce") + git("merge", "--no-ff", "side", "-m", "integrate side") + git("rm", "Gone.java") + removal = git.commit("CE removal") + lineage = p.Lineage.load(git.root, removal, [removal]) + self.assertEqual({"Gone.java"}, set(lineage.deleted)) + self.assertEqual(removal + "^1", lineage.deleted["Gone.java"]["ref"]) + self.assertEqual(b"removed from CE\n", p.blobs(git.root, [lineage.deleted["Gone.java"]["blob"]]) + [lineage.deleted["Gone.java"]["blob"]]) + self.assertEqual([(removal, git("rev-parse", f"{removal}:Kept.java"))], lineage.versions("Kept.java")) + self.assertEqual([], lineage.versions("Gone.java")) + + def test_merge_blobs_returns_only_clean_merges(self): + git = GitFixture(temporary_directory(self), "main") + git.write("File.java", "one\ntwo\nthree\nfour\nfive\n") + git.commit("base") + base = git("rev-parse", "HEAD:File.java") + + def blob(content): + git.write("File.java", content) + git.commit(content.splitlines()[0]) + return git("rev-parse", "HEAD:File.java") + + ours, theirs = blob("ONE\ntwo\nthree\nfour\nfive\n"), blob("one\ntwo\nthree\nfour\nFIVE\n") + self.assertEqual(b"ONE\ntwo\nthree\nfour\nFIVE\n", p.merge_blobs(git.root, ours, base, theirs)) + self.assertIsNone(p.merge_blobs(git.root, ours, base, blob("uno\ntwo\nthree\nfour\nfive\n"))) def test_ignore_filter_keeps_tracked_and_unignored_files(self): repo = temporary_directory(self) @@ -393,10 +518,10 @@ class GitHistoryTests(unittest.TestCase): original = b"class Source {\n" + b" void action() { doUsefulWork(); }\n" * 20 + b"}\n" tool.add(source, "Source.java", original) tool.add(empty, "Empty.java", b"\n") - tool.add(("pe", "Renamed.java"), "Renamed.java", + tool.add(("head", "Renamed.java"), "Renamed.java", original.replace(b"Source", b"Renamed").replace(b"\n", b"\r\n")) - tool.add(("pe", "Other.java"), "Other.java", b"independent PE implementation\n") - tool.add(("pe", "Blank.java"), "Blank.java", b"\r\n") + tool.add(("head", "Other.java"), "Other.java", b"independent implementation\n") + tool.add(("head", "Blank.java"), "Blank.java", b"\r\n") found = p.normalized_copies(tool, {source: "selected-mainline", empty: "selected-mainline"}, ["Renamed.java", "Other.java", "Blank.java"], tool.nonempty()) self.assertEqual({"Renamed.java"}, set(found)) @@ -412,19 +537,19 @@ class FetchTests(unittest.TestCase): self.ce("tag", "-a", "v4.2.0", "-m", "release") self.ce.write("Base.java", "second\n") self.second = self.ce.commit("second") - self.pe = GitFixture(temporary_directory(self), "pe") - self.pe.write("Pe.java", "pe\n") - self.pe.commit("pe base") + self.local = GitFixture(temporary_directory(self), "main") + self.local.write("Own.java", "own\n") + self.local.commit("own base") def fetch(self, ref): - return p.fetch(self.pe.root, str(self.ce.root), ref) + return p.fetch(self.local.root, str(self.ce.root), ref) def test_fetches_branches_tags_and_commits(self): self.assertEqual(self.second, self.fetch("lts-4.2")) self.assertEqual(self.second, self.fetch("refs/heads/lts-4.2")) self.assertEqual(self.first, self.fetch("v4.2.0")) self.assertEqual(self.first, self.fetch(self.first)) - self.assertEqual("second", self.pe("show", f"{self.second}:Base.java")) + self.assertEqual("second", self.local("show", f"{self.second}:Base.java")) def test_every_run_fetches_the_current_tip(self): self.assertEqual(self.second, self.fetch("lts-4.2")) @@ -440,33 +565,39 @@ class FetchTests(unittest.TestCase): class CheckCommandTests(unittest.TestCase): + LINES = "".join(f"line {index}\n" for index in range(10)) + def setUp(self): self.repo = temporary_directory(self) - self.git = git = GitFixture(self.repo, "lts-4.2") - self.body = "new CE feature implementation\n" * 20 - git.write("Base.java", "base implementation\n") - git.commit("release base") - git("branch", "pe") - git("checkout", "-b", "fix/my-fix") - git.write("Feature.java", self.body) - git.write("Deleted.java", "historical CE feature source\n") - git.commit("CE fix sources") - git("rm", "Deleted.java") - self.feature = git.commit("remove temporary source") - git("checkout", "-b", "unrelated", "lts-4.2") - git.write("Unrelated.java", "unrelated source\n") - git.commit("unrelated source") - git("checkout", "pe") - git.write("Renamed.java", fixture("pe-only") + self.body) - git.write("Deleted.java", fixture("pe-only") + "historical CE feature source\n") - git.write("Local.java", fixture("pe-only") + "unrelated source\n") - git.write("Swapped.java", fixture("apache") + "swapped source\n") + self.git = git = GitFixture(self.repo, "master") + self.body = "CE source implementation\n" * 20 + git.write(".gitignore", "target/\n") for category, name in p.TEMPLATES.items(): git.write(name, f"fixture {category}\n") git.write(p.CURATIONS, '{"schemaVersion": 1, "curations": []}') + git.write("Base.java", fixture("apache") + "base implementation\n") + git.write("Changed.java", fixture("apache") + "CE implementation\n") + git.write("Merged.java", fixture("apache") + self.LINES) + git.write("Source.java", fixture("apache") + self.body) + self.base = git.commit("CE base") + git("checkout", "-b", "lts-4.3") + git.write("Merged.java", fixture("apache") + self.LINES.replace("line 9", "lts fix")) + git.write("Fixed.java", fixture("apache") + "lts addition\n") + self.fix = git.commit("CE fix") + git("checkout", "master") + git.write("Deleted.java", fixture("apache") + "removed CE source\n") + self.addition = git.commit("CE addition") + git.write("Merged.java", fixture("apache") + self.LINES.replace("line 0", "master change")) + git("rm", "-q", "Deleted.java") + self.last = git.commit("last Apache commit") + git.write("Changed.java", fixture("ce-modified") + "CE implementation\nTB change\n") + git.write("New.java", fixture(p.NON_CE) + "TB feature\n") + self.relicensing = git.commit("relicensing") + git("merge", "--no-ff", "lts-4.3", "-m", "integrate CE fix") + self.scope = ["Base.java", "Changed.java", "Fixed.java", "Merged.java", "New.java", "Source.java"] self.output = self.repo / "target/report.json" - def check(self, ref, scope, fix=False): + def check(self, *args, scope=None): def recognized(content): for header in p.TEMPLATES: if content.startswith(fixture(header).encode()): @@ -483,30 +614,134 @@ class CheckCommandTests(unittest.TestCase): def strip_headers(tool): tool.removed = {key: split(body)[0] for key, body in tool.contents.items()} tool.stacked = set() - return {key: p.comparison_hash(split(body)[1]) for key, body in tool.contents.items()} + for key, body in list(tool.contents.items()): + tool.write(key, split(body)[1]) + return {key: p.comparison_hash(body) for key, body in tool.contents.items()} def restamp(tool, expected): for key, header in expected.items(): (tool.root / tool.paths[key]).write_bytes(fixture(header).encode() + split(tool.contents[key])[1]) return {key: (tool.root / tool.paths[key]).read_bytes() for key in expected}, {} + stderr = io.StringIO() with (patch.object(p.Path, "cwd", return_value=self.repo), + patch.object(p, "RELICENSING_COMMIT", self.relicensing), patch.object(p, "read_plugin", return_value=fixture_plugin()), - patch.object(p, "discover_scope", return_value=p.Scope(scope, [], [], 0)), + patch.object(p, "discover_scope", return_value=p.Scope(scope or self.scope, [], [], 0)), patch.object(p.Mycila, "current_headers", current_headers), patch.object(p.Mycila, "strip_headers", strip_headers), patch.object(p.Mycila, "restamp", restamp), - redirect_stdout(io.StringIO()), redirect_stderr(io.StringIO())): - code = p.main(["check", "--ce-ref", ref, "--ce-remote", str(self.repo), "--output", str(self.output)] - + (["--fix"] if fix else [])) - return code, json.loads(self.output.read_text()) + redirect_stdout(io.StringIO()), redirect_stderr(stderr)): + code = p.main(["check", "--output", str(self.output), *args]) + report = json.loads(self.output.read_text()) if self.output.exists() else None + return code, report, stderr.getvalue() - def test_matching_mainline_passes(self): - code, report = self.check("lts-4.2", ["Renamed.java", "Deleted.java", "Local.java"]) + def rows(self, report): + return {row["path"]: row for row in report["files"]} + + def test_relicensed_branch_passes(self): + code, report, _ = self.check() self.assertEqual(0, code) - self.assertEqual({"match": 3}, report["summary"]) - self.assertEqual({"remote": str(self.repo), "input": "lts-4.2", "commit": self.git("rev-parse", "lts-4.2")}, - report["ceComparison"]) + self.assertEqual({"match": 6}, report["summary"]) + bases = sorted([self.fix, self.last]) + self.assertEqual({"relicensingCommit": self.relicensing, "bases": bases}, report["ce"]) + rows = self.rows(report) + self.assertEqual({"Base.java": "apache", "Changed.java": "ce-modified", "Fixed.java": "apache", + "Merged.java": "apache", "New.java": p.NON_CE, "Source.java": "apache"}, + {name: row["expectedHeader"] for name, row in rows.items()}) + self.assertEqual({"path": "Merged.java", "merge": bases, "base": self.base}, rows["Merged.java"]["identicalTo"]) + self.assertEqual({"path": "Fixed.java", "ref": self.fix, "blob": self.git("rev-parse", f"{self.fix}:Fixed.java")}, + rows["Fixed.java"]["identicalTo"]) + + def test_fix_restamps_decided_headers_only(self): + self.git.write("Base.java", FOREIGN_LINE.decode() + "base implementation\n") + self.git.write("New.java", fixture("apache") + "TB feature\n") + shortened = self.body.replace("CE source implementation\n", "", 1) + self.git.write("Source.java", fixture("apache") + shortened) + code, report, _ = self.check() + self.assertEqual(1, code) + self.assertEqual({"match": 3, "mismatch": 3}, report["summary"]) + rows = self.rows(report) + self.assertEqual((p.FOREIGN, "apache"), (rows["Base.java"]["currentHeader"], rows["Base.java"]["expectedHeader"])) + self.assertEqual(("apache", p.NON_CE), (rows["New.java"]["currentHeader"], rows["New.java"]["expectedHeader"])) + self.assertEqual(("apache", "ce-modified"), + (rows["Source.java"]["currentHeader"], rows["Source.java"]["expectedHeader"])) + + code, report, _ = self.check("--fix") + + self.assertEqual(1, code) + self.assertEqual(["New.java", "Source.java"], report["restamped"]) + self.assertEqual({"match": 5, "mismatch": 1}, report["summary"]) + self.assertEqual(fixture(p.NON_CE) + "TB feature\n", (self.repo / "New.java").read_text()) + self.assertEqual(fixture("ce-modified") + shortened, (self.repo / "Source.java").read_text()) + self.assertEqual(FOREIGN_LINE.decode() + "base implementation\n", (self.repo / "Base.java").read_text()) + code, report, _ = self.check("--fix") + self.assertEqual([], report["restamped"]) + self.assertEqual({"match": 5, "mismatch": 1}, report["summary"]) + + def test_ce_evidence_for_new_paths_needs_a_decision(self): + self.git.write("Copy.java", fixture(p.NON_CE) + self.body) + self.git.write("Deleted.java", fixture(p.NON_CE) + "removed CE source\n") + code, report, output = self.check(scope=self.scope + ["Copy.java", "Deleted.java"]) + self.assertEqual(1, code) + self.assertEqual({"match": 6, "unresolved": 2}, report["summary"]) + rows = self.rows(report) + self.assertEqual("Source.java", rows["Copy.java"]["copyCandidates"][0]["path"]) + self.assertEqual({"path": "Deleted.java", "ref": self.last + "^1", + "blob": self.git("rev-parse", f"{self.addition}:Deleted.java")}, + rows["Deleted.java"]["historicalCandidate"]) + self.assertIn("Needs a decision (2)\n", output) + + def test_fix_removes_redundant_and_orphaned_curations(self): + self.git.write("Copy.java", fixture(p.NON_CE) + self.body) + + def curation(name, header): + return dict(path=name, header=header, reason="Reviewed", + contentHash=p.raw_hash((self.repo / name).read_bytes())) + + needed, redundant = curation("Copy.java", p.NON_CE), curation("New.java", p.NON_CE) + orphaned = dict(path="Gone.java", header=p.NON_CE, reason="Reviewed", contentHash=p.raw_hash(b"gone")) + self.git.write(p.CURATIONS, json.dumps(dict(schemaVersion=1, curations=[needed, redundant, orphaned]), + indent=2) + "\n") + scope = self.scope + ["Copy.java"] + code, report, output = self.check(scope=scope) + self.assertEqual(1, code) + self.assertEqual({"match": 7}, report["summary"]) + self.assertEqual(["New.java"], report["redundantCurations"]) + self.assertEqual([dict(path="Gone.java", status="stale-curation", reason="file is no longer in scope")], + report["curationIssues"]) + self.assertIn("Redundant curations (1)\n", output) + + code, report, output = self.check("--fix", scope=scope) + + self.assertEqual(0, code) + self.assertEqual([{"path": "Gone.java", "reason": "file is no longer in scope"}, + {"path": "New.java", "reason": "the check decides the same header by itself"}], + report["removedCurations"]) + self.assertEqual(([], []), (report["redundantCurations"], report["curationIssues"])) + self.assertEqual(json.dumps(dict(schemaVersion=1, curations=[needed]), indent=2) + "\n", + (self.repo / p.CURATIONS).read_text()) + self.assertIn("Removed curations (2)\n", output) + code, report, _ = self.check("--fix", scope=scope) + self.assertEqual((0, []), (code, report["removedCurations"])) + + def test_missing_relicensing_commit_fails_before_the_scan(self): + self.relicensing = "0" * 40 + code, report, output = self.check() + self.assertEqual((2, None), (code, report)) + self.assertIn("Resolving Git history ... failed\n", output) + self.assertIn("Pass --ce-ref", output) + + def test_ce_ref_mode_compares_against_the_merged_ce_commit(self): + code, report, output = self.check("--ce-ref", "lts-4.3", "--ce-remote", str(self.repo)) + self.assertEqual(1, code) + self.assertEqual({"remote": str(self.repo), "ref": "lts-4.3", "commit": self.fix, "bases": [self.fix]}, + report["ce"]) + rows = self.rows(report) + self.assertEqual(("mismatch", "ce-modified"), (rows["Merged.java"]["status"], rows["Merged.java"]["expectedHeader"])) + self.assertEqual({"match": 5, "mismatch": 1}, report["summary"]) + self.assertIn(f" CE ref lts-4.3 → {self.fix[:11]}\n", output) + self.assertIn("Resolving Git history ... done (CE base lts-4.3)\n", output) def test_ce_ref_is_fetched_from_the_public_ce_repository_by_default(self): fetched = [] @@ -520,9 +755,9 @@ class CheckCommandTests(unittest.TestCase): patch.object(p, "read_plugin", return_value=fixture_plugin()), patch.object(p, "discover_scope", return_value=p.Scope([], [], [], 0)), redirect_stdout(io.StringIO()), redirect_stderr(io.StringIO())): - code = p.main(["check", "--ce-ref", "lts-4.2", "--output", str(self.output)]) + code = p.main(["check", "--ce-ref", "lts-4.3", "--output", str(self.output)]) self.assertEqual(0, code) - self.assertEqual([(p.CE_REMOTE, "lts-4.2")], fetched) + self.assertEqual([(p.CE_REMOTE, "lts-4.3")], fetched) def test_unfetchable_ce_ref_fails_before_the_history_walk(self): stderr = io.StringIO() @@ -535,71 +770,6 @@ class CheckCommandTests(unittest.TestCase): self.assertIn(f"Fetching missing from {self.repo} ... failed\n", stderr.getvalue()) self.assertIn(f"Error: cannot fetch 'missing' from {self.repo}.", stderr.getvalue()) - def test_feature_ref_exposes_rename_and_history_candidates(self): - code, report = self.check("fix/my-fix", ["Renamed.java", "Deleted.java", "Local.java"]) - self.assertEqual(1, code) - rows = {row["path"]: row for row in report["files"]} - self.assertEqual("unresolved", rows["Renamed.java"]["status"]) - candidate = rows["Renamed.java"]["candidates"][0] - self.assertEqual(("Feature.java", self.feature), (candidate["path"], candidate["ref"])) - self.assertEqual("unresolved", rows["Deleted.java"]["status"]) - self.assertTrue(rows["Deleted.java"]["historicalCandidates"]) - self.assertEqual("pe-only", rows["Local.java"]["expectedHeader"]) - self.assertEqual({"tip": self.feature, "firstParent": True}, report["ceHistory"]) - - def test_curation_for_deleted_file_fails_the_check(self): - curation = dict(path="Gone.java", contentHash=p.raw_hash(b"gone"), header="pe-only", reason="Reviewed") - self.git.write(p.CURATIONS, json.dumps(dict(schemaVersion=1, curations=[curation]))) - code, report = self.check("lts-4.2", ["Renamed.java", "Deleted.java", "Local.java"]) - self.assertEqual(1, code) - self.assertEqual({"match": 3}, report["summary"]) - self.assertEqual([dict(path="Gone.java", status="stale-curation", reason="file is no longer in scope")], - report["curationIssues"]) - - def test_fix_restamps_decided_headers_only(self): - self.git("merge", "--no-ff", "fix/my-fix", "-m", "integrate CE fix") - self.git.write("Base.java", FOREIGN_LINE.decode() + "base implementation\n") - scope = ["Base.java", "Feature.java", "Renamed.java", "Swapped.java"] - code, report = self.check(self.feature, scope) - self.assertEqual(1, code) - self.assertEqual({"mismatch": 3, "unresolved": 1}, report["summary"]) - self.assertEqual([], report["restamped"]) - rows = {row["path"]: row for row in report["files"]} - self.assertEqual((p.FOREIGN, "apache"), (rows["Base.java"]["currentHeader"], rows["Base.java"]["expectedHeader"])) - self.assertEqual((p.MISSING, "apache"), - (rows["Feature.java"]["currentHeader"], rows["Feature.java"]["expectedHeader"])) - self.assertEqual(("apache", "pe-only"), - (rows["Swapped.java"]["currentHeader"], rows["Swapped.java"]["expectedHeader"])) - - code, report = self.check(self.feature, scope, fix=True) - - self.assertEqual(1, code) - self.assertEqual(["Feature.java", "Swapped.java"], report["restamped"]) - self.assertEqual({"match": 2, "mismatch": 1, "unresolved": 1}, report["summary"]) - rows = {row["path"]: row for row in report["files"]} - self.assertEqual(("match", "apache", p.MISSING), - (rows["Feature.java"]["status"], rows["Feature.java"]["currentHeader"], - rows["Feature.java"]["previousHeader"])) - self.assertEqual(fixture("apache") + self.body, (self.repo / "Feature.java").read_text()) - self.assertEqual(fixture("pe-only") + "swapped source\n", (self.repo / "Swapped.java").read_text()) - self.assertEqual("apache", rows["Swapped.java"]["previousHeader"]) - self.assertEqual("mismatch", rows["Base.java"]["status"]) - self.assertNotIn("previousHeader", rows["Base.java"]) - self.assertEqual(FOREIGN_LINE.decode() + "base implementation\n", (self.repo / "Base.java").read_text()) - self.assertEqual(fixture("pe-only") + self.body, (self.repo / "Renamed.java").read_text()) - code, report = self.check(self.feature, scope, fix=True) - self.assertEqual([], report["restamped"]) - self.assertEqual({"match": 2, "mismatch": 1, "unresolved": 1}, report["summary"]) - - def test_integrated_ce_file_compares_against_shared_ancestor(self): - self.git("merge", "--no-ff", "fix/my-fix", "-m", "integrate CE fix") - _, report = self.check(self.feature, ["Feature.java"]) - self.assertEqual("apache", report["files"][0]["expectedHeader"]) - self.assertEqual(self.feature, report["sharedAncestor"]) - self.git.write("Feature.java", self.body + "PE-specific addition\n") - _, report = self.check(self.feature, ["Feature.java"]) - self.assertEqual("ce-modified", report["files"][0]["expectedHeader"]) - MANAGED_POM = textwrap.dedent("""\ @@ -748,30 +918,30 @@ class MavenTests(unittest.TestCase): header = (repo / template).read_text() for extension in SAMPLE_BODY: for eol in ("\n", "\r\n"): - key = ("pe", category + extension + repr(eol)) + key = ("head", category + extension + repr(eol)) sample = SAMPLE_PREFIX[extension] + commented(header, extension) + SAMPLE_BODY[extension] tool.add(key, "sample." + extension, sample.replace("\n", eol).encode()) expected[key] = p.comparison_hash((SAMPLE_PREFIX[extension] + SAMPLE_BODY[extension]).encode()) - missing = ("pe", "missing") + missing = ("head", "missing") tool.add(missing, "missing.java", b"// Ordinary documentation\nclass Missing {}\n") expected[missing] = p.comparison_hash(b"// Ordinary documentation\nclass Missing {}\n") legacy = ("ce", "legacy") tool.add(legacy, "legacy.java", LEGACY_JAVA) expected[legacy] = p.comparison_hash(b"class Legacy {}\n") - foreign = ("pe", "foreign") + foreign = ("head", "foreign") tool.add(foreign, "foreign.java", FOREIGN_LINE + b"class Foreign {}\n") expected[foreign] = p.comparison_hash(b"class Foreign {}\n") - one_line = ("pe", "one-line") + one_line = ("head", "one-line") tool.add(one_line, "one.sh", b"#!/bin/sh\n# Copyright 2024 The Thingsboard Authors\nset -e\necho x\n") expected[one_line] = p.comparison_hash(b"#!/bin/sh\nset -e\necho x\n") spdx = stamped((repo / p.TEMPLATES["apache"]).read_text(), "java").encode() - stacked = ("pe", "stacked") + stacked = ("head", "stacked") tool.add(stacked, "stacked.java", spdx + LEGACY_JAVA) expected[stacked] = p.comparison_hash(b"class Legacy {}\n") - reversed_stack = ("pe", "reversed") + reversed_stack = ("head", "reversed") tool.add(reversed_stack, "reversed.java", LEGACY_JAVA.replace(b"class Legacy {}\n", spdx + b"class Legacy {}\n")) expected[reversed_stack] = p.comparison_hash(b"class Legacy {}\n") - mentioned = ("pe", "mentioned") + mentioned = ("head", "mentioned") tool.add(mentioned, "mentioned.java", spdx + b"\n" + FOREIGN_LINE + b"class Mentioned {}\n") expected[mentioned] = p.comparison_hash(FOREIGN_LINE + b"class Mentioned {}\n") pairs = {} @@ -780,18 +950,18 @@ class MavenTests(unittest.TestCase): new = stamped((repo / p.TEMPLATES["apache"]).read_text(), extension).encode() old = legacy_file[:-len(body)] for order, content in (("new-old", new + old + body), ("old-new", old + new + body)): - key = ("pe", order + "." + extension) + key = ("head", order + "." + extension) pairs[key] = content tool.add(key, key[1], content) expected[key] = p.comparison_hash(body) header_only = {} for extension in SAMPLE_BODY: - key = ("pe", "only." + extension) - header_only[key] = SAMPLE_PREFIX[extension] + commented((repo / p.TEMPLATES["pe-only"]).read_text(), extension) + key = ("head", "only." + extension) + header_only[key] = SAMPLE_PREFIX[extension] + commented((repo / p.TEMPLATES[p.NON_CE]).read_text(), extension) tool.add(key, "only." + extension, header_only[key].encode()) expected[key] = p.comparison_hash(SAMPLE_PREFIX[extension].encode()) - headers = tool.current_headers([key for key in expected if key[0] == "pe"]) + headers = tool.current_headers([key for key in expected if key[0] == "head"]) recognized = dict(headers) self.assertEqual(p.UNRECOGNIZED, headers.pop(missing)) @@ -803,7 +973,7 @@ class MavenTests(unittest.TestCase): for key in pairs: headers.pop(key) for key in header_only: - self.assertEqual("pe-only", headers.pop(key), key) + self.assertEqual(p.NON_CE, headers.pop(key), key) for key, header in headers.items(): self.assertTrue(key[1].startswith(header), (key, header)) self.assertEqual(expected, tool.strip_headers()) @@ -832,55 +1002,55 @@ class MavenTests(unittest.TestCase): for extension in SAMPLE_BODY: for eol in ("\n", "\r\n"): body = (SAMPLE_PREFIX[extension] + SAMPLE_BODY[extension]).replace("\n", eol) - key = ("pe", "missing-" + category + extension + repr(eol)) + key = ("head", "missing-" + category + extension + repr(eol)) tool.add(key, "sample." + extension, body.encode()) wanted[key] = category expected[key] = (SAMPLE_PREFIX[extension] + stamped(header, extension) + SAMPLE_BODY[extension]).replace("\n", eol).encode() - legacy = ("pe", "legacy") + legacy = ("head", "legacy") tool.add(legacy, "legacy.java", LEGACY_JAVA) wanted[legacy], expected[legacy] = "apache", (stamped(templates["apache"], "java") + "class Legacy {}\n").encode() - confidential = ("pe", "confidential") + confidential = ("head", "confidential") tool.add(confidential, "start.sh", b"#!/bin/bash\n#\n# ThingsBoard, Inc. (\"COMPANY\") CONFIDENTIAL\n#\n" b"# Copyright \xc2\xa9 2016-2026 ThingsBoard, Inc. All Rights Reserved.\n#\n\nset -e\n") - wanted[confidential], expected[confidential] = "pe-only", ("#!/bin/bash\n" + stamped(templates["pe-only"], "sh") + "set -e\n").encode() - header_only = ("pe", "only") + wanted[confidential], expected[confidential] = p.NON_CE, ("#!/bin/bash\n" + stamped(templates[p.NON_CE], "sh") + "set -e\n").encode() + header_only = ("head", "only") tool.add(header_only, "only.java", b"/**\n * Copyright 2024 The Thingsboard Authors\n */\n") wanted[header_only], expected[header_only] = "ce-modified", stamped(templates["ce-modified"], "java").encode() - shebang = ("pe", "shebang") + shebang = ("head", "shebang") tool.add(shebang, "shebang.sh", b"#!/bin/sh\n#\n# Copyright 2024 The Thingsboard Authors\n#\n") - wanted[shebang], expected[shebang] = "pe-only", ("#!/bin/sh\n" + stamped(templates["pe-only"], "sh")).encode() - glued = ("pe", "glued") + wanted[shebang], expected[shebang] = p.NON_CE, ("#!/bin/sh\n" + stamped(templates[p.NON_CE], "sh")).encode() + glued = ("head", "glued") tool.add(glued, "glued.sh", b"#\n# Copyright 2024 The Thingsboard Authors\n#\n# helper\nset -e\n") - wanted[glued] = "pe-only" - doubled = ("pe", "doubled") + wanted[glued] = p.NON_CE + doubled = ("head", "doubled") tool.add(doubled, "doubled.java", LEGACY_JAVA.replace(b"class Legacy {}\n", LEGACY_JAVA)) - wanted[doubled], expected[doubled] = "pe-only", (stamped(templates["pe-only"], "java") + "class Legacy {}\n").encode() - damaged = ("pe", "damaged") + wanted[doubled], expected[doubled] = p.NON_CE, (stamped(templates[p.NON_CE], "java") + "class Legacy {}\n").encode() + damaged = ("head", "damaged") tool.add(damaged, "damaged.java", stamped(templates["apache"], "java").replace("Apache-2.0", "Apache-2.0 test").encode() + b"class Damaged {}\n") wanted[damaged], expected[damaged] = "apache", (stamped(templates["apache"], "java") + "class Damaged {}\n").encode() - truncated = ("pe", "truncated") + truncated = ("head", "truncated") tool.add(truncated, "truncated.java", b"// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors\nclass Truncated {}\n") wanted[truncated], expected[truncated] = "apache", (stamped(templates["apache"], "java") + "class Truncated {}\n").encode() - vendored = ("pe", "vendored") + vendored = ("head", "vendored") tool.add(vendored, "vendored.java", LEGACY_JAVA.replace(b"class Legacy {}\n", FOREIGN_LINE + b"// MIT\nclass Legacy {}\n")) - wanted[vendored] = "pe-only" + wanted[vendored] = p.NON_CE spdx = stamped(templates["apache"], "java").encode() - stacked = ("pe", "stacked") + stacked = ("head", "stacked") tool.add(stacked, "stacked.java", spdx + LEGACY_JAVA) wanted[stacked], expected[stacked] = "ce-modified", (stamped(templates["ce-modified"], "java") + "class Legacy {}\n").encode() - reversed_stack = ("pe", "reversed") + reversed_stack = ("head", "reversed") tool.add(reversed_stack, "reversed.java", LEGACY_JAVA.replace(b"class Legacy {}\n", spdx + b"\nclass Legacy {}\n")) wanted[reversed_stack], expected[reversed_stack] = "apache", (stamped(templates["apache"], "java") + "class Legacy {}\n").encode() - mentioned = ("pe", "mentioned") + mentioned = ("head", "mentioned") tool.add(mentioned, "mentioned.java", spdx + b"\n" + FOREIGN_LINE + b"class Mentioned {}\n") - wanted[mentioned] = "pe-only" + wanted[mentioned] = p.NON_CE for extension, legacy_file, body in (("ts", LEGACY_TS, b"export const legacy = 1;\n"), ("xml", LEGACY_XML, b"\n")): new = stamped(templates["apache"], extension).encode() old = legacy_file[:-len(body)] for order, content in (("new-old", new + old + body), ("old-new", old + new + body)): - key = ("pe", order + "." + extension) + key = ("head", order + "." + extension) tool.add(key, key[1], content) wanted[key] = "ce-modified" expected[key] = stamped(templates["ce-modified"], extension).encode() + body From 1eb233b6524b799446818963f39ea62f600bb667 Mon Sep 17 00:00:00 2001 From: Dmytro Skarzhynets Date: Wed, 30 Sep 2026 17:04:35 +0300 Subject: [PATCH 06/43] fix: correct license headers reported by the provenance check - Restamp ten files whose header does not match their CE provenance: EntityDatabaseSchemaService.java, js-resource.component.ts and DataValidationException.java are identical to CE and take the Apache header; the 4.3.1.6 cluster migration, TbClusterStore and their tests exist in CE lts-4.3 and common/transport/snmp/pom.xml lost a CE dependency, so they take the ce-modified header. - Remove the DataValidationException.java curation: CE has had an identical file at the same path since December 2025. - Remove 29 curations that repeat the header the check decides by itself. - Delete trendz-settings.component.html and comparison-keys-table.component.html at their old locations: their components moved and no longer reference them, and the relicensing commit left only a license header in them. --- .../upgrade/lts/4.3.1.6/schema_update.sql | 5 +- .../install/EntityDatabaseSchemaService.java | 3 +- .../install/lts/V4_3_1_6Migration.java | 5 +- .../ThingsboardInstallServiceTest.java | 5 +- ...ityDatabaseSchemaServiceClusterIdTest.java | 5 +- .../exception/DataValidationException.java | 3 +- common/transport/snmp/pom.xml | 3 +- .../dao/subscription/TbClusterStore.java | 5 +- .../dao/subscription/TbClusterStoreTest.java | 5 +- .../python/license-headers/curations.json | 180 ------------------ .../comparison-keys-table.component.html | 8 - .../admin/resource/js-resource.component.ts | 3 +- .../admin/trendz-settings.component.html | 8 - 13 files changed, 23 insertions(+), 215 deletions(-) delete mode 100644 ui-ngx/src/app/modules/home/components/widget/config/basic/chart/comparison-keys-table.component.html delete mode 100644 ui-ngx/src/app/modules/home/pages/admin/trendz-settings.component.html diff --git a/application/src/main/data/upgrade/lts/4.3.1.6/schema_update.sql b/application/src/main/data/upgrade/lts/4.3.1.6/schema_update.sql index c57c9ab598..fb95b9b15f 100644 --- a/application/src/main/data/upgrade/lts/4.3.1.6/schema_update.sql +++ b/application/src/main/data/upgrade/lts/4.3.1.6/schema_update.sql @@ -1,6 +1,7 @@ -- --- SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. --- SPDX-License-Identifier: BUSL-1.1 +-- SPDX-FileCopyrightText: Copyright The ThingsBoard Authors +-- SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +-- SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 -- -- A copy of the tb_cluster block in dao/src/main/resources/sql/schema-entities.sql, because the no-downtime patch diff --git a/application/src/main/java/org/thingsboard/server/service/install/EntityDatabaseSchemaService.java b/application/src/main/java/org/thingsboard/server/service/install/EntityDatabaseSchemaService.java index 0382b1205a..4b08361076 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/EntityDatabaseSchemaService.java +++ b/application/src/main/java/org/thingsboard/server/service/install/EntityDatabaseSchemaService.java @@ -1,6 +1,5 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors -// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. -// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 +// SPDX-License-Identifier: Apache-2.0 package org.thingsboard.server.service.install; public interface EntityDatabaseSchemaService extends DatabaseSchemaService { diff --git a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_6Migration.java b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_6Migration.java index 7a16cf6195..1756033ef1 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_6Migration.java +++ b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_6Migration.java @@ -1,5 +1,6 @@ -// SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors +// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 package org.thingsboard.server.service.install.lts; import lombok.RequiredArgsConstructor; diff --git a/application/src/test/java/org/thingsboard/server/install/ThingsboardInstallServiceTest.java b/application/src/test/java/org/thingsboard/server/install/ThingsboardInstallServiceTest.java index 0fe371aa77..8591952462 100644 --- a/application/src/test/java/org/thingsboard/server/install/ThingsboardInstallServiceTest.java +++ b/application/src/test/java/org/thingsboard/server/install/ThingsboardInstallServiceTest.java @@ -1,5 +1,6 @@ -// SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors +// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 package org.thingsboard.server.install; import org.junit.jupiter.api.BeforeEach; diff --git a/application/src/test/java/org/thingsboard/server/service/install/SqlEntityDatabaseSchemaServiceClusterIdTest.java b/application/src/test/java/org/thingsboard/server/service/install/SqlEntityDatabaseSchemaServiceClusterIdTest.java index 88d6bfba03..f8f1cd800d 100644 --- a/application/src/test/java/org/thingsboard/server/service/install/SqlEntityDatabaseSchemaServiceClusterIdTest.java +++ b/application/src/test/java/org/thingsboard/server/service/install/SqlEntityDatabaseSchemaServiceClusterIdTest.java @@ -1,5 +1,6 @@ -// SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. -// SPDX-License-Identifier: BUSL-1.1 +// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors +// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 package org.thingsboard.server.service.install; import org.junit.jupiter.api.BeforeEach; diff --git a/common/data/src/main/java/org/thingsboard/server/exception/DataValidationException.java b/common/data/src/main/java/org/thingsboard/server/exception/DataValidationException.java index 42a6b1af56..034dfa82a4 100644 --- a/common/data/src/main/java/org/thingsboard/server/exception/DataValidationException.java +++ b/common/data/src/main/java/org/thingsboard/server/exception/DataValidationException.java @@ -1,6 +1,5 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors -// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. -// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 +// SPDX-License-Identifier: Apache-2.0 package org.thingsboard.server.exception; public class DataValidationException extends RuntimeException { diff --git a/common/transport/snmp/pom.xml b/common/transport/snmp/pom.xml index fa24bc6e3c..97e47ab761 100644 --- a/common/transport/snmp/pom.xml +++ b/common/transport/snmp/pom.xml @@ -1,7 +1,8 @@ ---> diff --git a/ui-ngx/src/app/modules/home/pages/admin/resource/js-resource.component.ts b/ui-ngx/src/app/modules/home/pages/admin/resource/js-resource.component.ts index bce969df3a..e29bb3660c 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/resource/js-resource.component.ts +++ b/ui-ngx/src/app/modules/home/pages/admin/resource/js-resource.component.ts @@ -1,6 +1,5 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors -// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. -// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 +// SPDX-License-Identifier: Apache-2.0 import { ChangeDetectorRef, Component, Inject, OnDestroy, OnInit } from '@angular/core'; import { Subject } from 'rxjs'; import { Store } from '@ngrx/store'; diff --git a/ui-ngx/src/app/modules/home/pages/admin/trendz-settings.component.html b/ui-ngx/src/app/modules/home/pages/admin/trendz-settings.component.html deleted file mode 100644 index 12bc46fef7..0000000000 --- a/ui-ngx/src/app/modules/home/pages/admin/trendz-settings.component.html +++ /dev/null @@ -1,8 +0,0 @@ - ---> From 4c7cc04859016921e512ad0e87c6f1c7ce258dbc Mon Sep 17 00:00:00 2001 From: Dmytro Skarzhynets Date: Wed, 30 Sep 2026 18:10:20 +0300 Subject: [PATCH 07/43] fix: exclude relicensed commits of the CE ref from CE With --ce-ref, CE was the history of the merge bases of HEAD and the CE ref. When the CE ref is a branch of the unified codebase, such as master, those merge bases are relicensed commits themselves, so a downstream repository whose history does not come from CE alone compared against the unified code. The CE bases below a relicensed merge base are now the CE commits beneath it, found with the relicensing commit as without --ce-ref. --- tools/src/main/python/license-headers/README.md | 4 +++- .../python/license-headers/check_license_headers.py | 6 ++++-- .../license-headers/test_check_license_headers.py | 12 ++++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/tools/src/main/python/license-headers/README.md b/tools/src/main/python/license-headers/README.md index 6597faad14..4f2eab2a1e 100644 --- a/tools/src/main/python/license-headers/README.md +++ b/tools/src/main/python/license-headers/README.md @@ -13,7 +13,9 @@ check compares against the latest CE commits merged into the current branch: `31936b09d24` in their history, for example pre-4.4 master and the lts-4.3 commits merged into lts-4.4. - With `--ce-ref`, CE commits are the history of the given CE branch, tag, or - commit. It is fetched from `https://github.com/thingsboard/thingsboard.git` + commit, without the commits that have the relicensing commit in their + history. Use it when the history of the current branch does not come from CE + alone. The ref is fetched from `https://github.com/thingsboard/thingsboard.git` on every run; pass `--ce-remote` to fetch from another URL or a local clone. ## Rules diff --git a/tools/src/main/python/license-headers/check_license_headers.py b/tools/src/main/python/license-headers/check_license_headers.py index d59e6dffa1..1ff6faf77c 100644 --- a/tools/src/main/python/license-headers/check_license_headers.py +++ b/tools/src/main/python/license-headers/check_license_headers.py @@ -188,7 +188,9 @@ def merged_ce_bases(repo, head, baseline): bases = run(["git", "merge-base", "--all", head, baseline], repo, ok=(0, 1)).stdout.decode().split() if not bases: raise Failure("HEAD shares no history with the CE ref. Check that the right CE branch was passed.") - return independent(repo, bases) + ce = [ce_base for base in bases + for ce_base in (relicensed_ce_bases(repo, base) if contains(repo, RELICENSING_COMMIT, base) else [base])] + return independent(repo, ce) def merge_blobs(repo, ours, base, theirs): @@ -1210,7 +1212,7 @@ def main(argv=None): parser.add_argument("command", choices=["check"]) parser.add_argument("--ce-ref", help="CE branch, tag, or commit that this branch integrates, fetched from --ce-remote; " - "without it, CE is the history that does not contain the relicensing commit") + "without it, CE is the history of HEAD that does not contain the relicensing commit") parser.add_argument("--ce-remote", default=CE_REMOTE, help=f"Git URL or path of the CE repository to fetch --ce-ref from (default: {CE_REMOTE})") parser.add_argument("--output", default="target/license-provenance/report.json") diff --git a/tools/src/main/python/license-headers/test_check_license_headers.py b/tools/src/main/python/license-headers/test_check_license_headers.py index 88968a1b91..a025443e75 100644 --- a/tools/src/main/python/license-headers/test_check_license_headers.py +++ b/tools/src/main/python/license-headers/test_check_license_headers.py @@ -457,6 +457,18 @@ class GitHistoryTests(unittest.TestCase): with self.assertRaisesRegex(p.Failure, "shares no history"): p.merged_ce_bases(git.root, unrelated, tip) + def test_merged_ce_bases_below_a_relicensed_ce_ref_exclude_relicensed_commits(self): + git, fix, last, relicensing = self.relicensed_fixture() + ce_tip = git("rev-parse", "HEAD") + git("checkout", "-b", "downstream", git("rev-list", "--max-parents=0", "HEAD")) + git.write("Own.java", "own\n") + own = git.commit("own history without the relicensing commit") + git("merge", "--no-ff", "master", "-m", "integrate CE master") + head = git("rev-parse", "HEAD") + with patch.object(p, "RELICENSING_COMMIT", relicensing): + self.assertIn(own, p.relicensed_ce_bases(git.root, head)) + self.assertEqual(sorted([fix, last]), p.merged_ce_bases(git.root, head, ce_tip)) + def test_lineage_records_first_parent_ce_deletions(self): git = GitFixture(temporary_directory(self), "ce") git.write("Gone.java", "removed from CE\n") From 969392e1996820298852f5cbaea2fc306527a0f3 Mon Sep 17 00:00:00 2001 From: Andrii Landiak Date: Tue, 6 Oct 2026 13:44:03 +0300 Subject: [PATCH 08/43] fix: reload CoAP DTLS certificates in CoAP integration services CertificateReloadManager was limited to transport services, while the shared CoAP server also runs in tb-integration, tb-integration-executor and tb-core (coap.server.enabled). There the DTLS reload callback was registered but never triggered, so rotated certificates were not picked up by CoAP integrations. - Remove the service-type condition from CertificateReloadManager: it already discovers SslCredentialsConfig beans at runtime, and now skips the scheduler when there is nothing to watch - Import CertificateReloadManager into the remote CoAP integration application - Add transport.ssl.certificate.reload settings to tb-coap-integration.yml and tb-integration-executor.yml - Replace unused flat DTLS keys in tb-coap-integration.yml with the coap.dtls.credentials block read by TbCoapDtlsSettings --- .../service/CertificateReloadManager.java | 9 ++- ...CertificateReloadManagerDiscoveryTest.java | 74 +++++++++++++++++++ ...ThingsboardCoapIntegrationApplication.java | 3 + .../main/resources/tb-coap-integration.yml | 47 +++++++++--- .../resources/tb-integration-executor.yml | 13 +++- .../python/license-headers/curations.json | 2 +- 6 files changed, 133 insertions(+), 15 deletions(-) create mode 100644 common/transport/transport-api/src/test/java/org/thingsboard/server/common/transport/service/CertificateReloadManagerDiscoveryTest.java diff --git a/common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/service/CertificateReloadManager.java b/common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/service/CertificateReloadManager.java index 53ed70ec37..e33b0bd0b2 100644 --- a/common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/service/CertificateReloadManager.java +++ b/common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/service/CertificateReloadManager.java @@ -1,5 +1,6 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors -// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 package org.thingsboard.server.common.transport.service; import lombok.extern.slf4j.Slf4j; @@ -12,7 +13,6 @@ import org.springframework.stereotype.Component; import org.thingsboard.common.util.ThingsBoardThreadFactory; import org.thingsboard.server.common.transport.config.ssl.SslCredentials; import org.thingsboard.server.common.transport.config.ssl.SslCredentialsConfig; -import org.thingsboard.server.queue.util.TbTransportComponent; import java.io.InputStream; import java.nio.file.Files; @@ -30,7 +30,6 @@ import java.util.concurrent.TimeUnit; @Slf4j @Component -@TbTransportComponent public class CertificateReloadManager implements SmartInitializingSingleton, DisposableBean { private static final int MAX_CONSECUTIVE_FAILURES = 10; @@ -143,6 +142,10 @@ public class CertificateReloadManager implements SmartInitializingSingleton, Dis log.info("Initializing Certificate Reload Manager..."); discoverAndRegisterSslCredentials(); + if (watchers.isEmpty()) { + log.debug("No certificate files to watch. Skipping scheduler initialization..."); + return; + } scheduler = Executors.newSingleThreadScheduledExecutor(ThingsBoardThreadFactory.forName("certificate-reload-manager")); scheduler.scheduleWithFixedDelay(this::checkCertificates, checkIntervalInSeconds, checkIntervalInSeconds, TimeUnit.SECONDS); diff --git a/common/transport/transport-api/src/test/java/org/thingsboard/server/common/transport/service/CertificateReloadManagerDiscoveryTest.java b/common/transport/transport-api/src/test/java/org/thingsboard/server/common/transport/service/CertificateReloadManagerDiscoveryTest.java new file mode 100644 index 0000000000..59bfd816fa --- /dev/null +++ b/common/transport/transport-api/src/test/java/org/thingsboard/server/common/transport/service/CertificateReloadManagerDiscoveryTest.java @@ -0,0 +1,74 @@ +// SPDX-FileCopyrightText: Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: BUSL-1.1 +package org.thingsboard.server.common.transport.service; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; +import org.springframework.boot.test.context.runner.ApplicationContextRunner; +import org.springframework.test.util.ReflectionTestUtils; +import org.thingsboard.server.common.transport.config.ssl.SslCredentials; +import org.thingsboard.server.common.transport.config.ssl.SslCredentialsConfig; + +import java.nio.file.Path; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +public class CertificateReloadManagerDiscoveryTest { + + @TempDir + Path tempDir; + + private final ApplicationContextRunner contextRunner = new ApplicationContextRunner() + .withUserConfiguration(CertificateReloadManager.class); + + @Test + public void givenNoSslCredentialsConfigs_whenContextStarts_thenManagerCreatedWithoutScheduler() { + contextRunner.run(context -> { + assertThat(context).hasSingleBean(CertificateReloadManager.class); + assertThat(getScheduler(context.getBean(CertificateReloadManager.class))).isNull(); + }); + } + + @Test + public void givenDisabledSslCredentialsConfig_whenContextStarts_thenSchedulerNotStarted() { + SslCredentialsConfig config = mockSslCredentialsConfig(false, List.of(tempDir.resolve("server.pem"))); + contextRunner + .withBean(SslCredentialsConfig.class, () -> config) + .run(context -> assertThat(getScheduler(context.getBean(CertificateReloadManager.class))).isNull()); + } + + @Test + public void givenSslCredentialsConfigWithCertificateFile_whenContextStarts_thenSchedulerStarted() { + SslCredentialsConfig config = mockSslCredentialsConfig(true, List.of(tempDir.resolve("server.pem"))); + contextRunner + .withBean(SslCredentialsConfig.class, () -> config) + .run(context -> assertThat(getScheduler(context.getBean(CertificateReloadManager.class))).isNotNull()); + } + + @Test + public void givenReloadDisabled_whenContextStarts_thenSchedulerNotStarted() { + SslCredentialsConfig config = mockSslCredentialsConfig(true, List.of(tempDir.resolve("server.pem"))); + contextRunner + .withPropertyValues("transport.ssl.certificate.reload.enabled=false") + .withBean(SslCredentialsConfig.class, () -> config) + .run(context -> assertThat(getScheduler(context.getBean(CertificateReloadManager.class))).isNull()); + } + + private static SslCredentialsConfig mockSslCredentialsConfig(boolean enabled, List certificateFilePaths) { + SslCredentials credentials = mock(SslCredentials.class); + when(credentials.getCertificateFilePaths()).thenReturn(certificateFilePaths); + SslCredentialsConfig config = mock(SslCredentialsConfig.class); + when(config.isEnabled()).thenReturn(enabled); + when(config.getName()).thenReturn("Test SSL Credentials"); + when(config.getCredentials()).thenReturn(credentials); + return config; + } + + private static Object getScheduler(CertificateReloadManager manager) { + return ReflectionTestUtils.getField(manager, "scheduler"); + } + +} diff --git a/integration/coap/src/main/java/org/thingsboard/integration/ThingsboardCoapIntegrationApplication.java b/integration/coap/src/main/java/org/thingsboard/integration/ThingsboardCoapIntegrationApplication.java index 46f419d853..691675e579 100644 --- a/integration/coap/src/main/java/org/thingsboard/integration/ThingsboardCoapIntegrationApplication.java +++ b/integration/coap/src/main/java/org/thingsboard/integration/ThingsboardCoapIntegrationApplication.java @@ -5,13 +5,16 @@ package org.thingsboard.integration; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Import; import org.springframework.scheduling.annotation.EnableAsync; +import org.thingsboard.server.common.transport.service.CertificateReloadManager; import java.util.Arrays; @SpringBootApplication @EnableAsync @ComponentScan({"org.thingsboard.integration", "org.thingsboard.script.api", "org.thingsboard.server.coapserver"}) +@Import(CertificateReloadManager.class) public class ThingsboardCoapIntegrationApplication { private static final String SPRING_CONFIG_NAME_KEY = "--spring.config.name"; diff --git a/integration/coap/src/main/resources/tb-coap-integration.yml b/integration/coap/src/main/resources/tb-coap-integration.yml index a7fde74529..267c91dba0 100644 --- a/integration/coap/src/main/resources/tb-coap-integration.yml +++ b/integration/coap/src/main/resources/tb-coap-integration.yml @@ -3,6 +3,8 @@ # SPDX-License-Identifier: BUSL-1.1 # +spring.main.allow-circular-references: "true" # Spring Boot configuration property that controls whether circular dependencies between beans are allowed. + server: # Server bind address address: "${HTTP_BIND_ADDRESS:0.0.0.0}" @@ -134,14 +136,41 @@ coap: # } MaxFragmentLength; # TLS already requires clients and servers to support fragmentation of handshake messages. max_fragment_length: "${COAP_DTLS_MAX_FRAGMENT_LENGTH:1024}" - # Path to the key store that holds the certificate - key_store: "${COAP_DTLS_KEY_STORE:coapserver.jks}" - # Password used to access the key store - key_store_password: "${COAP_DTLS_KEY_STORE_PASSWORD:server_ks_password}" - # Password used to access the key - key_password: "${COAP_DTLS_KEY_PASSWORD:server_key_password}" - # Key alias - key_alias: "${COAP_DTLS_KEY_ALIAS:serveralias}" + # Server DTLS credentials + credentials: + # Server credentials type (PEM - pem certificate file; KEYSTORE - java keystore) + type: "${COAP_DTLS_CREDENTIALS_TYPE:PEM}" + # PEM server credentials + pem: + # Path to the server certificate file (holds server certificate or certificate chain, may include server private key) + cert_file: "${COAP_DTLS_PEM_CERT:coapserver.pem}" + # Path to the server certificate private key file. Optional by default. Required if the private key is not present in server certificate file; + key_file: "${COAP_DTLS_PEM_KEY:coapserver_key.pem}" + # Server certificate private key password (optional) + key_password: "${COAP_DTLS_PEM_KEY_PASSWORD:server_key_password}" + # Keystore server credentials + keystore: + # Type of the key store (JKS or PKCS12) + type: "${COAP_DTLS_KEY_STORE_TYPE:JKS}" + # Path to the key store that holds the SSL certificate + store_file: "${COAP_DTLS_KEY_STORE:coapserver.jks}" + # Password used to access the key store + store_password: "${COAP_DTLS_KEY_STORE_PASSWORD:server_ks_password}" + # Key alias + key_alias: "${COAP_DTLS_KEY_ALIAS:serveralias}" + # Password used to access the key + key_password: "${COAP_DTLS_KEY_PASSWORD:server_key_password}" + +transport: + ssl: + # SSL/TLS settings + certificate: + # X.509 certificate configuration to auto-detect and reload certificate used by the CoAP server (DTLS) in real-time + reload: + # Enable/disable automatic SSL certificates reload + enabled: "${TB_TRANSPORT_SSL_CERTIFICATE_RELOAD_ENABLED:true}" + # Check interval in seconds for certificates reload + check_interval_seconds: "${TB_TRANSPORT_SSL_CERTIFICATE_RELOAD_CHECK_INTERVAL_SECONDS:60}" service: - type: "${TB_SERVICE_TYPE:tb-integration}" \ No newline at end of file + type: "${TB_SERVICE_TYPE:tb-integration}" diff --git a/integration/executor/src/main/resources/tb-integration-executor.yml b/integration/executor/src/main/resources/tb-integration-executor.yml index de77beb11c..7e2f6d107c 100644 --- a/integration/executor/src/main/resources/tb-integration-executor.yml +++ b/integration/executor/src/main/resources/tb-integration-executor.yml @@ -429,14 +429,23 @@ js: # Interval of logging for remote JS executor stats print_interval_ms: "${TB_JS_REMOTE_STATS_PRINT_INTERVAL_MS:10000}" -# JSON converter parameters -# Controls JSON telemetry/attribute parsing behaviour, including type casting and maximum string value length. +# JSON converter and SSL certificate reload parameters +# Controls JSON telemetry/attribute parsing behaviour, including type casting and maximum string value length, and real-time reload of CoAP DTLS certificates. transport: json: # Cast String data types to Numeric if possible when processing Telemetry/Attributes JSON type_cast_enabled: "${JSON_TYPE_CAST_ENABLED:true}" # Maximum allowed string value length when processing Telemetry/Attributes JSON (0 value disables string value length check) max_string_value_length: "${JSON_MAX_STRING_VALUE_LENGTH:0}" + ssl: + # SSL/TLS settings + certificate: + # X.509 certificate configuration to auto-detect and reload certificate used by the CoAP server (DTLS) in real-time + reload: + # Enable/disable automatic SSL certificates reload + enabled: "${TB_TRANSPORT_SSL_CERTIFICATE_RELOAD_ENABLED:true}" + # Check interval in seconds for certificates reload + check_interval_seconds: "${TB_TRANSPORT_SSL_CERTIFICATE_RELOAD_CHECK_INTERVAL_SECONDS:60}" # Cache parameters # Configures the cache backend type (Caffeine or Redis) and per-cache TTL and size limits. diff --git a/tools/src/main/python/license-headers/curations.json b/tools/src/main/python/license-headers/curations.json index 75b0eb6a2c..91d0e42065 100644 --- a/tools/src/main/python/license-headers/curations.json +++ b/tools/src/main/python/license-headers/curations.json @@ -797,7 +797,7 @@ "path": "integration/coap/src/main/java/org/thingsboard/integration/ThingsboardCoapIntegrationApplication.java", "header": "busl", "reason": "Launch, logging or runtime scaffolding for a PE service. Maintainer explicitly resolved this PE module scaffolding as PE-only; matching CE startup/logging conventions do not override that decision. Reviewed similarity candidate transport/http/src/main/java/org/thingsboard/server/http/ThingsboardHttpTransportApplication.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob 98be09069a487befab217c9b7c036fc6132fc97b).", - "contentHash": "sha256:691ed1e7c96845e81ccfdcf522c836794f4045180c74d50be1613122517397c4" + "contentHash": "sha256:d603f73f715f82368dcfd54325b95c653684077d49afeafb69b9117b7196dfbc" }, { "path": "integration/coap/src/main/resources/logback.xml", From b0b7623b7476f57329b5ad7d04b8fc6e4130c213 Mon Sep 17 00:00:00 2001 From: nickAS21 Date: Mon, 12 Oct 2026 12:05:35 +0300 Subject: [PATCH 09/43] lwm2m: fix bootstrap-discovery: Replaced the single root Discover request (DiscoverRequest [/]) during the Bootstrap session with targeted requests for required objects (/0, /1, /2). --- .../store/LwM2MBootstrapConfigStoreTaskProvider.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/transport/lwm2m/src/main/java/org/thingsboard/server/transport/lwm2m/bootstrap/store/LwM2MBootstrapConfigStoreTaskProvider.java b/common/transport/lwm2m/src/main/java/org/thingsboard/server/transport/lwm2m/bootstrap/store/LwM2MBootstrapConfigStoreTaskProvider.java index e9c0ef6dee..88c5a26dad 100644 --- a/common/transport/lwm2m/src/main/java/org/thingsboard/server/transport/lwm2m/bootstrap/store/LwM2MBootstrapConfigStoreTaskProvider.java +++ b/common/transport/lwm2m/src/main/java/org/thingsboard/server/transport/lwm2m/bootstrap/store/LwM2MBootstrapConfigStoreTaskProvider.java @@ -70,8 +70,10 @@ public class LwM2MBootstrapConfigStoreTaskProvider implements LwM2MBootstrapTask } if (previousResponse == null && shouldStartWithDiscover(configNew)) { Tasks tasks = new Tasks(); - tasks.requestsToSend = new ArrayList<>(1); - tasks.requestsToSend.add(new BootstrapDiscoverRequest()); + tasks.requestsToSend = new ArrayList<>(3); + tasks.requestsToSend.add(new BootstrapDiscoverRequest("/0")); + tasks.requestsToSend.add(new BootstrapDiscoverRequest("/1")); + tasks.requestsToSend.add(new BootstrapDiscoverRequest("/2")); tasks.last = false; return tasks; } else { From c12e6daa533893f1ae84e8bcca0ccfce6629b182 Mon Sep 17 00:00:00 2001 From: Nikita Mazurenko Date: Mon, 12 Oct 2026 11:26:33 +0200 Subject: [PATCH 10/43] Proxy edge license V2 checkInstance/activateInstance to the license portal Edge 4.4.0.1 moves to license client 3.0.x, which talks /api/v2/license/*. Restores the proxy from #4306 and forwards clusterId (required by the portal's V2 activateInstance) and protocolVersion. --- .../ThingsboardSecurityConfiguration.java | 2 +- .../server/controller/EdgeController.java | 29 +++++++++++++++ .../edge/DefaultEdgeLicenseService.java | 35 +++++++++++++++++-- .../service/edge/EdgeLicenseService.java | 4 +++ 4 files changed, 67 insertions(+), 3 deletions(-) diff --git a/application/src/main/java/org/thingsboard/server/config/ThingsboardSecurityConfiguration.java b/application/src/main/java/org/thingsboard/server/config/ThingsboardSecurityConfiguration.java index 9d5f734bf4..a064a5bbaf 100644 --- a/application/src/main/java/org/thingsboard/server/config/ThingsboardSecurityConfiguration.java +++ b/application/src/main/java/org/thingsboard/server/config/ThingsboardSecurityConfiguration.java @@ -134,7 +134,7 @@ public class ThingsboardSecurityConfiguration { /** Session bootstrap, exempt for GET only: {@code POST} on the same path creates a custom menu. */ public static final String CUSTOM_MENU_ENTRY_POINT = "/api/customMenu"; public static final String ALLOWED_PERMISSIONS_ENTRY_POINT = "/api/permissions/allowedPermissions"; - protected static final String[] NON_TOKEN_BASED_AUTH_ENTRY_POINTS = new String[]{"/index.html", "/assets/**", "/static/**", "/api/noauth/**", "/webjars/**", "/api/license/**", "/api/images/public/**", "/api/v2/report/public/**", "/.well-known/**"}; + protected static final String[] NON_TOKEN_BASED_AUTH_ENTRY_POINTS = new String[]{"/index.html", "/assets/**", "/static/**", "/api/noauth/**", "/webjars/**", "/api/license/**", "/api/v2/license/**", "/api/images/public/**", "/api/v2/report/public/**", "/.well-known/**"}; /** * API entry points that stay reachable while the setup is incomplete, or while a provisioned instance is * locked again at runtime. Only {@link #SETUP_PROTECTED_ENTRY_POINTS} is locked, so the Angular diff --git a/application/src/main/java/org/thingsboard/server/controller/EdgeController.java b/application/src/main/java/org/thingsboard/server/controller/EdgeController.java index 26c6a9fc54..af73926527 100644 --- a/application/src/main/java/org/thingsboard/server/controller/EdgeController.java +++ b/application/src/main/java/org/thingsboard/server/controller/EdgeController.java @@ -671,6 +671,35 @@ public class EdgeController extends BaseController { } } + @ApiOperation(value = "Check edge license (checkInstance)", + notes = "Checks license request (V1/V2) from edge service by forwarding request to license portal.") + @PostMapping(value = "/v2/license/checkInstance") + public ResponseEntity checkInstanceV2(@RequestBody JsonNode request) throws ThingsboardException { + log.debug("Checking instance [{}]", request); + try { + return edgeLicenseService.checkInstanceV2(request); + } catch (Exception e) { + log.error("Error occurred: [{}]", e.getMessage(), e); + throw new ThingsboardException(e, ThingsboardErrorCode.SUBSCRIPTION_VIOLATION); + } + } + + @ApiOperation(value = "Activate edge instance (activateInstance)", + notes = "Activates edge license (V1/V2) on license portal.") + @PostMapping(value = "/v2/license/activateInstance", params = {"licenseSecret", "releaseDate", "clusterId"}) + public ResponseEntity activateInstanceV2(@RequestParam String licenseSecret, + @RequestParam String releaseDate, + @RequestParam String clusterId, + @RequestParam(required = false) String protocolVersion) throws ThingsboardException { + log.debug("Activating instance [{}], [{}], [{}], [{}]", licenseSecret, releaseDate, clusterId, protocolVersion); + try { + return edgeLicenseService.activateInstanceV2(licenseSecret, releaseDate, clusterId, protocolVersion); + } catch (Exception e) { + log.error("Error occurred: [{}]", e.getMessage(), e); + throw new ThingsboardException(e, ThingsboardErrorCode.SUBSCRIPTION_VIOLATION); + } + } + private void cleanUpLicenseKey(Edge edge) { edge.setEdgeLicenseKey(null); } diff --git a/application/src/main/java/org/thingsboard/server/service/edge/DefaultEdgeLicenseService.java b/application/src/main/java/org/thingsboard/server/service/edge/DefaultEdgeLicenseService.java index 9186e307dd..45263ef7fd 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/DefaultEdgeLicenseService.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/DefaultEdgeLicenseService.java @@ -66,7 +66,7 @@ public class DefaultEdgeLicenseService implements EdgeLicenseService { new HttpEntity<>(request, headers), JsonNode.class); log.trace("checkInstance response: {}", response); // removing headers from response of the license server, because it might be a conflict with the proxy from we are accepting incoming connections - return new ResponseEntity(response.getBody(), response.getStatusCode()); + return new ResponseEntity<>(response.getBody(), response.getStatusCode()); } @Override @@ -80,7 +80,38 @@ public class DefaultEdgeLicenseService implements EdgeLicenseService { null, JsonNode.class, params); log.trace("activateInstance response: {}", response); // removing headers from response of the license server, because it might be a conflict with the proxy from we are accepting incoming connections - return new ResponseEntity(response.getBody(), response.getStatusCode()); + return new ResponseEntity<>(response.getBody(), response.getStatusCode()); + } + + @Override + public ResponseEntity checkInstanceV2(JsonNode request) { + log.trace("checkInstance V2 [{}]", request); + var headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_JSON); + ResponseEntity response = this.restTemplate.postForEntity( + EDGE_LICENSE_SERVER_ENDPOINT + "/api/v2/license/checkInstance", + new HttpEntity<>(request, headers), JsonNode.class); + log.trace("checkInstance V2 response: {}", response); + // removing headers from response of the license server, because it might be a conflict with the proxy from we are accepting incoming connections + return new ResponseEntity<>(response.getBody(), response.getStatusCode()); + } + + @Override + public ResponseEntity activateInstanceV2(String edgeLicenseSecret, String releaseDate, String clusterId, String protocolVersion) { + log.trace("activateInstance V2 [{}][{}][{}]", releaseDate, clusterId, protocolVersion); + Map params = new HashMap<>(); + params.put("licenseSecret", edgeLicenseSecret); + params.put("releaseDate", releaseDate); + params.put("clusterId", clusterId); + String url = EDGE_LICENSE_SERVER_ENDPOINT + "/api/v2/license/activateInstance?licenseSecret={licenseSecret}&releaseDate={releaseDate}&clusterId={clusterId}"; + if (protocolVersion != null) { + params.put("protocolVersion", protocolVersion); + url += "&protocolVersion={protocolVersion}"; + } + ResponseEntity response = this.restTemplate.postForEntity(url, null, JsonNode.class, params); + log.trace("activateInstance V2 response: {}", response); + // removing headers from response of the license server, because it might be a conflict with the proxy from we are accepting incoming connections + return new ResponseEntity<>(response.getBody(), response.getStatusCode()); } private RestTemplate initRestTemplate() { diff --git a/application/src/main/java/org/thingsboard/server/service/edge/EdgeLicenseService.java b/application/src/main/java/org/thingsboard/server/service/edge/EdgeLicenseService.java index 0f2ca9dccf..bc796b02b1 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/EdgeLicenseService.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/EdgeLicenseService.java @@ -10,4 +10,8 @@ public interface EdgeLicenseService { ResponseEntity checkInstance(JsonNode request); ResponseEntity activateInstance(String licenseSecret, String releaseDate); + + ResponseEntity checkInstanceV2(JsonNode request); + + ResponseEntity activateInstanceV2(String licenseSecret, String releaseDate, String clusterId, String protocolVersion); } From a31baaf52bc72f3eb4f7dc1cd55f7558f3bdf228 Mon Sep 17 00:00:00 2001 From: nickAS21 Date: Mon, 12 Oct 2026 13:06:54 +0300 Subject: [PATCH 11/43] lwm2m: check-license-headers. --- .../bootstrap/store/LwM2MBootstrapConfigStoreTaskProvider.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/transport/lwm2m/src/main/java/org/thingsboard/server/transport/lwm2m/bootstrap/store/LwM2MBootstrapConfigStoreTaskProvider.java b/common/transport/lwm2m/src/main/java/org/thingsboard/server/transport/lwm2m/bootstrap/store/LwM2MBootstrapConfigStoreTaskProvider.java index 88c5a26dad..cc38b2e502 100644 --- a/common/transport/lwm2m/src/main/java/org/thingsboard/server/transport/lwm2m/bootstrap/store/LwM2MBootstrapConfigStoreTaskProvider.java +++ b/common/transport/lwm2m/src/main/java/org/thingsboard/server/transport/lwm2m/bootstrap/store/LwM2MBootstrapConfigStoreTaskProvider.java @@ -1,5 +1,6 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors -// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 package org.thingsboard.server.transport.lwm2m.bootstrap.store; import lombok.extern.slf4j.Slf4j; From 8e16f9ebbb5529ff51e49108fe1a5ba054365fb6 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Tue, 13 Oct 2026 11:08:08 +0300 Subject: [PATCH 12/43] Bump tomcat from 10.1.59 to 10.1.60 to fix CVE-2026-76183 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8edb9d53d8..87038e275b 100755 --- a/pom.xml +++ b/pom.xml @@ -70,7 +70,7 @@ 3.5.13 3.18.0 4.1.138.Final - 10.1.59 + 10.1.60 5.4.3 1.5.38 2.21.7 From 7cd7b266291217dfb1c9671f7834fe1c2dda81ac Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Tue, 13 Oct 2026 11:08:08 +0300 Subject: [PATCH 13/43] Bump bouncycastle from 1.85 to 1.86 to fix CVE-2026-18036, CVE-2026-71888, and 2 others --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 87038e275b..044e4de615 100755 --- a/pom.xml +++ b/pom.xml @@ -116,7 +116,7 @@ 2.2.30 0.8 1.19.0 - 1.85 + 1.86 2.0.1 org/thingsboard/server/gen/**/*, org/thingsboard/server/extensions/core/plugin/telemetry/gen/**/* From 2b5a22cd0d40df6654c4a1db4b331456064f0a41 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Tue, 13 Oct 2026 11:08:09 +0300 Subject: [PATCH 14/43] Bump guava from 33.1.0-jre to 33.7.2-jre to fix CVE-2026-102554 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 044e4de615..6fb0e30c30 100755 --- a/pom.xml +++ b/pom.xml @@ -85,7 +85,7 @@ 4.17.0 4.2.25 5.0.7 - 33.1.0-jre + 33.7.2-jre 2.16.1 1.3.1 1.10.0 From b9e6eaabc4f574e1879ca2c7a54e772457fc7b69 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Tue, 13 Oct 2026 11:08:09 +0300 Subject: [PATCH 15/43] Bump postgresql from 42.7.12 to 42.7.14 to fix CVE-2026-107314 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6fb0e30c30..3975352ab8 100755 --- a/pom.xml +++ b/pom.xml @@ -74,7 +74,7 @@ 5.4.3 1.5.38 2.21.7 - 42.7.12 + 42.7.14 5.34.0 5.6.4 1.5.7-14 From 50d320ab493ba0d90ebcc5f14269cecc52e08f4d Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Tue, 13 Oct 2026 11:08:09 +0300 Subject: [PATCH 16/43] Bump snappy-java from 1.1.10.5 to 1.1.10.10 to fix CVE-2026-90559, CVE-2026-93452, and CVE-2026-108106 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3975352ab8..eef137f59f 100755 --- a/pom.xml +++ b/pom.xml @@ -183,7 +183,7 @@ 1.6.1 2.19.0 9.2.0 - 1.1.10.5 + 1.1.10.10 9.10.0 From d370560280c33dc4b61d3c70406a3fb7cb2b97d9 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Tue, 13 Oct 2026 11:08:09 +0300 Subject: [PATCH 17/43] Bump lz4-java from 1.10.1 to 1.11.4 to fix CVE-2026-59949, CVE-2026-106450, and CVE-2026-106451 --- pom.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pom.xml b/pom.xml index eef137f59f..18b232787c 100755 --- a/pom.xml +++ b/pom.xml @@ -79,6 +79,7 @@ 5.6.4 1.5.7-14 2.3.35 + 1.11.4 2.4.0-b180830.0359 0.12.5 0.10 @@ -1130,6 +1131,13 @@ ${freemarker.version} + + + at.yawk.lz4 + lz4-java + ${lz4-java.version} + + org.springframework.boot spring-boot-dependencies From 6a296833bf9e899192b6ef9d84983f11097765c8 Mon Sep 17 00:00:00 2001 From: Maksym Tsymbarov Date: Tue, 13 Oct 2026 10:24:44 +0200 Subject: [PATCH 18/43] Merge pull request #16286 from mtsymbarov-del/fix/ai-assistant-panel-scroll-reveal Fixed AI Assistant panel appearing after rapid clicks on table rows --- .../modules/home/components/entity/entities-table.component.ts | 3 --- ui-ngx/src/app/modules/home/home.component.scss | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts b/ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts index 74d515996f..05f6608ae5 100644 --- a/ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts +++ b/ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts @@ -529,9 +529,6 @@ export class EntitiesTableComponent extends PageComponent implements IEntitiesTa toggleEntityDetails($event: Event, entity) { if ($event) { $event.stopPropagation(); - if (($event as MouseEvent).detail > 1) { - return; - } } const open = this.dataSource.toggleCurrentEntity(entity) ? true : !this.isDetailsOpen; this.setEntityDetailsOpen(open); diff --git a/ui-ngx/src/app/modules/home/home.component.scss b/ui-ngx/src/app/modules/home/home.component.scss index d39e640480..6843152ada 100644 --- a/ui-ngx/src/app/modules/home/home.component.scss +++ b/ui-ngx/src/app/modules/home/home.component.scss @@ -166,7 +166,7 @@ } .tb-main-content-wrapper { position: relative; - overflow: hidden; + overflow: clip; flex: 1; display: flex; } From bb359394cfe878dabf5f49b8e989353000f3b64f Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Tue, 13 Oct 2026 11:20:57 +0300 Subject: [PATCH 19/43] CLA --- CONTRIBUTING.md | 19 ++++++++++++++++--- pull_request_template.md | 1 + 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a0d336e353..52bba5966c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -152,8 +152,21 @@ rm ~/.testcontainers.properties Open a pull request against `master`. Fill out the pull request template, and make sure: - New or changed behavior has test coverage. -- `mvn license:format` has been run, so new files carry the correct license header. +- `mvn license:format` has been run, so new files carry the correct license header. Do not add + your own copyright or author lines to file headers. - The change builds cleanly: `mvn -pl -am -DskipTests -Dpkg.skip=true test-compile` at minimum for the modules you touched. +- You have signed the Contributor License Agreement (see below). -By contributing, you agree that your contribution is licensed under this project's license (see -[LICENSE](./LICENSE)). +## Contributor License Agreement + +Before we can merge your pull request, you need to sign the ThingsBoard +[Contributor License Agreement](https://cla-assistant.io/thingsboard/thingsboard) (CLA). On your +first pull request a bot posts a link: sign in with GitHub and accept the agreement. You sign once, +and it covers all your contributions to this repository, including those made before you signed. + +You keep the copyright in your contributions. The CLA grants ThingsBoard, Inc. a license to use and +distribute them, including under this project's license (see [LICENSE](./LICENSE)) and under +commercial licenses. + +If you contribute on behalf of your employer, your employer may need to sign the Corporate CLA +instead. Contact info@thingsboard.io. diff --git a/pull_request_template.md b/pull_request_template.md index d375ea4d5f..4d37602ca5 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -5,6 +5,7 @@ Put your PR description here instead of this sentence. ## General checklist - [ ] You have reviewed the [contributing guidelines](https://github.com/thingsboard/thingsboard/blob/master/CONTRIBUTING.md). +- [ ] You have signed the [Contributor License Agreement](https://cla-assistant.io/thingsboard/thingsboard). - [ ] [Labels](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels#about-labels) that classify your pull request have been added. - [ ] The [milestone](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/about-milestones) is specified and corresponds to fix version. - [ ] Description references specific [issue](https://github.com/thingsboard/thingsboard/issues). From 2d0cb9db48a91964204ab6485e349fda2a1dc8fd Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Tue, 23 Jun 2026 13:09:45 +0300 Subject: [PATCH 20/43] added specific encoders for TTN/TTI integrations --- .../src/app/shared/models/converter.models.ts | 11 +++++- .../src/assets/converters/js-tti-encoder.raw | 38 +++++++++++++++++++ .../src/assets/converters/js-ttn-encoder.raw | 38 +++++++++++++++++++ .../assets/converters/tbel-tti-encoder.raw | 38 +++++++++++++++++++ .../assets/converters/tbel-ttn-encoder.raw | 38 +++++++++++++++++++ 5 files changed, 162 insertions(+), 1 deletion(-) create mode 100644 ui-ngx/src/assets/converters/js-tti-encoder.raw create mode 100644 ui-ngx/src/assets/converters/js-ttn-encoder.raw create mode 100644 ui-ngx/src/assets/converters/tbel-tti-encoder.raw create mode 100644 ui-ngx/src/assets/converters/tbel-ttn-encoder.raw diff --git a/ui-ngx/src/app/shared/models/converter.models.ts b/ui-ngx/src/app/shared/models/converter.models.ts index 98187efe93..6951ae31c7 100644 --- a/ui-ngx/src/app/shared/models/converter.models.ts +++ b/ui-ngx/src/app/shared/models/converter.models.ts @@ -42,7 +42,14 @@ export const IntegrationJSDefaultConvertersUrl = new Map([ - [IntegrationType.OPC_UA, '/assets/converters/tbel-opc-ua-encoder.raw'] + [IntegrationType.OPC_UA, '/assets/converters/tbel-opc-ua-encoder.raw'], + [IntegrationType.TTI, '/assets/converters/tbel-tti-encoder.raw'], + [IntegrationType.TTN, '/assets/converters/tbel-ttn-encoder.raw'] +]) + +export const IntegrationJSDefaultEncodersUrl = new Map([ + [IntegrationType.TTI, '/assets/converters/js-tti-encoder.raw'], + [IntegrationType.TTN, '/assets/converters/js-ttn-encoder.raw'] ]) export const jsDefaultConvertersUrl = new Map([ @@ -264,6 +271,8 @@ export const getTargetTemplateUrl = integrationType: IntegrationType, converterVersion: ConverterVersion = 1): string => { if (scriptLang === ScriptLanguage.JS && converterType === ConverterType.UPLINK && IntegrationJSDefaultConvertersUrl.has(integrationType)) { return IntegrationJSDefaultConvertersUrl.get(integrationType) + } else if (scriptLang === ScriptLanguage.JS && converterType === ConverterType.DOWNLINK && IntegrationJSDefaultEncodersUrl.has(integrationType)) { + return IntegrationJSDefaultEncodersUrl.get(integrationType); } else if (scriptLang === ScriptLanguage.JS) { return getJsTemplateUrl(converterType, converterVersion); } else if (converterType === ConverterType.UPLINK && IntegrationTbelDefaultConvertersUrl.has(integrationType)) { diff --git a/ui-ngx/src/assets/converters/js-tti-encoder.raw b/ui-ngx/src/assets/converters/js-tti-encoder.raw new file mode 100644 index 0000000000..583b1c40d9 --- /dev/null +++ b/ui-ngx/src/assets/converters/js-tti-encoder.raw @@ -0,0 +1,38 @@ +// Encode downlink data from incoming Rule Engine message + +// msg - JSON message payload downlink message json +// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. +// metadata - list of key-value pairs with additional data about the message +// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter + +/** Encoder **/ + +// Target device identifier used to build the TTN downlink topic (devId is assumed to be added via Originator fields rule node) +var devId = metadata.devId; +// LoRaWAN frame port the downlink is scheduled on (cs_fPort is assumed to be added via Originator attributes rule node, prefix 'cs_' (client-side) is added by rule node) +var fPort = metadata.cs_fPort; + +// The Things Network expects a 'downlinks' array; each entry is a single scheduled downlink. +var data = { + downlinks: [{ + // Frame port to deliver the payload on (must match the device's expected port). + f_port: fPort, + // false - best-effort downlink; set to true to request an acknowledgement from the device. + confirmed: false, + // Downlink payload, base64-encoded as required by the TTN API. + frm_payload: btoa(msg), + // Scheduling priority for the network server: LOWEST, LOW, BELOW_NORMAL, NORMAL, ABOVE_NORMAL, HIGH, HIGHEST. + priority: "NORMAL" + }] +}; + +// Result object with encoded downlink payload +var result = { + contentType: "JSON", + data: JSON.stringify(data), + metadata: { + devId: devId + } +}; + +return result; diff --git a/ui-ngx/src/assets/converters/js-ttn-encoder.raw b/ui-ngx/src/assets/converters/js-ttn-encoder.raw new file mode 100644 index 0000000000..583b1c40d9 --- /dev/null +++ b/ui-ngx/src/assets/converters/js-ttn-encoder.raw @@ -0,0 +1,38 @@ +// Encode downlink data from incoming Rule Engine message + +// msg - JSON message payload downlink message json +// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. +// metadata - list of key-value pairs with additional data about the message +// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter + +/** Encoder **/ + +// Target device identifier used to build the TTN downlink topic (devId is assumed to be added via Originator fields rule node) +var devId = metadata.devId; +// LoRaWAN frame port the downlink is scheduled on (cs_fPort is assumed to be added via Originator attributes rule node, prefix 'cs_' (client-side) is added by rule node) +var fPort = metadata.cs_fPort; + +// The Things Network expects a 'downlinks' array; each entry is a single scheduled downlink. +var data = { + downlinks: [{ + // Frame port to deliver the payload on (must match the device's expected port). + f_port: fPort, + // false - best-effort downlink; set to true to request an acknowledgement from the device. + confirmed: false, + // Downlink payload, base64-encoded as required by the TTN API. + frm_payload: btoa(msg), + // Scheduling priority for the network server: LOWEST, LOW, BELOW_NORMAL, NORMAL, ABOVE_NORMAL, HIGH, HIGHEST. + priority: "NORMAL" + }] +}; + +// Result object with encoded downlink payload +var result = { + contentType: "JSON", + data: JSON.stringify(data), + metadata: { + devId: devId + } +}; + +return result; diff --git a/ui-ngx/src/assets/converters/tbel-tti-encoder.raw b/ui-ngx/src/assets/converters/tbel-tti-encoder.raw new file mode 100644 index 0000000000..583b1c40d9 --- /dev/null +++ b/ui-ngx/src/assets/converters/tbel-tti-encoder.raw @@ -0,0 +1,38 @@ +// Encode downlink data from incoming Rule Engine message + +// msg - JSON message payload downlink message json +// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. +// metadata - list of key-value pairs with additional data about the message +// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter + +/** Encoder **/ + +// Target device identifier used to build the TTN downlink topic (devId is assumed to be added via Originator fields rule node) +var devId = metadata.devId; +// LoRaWAN frame port the downlink is scheduled on (cs_fPort is assumed to be added via Originator attributes rule node, prefix 'cs_' (client-side) is added by rule node) +var fPort = metadata.cs_fPort; + +// The Things Network expects a 'downlinks' array; each entry is a single scheduled downlink. +var data = { + downlinks: [{ + // Frame port to deliver the payload on (must match the device's expected port). + f_port: fPort, + // false - best-effort downlink; set to true to request an acknowledgement from the device. + confirmed: false, + // Downlink payload, base64-encoded as required by the TTN API. + frm_payload: btoa(msg), + // Scheduling priority for the network server: LOWEST, LOW, BELOW_NORMAL, NORMAL, ABOVE_NORMAL, HIGH, HIGHEST. + priority: "NORMAL" + }] +}; + +// Result object with encoded downlink payload +var result = { + contentType: "JSON", + data: JSON.stringify(data), + metadata: { + devId: devId + } +}; + +return result; diff --git a/ui-ngx/src/assets/converters/tbel-ttn-encoder.raw b/ui-ngx/src/assets/converters/tbel-ttn-encoder.raw new file mode 100644 index 0000000000..583b1c40d9 --- /dev/null +++ b/ui-ngx/src/assets/converters/tbel-ttn-encoder.raw @@ -0,0 +1,38 @@ +// Encode downlink data from incoming Rule Engine message + +// msg - JSON message payload downlink message json +// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. +// metadata - list of key-value pairs with additional data about the message +// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter + +/** Encoder **/ + +// Target device identifier used to build the TTN downlink topic (devId is assumed to be added via Originator fields rule node) +var devId = metadata.devId; +// LoRaWAN frame port the downlink is scheduled on (cs_fPort is assumed to be added via Originator attributes rule node, prefix 'cs_' (client-side) is added by rule node) +var fPort = metadata.cs_fPort; + +// The Things Network expects a 'downlinks' array; each entry is a single scheduled downlink. +var data = { + downlinks: [{ + // Frame port to deliver the payload on (must match the device's expected port). + f_port: fPort, + // false - best-effort downlink; set to true to request an acknowledgement from the device. + confirmed: false, + // Downlink payload, base64-encoded as required by the TTN API. + frm_payload: btoa(msg), + // Scheduling priority for the network server: LOWEST, LOW, BELOW_NORMAL, NORMAL, ABOVE_NORMAL, HIGH, HIGHEST. + priority: "NORMAL" + }] +}; + +// Result object with encoded downlink payload +var result = { + contentType: "JSON", + data: JSON.stringify(data), + metadata: { + devId: devId + } +}; + +return result; From 90fdfa444204ec232fa6aa7a1b793224356d1933 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Tue, 23 Jun 2026 14:02:40 +0300 Subject: [PATCH 21/43] added specific encoder for MQTT integration --- .../src/app/shared/models/converter.models.ts | 6 ++++-- .../src/assets/converters/js-mqtt-encoder.raw | 20 +++++++++++++++++++ .../assets/converters/tbel-mqtt-encoder.raw | 20 +++++++++++++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 ui-ngx/src/assets/converters/js-mqtt-encoder.raw create mode 100644 ui-ngx/src/assets/converters/tbel-mqtt-encoder.raw diff --git a/ui-ngx/src/app/shared/models/converter.models.ts b/ui-ngx/src/app/shared/models/converter.models.ts index 6951ae31c7..5c53483671 100644 --- a/ui-ngx/src/app/shared/models/converter.models.ts +++ b/ui-ngx/src/app/shared/models/converter.models.ts @@ -44,12 +44,14 @@ export const IntegrationJSDefaultConvertersUrl = new Map([ [IntegrationType.OPC_UA, '/assets/converters/tbel-opc-ua-encoder.raw'], [IntegrationType.TTI, '/assets/converters/tbel-tti-encoder.raw'], - [IntegrationType.TTN, '/assets/converters/tbel-ttn-encoder.raw'] + [IntegrationType.TTN, '/assets/converters/tbel-ttn-encoder.raw'], + [IntegrationType.MQTT, '/assets/converters/tbel-mqtt-encoder.raw'] ]) export const IntegrationJSDefaultEncodersUrl = new Map([ [IntegrationType.TTI, '/assets/converters/js-tti-encoder.raw'], - [IntegrationType.TTN, '/assets/converters/js-ttn-encoder.raw'] + [IntegrationType.TTN, '/assets/converters/js-ttn-encoder.raw'], + [IntegrationType.MQTT, '/assets/converters/js-mqtt-encoder.raw'] ]) export const jsDefaultConvertersUrl = new Map([ diff --git a/ui-ngx/src/assets/converters/js-mqtt-encoder.raw b/ui-ngx/src/assets/converters/js-mqtt-encoder.raw new file mode 100644 index 0000000000..28b7157b8f --- /dev/null +++ b/ui-ngx/src/assets/converters/js-mqtt-encoder.raw @@ -0,0 +1,20 @@ +// Encode downlink data from incoming Rule Engine message + +// msg - JSON message payload downlink message json +// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. +// metadata - list of key-value pairs with additional data about the message +// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter + +/** Encoder **/ + +// Publish the ThingsBoard message as JSON to the device command topic. +// metadata.topic is read by the integration when Downlink topic pattern is ${topic}. +var result = { + contentType: "JSON", + data: JSON.stringify(msg), + metadata: { + topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload' + } +}; + +return result; diff --git a/ui-ngx/src/assets/converters/tbel-mqtt-encoder.raw b/ui-ngx/src/assets/converters/tbel-mqtt-encoder.raw new file mode 100644 index 0000000000..fae1cff169 --- /dev/null +++ b/ui-ngx/src/assets/converters/tbel-mqtt-encoder.raw @@ -0,0 +1,20 @@ +// Encode downlink data from incoming Rule Engine message + +// msg - JSON message payload downlink message json +// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. +// metadata - list of key-value pairs with additional data about the message +// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter + +/** Encoder **/ + +// Publish the ThingsBoard message as JSON to the device command topic. +// metadata.topic is read by the integration when Downlink topic pattern is ${topic}. +var result = { + contentType: "JSON", + data: JSON.stringify(msg), + metadata: { + topic: metadata['deviceType'] + '/' + metadata['deviceName'] + '/upload' + } +}; + +return result; From 376307c0aaa86f165e79371aba710a6c85ea7552 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Tue, 23 Jun 2026 14:41:48 +0300 Subject: [PATCH 22/43] added specific default encoder for Chirpstack integration --- .../src/app/shared/models/converter.models.ts | 6 +++-- .../converters/js-chirpstack-encoder.raw | 23 +++++++++++++++++++ .../converters/tbel-chirpstack-encoder.raw | 23 +++++++++++++++++++ 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 ui-ngx/src/assets/converters/js-chirpstack-encoder.raw create mode 100644 ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw diff --git a/ui-ngx/src/app/shared/models/converter.models.ts b/ui-ngx/src/app/shared/models/converter.models.ts index 5c53483671..d088b86539 100644 --- a/ui-ngx/src/app/shared/models/converter.models.ts +++ b/ui-ngx/src/app/shared/models/converter.models.ts @@ -45,13 +45,15 @@ export const IntegrationTbelDefaultEncodersUrl = new Map([ [IntegrationType.TTI, '/assets/converters/js-tti-encoder.raw'], [IntegrationType.TTN, '/assets/converters/js-ttn-encoder.raw'], - [IntegrationType.MQTT, '/assets/converters/js-mqtt-encoder.raw'] + [IntegrationType.MQTT, '/assets/converters/js-mqtt-encoder.raw'], + [IntegrationType.CHIRPSTACK, '/assets/converters/js-chirpstack-encoder.raw'] ]) export const jsDefaultConvertersUrl = new Map([ diff --git a/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw b/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw new file mode 100644 index 0000000000..41c13c7a6c --- /dev/null +++ b/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw @@ -0,0 +1,23 @@ +// Encode downlink data from incoming Rule Engine message + +// msg - JSON message payload downlink message json +// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. +// metadata - list of key-value pairs with additional data about the message +// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter + +/** Encoder **/ + +// Result object with encoded downlink payload +var result = { + // downlink data content type: JSON, TEXT or BINARY (base64 format) + contentType: "TEXT", + // downlink data + data: btoa(msg), + // Optional metadata object presented in key/value format + metadata: { + DevEUI: metadata.cs_eui, + fPort: metadata.cs_fPort + } +}; + +return result; diff --git a/ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw b/ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw new file mode 100644 index 0000000000..41c13c7a6c --- /dev/null +++ b/ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw @@ -0,0 +1,23 @@ +// Encode downlink data from incoming Rule Engine message + +// msg - JSON message payload downlink message json +// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. +// metadata - list of key-value pairs with additional data about the message +// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter + +/** Encoder **/ + +// Result object with encoded downlink payload +var result = { + // downlink data content type: JSON, TEXT or BINARY (base64 format) + contentType: "TEXT", + // downlink data + data: btoa(msg), + // Optional metadata object presented in key/value format + metadata: { + DevEUI: metadata.cs_eui, + fPort: metadata.cs_fPort + } +}; + +return result; From ebe820002e930b25b1cd547df2d9be02ae55d63a Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Tue, 23 Jun 2026 16:38:16 +0300 Subject: [PATCH 23/43] updated Loriot default decoder and encoder --- .../src/app/shared/models/converter.models.ts | 6 ++-- .../assets/converters/js-loriot-decoder.raw | 7 +++++ .../assets/converters/js-loriot-encoder.raw | 30 +++++++++++++++++++ .../assets/converters/tbel-loriot-decoder.raw | 7 +++++ .../assets/converters/tbel-loriot-encoder.raw | 30 +++++++++++++++++++ 5 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 ui-ngx/src/assets/converters/js-loriot-encoder.raw create mode 100644 ui-ngx/src/assets/converters/tbel-loriot-encoder.raw diff --git a/ui-ngx/src/app/shared/models/converter.models.ts b/ui-ngx/src/app/shared/models/converter.models.ts index d088b86539..fc9d2a985e 100644 --- a/ui-ngx/src/app/shared/models/converter.models.ts +++ b/ui-ngx/src/app/shared/models/converter.models.ts @@ -46,14 +46,16 @@ export const IntegrationTbelDefaultEncodersUrl = new Map([ [IntegrationType.TTI, '/assets/converters/js-tti-encoder.raw'], [IntegrationType.TTN, '/assets/converters/js-ttn-encoder.raw'], [IntegrationType.MQTT, '/assets/converters/js-mqtt-encoder.raw'], - [IntegrationType.CHIRPSTACK, '/assets/converters/js-chirpstack-encoder.raw'] + [IntegrationType.CHIRPSTACK, '/assets/converters/js-chirpstack-encoder.raw'], + [IntegrationType.LORIOT, '/assets/converters/js-loriot-encoder.raw'] ]) export const jsDefaultConvertersUrl = new Map([ diff --git a/ui-ngx/src/assets/converters/js-loriot-decoder.raw b/ui-ngx/src/assets/converters/js-loriot-decoder.raw index 8021611b56..1e18fbe019 100644 --- a/ui-ngx/src/assets/converters/js-loriot-decoder.raw +++ b/ui-ngx/src/assets/converters/js-loriot-decoder.raw @@ -52,6 +52,13 @@ function decodePayload(input) { // }; } +// Process only LORIOT uplink messages (cmd == 'rx'). +// Skip downlink confirmations (e.g. cmd == 'txd') and other events so they +// are not stored as telemetry. Returning an empty array yields no uplink data. +if (metadata.cmd != 'rx') { + return []; +} + var result = decodePayload(payload); // Uncomment this code block to overwrite values set in the main configuration window. Useful if you extract device/asset/customer/group names from the payload; // result.type = 'DEVICE'; // Entity type allows you to choose type of created entity. Can be 'DEVICE' or 'ASSET'. diff --git a/ui-ngx/src/assets/converters/js-loriot-encoder.raw b/ui-ngx/src/assets/converters/js-loriot-encoder.raw new file mode 100644 index 0000000000..5c58ffbe54 --- /dev/null +++ b/ui-ngx/src/assets/converters/js-loriot-encoder.raw @@ -0,0 +1,30 @@ +// Encode downlink data from incoming Rule Engine message. +// msg - JSON message payload (e.g. { "state": "on" }) +// msgType - message type, e.g. 'ATTRIBUTES_UPDATED' +// metadata - enriched by the Originator attributes node with device client attributes. +// ThingsBoard prefixes client-scope attributes with "cs_": +// metadata.cs_eui — LORIOT device EUI stored on first uplink (e.g. "466ECD510CF7B021") +// metadata.cs_fPort — LoRaWAN frame port stored on first uplink (e.g. "1") + +var eui = metadata.cs_eui; + +// Default port to 1 when the device fPort attribute is missing or empty. +var port = (metadata.cs_fPort != null && metadata.cs_fPort != '') + ? parseInt(metadata.cs_fPort) + : 1; + +var result = { + // Downlink data content type: JSON, TEXT, or BINARY (base64 format). + contentType: "JSON", + + // Downlink data — serialise the full message payload as a JSON string. + data: JSON.stringify(msg), + + // Metadata required by LORIOT for downlink delivery. + metadata: { + "EUI": eui, + "port": port + } +}; + +return result; diff --git a/ui-ngx/src/assets/converters/tbel-loriot-decoder.raw b/ui-ngx/src/assets/converters/tbel-loriot-decoder.raw index 5628a2f6c4..ab2dfa83b4 100644 --- a/ui-ngx/src/assets/converters/tbel-loriot-decoder.raw +++ b/ui-ngx/src/assets/converters/tbel-loriot-decoder.raw @@ -52,6 +52,13 @@ function decodePayload(input) { // }; } +// Process only LORIOT uplink messages (cmd == 'rx'). +// Skip downlink confirmations (e.g. cmd == 'txd') and other events so they +// are not stored as telemetry. Returning an empty array yields no uplink data. +if (metadata.cmd != 'rx') { + return []; +} + var result = decodePayload(payload); // Uncomment this code block to overwrite values set in the main configuration window. Useful if you extract device/asset/customer/group names from the payload; // result.type = 'DEVICE'; // Entity type allows you to choose type of created entity. Can be 'DEVICE' or 'ASSET'. diff --git a/ui-ngx/src/assets/converters/tbel-loriot-encoder.raw b/ui-ngx/src/assets/converters/tbel-loriot-encoder.raw new file mode 100644 index 0000000000..5c58ffbe54 --- /dev/null +++ b/ui-ngx/src/assets/converters/tbel-loriot-encoder.raw @@ -0,0 +1,30 @@ +// Encode downlink data from incoming Rule Engine message. +// msg - JSON message payload (e.g. { "state": "on" }) +// msgType - message type, e.g. 'ATTRIBUTES_UPDATED' +// metadata - enriched by the Originator attributes node with device client attributes. +// ThingsBoard prefixes client-scope attributes with "cs_": +// metadata.cs_eui — LORIOT device EUI stored on first uplink (e.g. "466ECD510CF7B021") +// metadata.cs_fPort — LoRaWAN frame port stored on first uplink (e.g. "1") + +var eui = metadata.cs_eui; + +// Default port to 1 when the device fPort attribute is missing or empty. +var port = (metadata.cs_fPort != null && metadata.cs_fPort != '') + ? parseInt(metadata.cs_fPort) + : 1; + +var result = { + // Downlink data content type: JSON, TEXT, or BINARY (base64 format). + contentType: "JSON", + + // Downlink data — serialise the full message payload as a JSON string. + data: JSON.stringify(msg), + + // Metadata required by LORIOT for downlink delivery. + metadata: { + "EUI": eui, + "port": port + } +}; + +return result; From 2612e44bd6344cfa679fc79bd5bf759b0bb67c48 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Wed, 24 Jun 2026 13:49:28 +0300 Subject: [PATCH 24/43] fixed pr comments --- .../src/app/shared/models/converter.models.ts | 31 +++++++-------- .../converters/js-chirpstack-encoder.raw | 11 +++++- .../src/assets/converters/js-mqtt-encoder.raw | 4 +- ...tti-encoder.raw => js-ttn-tti-encoder.raw} | 14 ++++--- .../converters/tbel-chirpstack-encoder.raw | 11 +++++- .../assets/converters/tbel-mqtt-encoder.raw | 2 +- .../assets/converters/tbel-tti-encoder.raw | 38 ------------------- .../assets/converters/tbel-ttn-encoder.raw | 38 ------------------- ...n-encoder.raw => tbel-ttn-tti-encoder.raw} | 14 ++++--- 9 files changed, 55 insertions(+), 108 deletions(-) rename ui-ngx/src/assets/converters/{js-tti-encoder.raw => js-ttn-tti-encoder.raw} (64%) delete mode 100644 ui-ngx/src/assets/converters/tbel-tti-encoder.raw delete mode 100644 ui-ngx/src/assets/converters/tbel-ttn-encoder.raw rename ui-ngx/src/assets/converters/{js-ttn-encoder.raw => tbel-ttn-tti-encoder.raw} (64%) diff --git a/ui-ngx/src/app/shared/models/converter.models.ts b/ui-ngx/src/app/shared/models/converter.models.ts index fc9d2a985e..fab8903566 100644 --- a/ui-ngx/src/app/shared/models/converter.models.ts +++ b/ui-ngx/src/app/shared/models/converter.models.ts @@ -43,16 +43,16 @@ export const IntegrationJSDefaultConvertersUrl = new Map([ [IntegrationType.OPC_UA, '/assets/converters/tbel-opc-ua-encoder.raw'], - [IntegrationType.TTI, '/assets/converters/tbel-tti-encoder.raw'], - [IntegrationType.TTN, '/assets/converters/tbel-ttn-encoder.raw'], + [IntegrationType.TTI, '/assets/converters/tbel-ttn-tti-encoder.raw'], + [IntegrationType.TTN, '/assets/converters/tbel-ttn-tti-encoder.raw'], [IntegrationType.MQTT, '/assets/converters/tbel-mqtt-encoder.raw'], [IntegrationType.CHIRPSTACK, '/assets/converters/tbel-chirpstack-encoder.raw'], [IntegrationType.LORIOT, '/assets/converters/tbel-loriot-encoder.raw'] ]) export const IntegrationJSDefaultEncodersUrl = new Map([ - [IntegrationType.TTI, '/assets/converters/js-tti-encoder.raw'], - [IntegrationType.TTN, '/assets/converters/js-ttn-encoder.raw'], + [IntegrationType.TTI, '/assets/converters/js-ttn-tti-encoder.raw'], + [IntegrationType.TTN, '/assets/converters/js-ttn-tti-encoder.raw'], [IntegrationType.MQTT, '/assets/converters/js-mqtt-encoder.raw'], [IntegrationType.CHIRPSTACK, '/assets/converters/js-chirpstack-encoder.raw'], [IntegrationType.LORIOT, '/assets/converters/js-loriot-encoder.raw'] @@ -275,18 +275,19 @@ export const getTargetField = export const getTargetTemplateUrl = (converterType: ConverterType, scriptLang: ScriptLanguage, integrationType: IntegrationType, converterVersion: ConverterVersion = 1): string => { - if (scriptLang === ScriptLanguage.JS && converterType === ConverterType.UPLINK && IntegrationJSDefaultConvertersUrl.has(integrationType)) { - return IntegrationJSDefaultConvertersUrl.get(integrationType) - } else if (scriptLang === ScriptLanguage.JS && converterType === ConverterType.DOWNLINK && IntegrationJSDefaultEncodersUrl.has(integrationType)) { - return IntegrationJSDefaultEncodersUrl.get(integrationType); - } else if (scriptLang === ScriptLanguage.JS) { - return getJsTemplateUrl(converterType, converterVersion); - } else if (converterType === ConverterType.UPLINK && IntegrationTbelDefaultConvertersUrl.has(integrationType)) { - return IntegrationTbelDefaultConvertersUrl.get(integrationType); - } else if (converterType === ConverterType.DOWNLINK && IntegrationTbelDefaultEncodersUrl.has(integrationType)) { - return IntegrationTbelDefaultEncodersUrl.get(integrationType); + const isJs = scriptLang === ScriptLanguage.JS; + const isUplink = converterType === ConverterType.UPLINK; + // Integration-specific template map for this (language, direction); UPLINK -> decoders, DOWNLINK -> encoders. + const integrationUrls = isJs + ? (isUplink ? IntegrationJSDefaultConvertersUrl : IntegrationJSDefaultEncodersUrl) + : (isUplink ? IntegrationTbelDefaultConvertersUrl : IntegrationTbelDefaultEncodersUrl); + if (integrationUrls.has(integrationType)) { + return integrationUrls.get(integrationType); } - return getTbelTemplateUrl(converterType, converterVersion); + // Fall back to the generic template for the script language. + return isJs + ? getJsTemplateUrl(converterType, converterVersion) + : getTbelTemplateUrl(converterType, converterVersion); } const getTbelConverterFunctionHeldId = (converterType: ConverterType, converterVersion: ConverterVersion): string => { diff --git a/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw b/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw index 41c13c7a6c..ebfaf140bf 100644 --- a/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw +++ b/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw @@ -3,6 +3,11 @@ // msg - JSON message payload downlink message json // msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. // metadata - list of key-value pairs with additional data about the message +// ChirpStack reads DevEUI and fPort from the metadata below to enqueue the downlink (POST .../devices/{DevEUI}/queue). +// Both are client-side device attributes that must be populated via an Originator attributes rule node. +// ThingsBoard prefixes client-scope attributes with "cs_": +// metadata.cs_eui — ChirpStack device EUI stored on first uplink (e.g. "466ECD510CF7B021") +// metadata.cs_fPort — LoRaWAN frame port stored on first uplink (e.g. "1") // integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter /** Encoder **/ @@ -12,10 +17,12 @@ var result = { // downlink data content type: JSON, TEXT or BINARY (base64 format) contentType: "TEXT", // downlink data - data: btoa(msg), - // Optional metadata object presented in key/value format + data: btoa(JSON.stringify(msg)), + // Metadata required by ChirpStack for downlink delivery. metadata: { + // Target device EUI; ChirpStack rejects the downlink if this is missing. DevEUI: metadata.cs_eui, + // LoRaWAN frame port (1-223); ChirpStack parses this as an integer. fPort: metadata.cs_fPort } }; diff --git a/ui-ngx/src/assets/converters/js-mqtt-encoder.raw b/ui-ngx/src/assets/converters/js-mqtt-encoder.raw index 28b7157b8f..71739f2029 100644 --- a/ui-ngx/src/assets/converters/js-mqtt-encoder.raw +++ b/ui-ngx/src/assets/converters/js-mqtt-encoder.raw @@ -7,13 +7,13 @@ /** Encoder **/ -// Publish the ThingsBoard message as JSON to the device command topic. +// Publish the ThingsBoard message as JSON to the device upload topic. // metadata.topic is read by the integration when Downlink topic pattern is ${topic}. var result = { contentType: "JSON", data: JSON.stringify(msg), metadata: { - topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload' + topic: metadata['deviceType'] + '/' + metadata['deviceName'] + '/upload' } }; diff --git a/ui-ngx/src/assets/converters/js-tti-encoder.raw b/ui-ngx/src/assets/converters/js-ttn-tti-encoder.raw similarity index 64% rename from ui-ngx/src/assets/converters/js-tti-encoder.raw rename to ui-ngx/src/assets/converters/js-ttn-tti-encoder.raw index 583b1c40d9..7689451630 100644 --- a/ui-ngx/src/assets/converters/js-tti-encoder.raw +++ b/ui-ngx/src/assets/converters/js-ttn-tti-encoder.raw @@ -1,4 +1,5 @@ // Encode downlink data from incoming Rule Engine message +// Shared by the TTN and TTI integrations (The Things Stack). // msg - JSON message payload downlink message json // msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. @@ -7,20 +8,23 @@ /** Encoder **/ -// Target device identifier used to build the TTN downlink topic (devId is assumed to be added via Originator fields rule node) +// Target device identifier used to build the TTN/TTI downlink topic (devId is assumed to be added via Originator fields rule node) var devId = metadata.devId; // LoRaWAN frame port the downlink is scheduled on (cs_fPort is assumed to be added via Originator attributes rule node, prefix 'cs_' (client-side) is added by rule node) -var fPort = metadata.cs_fPort; +// Default port to 1 when the device fPort attribute is missing or empty. parseInt keeps f_port a number, as the TTN/TTI API expects. +var fPort = (metadata.cs_fPort != null && metadata.cs_fPort != '') + ? parseInt(metadata.cs_fPort) + : 1; -// The Things Network expects a 'downlinks' array; each entry is a single scheduled downlink. +// The Things Stack (TTN/TTI) expects a 'downlinks' array; each entry is a single scheduled downlink. var data = { downlinks: [{ // Frame port to deliver the payload on (must match the device's expected port). f_port: fPort, // false - best-effort downlink; set to true to request an acknowledgement from the device. confirmed: false, - // Downlink payload, base64-encoded as required by the TTN API. - frm_payload: btoa(msg), + // Downlink payload, base64-encoded as required by the TTN/TTI API. + frm_payload: btoa(JSON.stringify(msg)), // Scheduling priority for the network server: LOWEST, LOW, BELOW_NORMAL, NORMAL, ABOVE_NORMAL, HIGH, HIGHEST. priority: "NORMAL" }] diff --git a/ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw b/ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw index 41c13c7a6c..906f5f7afd 100644 --- a/ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw +++ b/ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw @@ -3,6 +3,11 @@ // msg - JSON message payload downlink message json // msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. // metadata - list of key-value pairs with additional data about the message +// ChirpStack reads DevEUI and fPort from the metadata below to enqueue the downlink (POST .../devices/{DevEUI}/queue). +// Both are client-side device attributes that could be populated via an Originator attributes rule node. +// ThingsBoard prefixes client-scope attributes with "cs_": +// metadata.cs_eui — ChirpStack device EUI stored on first uplink (e.g. "466ECD510CF7B021") +// metadata.cs_fPort — LoRaWAN frame port stored on first uplink (e.g. "1") // integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter /** Encoder **/ @@ -12,10 +17,12 @@ var result = { // downlink data content type: JSON, TEXT or BINARY (base64 format) contentType: "TEXT", // downlink data - data: btoa(msg), - // Optional metadata object presented in key/value format + data: btoa(JSON.stringify(msg)), + // Metadata required by ChirpStack for downlink delivery. metadata: { + // Target device EUI; ChirpStack rejects the downlink if this is missing. DevEUI: metadata.cs_eui, + // LoRaWAN frame port (1-223); ChirpStack parses this as an integer. fPort: metadata.cs_fPort } }; diff --git a/ui-ngx/src/assets/converters/tbel-mqtt-encoder.raw b/ui-ngx/src/assets/converters/tbel-mqtt-encoder.raw index fae1cff169..71739f2029 100644 --- a/ui-ngx/src/assets/converters/tbel-mqtt-encoder.raw +++ b/ui-ngx/src/assets/converters/tbel-mqtt-encoder.raw @@ -7,7 +7,7 @@ /** Encoder **/ -// Publish the ThingsBoard message as JSON to the device command topic. +// Publish the ThingsBoard message as JSON to the device upload topic. // metadata.topic is read by the integration when Downlink topic pattern is ${topic}. var result = { contentType: "JSON", diff --git a/ui-ngx/src/assets/converters/tbel-tti-encoder.raw b/ui-ngx/src/assets/converters/tbel-tti-encoder.raw deleted file mode 100644 index 583b1c40d9..0000000000 --- a/ui-ngx/src/assets/converters/tbel-tti-encoder.raw +++ /dev/null @@ -1,38 +0,0 @@ -// Encode downlink data from incoming Rule Engine message - -// msg - JSON message payload downlink message json -// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. -// metadata - list of key-value pairs with additional data about the message -// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter - -/** Encoder **/ - -// Target device identifier used to build the TTN downlink topic (devId is assumed to be added via Originator fields rule node) -var devId = metadata.devId; -// LoRaWAN frame port the downlink is scheduled on (cs_fPort is assumed to be added via Originator attributes rule node, prefix 'cs_' (client-side) is added by rule node) -var fPort = metadata.cs_fPort; - -// The Things Network expects a 'downlinks' array; each entry is a single scheduled downlink. -var data = { - downlinks: [{ - // Frame port to deliver the payload on (must match the device's expected port). - f_port: fPort, - // false - best-effort downlink; set to true to request an acknowledgement from the device. - confirmed: false, - // Downlink payload, base64-encoded as required by the TTN API. - frm_payload: btoa(msg), - // Scheduling priority for the network server: LOWEST, LOW, BELOW_NORMAL, NORMAL, ABOVE_NORMAL, HIGH, HIGHEST. - priority: "NORMAL" - }] -}; - -// Result object with encoded downlink payload -var result = { - contentType: "JSON", - data: JSON.stringify(data), - metadata: { - devId: devId - } -}; - -return result; diff --git a/ui-ngx/src/assets/converters/tbel-ttn-encoder.raw b/ui-ngx/src/assets/converters/tbel-ttn-encoder.raw deleted file mode 100644 index 583b1c40d9..0000000000 --- a/ui-ngx/src/assets/converters/tbel-ttn-encoder.raw +++ /dev/null @@ -1,38 +0,0 @@ -// Encode downlink data from incoming Rule Engine message - -// msg - JSON message payload downlink message json -// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. -// metadata - list of key-value pairs with additional data about the message -// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter - -/** Encoder **/ - -// Target device identifier used to build the TTN downlink topic (devId is assumed to be added via Originator fields rule node) -var devId = metadata.devId; -// LoRaWAN frame port the downlink is scheduled on (cs_fPort is assumed to be added via Originator attributes rule node, prefix 'cs_' (client-side) is added by rule node) -var fPort = metadata.cs_fPort; - -// The Things Network expects a 'downlinks' array; each entry is a single scheduled downlink. -var data = { - downlinks: [{ - // Frame port to deliver the payload on (must match the device's expected port). - f_port: fPort, - // false - best-effort downlink; set to true to request an acknowledgement from the device. - confirmed: false, - // Downlink payload, base64-encoded as required by the TTN API. - frm_payload: btoa(msg), - // Scheduling priority for the network server: LOWEST, LOW, BELOW_NORMAL, NORMAL, ABOVE_NORMAL, HIGH, HIGHEST. - priority: "NORMAL" - }] -}; - -// Result object with encoded downlink payload -var result = { - contentType: "JSON", - data: JSON.stringify(data), - metadata: { - devId: devId - } -}; - -return result; diff --git a/ui-ngx/src/assets/converters/js-ttn-encoder.raw b/ui-ngx/src/assets/converters/tbel-ttn-tti-encoder.raw similarity index 64% rename from ui-ngx/src/assets/converters/js-ttn-encoder.raw rename to ui-ngx/src/assets/converters/tbel-ttn-tti-encoder.raw index 583b1c40d9..7689451630 100644 --- a/ui-ngx/src/assets/converters/js-ttn-encoder.raw +++ b/ui-ngx/src/assets/converters/tbel-ttn-tti-encoder.raw @@ -1,4 +1,5 @@ // Encode downlink data from incoming Rule Engine message +// Shared by the TTN and TTI integrations (The Things Stack). // msg - JSON message payload downlink message json // msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. @@ -7,20 +8,23 @@ /** Encoder **/ -// Target device identifier used to build the TTN downlink topic (devId is assumed to be added via Originator fields rule node) +// Target device identifier used to build the TTN/TTI downlink topic (devId is assumed to be added via Originator fields rule node) var devId = metadata.devId; // LoRaWAN frame port the downlink is scheduled on (cs_fPort is assumed to be added via Originator attributes rule node, prefix 'cs_' (client-side) is added by rule node) -var fPort = metadata.cs_fPort; +// Default port to 1 when the device fPort attribute is missing or empty. parseInt keeps f_port a number, as the TTN/TTI API expects. +var fPort = (metadata.cs_fPort != null && metadata.cs_fPort != '') + ? parseInt(metadata.cs_fPort) + : 1; -// The Things Network expects a 'downlinks' array; each entry is a single scheduled downlink. +// The Things Stack (TTN/TTI) expects a 'downlinks' array; each entry is a single scheduled downlink. var data = { downlinks: [{ // Frame port to deliver the payload on (must match the device's expected port). f_port: fPort, // false - best-effort downlink; set to true to request an acknowledgement from the device. confirmed: false, - // Downlink payload, base64-encoded as required by the TTN API. - frm_payload: btoa(msg), + // Downlink payload, base64-encoded as required by the TTN/TTI API. + frm_payload: btoa(JSON.stringify(msg)), // Scheduling priority for the network server: LOWEST, LOW, BELOW_NORMAL, NORMAL, ABOVE_NORMAL, HIGH, HIGHEST. priority: "NORMAL" }] From fe4e0c4ca6d69546cf0e3810c85a65e2ce7b8fd7 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Wed, 24 Jun 2026 13:56:50 +0300 Subject: [PATCH 25/43] Align ChirpStack encoder comment wording across js/tbel templates Co-Authored-By: Claude Opus 4.8 (1M context) --- ui-ngx/src/assets/converters/js-chirpstack-encoder.raw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw b/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw index ebfaf140bf..906f5f7afd 100644 --- a/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw +++ b/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw @@ -4,7 +4,7 @@ // msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc. // metadata - list of key-value pairs with additional data about the message // ChirpStack reads DevEUI and fPort from the metadata below to enqueue the downlink (POST .../devices/{DevEUI}/queue). -// Both are client-side device attributes that must be populated via an Originator attributes rule node. +// Both are client-side device attributes that could be populated via an Originator attributes rule node. // ThingsBoard prefixes client-scope attributes with "cs_": // metadata.cs_eui — ChirpStack device EUI stored on first uplink (e.g. "466ECD510CF7B021") // metadata.cs_fPort — LoRaWAN frame port stored on first uplink (e.g. "1") From abb54ab83cc26da6b871501dfa300c351366908c Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Wed, 24 Jun 2026 16:26:03 +0300 Subject: [PATCH 26/43] updated encoders to send powerState value only instead whole message --- .../src/assets/converters/js-chirpstack-encoder.raw | 6 +++++- ui-ngx/src/assets/converters/js-loriot-encoder.raw | 11 ++++++++--- ui-ngx/src/assets/converters/js-ttn-tti-encoder.raw | 6 +++++- .../src/assets/converters/tbel-chirpstack-encoder.raw | 6 +++++- ui-ngx/src/assets/converters/tbel-loriot-encoder.raw | 11 ++++++++--- ui-ngx/src/assets/converters/tbel-ttn-tti-encoder.raw | 6 +++++- 6 files changed, 36 insertions(+), 10 deletions(-) diff --git a/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw b/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw index 906f5f7afd..5258a448d2 100644 --- a/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw +++ b/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw @@ -12,12 +12,16 @@ /** Encoder **/ +var base64Payload = (msg.powerState != null) + ? btoa(msg.powerState) // if powerState is present, encode it to base64 + : btoa('unspecified'); // fall back to 'unspecified' when absent + // Result object with encoded downlink payload var result = { // downlink data content type: JSON, TEXT or BINARY (base64 format) contentType: "TEXT", // downlink data - data: btoa(JSON.stringify(msg)), + data: base64Payload, // Metadata required by ChirpStack for downlink delivery. metadata: { // Target device EUI; ChirpStack rejects the downlink if this is missing. diff --git a/ui-ngx/src/assets/converters/js-loriot-encoder.raw b/ui-ngx/src/assets/converters/js-loriot-encoder.raw index 5c58ffbe54..05ca39cbe7 100644 --- a/ui-ngx/src/assets/converters/js-loriot-encoder.raw +++ b/ui-ngx/src/assets/converters/js-loriot-encoder.raw @@ -13,12 +13,17 @@ var port = (metadata.cs_fPort != null && metadata.cs_fPort != '') ? parseInt(metadata.cs_fPort) : 1; +// Send only the command value (powerState) rather than the whole message; fall back to 'unspecified' when absent. +var payload = (msg.powerState != null) + ? msg.powerState + : 'unspecified'; + var result = { // Downlink data content type: JSON, TEXT, or BINARY (base64 format). - contentType: "JSON", + contentType: "TEXT", - // Downlink data — serialise the full message payload as a JSON string. - data: JSON.stringify(msg), + // Downlink data — the command value; LORIOT hex-encodes it before delivery. + data: payload, // Metadata required by LORIOT for downlink delivery. metadata: { diff --git a/ui-ngx/src/assets/converters/js-ttn-tti-encoder.raw b/ui-ngx/src/assets/converters/js-ttn-tti-encoder.raw index 7689451630..9cf33882e2 100644 --- a/ui-ngx/src/assets/converters/js-ttn-tti-encoder.raw +++ b/ui-ngx/src/assets/converters/js-ttn-tti-encoder.raw @@ -16,6 +16,10 @@ var fPort = (metadata.cs_fPort != null && metadata.cs_fPort != '') ? parseInt(metadata.cs_fPort) : 1; +var base64Payload = (msg.powerState != null) + ? btoa(msg.powerState) // if powerState is present, encode it to base64 + : btoa('unspecified'); // fall back to 'unspecified' when absent + // The Things Stack (TTN/TTI) expects a 'downlinks' array; each entry is a single scheduled downlink. var data = { downlinks: [{ @@ -24,7 +28,7 @@ var data = { // false - best-effort downlink; set to true to request an acknowledgement from the device. confirmed: false, // Downlink payload, base64-encoded as required by the TTN/TTI API. - frm_payload: btoa(JSON.stringify(msg)), + frm_payload: base64Payload, // Scheduling priority for the network server: LOWEST, LOW, BELOW_NORMAL, NORMAL, ABOVE_NORMAL, HIGH, HIGHEST. priority: "NORMAL" }] diff --git a/ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw b/ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw index 906f5f7afd..5258a448d2 100644 --- a/ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw +++ b/ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw @@ -12,12 +12,16 @@ /** Encoder **/ +var base64Payload = (msg.powerState != null) + ? btoa(msg.powerState) // if powerState is present, encode it to base64 + : btoa('unspecified'); // fall back to 'unspecified' when absent + // Result object with encoded downlink payload var result = { // downlink data content type: JSON, TEXT or BINARY (base64 format) contentType: "TEXT", // downlink data - data: btoa(JSON.stringify(msg)), + data: base64Payload, // Metadata required by ChirpStack for downlink delivery. metadata: { // Target device EUI; ChirpStack rejects the downlink if this is missing. diff --git a/ui-ngx/src/assets/converters/tbel-loriot-encoder.raw b/ui-ngx/src/assets/converters/tbel-loriot-encoder.raw index 5c58ffbe54..05ca39cbe7 100644 --- a/ui-ngx/src/assets/converters/tbel-loriot-encoder.raw +++ b/ui-ngx/src/assets/converters/tbel-loriot-encoder.raw @@ -13,12 +13,17 @@ var port = (metadata.cs_fPort != null && metadata.cs_fPort != '') ? parseInt(metadata.cs_fPort) : 1; +// Send only the command value (powerState) rather than the whole message; fall back to 'unspecified' when absent. +var payload = (msg.powerState != null) + ? msg.powerState + : 'unspecified'; + var result = { // Downlink data content type: JSON, TEXT, or BINARY (base64 format). - contentType: "JSON", + contentType: "TEXT", - // Downlink data — serialise the full message payload as a JSON string. - data: JSON.stringify(msg), + // Downlink data — the command value; LORIOT hex-encodes it before delivery. + data: payload, // Metadata required by LORIOT for downlink delivery. metadata: { diff --git a/ui-ngx/src/assets/converters/tbel-ttn-tti-encoder.raw b/ui-ngx/src/assets/converters/tbel-ttn-tti-encoder.raw index 7689451630..cfc95786c8 100644 --- a/ui-ngx/src/assets/converters/tbel-ttn-tti-encoder.raw +++ b/ui-ngx/src/assets/converters/tbel-ttn-tti-encoder.raw @@ -16,6 +16,10 @@ var fPort = (metadata.cs_fPort != null && metadata.cs_fPort != '') ? parseInt(metadata.cs_fPort) : 1; +var base64Payload = (msg.powerState != null) + ? btoa(msg.powerState) // if powerState is present, encode it to base64 + : btoa('unspecified'); // fall back to 'unspecified' when absent + // The Things Stack (TTN/TTI) expects a 'downlinks' array; each entry is a single scheduled downlink. var data = { downlinks: [{ @@ -24,7 +28,7 @@ var data = { // false - best-effort downlink; set to true to request an acknowledgement from the device. confirmed: false, // Downlink payload, base64-encoded as required by the TTN/TTI API. - frm_payload: btoa(JSON.stringify(msg)), + frm_payload: base64Payload, // Scheduling priority for the network server: LOWEST, LOW, BELOW_NORMAL, NORMAL, ABOVE_NORMAL, HIGH, HIGHEST. priority: "NORMAL" }] From 824a81dcad547c5bd35e49111233dca696160017 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Wed, 24 Jun 2026 17:18:24 +0300 Subject: [PATCH 27/43] added some explanation comments in default encoders, minor refactoring --- ui-ngx/src/app/shared/models/converter.models.ts | 8 ++++---- ui-ngx/src/assets/converters/js-chirpstack-encoder.raw | 3 +++ ui-ngx/src/assets/converters/js-loriot-encoder.raw | 4 +++- ui-ngx/src/assets/converters/js-ttn-tti-encoder.raw | 3 +++ ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw | 3 +++ ui-ngx/src/assets/converters/tbel-loriot-encoder.raw | 4 +++- ui-ngx/src/assets/converters/tbel-ttn-tti-encoder.raw | 3 +++ 7 files changed, 22 insertions(+), 6 deletions(-) diff --git a/ui-ngx/src/app/shared/models/converter.models.ts b/ui-ngx/src/app/shared/models/converter.models.ts index fab8903566..e953cd1fb1 100644 --- a/ui-ngx/src/app/shared/models/converter.models.ts +++ b/ui-ngx/src/app/shared/models/converter.models.ts @@ -15,7 +15,7 @@ export enum ConverterType { DOWNLINK = 'DOWNLINK' } -export const IntegrationTbelDefaultConvertersUrl = new Map([ +export const IntegrationTbelDefaultDecodersUrl = new Map([ [IntegrationType.CHIRPSTACK, '/assets/converters/tbel-chirpstack-decoder.raw'], [IntegrationType.LORIOT, '/assets/converters/tbel-loriot-decoder.raw'], [IntegrationType.TTI,'/assets/converters/tbel-tti-decoder.raw'], @@ -31,7 +31,7 @@ export const IntegrationTbelDefaultConvertersUrl = new Map([ +export const IntegrationJSDefaultDecodersUrl = new Map([ [IntegrationType.CHIRPSTACK, '/assets/converters/js-chirpstack-decoder.raw'], [IntegrationType.LORIOT, '/assets/converters/js-loriot-decoder.raw'], [IntegrationType.TTI,'/assets/converters/js-tti-decoder.raw'], @@ -279,8 +279,8 @@ export const getTargetTemplateUrl = const isUplink = converterType === ConverterType.UPLINK; // Integration-specific template map for this (language, direction); UPLINK -> decoders, DOWNLINK -> encoders. const integrationUrls = isJs - ? (isUplink ? IntegrationJSDefaultConvertersUrl : IntegrationJSDefaultEncodersUrl) - : (isUplink ? IntegrationTbelDefaultConvertersUrl : IntegrationTbelDefaultEncodersUrl); + ? (isUplink ? IntegrationJSDefaultDecodersUrl : IntegrationJSDefaultEncodersUrl) + : (isUplink ? IntegrationTbelDefaultDecodersUrl : IntegrationTbelDefaultEncodersUrl); if (integrationUrls.has(integrationType)) { return integrationUrls.get(integrationType); } diff --git a/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw b/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw index 5258a448d2..3e8ec1d4b1 100644 --- a/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw +++ b/ui-ngx/src/assets/converters/js-chirpstack-encoder.raw @@ -12,6 +12,9 @@ /** Encoder **/ +// EXAMPLE — replace this: it encodes a single field ('powerState') from the downlink message. +// Swap 'powerState' (and the 'unspecified' fallback) for the field(s) and encoding your device expects; +// as written, any downlink without a 'powerState' field sends the constant value 'unspecified'. var base64Payload = (msg.powerState != null) ? btoa(msg.powerState) // if powerState is present, encode it to base64 : btoa('unspecified'); // fall back to 'unspecified' when absent diff --git a/ui-ngx/src/assets/converters/js-loriot-encoder.raw b/ui-ngx/src/assets/converters/js-loriot-encoder.raw index 05ca39cbe7..879469edec 100644 --- a/ui-ngx/src/assets/converters/js-loriot-encoder.raw +++ b/ui-ngx/src/assets/converters/js-loriot-encoder.raw @@ -13,7 +13,9 @@ var port = (metadata.cs_fPort != null && metadata.cs_fPort != '') ? parseInt(metadata.cs_fPort) : 1; -// Send only the command value (powerState) rather than the whole message; fall back to 'unspecified' when absent. +// EXAMPLE — replace this: it sends a single field ('powerState') from the downlink message. +// Swap 'powerState' (and the 'unspecified' fallback) for the field your device expects; +// as written, any downlink without a 'powerState' field sends the constant value 'unspecified'. var payload = (msg.powerState != null) ? msg.powerState : 'unspecified'; diff --git a/ui-ngx/src/assets/converters/js-ttn-tti-encoder.raw b/ui-ngx/src/assets/converters/js-ttn-tti-encoder.raw index 9cf33882e2..e30c1c75ef 100644 --- a/ui-ngx/src/assets/converters/js-ttn-tti-encoder.raw +++ b/ui-ngx/src/assets/converters/js-ttn-tti-encoder.raw @@ -16,6 +16,9 @@ var fPort = (metadata.cs_fPort != null && metadata.cs_fPort != '') ? parseInt(metadata.cs_fPort) : 1; +// EXAMPLE — replace this: it encodes a single field ('powerState') from the downlink message. +// Swap 'powerState' (and the 'unspecified' fallback) for the field(s) and encoding your device expects; +// as written, any downlink without a 'powerState' field sends the constant value 'unspecified'. var base64Payload = (msg.powerState != null) ? btoa(msg.powerState) // if powerState is present, encode it to base64 : btoa('unspecified'); // fall back to 'unspecified' when absent diff --git a/ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw b/ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw index 5258a448d2..3e8ec1d4b1 100644 --- a/ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw +++ b/ui-ngx/src/assets/converters/tbel-chirpstack-encoder.raw @@ -12,6 +12,9 @@ /** Encoder **/ +// EXAMPLE — replace this: it encodes a single field ('powerState') from the downlink message. +// Swap 'powerState' (and the 'unspecified' fallback) for the field(s) and encoding your device expects; +// as written, any downlink without a 'powerState' field sends the constant value 'unspecified'. var base64Payload = (msg.powerState != null) ? btoa(msg.powerState) // if powerState is present, encode it to base64 : btoa('unspecified'); // fall back to 'unspecified' when absent diff --git a/ui-ngx/src/assets/converters/tbel-loriot-encoder.raw b/ui-ngx/src/assets/converters/tbel-loriot-encoder.raw index 05ca39cbe7..879469edec 100644 --- a/ui-ngx/src/assets/converters/tbel-loriot-encoder.raw +++ b/ui-ngx/src/assets/converters/tbel-loriot-encoder.raw @@ -13,7 +13,9 @@ var port = (metadata.cs_fPort != null && metadata.cs_fPort != '') ? parseInt(metadata.cs_fPort) : 1; -// Send only the command value (powerState) rather than the whole message; fall back to 'unspecified' when absent. +// EXAMPLE — replace this: it sends a single field ('powerState') from the downlink message. +// Swap 'powerState' (and the 'unspecified' fallback) for the field your device expects; +// as written, any downlink without a 'powerState' field sends the constant value 'unspecified'. var payload = (msg.powerState != null) ? msg.powerState : 'unspecified'; diff --git a/ui-ngx/src/assets/converters/tbel-ttn-tti-encoder.raw b/ui-ngx/src/assets/converters/tbel-ttn-tti-encoder.raw index cfc95786c8..a8306cddab 100644 --- a/ui-ngx/src/assets/converters/tbel-ttn-tti-encoder.raw +++ b/ui-ngx/src/assets/converters/tbel-ttn-tti-encoder.raw @@ -16,6 +16,9 @@ var fPort = (metadata.cs_fPort != null && metadata.cs_fPort != '') ? parseInt(metadata.cs_fPort) : 1; +// EXAMPLE — replace this: it encodes a single field ('powerState') from the downlink message. +// Swap 'powerState' (and the 'unspecified' fallback) for the field(s) and encoding your device expects; +// as written, any downlink without a 'powerState' field sends the constant value 'unspecified'. var base64Payload = (msg.powerState != null) ? btoa(msg.powerState) // if powerState is present, encode it to base64 : btoa('unspecified'); // fall back to 'unspecified' when absent From 87c0a2dd401cd649f7bf7d228b4725e6b82214b1 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Tue, 13 Oct 2026 14:43:49 +0300 Subject: [PATCH 28/43] Declare checker-qual in modules that use its nullness annotations --- common/dao-api/pom.xml | 4 ++++ common/version-control/pom.xml | 4 ++++ dao/pom.xml | 4 ++++ rule-engine/rule-engine-components/pom.xml | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/common/dao-api/pom.xml b/common/dao-api/pom.xml index f835a8ac0e..a99d0be727 100644 --- a/common/dao-api/pom.xml +++ b/common/dao-api/pom.xml @@ -41,6 +41,10 @@ com.google.guava guava + + org.checkerframework + checker-qual + jakarta.annotation jakarta.annotation-api diff --git a/common/version-control/pom.xml b/common/version-control/pom.xml index b6690c03cc..7ef0fbcd84 100644 --- a/common/version-control/pom.xml +++ b/common/version-control/pom.xml @@ -58,6 +58,10 @@ com.google.guava guava + + org.checkerframework + checker-qual + com.fasterxml.jackson.core jackson-databind diff --git a/dao/pom.xml b/dao/pom.xml index 6deadce293..e1e4f2d2e8 100644 --- a/dao/pom.xml +++ b/dao/pom.xml @@ -169,6 +169,10 @@ com.google.guava guava + + org.checkerframework + checker-qual + com.google.protobuf protobuf-java diff --git a/rule-engine/rule-engine-components/pom.xml b/rule-engine/rule-engine-components/pom.xml index ebfaf2ffcd..35868dba47 100644 --- a/rule-engine/rule-engine-components/pom.xml +++ b/rule-engine/rule-engine-components/pom.xml @@ -64,6 +64,10 @@ com.google.guava guava + + org.checkerframework + checker-qual + com.google.code.gson gson From 822549016fdff7ac125b5720b79d653bfdae6d1f Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Tue, 13 Oct 2026 14:45:25 +0300 Subject: [PATCH 29/43] Declare checker-qual in common/data for its nullness annotations --- common/data/pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/data/pom.xml b/common/data/pom.xml index e43fc52e60..6e30c03734 100644 --- a/common/data/pom.xml +++ b/common/data/pom.xml @@ -79,6 +79,10 @@ com.squareup.wire wire-schema-jvm + + org.checkerframework + checker-qual + org.thingsboard protobuf-dynamic From 8a924f73409e9b68421f668c7fa9a4fc7c22d726 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Tue, 13 Oct 2026 14:52:23 +0300 Subject: [PATCH 30/43] Address PR review feedback - Let LORIOT gw uplinks through the JS decoder guard (PR #16300) - Let LORIOT gw uplinks through the TBEL decoder guard (PR #16300) --- ui-ngx/src/assets/converters/js-loriot-decoder.raw | 4 ++-- ui-ngx/src/assets/converters/tbel-loriot-decoder.raw | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui-ngx/src/assets/converters/js-loriot-decoder.raw b/ui-ngx/src/assets/converters/js-loriot-decoder.raw index 1e18fbe019..b0bcab08a2 100644 --- a/ui-ngx/src/assets/converters/js-loriot-decoder.raw +++ b/ui-ngx/src/assets/converters/js-loriot-decoder.raw @@ -52,10 +52,10 @@ function decodePayload(input) { // }; } -// Process only LORIOT uplink messages (cmd == 'rx'). +// Process only LORIOT uplink messages: cmd is 'rx', or 'gw' when gateway info is included. // Skip downlink confirmations (e.g. cmd == 'txd') and other events so they // are not stored as telemetry. Returning an empty array yields no uplink data. -if (metadata.cmd != 'rx') { +if (metadata.cmd != 'rx' && metadata.cmd != 'gw') { return []; } diff --git a/ui-ngx/src/assets/converters/tbel-loriot-decoder.raw b/ui-ngx/src/assets/converters/tbel-loriot-decoder.raw index ab2dfa83b4..248015eb7c 100644 --- a/ui-ngx/src/assets/converters/tbel-loriot-decoder.raw +++ b/ui-ngx/src/assets/converters/tbel-loriot-decoder.raw @@ -52,10 +52,10 @@ function decodePayload(input) { // }; } -// Process only LORIOT uplink messages (cmd == 'rx'). +// Process only LORIOT uplink messages: cmd is 'rx', or 'gw' when gateway info is included. // Skip downlink confirmations (e.g. cmd == 'txd') and other events so they // are not stored as telemetry. Returning an empty array yields no uplink data. -if (metadata.cmd != 'rx') { +if (metadata.cmd != 'rx' && metadata.cmd != 'gw') { return []; } From 1ce37cd1a86bf28a598b74efd35bebbfad2342da Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Wed, 14 Oct 2026 13:05:44 +0300 Subject: [PATCH 31/43] Handle validation results consistently in telemetry and attribute callbacks --- .../service/security/AccessValidator.java | 5 ++ .../telemetry/DefaultTbTelemetryService.java | 6 ++ .../service/ws/DefaultWebSocketService.java | 76 +++++-------------- .../controller/TelemetryControllerTest.java | 36 +++++++++ .../server/controller/WebsocketApiTest.java | 12 +++ 5 files changed, 79 insertions(+), 56 deletions(-) diff --git a/application/src/main/java/org/thingsboard/server/service/security/AccessValidator.java b/application/src/main/java/org/thingsboard/server/service/security/AccessValidator.java index 3668bef2ef..bf712a851b 100644 --- a/application/src/main/java/org/thingsboard/server/service/security/AccessValidator.java +++ b/application/src/main/java/org/thingsboard/server/service/security/AccessValidator.java @@ -263,6 +263,7 @@ public class AccessValidator { accessControlService.checkPermission(currentUser, Resource.DEVICE_PROFILE, operation, entityId, deviceProfile); } catch (ThingsboardException e) { callback.onSuccess(ValidationResult.accessDenied(e.getMessage())); + return; } callback.onSuccess(ValidationResult.ok(deviceProfile)); } @@ -281,6 +282,7 @@ public class AccessValidator { accessControlService.checkPermission(currentUser, Resource.ASSET_PROFILE, operation, entityId, assetProfile); } catch (ThingsboardException e) { callback.onSuccess(ValidationResult.accessDenied(e.getMessage())); + return; } callback.onSuccess(ValidationResult.ok(assetProfile)); } @@ -293,6 +295,7 @@ public class AccessValidator { } else { if (!operation.equals(Operation.READ_TELEMETRY)) { callback.onSuccess(ValidationResult.accessDenied("Allowed only READ_TELEMETRY operation!")); + return; } ApiUsageState apiUsageState = apiUsageStateService.findApiUsageStateById(currentUser.getTenantId(), new ApiUsageStateId(entityId.getId())); if (apiUsageState == null) { @@ -302,6 +305,7 @@ public class AccessValidator { accessControlService.checkPermission(currentUser, Resource.API_USAGE_STATE, operation, entityId, apiUsageState); } catch (ThingsboardException e) { callback.onSuccess(ValidationResult.accessDenied(e.getMessage())); + return; } callback.onSuccess(ValidationResult.ok(apiUsageState)); } @@ -320,6 +324,7 @@ public class AccessValidator { accessControlService.checkPermission(currentUser, Resource.OTA_PACKAGE, operation, entityId, otaPackage); } catch (ThingsboardException e) { callback.onSuccess(ValidationResult.accessDenied(e.getMessage())); + return; } callback.onSuccess(ValidationResult.ok(otaPackage)); } diff --git a/application/src/main/java/org/thingsboard/server/service/telemetry/DefaultTbTelemetryService.java b/application/src/main/java/org/thingsboard/server/service/telemetry/DefaultTbTelemetryService.java index 54c5d271e1..da1a748c37 100644 --- a/application/src/main/java/org/thingsboard/server/service/telemetry/DefaultTbTelemetryService.java +++ b/application/src/main/java/org/thingsboard/server/service/telemetry/DefaultTbTelemetryService.java @@ -19,7 +19,9 @@ import org.thingsboard.server.common.data.kv.ReadTsKvQuery; import org.thingsboard.server.common.data.kv.TsKvEntry; import org.thingsboard.server.dao.timeseries.TimeseriesService; import org.thingsboard.server.service.security.AccessValidator; +import org.thingsboard.server.service.security.ValidationCallback; import org.thingsboard.server.service.security.ValidationResult; +import org.thingsboard.server.service.security.ValidationResultCode; import org.thingsboard.server.service.security.model.SecurityUser; import org.thingsboard.server.service.security.permission.Operation; @@ -42,6 +44,10 @@ public class DefaultTbTelemetryService implements TbTelemetryService { accessValidator.validate(currentUser, Operation.READ_TELEMETRY, entityId, new FutureCallback<>() { @Override public void onSuccess(ValidationResult validationResult) { + if (validationResult.getResultCode() != ValidationResultCode.OK) { + onFailure(ValidationCallback.getException(validationResult)); + return; + } try { AggregationParams params; if (Aggregation.NONE.equals(agg)) { diff --git a/application/src/main/java/org/thingsboard/server/service/ws/DefaultWebSocketService.java b/application/src/main/java/org/thingsboard/server/service/ws/DefaultWebSocketService.java index 71f4e73929..15e470085b 100644 --- a/application/src/main/java/org/thingsboard/server/service/ws/DefaultWebSocketService.java +++ b/application/src/main/java/org/thingsboard/server/service/ws/DefaultWebSocketService.java @@ -882,72 +882,36 @@ public class DefaultWebSocketService implements WebSocketService { }, executor); } - private FutureCallback getAttributesFetchCallback(final TenantId tenantId, final EntityId entityId, final List keys, final FutureCallback> callback) { - return new FutureCallback() { - @Override - public void onSuccess(@Nullable ValidationResult result) { - List>> futures = new ArrayList<>(); - for (AttributeScope scope : AttributeScope.values()) { - futures.add(attributesService.find(tenantId, entityId, scope, keys)); - } - - ListenableFuture> future = mergeAllAttributesFutures(futures); - Futures.addCallback(future, callback, MoreExecutors.directExecutor()); + private FutureCallback getAttributesFetchCallback(final TenantId tenantId, final EntityId entityId, final List keys, final FutureCallback> callback) { + return on(r -> { + List>> futures = new ArrayList<>(); + for (AttributeScope scope : AttributeScope.values()) { + futures.add(attributesService.find(tenantId, entityId, scope, keys)); } - @Override - public void onFailure(Throwable t) { - callback.onFailure(t); - } - }; + ListenableFuture> future = mergeAllAttributesFutures(futures); + Futures.addCallback(future, callback, MoreExecutors.directExecutor()); + }, callback::onFailure); } - private FutureCallback getAttributesFetchCallback(final TenantId tenantId, final EntityId entityId, final String scope, final List keys, final FutureCallback> callback) { - return new FutureCallback() { - @Override - public void onSuccess(@Nullable ValidationResult result) { - Futures.addCallback(attributesService.find(tenantId, entityId, AttributeScope.valueOf(scope), keys), callback, MoreExecutors.directExecutor()); - } - - @Override - public void onFailure(Throwable t) { - callback.onFailure(t); - } - }; + private FutureCallback getAttributesFetchCallback(final TenantId tenantId, final EntityId entityId, final String scope, final List keys, final FutureCallback> callback) { + return on(r -> Futures.addCallback(attributesService.find(tenantId, entityId, AttributeScope.valueOf(scope), keys), callback, MoreExecutors.directExecutor()), callback::onFailure); } - private FutureCallback getAttributesFetchCallback(final TenantId tenantId, final EntityId entityId, final FutureCallback> callback) { - return new FutureCallback() { - @Override - public void onSuccess(@Nullable ValidationResult result) { - List>> futures = new ArrayList<>(); - for (AttributeScope scope : AttributeScope.values()) { - futures.add(attributesService.findAll(tenantId, entityId, scope)); - } - - ListenableFuture> future = mergeAllAttributesFutures(futures); - Futures.addCallback(future, callback, MoreExecutors.directExecutor()); + private FutureCallback getAttributesFetchCallback(final TenantId tenantId, final EntityId entityId, final FutureCallback> callback) { + return on(r -> { + List>> futures = new ArrayList<>(); + for (AttributeScope scope : AttributeScope.values()) { + futures.add(attributesService.findAll(tenantId, entityId, scope)); } - @Override - public void onFailure(Throwable t) { - callback.onFailure(t); - } - }; + ListenableFuture> future = mergeAllAttributesFutures(futures); + Futures.addCallback(future, callback, MoreExecutors.directExecutor()); + }, callback::onFailure); } - private FutureCallback getAttributesFetchCallback(final TenantId tenantId, final EntityId entityId, final String scope, final FutureCallback> callback) { - return new FutureCallback() { - @Override - public void onSuccess(@Nullable ValidationResult result) { - Futures.addCallback(attributesService.findAll(tenantId, entityId, AttributeScope.valueOf(scope)), callback, MoreExecutors.directExecutor()); - } - - @Override - public void onFailure(Throwable t) { - callback.onFailure(t); - } - }; + private FutureCallback getAttributesFetchCallback(final TenantId tenantId, final EntityId entityId, final String scope, final FutureCallback> callback) { + return on(r -> Futures.addCallback(attributesService.findAll(tenantId, entityId, AttributeScope.valueOf(scope)), callback, MoreExecutors.directExecutor()), callback::onFailure); } private FutureCallback on(Consumer success, Consumer failure) { diff --git a/application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java b/application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java index f582f7cd09..9d1c7db552 100644 --- a/application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java +++ b/application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java @@ -7,8 +7,10 @@ import org.junit.Assert; import org.junit.Test; import org.springframework.test.context.TestPropertySource; import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException; +import org.thingsboard.server.common.data.AttributeScope; import org.thingsboard.server.common.data.Device; import org.thingsboard.server.common.data.SaveDeviceWithCredentialsRequest; +import org.thingsboard.server.common.data.id.DeviceProfileId; import org.thingsboard.server.common.data.kv.BasicTsKvEntry; import org.thingsboard.server.common.data.kv.LongDataEntry; import org.thingsboard.server.common.data.query.AliasEntityId; @@ -19,9 +21,11 @@ import org.thingsboard.server.common.data.security.DeviceCredentialsType; import org.thingsboard.server.dao.service.DaoSqlTest; import java.util.List; +import java.util.UUID; import java.util.concurrent.TimeUnit; import static org.assertj.core.api.Assertions.assertThat; +import static org.awaitility.Awaitility.await; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.thingsboard.server.common.data.query.EntityKeyType.TIME_SERIES; @@ -219,6 +223,38 @@ public class TelemetryControllerTest extends AbstractControllerTest { doPostAsync("/api/plugins/telemetry/DEVICE/" + device.getId() + "/timeseries/smth", invalidRequestBody2, String.class, status().isBadRequest()); } + @Test + public void testCustomerUserCannotReadTimeseriesOfNotAssignedDevice() throws Exception { + loginTenantAdmin(); + Device device = createDevice(); + tsService.save(tenantId, device.getId(), new BasicTsKvEntry(1000L, new LongDataEntry("t", 1L))).get(); + + loginCustomerUser(); + String url = "/api/plugins/telemetry/DEVICE/{entityId}/values/timeseries?keys=t&startTs=0&endTs={endTs}"; + doGetAsync(url, device.getUuidId(), System.currentTimeMillis()).andExpect(status().isForbidden()); + doGetAsync(url + "&agg=SUM&interval=86400000", device.getUuidId(), System.currentTimeMillis()).andExpect(status().isForbidden()); + doGetAsync(url, UUID.randomUUID(), System.currentTimeMillis()).andExpect(status().isNotFound()); + + loginTenantAdmin(); + assignDeviceToCustomer(device.getId(), customerId); + + loginCustomerUser(); + ObjectNode result = doGetAsync(url, ObjectNode.class, device.getUuidId(), System.currentTimeMillis()); + Assert.assertEquals(1L, result.get("t").get(0).get("value").asLong()); + } + + @Test + public void testCustomerUserCannotSaveDeviceProfileAttributes() throws Exception { + loginTenantAdmin(); + DeviceProfileId deviceProfileId = createDevice().getDeviceProfileId(); + + loginCustomerUser(); + doPostAsync("/api/plugins/telemetry/DEVICE_PROFILE/" + deviceProfileId + "/SERVER_SCOPE", "{\"attr\": \"value\"}", String.class, status().isForbidden()); + + await().during(1, TimeUnit.SECONDS).atMost(2, TimeUnit.SECONDS) + .until(() -> attributesService.find(tenantId, deviceProfileId, AttributeScope.SERVER_SCOPE, "attr").get().isEmpty()); + } + private Device createDevice() throws Exception { String testToken = "TEST_TOKEN"; diff --git a/application/src/test/java/org/thingsboard/server/controller/WebsocketApiTest.java b/application/src/test/java/org/thingsboard/server/controller/WebsocketApiTest.java index e005cb18ff..508492eedb 100644 --- a/application/src/test/java/org/thingsboard/server/controller/WebsocketApiTest.java +++ b/application/src/test/java/org/thingsboard/server/controller/WebsocketApiTest.java @@ -966,6 +966,18 @@ public class WebsocketApiTest extends AbstractControllerTest { assertThat(update.get("data").get("attr").get(0).get(1).asText()).isEqualTo(expectedAttrValue); } + @Test + public void testAttributesSubscription_customerUserNotAssignedDevice() throws Exception { + sendAttributes(device, TbAttributeSubscriptionScope.SERVER_SCOPE, List.of( + new BaseAttributeKvEntry(System.currentTimeMillis(), new StringDataEntry("attr", "secret")) + )); + + loginCustomerUser(); + JsonNode update = getWsClient().subscribeForAttributes(device.getId(), TbAttributeSubscriptionScope.SERVER_SCOPE.name(), List.of("attr")); + assertThat(update.get("errorCode").asInt()).isNotEqualTo(SubscriptionErrorCode.NO_ERROR.getCode()); + assertThat(update.path("data").isEmpty()).isTrue(); + } + @Test public void testEntityCountCmd_filterTypeSingularCompatibilityTest() throws Exception { ObjectNode oldFormatDeviceTypeFilterSingular = JacksonUtil.newObjectNode(); From 1e98df91e0211ec2dab4ad4441f40ab486eb8f05 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Wed, 14 Oct 2026 13:10:08 +0300 Subject: [PATCH 32/43] Handle validation result in time series read queries --- .../server/service/telemetry/DefaultTbTelemetryService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/application/src/main/java/org/thingsboard/server/service/telemetry/DefaultTbTelemetryService.java b/application/src/main/java/org/thingsboard/server/service/telemetry/DefaultTbTelemetryService.java index 290e293451..b7cb597f12 100644 --- a/application/src/main/java/org/thingsboard/server/service/telemetry/DefaultTbTelemetryService.java +++ b/application/src/main/java/org/thingsboard/server/service/telemetry/DefaultTbTelemetryService.java @@ -91,6 +91,10 @@ public class DefaultTbTelemetryService implements TbTelemetryService { accessValidator.validate(currentUser, Operation.READ_TELEMETRY, entityId, new FutureCallback<>() { @Override public void onSuccess(ValidationResult validationResult) { + if (validationResult.getResultCode() != ValidationResultCode.OK) { + onFailure(ValidationCallback.getException(validationResult)); + return; + } try { Futures.addCallback(tsService.findAllByQueries(currentUser.getTenantId(), entityId, new ArrayList<>(queries)), new FutureCallback<>() { @Override From cd2383baddc22439046b2c0ed68bd49ccd5576b9 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Wed, 14 Oct 2026 13:27:57 +0300 Subject: [PATCH 33/43] Use change owner API in TelemetryControllerTest and cover read queries endpoint --- .../server/controller/TelemetryControllerTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java b/application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java index 82ad5a9683..d8eebfd2f4 100644 --- a/application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java +++ b/application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java @@ -14,6 +14,7 @@ import org.thingsboard.server.common.data.AttributeScope; import org.thingsboard.server.common.data.Device; import org.thingsboard.server.common.data.SaveDeviceWithCredentialsRequest; import org.thingsboard.server.common.data.id.DeviceProfileId; +import org.thingsboard.server.common.data.kv.BaseReadTsKvQuery; import org.thingsboard.server.common.data.kv.BasicTsKvEntry; import org.thingsboard.server.common.data.kv.LongDataEntry; import org.thingsboard.server.common.data.query.AliasEntityId; @@ -306,9 +307,11 @@ public class TelemetryControllerTest extends AbstractControllerTest { doGetAsync(url, device.getUuidId(), System.currentTimeMillis()).andExpect(status().isForbidden()); doGetAsync(url + "&agg=SUM&interval=86400000", device.getUuidId(), System.currentTimeMillis()).andExpect(status().isForbidden()); doGetAsync(url, UUID.randomUUID(), System.currentTimeMillis()).andExpect(status().isNotFound()); + List queries = List.of(new BaseReadTsKvQuery("t", 0, System.currentTimeMillis(), 10, "DESC")); + doPostAsync("/api/plugins/telemetry/DEVICE/" + device.getId() + "/values/timeseries", queries, String.class, status().isForbidden()); loginTenantAdmin(); - assignDeviceToCustomer(device.getId(), customerId); + doPost("/api/owner/CUSTOMER/" + customerId.getId() + "/DEVICE/" + device.getId().getId()).andExpect(status().isOk()); loginCustomerUser(); ObjectNode result = doGetAsync(url, ObjectNode.class, device.getUuidId(), System.currentTimeMillis()); From 4d1a098e70930bf5aa8d89096c3c05ab253bf046 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Wed, 14 Oct 2026 13:27:57 +0300 Subject: [PATCH 34/43] Skip time series the report user is not allowed to read --- .../report/LocalReportDataService.java | 19 +++++++++++++++++-- .../datasource/RemoteReportDataService.java | 8 ++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/application/src/main/java/org/thingsboard/server/service/report/LocalReportDataService.java b/application/src/main/java/org/thingsboard/server/service/report/LocalReportDataService.java index 1ba1f1aace..23c96858c8 100644 --- a/application/src/main/java/org/thingsboard/server/service/report/LocalReportDataService.java +++ b/application/src/main/java/org/thingsboard/server/service/report/LocalReportDataService.java @@ -2,6 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 package org.thingsboard.server.service.report; +import com.google.common.util.concurrent.ListenableFuture; import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; import org.springframework.stereotype.Service; @@ -32,6 +33,7 @@ import org.thingsboard.server.dao.alarm.AlarmService; import org.thingsboard.server.dao.report.ReportService; import org.thingsboard.server.dao.report.ReportTemplateService; import org.thingsboard.server.dao.resource.ImageService; +import org.thingsboard.server.exception.AccessDeniedException; import org.thingsboard.server.queue.util.TbCoreComponent; import org.thingsboard.server.report.context.TbReportCtx; import org.thingsboard.server.report.datasource.ReportDataService; @@ -41,7 +43,9 @@ import org.thingsboard.server.service.security.permission.AccessControlService; import org.thingsboard.server.service.telemetry.TbTelemetryService; import java.util.Collection; +import java.util.Collections; import java.util.List; +import java.util.concurrent.ExecutionException; import static org.thingsboard.server.common.data.report.configuration.timewindow.TimeIntervalCalculator.getIntervalTs; import static org.thingsboard.server.common.data.report.configuration.timewindow.TimeIntervalCalculator.getIntervalType; @@ -112,13 +116,13 @@ public class LocalReportDataService implements ReportDataService { @Override public List getTimeseries(EntityId entityId, List keys, Long startTs, Long endTs, Interval interval, String timeZone, Aggregation agg, SortOrder.Direction sortOrder, Integer limit, boolean useStrictDataTypes, TbReportCtx ctx) { - return tbTelemetryService.getTimeseries(entityId, keys, startTs, endTs, getIntervalType(interval), getIntervalTs(interval), timeZone, limit, agg, sortOrder.name(), useStrictDataTypes, getSecurityUser(ctx)).get(); // .get() will be interrupted on task processing timeout + return getOrEmptyIfAccessDenied(tbTelemetryService.getTimeseries(entityId, keys, startTs, endTs, getIntervalType(interval), getIntervalTs(interval), timeZone, limit, agg, sortOrder.name(), useStrictDataTypes, getSecurityUser(ctx))); // .get() will be interrupted on task processing timeout } @SneakyThrows @Override public List findTimeseriesByQueries(EntityId entityId, List queries, TbReportCtx ctx) { - return tbTelemetryService.getTimeseriesByReadQueries(entityId, queries, getSecurityUser(ctx)).get(); + return getOrEmptyIfAccessDenied(tbTelemetryService.getTimeseriesByReadQueries(entityId, queries, getSecurityUser(ctx))); } @Override @@ -127,6 +131,17 @@ public class LocalReportDataService implements ReportDataService { return reportService.createReport(report, data); } + private List getOrEmptyIfAccessDenied(ListenableFuture> future) throws InterruptedException, ExecutionException { + try { + return future.get(); + } catch (ExecutionException e) { + if (e.getCause() instanceof AccessDeniedException) { + return Collections.emptyList(); + } + throw e; + } + } + private SecurityUser getSecurityUser(TbReportCtx ctx) { return ((LocalTbReportCtxProvider.LocalTbReportCtx) ctx).getSecurityUser(); } diff --git a/common/report/src/main/java/org/thingsboard/server/report/datasource/RemoteReportDataService.java b/common/report/src/main/java/org/thingsboard/server/report/datasource/RemoteReportDataService.java index c018879372..a2ad2bce0d 100644 --- a/common/report/src/main/java/org/thingsboard/server/report/datasource/RemoteReportDataService.java +++ b/common/report/src/main/java/org/thingsboard/server/report/datasource/RemoteReportDataService.java @@ -4,6 +4,7 @@ package org.thingsboard.server.report.datasource; import com.fasterxml.jackson.databind.JsonNode; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; +import org.springframework.http.HttpStatus; import org.springframework.stereotype.Service; import org.springframework.web.client.RestClientResponseException; import org.thingsboard.common.util.JacksonUtil; @@ -32,6 +33,7 @@ import org.thingsboard.server.report.context.TbReportCtx; import java.io.IOException; import java.util.Collection; +import java.util.Collections; import java.util.List; import static org.thingsboard.server.common.data.report.configuration.timewindow.TimeIntervalCalculator.getIntervalTs; @@ -125,6 +127,9 @@ public class RemoteReportDataService implements ReportDataService { try { return getRestClient(ctx).getTimeseries(entityId, keys, getIntervalTs(interval), getIntervalType(interval), timeZone, agg, sortOrder, startTs, endTs, limit, useStrictDataTypes); } catch (RestClientResponseException e) { + if (e.getStatusCode().value() == HttpStatus.FORBIDDEN.value()) { + return Collections.emptyList(); + } throw handleRestClientException(e); } } @@ -134,6 +139,9 @@ public class RemoteReportDataService implements ReportDataService { try { return getRestClient(ctx).getTimeseriesByQueries(entityId, queries); } catch (RestClientResponseException e) { + if (e.getStatusCode().value() == HttpStatus.FORBIDDEN.value()) { + return Collections.emptyList(); + } throw handleRestClientException(e); } } From 9f0ac047d92370af35bd46a7104fad1ee6a121c2 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Wed, 14 Oct 2026 13:31:42 +0300 Subject: [PATCH 35/43] Use customer admin in TelemetryControllerTest time series access test --- .../server/controller/TelemetryControllerTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java b/application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java index d8eebfd2f4..3c34a4d25b 100644 --- a/application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java +++ b/application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java @@ -302,7 +302,7 @@ public class TelemetryControllerTest extends AbstractControllerTest { Device device = createDevice(); tsService.save(tenantId, device.getId(), new BasicTsKvEntry(1000L, new LongDataEntry("t", 1L))).get(); - loginCustomerUser(); + loginCustomerAdminUser(); String url = "/api/plugins/telemetry/DEVICE/{entityId}/values/timeseries?keys=t&startTs=0&endTs={endTs}"; doGetAsync(url, device.getUuidId(), System.currentTimeMillis()).andExpect(status().isForbidden()); doGetAsync(url + "&agg=SUM&interval=86400000", device.getUuidId(), System.currentTimeMillis()).andExpect(status().isForbidden()); @@ -313,7 +313,7 @@ public class TelemetryControllerTest extends AbstractControllerTest { loginTenantAdmin(); doPost("/api/owner/CUSTOMER/" + customerId.getId() + "/DEVICE/" + device.getId().getId()).andExpect(status().isOk()); - loginCustomerUser(); + loginCustomerAdminUser(); ObjectNode result = doGetAsync(url, ObjectNode.class, device.getUuidId(), System.currentTimeMillis()); Assert.assertEquals(1L, result.get("t").get(0).get("value").asLong()); } From 83ba2923334ec5ff1379a9a1e8a7866da1eba031 Mon Sep 17 00:00:00 2001 From: Oleksandra Matviienko Date: Thu, 8 Oct 2026 17:30:44 +0200 Subject: [PATCH 36/43] Fixed deleting a single alarm comment wiping all comments of the alarm --- .../housekeeper/HousekeeperServiceTest.java | 33 +++++++++++++++++++ .../dao/housekeeper/CleanUpService.java | 4 ++- .../dao/housekeeper/CleanUpServiceTest.java | 20 +++++++++++ .../CleanUpServiceTransactionalTest.java | 4 ++- 4 files changed, 59 insertions(+), 2 deletions(-) diff --git a/application/src/test/java/org/thingsboard/server/service/housekeeper/HousekeeperServiceTest.java b/application/src/test/java/org/thingsboard/server/service/housekeeper/HousekeeperServiceTest.java index 41dbf711e2..a6d5ae2463 100644 --- a/application/src/test/java/org/thingsboard/server/service/housekeeper/HousekeeperServiceTest.java +++ b/application/src/test/java/org/thingsboard/server/service/housekeeper/HousekeeperServiceTest.java @@ -31,7 +31,9 @@ import org.thingsboard.server.common.data.EventInfo; import org.thingsboard.server.common.data.StringUtils; import org.thingsboard.server.common.data.alarm.Alarm; import org.thingsboard.server.common.data.alarm.AlarmComment; +import org.thingsboard.server.common.data.alarm.AlarmCommentInfo; import org.thingsboard.server.common.data.alarm.AlarmCommentSubType; +import org.thingsboard.server.common.data.alarm.AlarmCommentType; import org.thingsboard.server.common.data.alarm.AlarmRef; import org.thingsboard.server.common.data.alarm.AlarmSeverity; import org.thingsboard.server.common.data.alarm.EntityAlarm; @@ -322,6 +324,37 @@ public class HousekeeperServiceTest extends AbstractControllerTest { }); } + @Test + public void whenAlarmCommentIsDeleted_thenKeepOtherAlarmComments() throws Exception { + Device device = createDevice("test", "test"); + Alarm alarm = doPost("/api/alarm", Alarm.builder() + .tenantId(tenantId) + .originator(device.getId()) + .severity(AlarmSeverity.CRITICAL) + .type("test alarm with deleted comment") + .build(), Alarm.class); + AlarmId alarmId = alarm.getId(); + List comments = new ArrayList<>(); + for (int i = 1; i <= 3; i++) { + comments.add(doPost("/api/alarm/" + alarmId + "/comment", AlarmComment.builder() + .comment(JacksonUtil.newObjectNode().set("text", new TextNode("comment " + i))) + .build(), AlarmComment.class)); + } + assertThat(alarmCommentService.findAlarmComments(tenantId, alarmId, new PageLink(100)).getData()).hasSize(3); + + doDelete("/api/alarm/" + alarmId + "/comment/" + comments.get(0).getId()).andExpect(status().isOk()); + + TimeUnit.SECONDS.sleep(2); + List remaining = alarmCommentService.findAlarmComments(tenantId, alarmId, new PageLink(100)).getData(); + assertThat(remaining).hasSize(3); + assertThat(remaining).filteredOn(comment -> comment.getId().equals(comments.get(0).getId())) + .singleElement() + .satisfies(comment -> { + assertThat(comment.getType()).isEqualTo(AlarmCommentType.SYSTEM); + assertThat(comment.getComment().get("subtype").asText()).isEqualTo(AlarmCommentSubType.COMMENT_DELETED.name()); + }); + } + @Test public void whenDeviceIsDeleted_thenDeleteAllAlarms() throws Exception { Device device = createDevice("test", "test"); diff --git a/dao/src/main/java/org/thingsboard/server/dao/housekeeper/CleanUpService.java b/dao/src/main/java/org/thingsboard/server/dao/housekeeper/CleanUpService.java index 3c2c93e0a9..44dea223bb 100644 --- a/dao/src/main/java/org/thingsboard/server/dao/housekeeper/CleanUpService.java +++ b/dao/src/main/java/org/thingsboard/server/dao/housekeeper/CleanUpService.java @@ -11,6 +11,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.event.TransactionalEventListener; import org.thingsboard.server.common.data.EntityType; import org.thingsboard.server.common.data.User; +import org.thingsboard.server.common.data.alarm.Alarm; import org.thingsboard.server.common.data.housekeeper.HousekeeperTask; import org.thingsboard.server.common.data.id.AlarmId; import org.thingsboard.server.common.data.id.EntityId; @@ -61,9 +62,10 @@ public class CleanUpService { if (entityType == EntityType.TENANT) { submitTask(HousekeeperTask.deleteAiTenantData(tenantId)); } - if (entityType == EntityType.ALARM && event.getCause() != ActionCause.BULK_DELETION) { + if (entityType == EntityType.ALARM && event.getEntity() instanceof Alarm && event.getCause() != ActionCause.BULK_DELETION) { // Single-alarm delete: clean up its comments per alarm. Bulk deletions (BULK_DELETION) batch the // comment cleanup into a single list task at the orchestrator instead, to avoid one task per alarm. + // The entity check matters: deleting a single alarm comment publishes the same event with the alarm id. submitTask(HousekeeperTask.deleteAlarmComments(tenantId, new AlarmId(entityId.getId()))); } } catch (Throwable e) { diff --git a/dao/src/test/java/org/thingsboard/server/dao/housekeeper/CleanUpServiceTest.java b/dao/src/test/java/org/thingsboard/server/dao/housekeeper/CleanUpServiceTest.java index 98ed202a11..ed66d2b6d2 100644 --- a/dao/src/test/java/org/thingsboard/server/dao/housekeeper/CleanUpServiceTest.java +++ b/dao/src/test/java/org/thingsboard/server/dao/housekeeper/CleanUpServiceTest.java @@ -7,8 +7,10 @@ import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; import org.thingsboard.server.common.data.User; import org.thingsboard.server.common.data.alarm.Alarm; +import org.thingsboard.server.common.data.alarm.AlarmComment; import org.thingsboard.server.common.data.housekeeper.HousekeeperTask; import org.thingsboard.server.common.data.housekeeper.HousekeeperTaskType; +import org.thingsboard.server.common.data.id.AlarmCommentId; import org.thingsboard.server.common.data.id.AlarmId; import org.thingsboard.server.common.data.id.TenantId; import org.thingsboard.server.common.data.id.UserId; @@ -70,6 +72,7 @@ class CleanUpServiceTest { DeleteEntityEvent event = DeleteEntityEvent.builder() .tenantId(tenantId) .entityId(alarmId) + .entity(new Alarm(alarmId)) .build(); cleanUpService.handleEntityDeletionEvent(event); @@ -90,12 +93,29 @@ class CleanUpServiceTest { verify(relationService, never()).deleteEntityRelations(tenantId, alarmId); } + @Test + void alarmCommentDeletionDoesNotEnqueueAlarmCommentsCleanupTask() { + AlarmId alarmId = new AlarmId(UUID.randomUUID()); + AlarmComment alarmComment = new AlarmComment(new AlarmCommentId(UUID.randomUUID())); + alarmComment.setAlarmId(alarmId); + DeleteEntityEvent event = DeleteEntityEvent.builder() + .tenantId(tenantId) + .entityId(alarmId) + .entity(alarmComment) + .build(); + + cleanUpService.handleEntityDeletionEvent(event); + + verify(housekeeperClient, never()).submitTask(any()); + } + @Test void bulkAlarmDeletionDoesNotEnqueuePerAlarmCommentsCleanupTask() { AlarmId alarmId = new AlarmId(UUID.randomUUID()); DeleteEntityEvent event = DeleteEntityEvent.builder() .tenantId(tenantId) .entityId(alarmId) + .entity(new Alarm(alarmId)) .cause(ActionCause.BULK_DELETION) .build(); diff --git a/dao/src/test/java/org/thingsboard/server/dao/housekeeper/CleanUpServiceTransactionalTest.java b/dao/src/test/java/org/thingsboard/server/dao/housekeeper/CleanUpServiceTransactionalTest.java index 4fd8b2e8f4..de9f2a09e9 100644 --- a/dao/src/test/java/org/thingsboard/server/dao/housekeeper/CleanUpServiceTransactionalTest.java +++ b/dao/src/test/java/org/thingsboard/server/dao/housekeeper/CleanUpServiceTransactionalTest.java @@ -79,9 +79,11 @@ public class CleanUpServiceTransactionalTest extends AbstractServiceTest { } private DeleteEntityEvent alarmDeletionEvent() { + AlarmId alarmId = new AlarmId(UUID.randomUUID()); return DeleteEntityEvent.builder() .tenantId(tenantId) - .entityId(new AlarmId(UUID.randomUUID())) + .entityId(alarmId) + .entity(new Alarm(alarmId)) .build(); } From f1af4e5ff0e657677790fb16a368b2c5da1102f7 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Thu, 15 Oct 2026 10:11:28 +0300 Subject: [PATCH 37/43] Fix TbResourceApiClientTest compile --- .../org/thingsboard/server/client/TbResourceApiClientTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/src/test/java/org/thingsboard/server/client/TbResourceApiClientTest.java b/application/src/test/java/org/thingsboard/server/client/TbResourceApiClientTest.java index 17bcbfe048..3f9fb56c8c 100644 --- a/application/src/test/java/org/thingsboard/server/client/TbResourceApiClientTest.java +++ b/application/src/test/java/org/thingsboard/server/client/TbResourceApiClientTest.java @@ -21,6 +21,7 @@ import java.io.File; import java.util.ArrayList; import java.util.Base64; import java.util.List; +import java.util.Set; import java.util.UUID; import static org.junit.Assert.assertEquals; @@ -79,7 +80,7 @@ public class TbResourceApiClientTest extends AbstractApiClientTest { PageDataTbResourceInfo jsResources = client.getResources(GetResourcesArgs.builder() .pageSize(100) .page(0) - .resourceType(ResourceType.JS_MODULE.getValue()) + .resourceType(Set.of(ResourceType.JS_MODULE)) .textSearch(TEST_PREFIX + "Resource_" + timestamp) .build()); assertEquals(5, jsResources.getData().size()); From 5e9ec9ed23e2a89cc71062140e24588d100852af Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Thu, 15 Oct 2026 10:23:34 +0300 Subject: [PATCH 38/43] Use logInWithMfaToken in WebSocket 2FA tests --- .../thingsboard/server/controller/TwoFactorAuthTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/src/test/java/org/thingsboard/server/controller/TwoFactorAuthTest.java b/application/src/test/java/org/thingsboard/server/controller/TwoFactorAuthTest.java index 361c1c4fec..f2b5ba2f45 100644 --- a/application/src/test/java/org/thingsboard/server/controller/TwoFactorAuthTest.java +++ b/application/src/test/java/org/thingsboard/server/controller/TwoFactorAuthTest.java @@ -152,7 +152,7 @@ public class TwoFactorAuthTest extends AbstractControllerTest { @Test public void testWsAuthCmd_preVerificationTokenRejected() throws Exception { configureTotpTwoFa(); - logInWithPreVerificationToken(username, password); + logInWithMfaToken(username, password, Authority.PRE_VERIFICATION_TOKEN); wsClient = buildAndConnectWebSocketClient(); @@ -162,7 +162,7 @@ public class TwoFactorAuthTest extends AbstractControllerTest { @Test public void testWsQueryToken_preVerificationTokenRejected() throws Exception { configureTotpTwoFa(); - logInWithPreVerificationToken(username, password); + logInWithMfaToken(username, password, Authority.PRE_VERIFICATION_TOKEN); wsClient = buildAndConnectWebSocketClient("/api/ws?token=" + token); @@ -172,7 +172,7 @@ public class TwoFactorAuthTest extends AbstractControllerTest { @Test public void testWs_accessTokenAcceptedAfterTwoFa() throws Exception { TotpTwoFaAccountConfig totpTwoFaAccountConfig = configureTotpTwoFa(); - logInWithPreVerificationToken(username, password); + logInWithMfaToken(username, password, Authority.PRE_VERIFICATION_TOKEN); JsonNode tokenPair = readResponse(doPost("/api/auth/2fa/verification/check?providerType=TOTP&verificationCode=" + getCorrectTotp(totpTwoFaAccountConfig)) .andExpect(status().isOk()), JsonNode.class); validateAndSetJwtToken(tokenPair, username); From 8dc338e112fa535542f716a808350993c968082e Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Thu, 15 Oct 2026 10:31:12 +0300 Subject: [PATCH 39/43] Restamp TelemetryControllerTest with ce-modified header --- .../thingsboard/server/controller/TelemetryControllerTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java b/application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java index 3c34a4d25b..6ebd6ba29c 100644 --- a/application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java +++ b/application/src/test/java/org/thingsboard/server/controller/TelemetryControllerTest.java @@ -1,5 +1,6 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors -// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 package org.thingsboard.server.controller; import com.fasterxml.jackson.databind.node.ObjectNode; From f9056247451e5dc359a3a124fb5ea5281d825165 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Thu, 15 Oct 2026 10:44:01 +0300 Subject: [PATCH 40/43] Fix license headers after merging lts-4.2 WebSocket fix --- .../controller/plugin/TbWebSocketHandler.java | 3 ++- .../server/client/TbResourceApiClientTest.java | 3 ++- .../main/python/license-headers/curations.json | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java b/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java index e5a93e4758..d6bdbab7eb 100644 --- a/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java +++ b/application/src/main/java/org/thingsboard/server/controller/plugin/TbWebSocketHandler.java @@ -1,5 +1,6 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors -// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 package org.thingsboard.server.controller.plugin; import com.github.benmanes.caffeine.cache.Cache; diff --git a/application/src/test/java/org/thingsboard/server/client/TbResourceApiClientTest.java b/application/src/test/java/org/thingsboard/server/client/TbResourceApiClientTest.java index 3f9fb56c8c..4434c753da 100644 --- a/application/src/test/java/org/thingsboard/server/client/TbResourceApiClientTest.java +++ b/application/src/test/java/org/thingsboard/server/client/TbResourceApiClientTest.java @@ -1,5 +1,6 @@ // SPDX-FileCopyrightText: Copyright The ThingsBoard Authors -// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. +// SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 package org.thingsboard.server.client; import org.junit.Test; diff --git a/tools/src/main/python/license-headers/curations.json b/tools/src/main/python/license-headers/curations.json index 75b0eb6a2c..d1b7a98133 100644 --- a/tools/src/main/python/license-headers/curations.json +++ b/tools/src/main/python/license-headers/curations.json @@ -439,6 +439,18 @@ "reason": "PE-specific data/configuration type IntegrationLifecycleEventTrigger.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/notification/rule/trigger/RuleEngineComponentLifecycleEventTrigger.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob e4c967c19792ecf5fa6409973459efe5ce73cb8d).", "contentHash": "sha256:c5da9a11ed196635c09972733cf511bee2bd111242c0d084d115d37e2e7524c5" }, + { + "path": "common/data/src/main/java/org/thingsboard/server/common/data/notification/targets/platform/UserGroupListFilter.java", + "header": "busl", + "reason": "PE user group filter, a new class with its own groupsIds field and USER_GROUP_LIST type. The similarity comes from the shared shape of small filter DTOs, not from CE code. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/notification/targets/platform/UserListFilter.java at 862b224dd7e4e770804ffad3411255166daa4501 (blob 07cd0280ba84ab71b6823242e18c7c7285296b84).", + "contentHash": "sha256:64563fbc6ee416025b555c14cf3c517c5027bfc112a883078cc717ed471c5b52" + }, + { + "path": "common/data/src/main/java/org/thingsboard/server/common/data/notification/targets/platform/UserRoleFilter.java", + "header": "busl", + "reason": "PE role filter, a new class with its own rolesIds field and USER_ROLE type. The similarity comes from the shared shape of small filter DTOs, not from CE code. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/notification/targets/platform/UserListFilter.java at 862b224dd7e4e770804ffad3411255166daa4501 (blob 07cd0280ba84ab71b6823242e18c7c7285296b84).", + "contentHash": "sha256:007e94e798f25a9d0ccd1716b8a68eada4fe3ced71e531bd0538c2c56e24ecb7" + }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/permission/Operation.java", "header": "ce-modified", @@ -457,6 +469,12 @@ "reason": "PE-specific data/configuration type EntityGroupNameFilter.java. Reviewed fields, type discriminators and serialization hooks describe PE entities or PE behavior; matching CE types supply only the common DTO/interface pattern. Resolved as PE-authored consistently with the maintainer decision for PE entity wrappers. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/query/EntityNameFilter.java at 0d3b41e002f958887a317ca8366fdc4efa549058 (blob a3889bc7c07de44917eac165a9c4e8578bbbcd62).", "contentHash": "sha256:46cc0073210fb81fb1a71f44604042da6056f78f62468cf45bdc78cdaf8cdd09" }, + { + "path": "common/data/src/main/java/org/thingsboard/server/common/data/query/StateEntityFilter.java", + "header": "busl", + "reason": "PE dashboard state entity filter, a new class with its own defaultStateEntity field and STATE_ENTITY type. The similarity comes from the shared shape of small filter DTOs, not from CE code. Reviewed candidate common/data/src/main/java/org/thingsboard/server/common/data/query/SingleEntityFilter.java at 862b224dd7e4e770804ffad3411255166daa4501 (blob dacd7de6eae6cd80cfd63047dad8951d76aeb455).", + "contentHash": "sha256:46835b82b0320007209a5d53528f9fdb534af41c2fcb5a528754c316c530394a" + }, { "path": "common/data/src/main/java/org/thingsboard/server/common/data/query/StateEntityOwnerFilter.java", "header": "busl", From 1def2c6506998b17ab1e577e793efcce4e6cc0d2 Mon Sep 17 00:00:00 2001 From: Andrii Landiak Date: Thu, 15 Oct 2026 11:21:36 +0300 Subject: [PATCH 41/43] Move allow-circular-references into the spring block of the CoAP integration config --- integration/coap/src/main/resources/tb-coap-integration.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration/coap/src/main/resources/tb-coap-integration.yml b/integration/coap/src/main/resources/tb-coap-integration.yml index 267c91dba0..560f20b9f7 100644 --- a/integration/coap/src/main/resources/tb-coap-integration.yml +++ b/integration/coap/src/main/resources/tb-coap-integration.yml @@ -3,8 +3,6 @@ # SPDX-License-Identifier: BUSL-1.1 # -spring.main.allow-circular-references: "true" # Spring Boot configuration property that controls whether circular dependencies between beans are allowed. - server: # Server bind address address: "${HTTP_BIND_ADDRESS:0.0.0.0}" @@ -29,6 +27,8 @@ spring: exclude: - org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration - org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration + main: + allow-circular-references: "true" # Spring Boot configuration property that controls whether circular dependencies between beans are allowed. storage: # Location of the folder to store data files From 01ec34c76e6c4f0194011ff6d8da1cd19266651f Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Thu, 15 Oct 2026 12:17:59 +0300 Subject: [PATCH 42/43] Version set to 4.4.1-SNAPSHOT --- application/pom.xml | 2 +- common/actor/pom.xml | 2 +- common/agent-api/pom.xml | 2 +- common/cache/pom.xml | 2 +- common/cluster-api/pom.xml | 2 +- common/coap-server/pom.xml | 2 +- common/dao-api/pom.xml | 2 +- common/data/pom.xml | 2 +- common/discovery-api/pom.xml | 2 +- common/edge-api/pom.xml | 2 +- common/edge-api/src/main/proto/edge.proto | 2 +- common/edqs/pom.xml | 2 +- common/integration/apache-pulsar/pom.xml | 2 +- common/integration/aws-integrations/pom.xml | 2 +- common/integration/azure-integrations/pom.xml | 2 +- common/integration/cluster-integration-api/pom.xml | 2 +- common/integration/coap-integrations/pom.xml | 2 +- common/integration/gcloud-integrations/pom.xml | 2 +- common/integration/http-integrations/pom.xml | 2 +- common/integration/integration-api/pom.xml | 2 +- common/integration/kafka-integrations/pom.xml | 2 +- common/integration/mqtt-integrations/pom.xml | 2 +- common/integration/opcua-integrations/pom.xml | 2 +- common/integration/pom.xml | 2 +- common/integration/rabbitmq-integrations/pom.xml | 2 +- common/integration/remote-integration-api/pom.xml | 2 +- common/integration/tuya-integrations/pom.xml | 2 +- common/message/pom.xml | 2 +- common/pom.xml | 2 +- common/proto/pom.xml | 2 +- common/queue/pom.xml | 2 +- common/report/pom.xml | 2 +- common/script/pom.xml | 2 +- common/script/remote-js-client/pom.xml | 2 +- common/script/script-api/pom.xml | 2 +- common/stats/pom.xml | 2 +- common/transport/coap/pom.xml | 2 +- common/transport/http/pom.xml | 2 +- common/transport/lwm2m/pom.xml | 2 +- common/transport/mqtt/pom.xml | 2 +- common/transport/pom.xml | 2 +- common/transport/snmp/pom.xml | 2 +- common/transport/transport-api/pom.xml | 2 +- common/util/pom.xml | 2 +- common/version-control/pom.xml | 2 +- dao/pom.xml | 2 +- edqs/pom.xml | 2 +- integration/apache-pulsar/pom.xml | 2 +- integration/aws/pom.xml | 2 +- integration/azure/pom.xml | 2 +- integration/coap/pom.xml | 2 +- integration/executor/pom.xml | 2 +- integration/http/pom.xml | 2 +- integration/kafka/pom.xml | 2 +- integration/mqtt/pom.xml | 2 +- integration/opc-ua/pom.xml | 2 +- integration/pom.xml | 2 +- integration/pubsub/pom.xml | 2 +- integration/rabbitmq/pom.xml | 2 +- integration/tcp-udp/pom.xml | 2 +- integration/tuya/pom.xml | 2 +- migrator/pom.xml | 2 +- monitoring/pom.xml | 2 +- msa/black-box-tests/pom.xml | 2 +- msa/edqs/pom.xml | 2 +- msa/integration/apache-pulsar/pom.xml | 2 +- msa/integration/aws/pom.xml | 2 +- msa/integration/azure/pom.xml | 2 +- msa/integration/coap/pom.xml | 2 +- msa/integration/executor/pom.xml | 2 +- msa/integration/http/pom.xml | 2 +- msa/integration/kafka/pom.xml | 2 +- msa/integration/mqtt/pom.xml | 2 +- msa/integration/opc-ua/pom.xml | 2 +- msa/integration/pom.xml | 4 ++-- msa/integration/pubsub/pom.xml | 2 +- msa/integration/rabbitmq/pom.xml | 2 +- msa/integration/tcp-udp/pom.xml | 2 +- msa/integration/tuya/pom.xml | 2 +- msa/js-executor/package.json | 2 +- msa/js-executor/pom.xml | 2 +- msa/migrator/pom.xml | 2 +- msa/monitoring/pom.xml | 2 +- msa/pom.xml | 4 ++-- msa/report/pom.xml | 2 +- msa/tb-node/pom.xml | 2 +- msa/transport/coap/pom.xml | 2 +- msa/transport/http/pom.xml | 2 +- msa/transport/lwm2m/pom.xml | 2 +- msa/transport/mqtt/pom.xml | 2 +- msa/transport/pom.xml | 2 +- msa/transport/snmp/pom.xml | 2 +- msa/vc-executor-docker/pom.xml | 2 +- msa/vc-executor/pom.xml | 2 +- msa/web-report/package.json | 2 +- msa/web-report/pom.xml | 2 +- msa/web-ui/package.json | 2 +- msa/web-ui/pom.xml | 2 +- netty-mqtt/pom.xml | 4 ++-- pom.xml | 2 +- report/pom.xml | 2 +- rest-client/pom.xml | 2 +- rule-engine/pom.xml | 2 +- rule-engine/rule-engine-api/pom.xml | 2 +- rule-engine/rule-engine-components/pom.xml | 2 +- tools/pom.xml | 2 +- transport/coap/pom.xml | 2 +- transport/http/pom.xml | 2 +- transport/lwm2m/pom.xml | 2 +- transport/mqtt/pom.xml | 2 +- transport/pom.xml | 2 +- transport/snmp/pom.xml | 2 +- ui-ngx/package.json | 2 +- ui-ngx/pom.xml | 2 +- 114 files changed, 117 insertions(+), 117 deletions(-) diff --git a/application/pom.xml b/application/pom.xml index 05096269a8..1dcafd6e9c 100644 --- a/application/pom.xml +++ b/application/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT thingsboard application diff --git a/common/actor/pom.xml b/common/actor/pom.xml index d1f4eda97b..fa3037517c 100644 --- a/common/actor/pom.xml +++ b/common/actor/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/agent-api/pom.xml b/common/agent-api/pom.xml index 648bab6df3..4b52297231 100644 --- a/common/agent-api/pom.xml +++ b/common/agent-api/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/cache/pom.xml b/common/cache/pom.xml index 5b476b30cc..0c4ca035a0 100644 --- a/common/cache/pom.xml +++ b/common/cache/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/cluster-api/pom.xml b/common/cluster-api/pom.xml index 64c3d49d39..b3fa8eaf6d 100644 --- a/common/cluster-api/pom.xml +++ b/common/cluster-api/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/coap-server/pom.xml b/common/coap-server/pom.xml index 50347cb551..fd8a22fd53 100644 --- a/common/coap-server/pom.xml +++ b/common/coap-server/pom.xml @@ -12,7 +12,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/dao-api/pom.xml b/common/dao-api/pom.xml index 96e698c22c..acb473d00a 100644 --- a/common/dao-api/pom.xml +++ b/common/dao-api/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/data/pom.xml b/common/data/pom.xml index 4163e86279..9028a00497 100644 --- a/common/data/pom.xml +++ b/common/data/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/discovery-api/pom.xml b/common/discovery-api/pom.xml index d7cb25266b..aba7b8e3b7 100644 --- a/common/discovery-api/pom.xml +++ b/common/discovery-api/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/edge-api/pom.xml b/common/edge-api/pom.xml index 77005c642c..59c665b07c 100644 --- a/common/edge-api/pom.xml +++ b/common/edge-api/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/edge-api/src/main/proto/edge.proto b/common/edge-api/src/main/proto/edge.proto index 0c17d43e5f..0859747878 100644 --- a/common/edge-api/src/main/proto/edge.proto +++ b/common/edge-api/src/main/proto/edge.proto @@ -52,7 +52,7 @@ enum EdgeVersion { V_4_3_1_6 = 4316; V_4_3_1_7 = 4317; V_4_4_0 = 4400; - V_4_4_0_1 = 4401; + V_4_4_1 = 4410; V_LATEST = 99999; } diff --git a/common/edqs/pom.xml b/common/edqs/pom.xml index c4806872cd..b9e850af8c 100644 --- a/common/edqs/pom.xml +++ b/common/edqs/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/integration/apache-pulsar/pom.xml b/common/integration/apache-pulsar/pom.xml index 8d2bcb44c1..610872f5e9 100644 --- a/common/integration/apache-pulsar/pom.xml +++ b/common/integration/apache-pulsar/pom.xml @@ -11,7 +11,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.common.integration diff --git a/common/integration/aws-integrations/pom.xml b/common/integration/aws-integrations/pom.xml index 7629907753..d313be19bc 100644 --- a/common/integration/aws-integrations/pom.xml +++ b/common/integration/aws-integrations/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.common.integration diff --git a/common/integration/azure-integrations/pom.xml b/common/integration/azure-integrations/pom.xml index dad9f38033..8fd70d9c54 100644 --- a/common/integration/azure-integrations/pom.xml +++ b/common/integration/azure-integrations/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.common.integration diff --git a/common/integration/cluster-integration-api/pom.xml b/common/integration/cluster-integration-api/pom.xml index 151d787c23..1d4596b74d 100644 --- a/common/integration/cluster-integration-api/pom.xml +++ b/common/integration/cluster-integration-api/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.common.integration diff --git a/common/integration/coap-integrations/pom.xml b/common/integration/coap-integrations/pom.xml index f75a62aed9..b00bcb6d09 100644 --- a/common/integration/coap-integrations/pom.xml +++ b/common/integration/coap-integrations/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.common.integration diff --git a/common/integration/gcloud-integrations/pom.xml b/common/integration/gcloud-integrations/pom.xml index b909cfb628..472aeefa9d 100644 --- a/common/integration/gcloud-integrations/pom.xml +++ b/common/integration/gcloud-integrations/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.common.integration diff --git a/common/integration/http-integrations/pom.xml b/common/integration/http-integrations/pom.xml index 5b2606505a..c476648e2a 100644 --- a/common/integration/http-integrations/pom.xml +++ b/common/integration/http-integrations/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.common.integration diff --git a/common/integration/integration-api/pom.xml b/common/integration/integration-api/pom.xml index 23fbb4f012..15617a0a3a 100644 --- a/common/integration/integration-api/pom.xml +++ b/common/integration/integration-api/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.common.integration diff --git a/common/integration/kafka-integrations/pom.xml b/common/integration/kafka-integrations/pom.xml index 1da4a2e5bc..a6604aaa9b 100644 --- a/common/integration/kafka-integrations/pom.xml +++ b/common/integration/kafka-integrations/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.common.integration diff --git a/common/integration/mqtt-integrations/pom.xml b/common/integration/mqtt-integrations/pom.xml index 2880ab2710..89b3025891 100644 --- a/common/integration/mqtt-integrations/pom.xml +++ b/common/integration/mqtt-integrations/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.common.integration diff --git a/common/integration/opcua-integrations/pom.xml b/common/integration/opcua-integrations/pom.xml index af25e34904..79302fd0ec 100644 --- a/common/integration/opcua-integrations/pom.xml +++ b/common/integration/opcua-integrations/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.common.integration diff --git a/common/integration/pom.xml b/common/integration/pom.xml index ffc4d21947..3ee67d5101 100644 --- a/common/integration/pom.xml +++ b/common/integration/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/integration/rabbitmq-integrations/pom.xml b/common/integration/rabbitmq-integrations/pom.xml index c4f120c054..ac28a4cd67 100644 --- a/common/integration/rabbitmq-integrations/pom.xml +++ b/common/integration/rabbitmq-integrations/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.common.integration diff --git a/common/integration/remote-integration-api/pom.xml b/common/integration/remote-integration-api/pom.xml index a0efa16741..2db388a166 100644 --- a/common/integration/remote-integration-api/pom.xml +++ b/common/integration/remote-integration-api/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.common.integration diff --git a/common/integration/tuya-integrations/pom.xml b/common/integration/tuya-integrations/pom.xml index 6bb785b285..11805ef149 100644 --- a/common/integration/tuya-integrations/pom.xml +++ b/common/integration/tuya-integrations/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.common.integration diff --git a/common/message/pom.xml b/common/message/pom.xml index 7fdcc5d7e3..05f4d7a4ea 100644 --- a/common/message/pom.xml +++ b/common/message/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/pom.xml b/common/pom.xml index dd7abf9c65..ecef58c721 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT thingsboard common diff --git a/common/proto/pom.xml b/common/proto/pom.xml index f27ab28dd3..aef6f29b72 100644 --- a/common/proto/pom.xml +++ b/common/proto/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/queue/pom.xml b/common/queue/pom.xml index 1107cb9d80..be14683ec3 100644 --- a/common/queue/pom.xml +++ b/common/queue/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/report/pom.xml b/common/report/pom.xml index 4c5569f5b3..7aa634f468 100644 --- a/common/report/pom.xml +++ b/common/report/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/script/pom.xml b/common/script/pom.xml index 4c65c0ad49..2fa3adae61 100644 --- a/common/script/pom.xml +++ b/common/script/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/script/remote-js-client/pom.xml b/common/script/remote-js-client/pom.xml index 8107306a8c..d04821e04f 100644 --- a/common/script/remote-js-client/pom.xml +++ b/common/script/remote-js-client/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT script org.thingsboard.common.script diff --git a/common/script/script-api/pom.xml b/common/script/script-api/pom.xml index 59d85f86a1..081a2f3976 100644 --- a/common/script/script-api/pom.xml +++ b/common/script/script-api/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT script org.thingsboard.common.script diff --git a/common/stats/pom.xml b/common/stats/pom.xml index 53cc5e4eaf..2873f94f9c 100644 --- a/common/stats/pom.xml +++ b/common/stats/pom.xml @@ -12,7 +12,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/transport/coap/pom.xml b/common/transport/coap/pom.xml index fe30177622..9a28d7c95c 100644 --- a/common/transport/coap/pom.xml +++ b/common/transport/coap/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT transport org.thingsboard.common.transport diff --git a/common/transport/http/pom.xml b/common/transport/http/pom.xml index 577da5ed0c..f9f462da66 100644 --- a/common/transport/http/pom.xml +++ b/common/transport/http/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT transport org.thingsboard.common.transport diff --git a/common/transport/lwm2m/pom.xml b/common/transport/lwm2m/pom.xml index 3a195d23eb..ccc051900f 100644 --- a/common/transport/lwm2m/pom.xml +++ b/common/transport/lwm2m/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT transport org.thingsboard.common.transport diff --git a/common/transport/mqtt/pom.xml b/common/transport/mqtt/pom.xml index f10782e394..b499a5f591 100644 --- a/common/transport/mqtt/pom.xml +++ b/common/transport/mqtt/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT transport org.thingsboard.common.transport diff --git a/common/transport/pom.xml b/common/transport/pom.xml index 57728b92b7..103dde135d 100644 --- a/common/transport/pom.xml +++ b/common/transport/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/transport/snmp/pom.xml b/common/transport/snmp/pom.xml index 654180c79a..d3a02e9848 100644 --- a/common/transport/snmp/pom.xml +++ b/common/transport/snmp/pom.xml @@ -11,7 +11,7 @@ org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT transport diff --git a/common/transport/transport-api/pom.xml b/common/transport/transport-api/pom.xml index 94160d8e4d..d141135c0d 100644 --- a/common/transport/transport-api/pom.xml +++ b/common/transport/transport-api/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard.common - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT transport org.thingsboard.common.transport diff --git a/common/util/pom.xml b/common/util/pom.xml index 38dafbf900..0fe6b896a4 100644 --- a/common/util/pom.xml +++ b/common/util/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/common/version-control/pom.xml b/common/version-control/pom.xml index 1ef5f1fb48..1b80246053 100644 --- a/common/version-control/pom.xml +++ b/common/version-control/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT common org.thingsboard.common diff --git a/dao/pom.xml b/dao/pom.xml index 2e3e40d976..2d84a22298 100644 --- a/dao/pom.xml +++ b/dao/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT thingsboard dao diff --git a/edqs/pom.xml b/edqs/pom.xml index 1d6a0c8428..08ad8c6257 100644 --- a/edqs/pom.xml +++ b/edqs/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT thingsboard edqs diff --git a/integration/apache-pulsar/pom.xml b/integration/apache-pulsar/pom.xml index f81588fb8d..933f978139 100644 --- a/integration/apache-pulsar/pom.xml +++ b/integration/apache-pulsar/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.integration diff --git a/integration/aws/pom.xml b/integration/aws/pom.xml index 41a86f31d3..51ad65f933 100644 --- a/integration/aws/pom.xml +++ b/integration/aws/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.integration diff --git a/integration/azure/pom.xml b/integration/azure/pom.xml index 86a6a23a29..d568ac3c65 100644 --- a/integration/azure/pom.xml +++ b/integration/azure/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.integration diff --git a/integration/coap/pom.xml b/integration/coap/pom.xml index caf30f83f2..617763a02a 100644 --- a/integration/coap/pom.xml +++ b/integration/coap/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.integration diff --git a/integration/executor/pom.xml b/integration/executor/pom.xml index 41a281d9f9..4854543122 100644 --- a/integration/executor/pom.xml +++ b/integration/executor/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.integration diff --git a/integration/http/pom.xml b/integration/http/pom.xml index 1d619ab324..d83c8b52d1 100644 --- a/integration/http/pom.xml +++ b/integration/http/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.integration diff --git a/integration/kafka/pom.xml b/integration/kafka/pom.xml index 28e498fa45..168c9f5a68 100644 --- a/integration/kafka/pom.xml +++ b/integration/kafka/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.integration diff --git a/integration/mqtt/pom.xml b/integration/mqtt/pom.xml index 2bc8af134e..1ab8dec89e 100644 --- a/integration/mqtt/pom.xml +++ b/integration/mqtt/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.integration diff --git a/integration/opc-ua/pom.xml b/integration/opc-ua/pom.xml index e1ae8ffc85..3332c6462d 100644 --- a/integration/opc-ua/pom.xml +++ b/integration/opc-ua/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.integration diff --git a/integration/pom.xml b/integration/pom.xml index 2f3ec66166..e4df184899 100644 --- a/integration/pom.xml +++ b/integration/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT thingsboard integration diff --git a/integration/pubsub/pom.xml b/integration/pubsub/pom.xml index 286d29f1bc..d571e3c5b3 100644 --- a/integration/pubsub/pom.xml +++ b/integration/pubsub/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.integration diff --git a/integration/rabbitmq/pom.xml b/integration/rabbitmq/pom.xml index 081147ad5a..3b286f1c5d 100644 --- a/integration/rabbitmq/pom.xml +++ b/integration/rabbitmq/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.integration diff --git a/integration/tcp-udp/pom.xml b/integration/tcp-udp/pom.xml index 1ae99f25ef..4f0c360e97 100644 --- a/integration/tcp-udp/pom.xml +++ b/integration/tcp-udp/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.integration diff --git a/integration/tuya/pom.xml b/integration/tuya/pom.xml index 1d84b18221..3057a6df39 100644 --- a/integration/tuya/pom.xml +++ b/integration/tuya/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration org.thingsboard.integration diff --git a/migrator/pom.xml b/migrator/pom.xml index 7de06d3f90..fcf5838720 100644 --- a/migrator/pom.xml +++ b/migrator/pom.xml @@ -12,7 +12,7 @@ thingsboard org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT migrator diff --git a/monitoring/pom.xml b/monitoring/pom.xml index 53c5d3ec8a..5225aea050 100644 --- a/monitoring/pom.xml +++ b/monitoring/pom.xml @@ -11,7 +11,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT thingsboard diff --git a/msa/black-box-tests/pom.xml b/msa/black-box-tests/pom.xml index 82d4ca6810..03077a442e 100644 --- a/msa/black-box-tests/pom.xml +++ b/msa/black-box-tests/pom.xml @@ -11,7 +11,7 @@ org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/edqs/pom.xml b/msa/edqs/pom.xml index 19129f8365..5fc1650d80 100644 --- a/msa/edqs/pom.xml +++ b/msa/edqs/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/integration/apache-pulsar/pom.xml b/msa/integration/apache-pulsar/pom.xml index be95124a98..c4e9cb8263 100644 --- a/msa/integration/apache-pulsar/pom.xml +++ b/msa/integration/apache-pulsar/pom.xml @@ -10,7 +10,7 @@ org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration diff --git a/msa/integration/aws/pom.xml b/msa/integration/aws/pom.xml index 42c4cc38fa..1afd9aad25 100644 --- a/msa/integration/aws/pom.xml +++ b/msa/integration/aws/pom.xml @@ -10,7 +10,7 @@ org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration diff --git a/msa/integration/azure/pom.xml b/msa/integration/azure/pom.xml index da528c71ec..e306620b71 100644 --- a/msa/integration/azure/pom.xml +++ b/msa/integration/azure/pom.xml @@ -10,7 +10,7 @@ org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration diff --git a/msa/integration/coap/pom.xml b/msa/integration/coap/pom.xml index 06059a5e01..81155bc7e9 100644 --- a/msa/integration/coap/pom.xml +++ b/msa/integration/coap/pom.xml @@ -10,7 +10,7 @@ org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration diff --git a/msa/integration/executor/pom.xml b/msa/integration/executor/pom.xml index 24946b9f3e..450271579c 100644 --- a/msa/integration/executor/pom.xml +++ b/msa/integration/executor/pom.xml @@ -10,7 +10,7 @@ org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration diff --git a/msa/integration/http/pom.xml b/msa/integration/http/pom.xml index 7041c2c4fd..beb8d3fe31 100644 --- a/msa/integration/http/pom.xml +++ b/msa/integration/http/pom.xml @@ -10,7 +10,7 @@ org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration diff --git a/msa/integration/kafka/pom.xml b/msa/integration/kafka/pom.xml index 9d90ca755d..00c1f17501 100644 --- a/msa/integration/kafka/pom.xml +++ b/msa/integration/kafka/pom.xml @@ -10,7 +10,7 @@ org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration diff --git a/msa/integration/mqtt/pom.xml b/msa/integration/mqtt/pom.xml index 5095573d29..de56a62159 100644 --- a/msa/integration/mqtt/pom.xml +++ b/msa/integration/mqtt/pom.xml @@ -10,7 +10,7 @@ org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration diff --git a/msa/integration/opc-ua/pom.xml b/msa/integration/opc-ua/pom.xml index d6eb1e39b3..2f455d67fd 100644 --- a/msa/integration/opc-ua/pom.xml +++ b/msa/integration/opc-ua/pom.xml @@ -10,7 +10,7 @@ org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration diff --git a/msa/integration/pom.xml b/msa/integration/pom.xml index c7debdd00a..4e5a22d2fe 100644 --- a/msa/integration/pom.xml +++ b/msa/integration/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT msa @@ -110,7 +110,7 @@ - 4.4.0-latest + 4.4.1-latest false diff --git a/msa/integration/pubsub/pom.xml b/msa/integration/pubsub/pom.xml index f1dd1b878e..e9b7bb3975 100644 --- a/msa/integration/pubsub/pom.xml +++ b/msa/integration/pubsub/pom.xml @@ -10,7 +10,7 @@ org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration diff --git a/msa/integration/rabbitmq/pom.xml b/msa/integration/rabbitmq/pom.xml index a79d9bfd2a..baa664bea2 100644 --- a/msa/integration/rabbitmq/pom.xml +++ b/msa/integration/rabbitmq/pom.xml @@ -10,7 +10,7 @@ org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration diff --git a/msa/integration/tcp-udp/pom.xml b/msa/integration/tcp-udp/pom.xml index ca9e7cf50d..5b47b031eb 100644 --- a/msa/integration/tcp-udp/pom.xml +++ b/msa/integration/tcp-udp/pom.xml @@ -10,7 +10,7 @@ org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration diff --git a/msa/integration/tuya/pom.xml b/msa/integration/tuya/pom.xml index 434db9bbe6..22ca7ffa7e 100644 --- a/msa/integration/tuya/pom.xml +++ b/msa/integration/tuya/pom.xml @@ -10,7 +10,7 @@ org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT integration diff --git a/msa/js-executor/package.json b/msa/js-executor/package.json index f534a6d07b..d88291cf17 100644 --- a/msa/js-executor/package.json +++ b/msa/js-executor/package.json @@ -1,7 +1,7 @@ { "name": "thingsboard-js-executor", "private": true, - "version": "4.4.0.1", + "version": "4.4.1", "description": "ThingsBoard JavaScript Executor Microservice", "main": "server.ts", "bin": "server.js", diff --git a/msa/js-executor/pom.xml b/msa/js-executor/pom.xml index f5b5baf0c9..1e407061a6 100644 --- a/msa/js-executor/pom.xml +++ b/msa/js-executor/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/migrator/pom.xml b/msa/migrator/pom.xml index a6d7ae86a8..bbb29c50f5 100644 --- a/msa/migrator/pom.xml +++ b/msa/migrator/pom.xml @@ -11,7 +11,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT msa diff --git a/msa/monitoring/pom.xml b/msa/monitoring/pom.xml index 0bd2786a49..fb95e91b7d 100644 --- a/msa/monitoring/pom.xml +++ b/msa/monitoring/pom.xml @@ -12,7 +12,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT msa diff --git a/msa/pom.xml b/msa/pom.xml index bfb8655728..43cd606147 100644 --- a/msa/pom.xml +++ b/msa/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT thingsboard msa @@ -196,7 +196,7 @@ - 4.4.0-latest + 4.4.1-latest false diff --git a/msa/report/pom.xml b/msa/report/pom.xml index 8a3361d2c3..6a782df30a 100644 --- a/msa/report/pom.xml +++ b/msa/report/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/tb-node/pom.xml b/msa/tb-node/pom.xml index 8227d7bcb0..0baf11cf45 100644 --- a/msa/tb-node/pom.xml +++ b/msa/tb-node/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/transport/coap/pom.xml b/msa/transport/coap/pom.xml index 1354f57dab..e06e589e5c 100644 --- a/msa/transport/coap/pom.xml +++ b/msa/transport/coap/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT transport org.thingsboard.msa.transport diff --git a/msa/transport/http/pom.xml b/msa/transport/http/pom.xml index 10d593c1ea..6127552381 100644 --- a/msa/transport/http/pom.xml +++ b/msa/transport/http/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT transport org.thingsboard.msa.transport diff --git a/msa/transport/lwm2m/pom.xml b/msa/transport/lwm2m/pom.xml index 23fcf1aa52..3babb3256f 100644 --- a/msa/transport/lwm2m/pom.xml +++ b/msa/transport/lwm2m/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT transport org.thingsboard.msa.transport diff --git a/msa/transport/mqtt/pom.xml b/msa/transport/mqtt/pom.xml index 682986ec8b..66e483f62e 100644 --- a/msa/transport/mqtt/pom.xml +++ b/msa/transport/mqtt/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard.msa - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT transport org.thingsboard.msa.transport diff --git a/msa/transport/pom.xml b/msa/transport/pom.xml index 12bba190cf..93c2de38bf 100644 --- a/msa/transport/pom.xml +++ b/msa/transport/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/transport/snmp/pom.xml b/msa/transport/snmp/pom.xml index c96784b765..08c7df6229 100644 --- a/msa/transport/snmp/pom.xml +++ b/msa/transport/snmp/pom.xml @@ -11,7 +11,7 @@ org.thingsboard.msa transport - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT org.thingsboard.msa.transport diff --git a/msa/vc-executor-docker/pom.xml b/msa/vc-executor-docker/pom.xml index db28206847..b401024448 100644 --- a/msa/vc-executor-docker/pom.xml +++ b/msa/vc-executor-docker/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/vc-executor/pom.xml b/msa/vc-executor/pom.xml index f1092bf837..8a7b8e15ca 100644 --- a/msa/vc-executor/pom.xml +++ b/msa/vc-executor/pom.xml @@ -11,7 +11,7 @@ org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/web-report/package.json b/msa/web-report/package.json index a4a5433e9e..fe0ec7a8ff 100644 --- a/msa/web-report/package.json +++ b/msa/web-report/package.json @@ -1,7 +1,7 @@ { "name": "thingsboard-web-report", "private": true, - "version": "4.4.0.1", + "version": "4.4.1", "description": "ThingsBoard Web Reporting Microservice", "main": "server.ts", "bin": "server.js", diff --git a/msa/web-report/pom.xml b/msa/web-report/pom.xml index e3d9832b79..05f3813996 100644 --- a/msa/web-report/pom.xml +++ b/msa/web-report/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT msa org.thingsboard.msa diff --git a/msa/web-ui/package.json b/msa/web-ui/package.json index 1aed9569a1..b1f0b82c9e 100644 --- a/msa/web-ui/package.json +++ b/msa/web-ui/package.json @@ -1,7 +1,7 @@ { "name": "thingsboard-web-ui", "private": true, - "version": "4.4.0.1", + "version": "4.4.1", "description": "ThingsBoard Web UI Microservice", "main": "server.ts", "bin": "server.js", diff --git a/msa/web-ui/pom.xml b/msa/web-ui/pom.xml index 652bb2dc5c..5e3d67d99c 100644 --- a/msa/web-ui/pom.xml +++ b/msa/web-ui/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT msa org.thingsboard.msa diff --git a/netty-mqtt/pom.xml b/netty-mqtt/pom.xml index 6733a24fb2..9fe47daa32 100644 --- a/netty-mqtt/pom.xml +++ b/netty-mqtt/pom.xml @@ -9,11 +9,11 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT thingsboard netty-mqtt - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT jar Netty MQTT Client diff --git a/pom.xml b/pom.xml index 53835909e1..83563d31b6 100755 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT pom ThingsBoard diff --git a/report/pom.xml b/report/pom.xml index f428e65d22..5344f98b18 100644 --- a/report/pom.xml +++ b/report/pom.xml @@ -9,7 +9,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT thingsboard report diff --git a/rest-client/pom.xml b/rest-client/pom.xml index 1be733ccee..6ef87dde9b 100644 --- a/rest-client/pom.xml +++ b/rest-client/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT thingsboard rest-client diff --git a/rule-engine/pom.xml b/rule-engine/pom.xml index 59b274c450..72c1799c23 100644 --- a/rule-engine/pom.xml +++ b/rule-engine/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT thingsboard rule-engine diff --git a/rule-engine/rule-engine-api/pom.xml b/rule-engine/rule-engine-api/pom.xml index c0eaa24237..9b9ba5f45d 100644 --- a/rule-engine/rule-engine-api/pom.xml +++ b/rule-engine/rule-engine-api/pom.xml @@ -12,7 +12,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT rule-engine org.thingsboard.rule-engine diff --git a/rule-engine/rule-engine-components/pom.xml b/rule-engine/rule-engine-components/pom.xml index 48be39f45c..bc6f4b2eef 100644 --- a/rule-engine/rule-engine-components/pom.xml +++ b/rule-engine/rule-engine-components/pom.xml @@ -12,7 +12,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT rule-engine org.thingsboard.rule-engine diff --git a/tools/pom.xml b/tools/pom.xml index 41d179c115..2acb7b5877 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT thingsboard tools diff --git a/transport/coap/pom.xml b/transport/coap/pom.xml index 61002add66..d8226cd117 100644 --- a/transport/coap/pom.xml +++ b/transport/coap/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT transport org.thingsboard.transport diff --git a/transport/http/pom.xml b/transport/http/pom.xml index 744cc2a956..a3257700b1 100644 --- a/transport/http/pom.xml +++ b/transport/http/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT transport org.thingsboard.transport diff --git a/transport/lwm2m/pom.xml b/transport/lwm2m/pom.xml index 45767f145f..c7ab8fca10 100644 --- a/transport/lwm2m/pom.xml +++ b/transport/lwm2m/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT transport org.thingsboard.transport diff --git a/transport/mqtt/pom.xml b/transport/mqtt/pom.xml index 8654ddf92b..b651546129 100644 --- a/transport/mqtt/pom.xml +++ b/transport/mqtt/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT transport org.thingsboard.transport diff --git a/transport/pom.xml b/transport/pom.xml index 55e9390896..c308306461 100644 --- a/transport/pom.xml +++ b/transport/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT thingsboard transport diff --git a/transport/snmp/pom.xml b/transport/snmp/pom.xml index 38d689872f..2ca38942f7 100644 --- a/transport/snmp/pom.xml +++ b/transport/snmp/pom.xml @@ -11,7 +11,7 @@ org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT transport diff --git a/ui-ngx/package.json b/ui-ngx/package.json index a11a1c4221..0dbbae9f5e 100644 --- a/ui-ngx/package.json +++ b/ui-ngx/package.json @@ -1,6 +1,6 @@ { "name": "thingsboard", - "version": "4.4.0.1", + "version": "4.4.1", "scripts": { "ng": "ng", "start": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng serve --configuration development --host 0.0.0.0 --open", diff --git a/ui-ngx/pom.xml b/ui-ngx/pom.xml index a83bbd7864..5442028c2c 100644 --- a/ui-ngx/pom.xml +++ b/ui-ngx/pom.xml @@ -10,7 +10,7 @@ 4.0.0 org.thingsboard - 4.4.0.1-SNAPSHOT + 4.4.1-SNAPSHOT thingsboard ui-ngx From 7a926f2c1f2af17cac9b86316ae0cf9c1f9ee80f Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Thu, 15 Oct 2026 12:17:59 +0300 Subject: [PATCH 43/43] Accept upgrades by LTS family and drop the Lts prefix from migrations Offline upgrades now accept any version of a supported LTS family (4.3.x) instead of fixed 4.3.0/4.3.1 prefixes, and refuse an older version of the package's own family with a pointer to the no-downtime update applied on startup, so third-digit releases such as 4.4.1 need no upgrade script. The CE minimum for the CE-to-PE upgrade is 4.3.1.6, the first CE release that ships the community grant. LtsVersion, LtsMigration and LtsMigrationService are renamed to Version, Migration and MigrationService, and the empty upgrade/basic/schema_update.sql placeholder is removed along with its load. --- .../main/data/upgrade/basic/schema_update.sql | 10 -- .../upgrade/lts/4.3.1.4/schema_update.sql | 2 +- .../upgrade/lts/4.4.0.0/schema_update.sql | 5 +- .../install/ThingsboardInstallService.java | 4 +- .../DatabaseSchemaSettingsService.java | 2 +- .../DefaultDatabaseSchemaSettingsService.java | 39 ++++--- .../install/SqlDatabaseUpgradeService.java | 13 +-- .../service/install/TbClusterSchema.java | 2 +- .../lts/{LtsMigration.java => Migration.java} | 14 +-- ...tionService.java => MigrationService.java} | 62 +++++------ .../install/lts/V4_2_2_3Migration.java | 2 +- .../install/lts/V4_3_1_2Migration.java | 6 +- .../install/lts/V4_3_1_3Migration.java | 4 +- .../install/lts/V4_3_1_4Migration.java | 6 +- .../install/lts/V4_3_1_5Migration.java | 10 +- .../install/lts/V4_3_1_6Migration.java | 2 +- .../install/lts/V4_4_0_0Migration.java | 10 +- .../lts/{LtsVersion.java => Version.java} | 16 +-- .../update/DefaultDataUpdateService.java | 6 +- .../service/system/SystemPatchApplier.java | 18 +-- .../ThingsboardInstallServiceTest.java | 2 +- ...aultDatabaseSchemaSettingsServiceTest.java | 59 +++++++--- ...PeUpgradeAlarmShardingIntegrationTest.java | 2 +- .../PeUpgradeChainIntegrationTest.java | 16 +-- .../SqlDatabaseUpgradeServiceTest.java | 23 ++-- ...ityDatabaseSchemaServiceClusterIdTest.java | 2 +- ...est.java => MigrationIntegrationTest.java} | 46 ++++---- ...iceTest.java => MigrationServiceTest.java} | 104 +++++++++--------- .../install/lts/V4_3_1_5MigrationTest.java | 2 +- .../{LtsVersionTest.java => VersionTest.java} | 26 ++--- .../update/DefaultDataUpdateServiceTest.java | 20 ++-- .../server/system/SystemPatchApplierTest.java | 20 ++-- .../main/resources/sql/schema-entities.sql | 2 +- 33 files changed, 287 insertions(+), 270 deletions(-) delete mode 100644 application/src/main/data/upgrade/basic/schema_update.sql rename application/src/main/java/org/thingsboard/server/service/install/lts/{LtsMigration.java => Migration.java} (80%) rename application/src/main/java/org/thingsboard/server/service/install/lts/{LtsMigrationService.java => MigrationService.java} (81%) rename application/src/main/java/org/thingsboard/server/service/install/lts/{LtsVersion.java => Version.java} (80%) rename application/src/test/java/org/thingsboard/server/service/install/lts/{LtsMigrationIntegrationTest.java => MigrationIntegrationTest.java} (95%) rename application/src/test/java/org/thingsboard/server/service/install/lts/{LtsMigrationServiceTest.java => MigrationServiceTest.java} (85%) rename application/src/test/java/org/thingsboard/server/service/install/lts/{LtsVersionTest.java => VersionTest.java} (59%) diff --git a/application/src/main/data/upgrade/basic/schema_update.sql b/application/src/main/data/upgrade/basic/schema_update.sql deleted file mode 100644 index bb5bf9075a..0000000000 --- a/application/src/main/data/upgrade/basic/schema_update.sql +++ /dev/null @@ -1,10 +0,0 @@ --- --- SPDX-FileCopyrightText: Copyright The ThingsBoard Authors --- SPDX-FileCopyrightText: Modifications Copyright ThingsBoard, Inc. --- SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 --- - --- Intentionally empty. The offline upgrade path is now fully bean-driven: every schema/data change lives in --- an LtsMigration bean and its data/upgrade/lts//schema_update.sql (4.4 baseline DDL is in --- V4_4_0_0Migration / lts/4.4.0.0/schema_update.sql). This file is kept present only so loadSql does not fail. - diff --git a/application/src/main/data/upgrade/lts/4.3.1.4/schema_update.sql b/application/src/main/data/upgrade/lts/4.3.1.4/schema_update.sql index 7478f25bdf..80d0654fcc 100644 --- a/application/src/main/data/upgrade/lts/4.3.1.4/schema_update.sql +++ b/application/src/main/data/upgrade/lts/4.3.1.4/schema_update.sql @@ -16,7 +16,7 @@ ALTER TABLE alarm_comment DROP CONSTRAINT IF EXISTS fk_alarm_comment_alarm_id; -- change (nullable, no default), so the ACCESS EXCLUSIVE lock it takes is released as soon as this -- migration transaction commits. -- --- The originator_id backfill for pre-existing rows is intentionally NOT done here. LtsMigrationService runs +-- The originator_id backfill for pre-existing rows is intentionally NOT done here. MigrationService runs -- this whole file inside a single transaction, so an in-line UPDATE would hold the ADD COLUMN's -- ACCESS EXCLUSIVE lock for the entire backfill -- blocking all reads and writes on entity_alarm while the -- no-downtime patch path (SystemPatchApplier) runs it on a serving node. Instead the backfill runs after diff --git a/application/src/main/data/upgrade/lts/4.4.0.0/schema_update.sql b/application/src/main/data/upgrade/lts/4.4.0.0/schema_update.sql index 4f84c6e011..9da79c3bad 100644 --- a/application/src/main/data/upgrade/lts/4.4.0.0/schema_update.sql +++ b/application/src/main/data/upgrade/lts/4.4.0.0/schema_update.sql @@ -14,9 +14,8 @@ ALTER TABLE rule_chain ADD COLUMN IF NOT EXISTS notes varchar(1000000); -- RULE CHAIN NOTES MIGRATION END --- PE-only 4.4 baseline DDL below (carried over from basic/schema_update.sql; these columns/index have no --- owning bean of their own). report.* live on the PE-only report table; job.customer_id is a PE column on the --- shared job table. +-- PE-only 4.4 baseline DDL below (these columns/index have no owning bean of their own). report.* live on +-- the PE-only report table; job.customer_id is a PE column on the shared job table. -- REPORT PUBLIC LINK ADDITION START diff --git a/application/src/main/java/org/thingsboard/server/install/ThingsboardInstallService.java b/application/src/main/java/org/thingsboard/server/install/ThingsboardInstallService.java index bf9b2d41d7..07d14417bd 100644 --- a/application/src/main/java/org/thingsboard/server/install/ThingsboardInstallService.java +++ b/application/src/main/java/org/thingsboard/server/install/ThingsboardInstallService.java @@ -114,7 +114,7 @@ public class ThingsboardInstallService { entityDatabaseSchemaService.createOrUpdateViewsAndFunctions(); entityDatabaseSchemaService.createOrUpdateDeviceInfoView(persistToTelemetry); } else { - // TODO DON'T FORGET to update SUPPORTED_VERSIONS_FOR_UPGRADE and MIN_CE_VERSION_FOR_UPGRADE in DefaultDatabaseSchemaSettingsService + // TODO DON'T FORGET to update SUPPORTED_FAMILIES_FOR_UPGRADE and MIN_CE_VERSION_FOR_UPGRADE in DefaultDatabaseSchemaSettingsService databaseSchemaVersionService.validateSchemaSettings(); // The database's own product marker selects the branch, so a CE database can never be taken // down the PE path by a missing flag. --fromVersion=CE is still accepted, and now a no-op. @@ -131,7 +131,7 @@ public class ThingsboardInstallService { } cacheCleanupService.clearCache(); if (updateFromCE) { - // The LTS chain references PE-only tables and runs each of its files as a single transaction, + // The migration chain references PE-only tables and runs each of its files as a single transaction, // so a converted CE database must get those tables before the chain rather than after it. entityDatabaseSchemaService.createDatabaseSchema(false); } diff --git a/application/src/main/java/org/thingsboard/server/service/install/DatabaseSchemaSettingsService.java b/application/src/main/java/org/thingsboard/server/service/install/DatabaseSchemaSettingsService.java index 5d4a09d9a2..dbfb1d17cd 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/DatabaseSchemaSettingsService.java +++ b/application/src/main/java/org/thingsboard/server/service/install/DatabaseSchemaSettingsService.java @@ -9,7 +9,7 @@ public interface DatabaseSchemaSettingsService { /** * Whether the operator forced this offline upgrade past the version check (SKIP_SCHEMA_VERSION_CHECK). Besides - * suppressing the validation errors, it makes the LTS migration selection inclusive of the stored version, so a + * suppressing the validation errors, it makes the migration selection inclusive of the stored version, so a * database already at the package version re-runs that version's own migration instead of selecting nothing. */ boolean isForcedReUpgrade(); diff --git a/application/src/main/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsService.java b/application/src/main/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsService.java index 496d9296a8..35fb27aed7 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsService.java +++ b/application/src/main/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsService.java @@ -7,27 +7,24 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Service; -import org.thingsboard.server.service.install.lts.LtsVersion; +import org.thingsboard.server.service.install.lts.Version; import org.thingsboard.server.service.install.update.DefaultDataUpdateService; -import java.util.Map; +import java.util.List; @Service @Slf4j @RequiredArgsConstructor public class DefaultDatabaseSchemaSettingsService implements DatabaseSchemaSettingsService { - // map of versions from which the upgrade to the current version is possible - // key - supported version prefix, value - display name - private static final Map SUPPORTED_VERSIONS_FOR_UPGRADE = Map.of( - "4.3.0", "4.3.0.x", - "4.3.1", "4.3.1.x" - ); + // LTS families (major.minor) from which the offline upgrade to the current version is possible. A newer version + // within the package's own family needs no offline upgrade: SystemPatchApplier applies it on startup. + private static final List SUPPORTED_FAMILIES_FOR_UPGRADE = List.of(Version.parse("4.3")); private static final String CE_PRODUCT = "CE"; // The first CE version that converts to PE: the one that ships the community grant. Anything older takes the // cheap CE-to-CE patch upgrade first. 4.3 stays supported, so later 4.3.1.x releases convert as well. - private static final LtsVersion MIN_CE_VERSION_FOR_UPGRADE = LtsVersion.parse("4.3.1.4"); + private static final Version MIN_CE_VERSION_FOR_UPGRADE = Version.parse("4.3.1.6"); private final ProjectInfo projectInfo; private final JdbcTemplate jdbcTemplate; @@ -37,8 +34,8 @@ public class DefaultDatabaseSchemaSettingsService implements DatabaseSchemaSetti @Override public void validateSchemaSettings() { - // The flag also drops the CE floor below, and that is what it costs: the 4.3.1.4 minimum is - // what keeps a CE source above 4.2.2.3, and so keeps LtsMigrationService.select() from ever returning + // The flag also drops the CE floor below, and that is what it costs: the CE minimum is + // what keeps a CE source above 4.2.2.3, and so keeps MigrationService.select() from ever returning // the V4_2_2_3 <-> V4_3_1_3 reproduction-duplicate pair its own invariant forbids selecting together. // Forcing an older CE database through without --fromVersion reopens that pair. if (isForcedReUpgrade()) { @@ -48,7 +45,7 @@ public class DefaultDatabaseSchemaSettingsService implements DatabaseSchemaSetti String dbSchemaVersion = getDbSchemaVersion(); if (isUpgradeFromCe()) { - LtsVersion ceVersion = LtsVersion.parse(dbSchemaVersion); + Version ceVersion = Version.parse(dbSchemaVersion); if (ceVersion.compareTo(MIN_CE_VERSION_FOR_UPGRADE) < 0) { onSchemaSettingsError(String.format("Upgrade failed: transitioning from CE to PE requires the database to be at version '%s' or newer, but it is at '%s'. " + "Please upgrade ThingsBoard CE to %s first.", @@ -56,7 +53,7 @@ public class DefaultDatabaseSchemaSettingsService implements DatabaseSchemaSetti } // Without this the migration chain would select nothing and the PE schema would be created on top of a // newer CE database, silently. - if (ceVersion.compareTo(LtsVersion.parse(getPackageSchemaVersion())) > 0) { + if (ceVersion.compareTo(Version.parse(getPackageSchemaVersion())) > 0) { onSchemaSettingsError(String.format("Upgrade failed: the database is at CE version '%s', which is newer than this ThingsBoard PE package ('%s'). " + "Please use a PE package of version '%s' or newer.", dbSchemaVersion, getPackageSchemaVersion(), dbSchemaVersion)); @@ -66,10 +63,16 @@ public class DefaultDatabaseSchemaSettingsService implements DatabaseSchemaSetti onSchemaSettingsError("Upgrade failed: database already upgraded to current version. You can set SKIP_SCHEMA_VERSION_CHECK to 'true' if force re-upgrade needed."); } - if (SUPPORTED_VERSIONS_FOR_UPGRADE.keySet().stream().noneMatch(dbSchemaVersion::startsWith)) { + Version dbVersion = Version.parse(dbSchemaVersion); + Version packageVersion = Version.parse(getPackageSchemaVersion()); + if (dbVersion.sameFamily(packageVersion) && dbVersion.compareTo(packageVersion) < 0) { + onSchemaSettingsError(String.format("Upgrade failed: database version '%s' is in the same LTS family as this package ('%s'). " + + "No upgrade is needed: the update is applied automatically when ThingsBoard starts.", + dbSchemaVersion, getPackageSchemaVersion())); + } + if (SUPPORTED_FAMILIES_FOR_UPGRADE.stream().noneMatch(dbVersion::sameFamily)) { onSchemaSettingsError(String.format("Upgrade failed: database version '%s' is not supported for upgrade. Supported versions are: %s.", - dbSchemaVersion, SUPPORTED_VERSIONS_FOR_UPGRADE.values() - )); + dbSchemaVersion, SUPPORTED_FAMILIES_FOR_UPGRADE.stream().map(f -> f.major() + "." + f.minor() + ".x").toList())); } } } @@ -159,7 +162,7 @@ public class DefaultDatabaseSchemaSettingsService implements DatabaseSchemaSetti } private long toDbVersion(String version) { - LtsVersion v = LtsVersion.parse(version); + Version v = Version.parse(version); return v.major() * 1_000_000_000L + v.minor() * 1_000_000L + v.maintenance() * 1000L + v.patch(); } @@ -169,7 +172,7 @@ public class DefaultDatabaseSchemaSettingsService implements DatabaseSchemaSetti } private String normalizeVersion(String version) { - return LtsVersion.parse(version).toString(); + return Version.parse(version).toString(); } } diff --git a/application/src/main/java/org/thingsboard/server/service/install/SqlDatabaseUpgradeService.java b/application/src/main/java/org/thingsboard/server/service/install/SqlDatabaseUpgradeService.java index b7a75e407c..12e0f624a2 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/SqlDatabaseUpgradeService.java +++ b/application/src/main/java/org/thingsboard/server/service/install/SqlDatabaseUpgradeService.java @@ -11,7 +11,7 @@ import org.springframework.jdbc.core.StatementCallback; import org.springframework.stereotype.Service; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.support.TransactionTemplate; -import org.thingsboard.server.service.install.lts.LtsMigrationService; +import org.thingsboard.server.service.install.lts.MigrationService; import java.io.IOException; import java.io.UncheckedIOException; @@ -32,18 +32,18 @@ public class SqlDatabaseUpgradeService implements DatabaseEntitiesUpgradeService private final JdbcTemplate jdbcTemplate; private final TransactionTemplate transactionTemplate; private final DatabaseSchemaSettingsService schemaSettingsService; - private final LtsMigrationService ltsMigrationService; + private final MigrationService migrationService; public SqlDatabaseUpgradeService(InstallScripts installScripts, JdbcTemplate jdbcTemplate, PlatformTransactionManager transactionManager, DatabaseSchemaSettingsService schemaSettingsService, - LtsMigrationService ltsMigrationService) { + MigrationService migrationService) { this.installScripts = installScripts; this.jdbcTemplate = jdbcTemplate; this.transactionTemplate = new TransactionTemplate(transactionManager); this.transactionTemplate.setTimeout((int) TimeUnit.MINUTES.toSeconds(120)); this.schemaSettingsService = schemaSettingsService; - this.ltsMigrationService = ltsMigrationService; + this.migrationService = migrationService; } @Override @@ -51,12 +51,11 @@ public class SqlDatabaseUpgradeService implements DatabaseEntitiesUpgradeService log.info("Updating schema..."); if (fromCe) { // The delta is not confined to the version the database is already at - it also carries package-version - // DDL that the LTS chain below adds again (the job.customer_id and tb_cluster columns, for instance). + // DDL that the migration chain below adds again (the job.customer_id and tb_cluster columns, for instance). // Running it first is safe because every statement in it is repeat-safe, not because it is version-scoped. loadSql(getSchemaUpdateFile("pe")); } - loadSql(getSchemaUpdateFile("basic")); - ltsMigrationService.runSchemaMigrations(schemaSettingsService.getDbSchemaVersion(), schemaSettingsService.getPackageSchemaVersion(), + migrationService.runSchemaMigrations(schemaSettingsService.getDbSchemaVersion(), schemaSettingsService.getPackageSchemaVersion(), schemaSettingsService.isForcedReUpgrade()); log.info("Schema updated."); } diff --git a/application/src/main/java/org/thingsboard/server/service/install/TbClusterSchema.java b/application/src/main/java/org/thingsboard/server/service/install/TbClusterSchema.java index d07263af62..c9118894e7 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/TbClusterSchema.java +++ b/application/src/main/java/org/thingsboard/server/service/install/TbClusterSchema.java @@ -4,7 +4,7 @@ package org.thingsboard.server.service.install; /** * The statements that reach {@code tb_cluster} from Java. The DDL is a hand-kept copy of the block in - * {@code schema-entities.sql}; {@code LtsMigrationIntegrationTest} pins the copies against it. + * {@code schema-entities.sql}; {@code MigrationIntegrationTest} pins the copies against it. */ public final class TbClusterSchema { diff --git a/application/src/main/java/org/thingsboard/server/service/install/lts/LtsMigration.java b/application/src/main/java/org/thingsboard/server/service/install/lts/Migration.java similarity index 80% rename from application/src/main/java/org/thingsboard/server/service/install/lts/LtsMigration.java rename to application/src/main/java/org/thingsboard/server/service/install/lts/Migration.java index 85f1b95b3d..9c60ab7d74 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/lts/LtsMigration.java +++ b/application/src/main/java/org/thingsboard/server/service/install/lts/Migration.java @@ -4,12 +4,12 @@ package org.thingsboard.server.service.install.lts; /** - * One LTS migration, keyed by the version it ships in (e.g. "4.2.2.3"). + * One migration, keyed by the version it ships in (e.g. "4.2.2.3"). * The runner runs the version's data/upgrade/lts/<version>/schema_update.sql by convention * (if present), then calls {@link #apply()} for any programmatic work beyond SQL. * Most migrations are SQL-only and only override {@link #getVersion()}. *

- * Ordering caveat for a multi-version run (see {@link LtsMigrationService#applyMigrations}): on the no-downtime path + * Ordering caveat for a multi-version run (see {@link MigrationService#applyMigrations}): on the no-downtime path * every migration's schema_update.sql + {@link #apply()} runs, in version order, BEFORE any migration's * {@link #applyAfterCommit()}. So migration N+1's schema/apply executes ahead of migration N's backfill. A migration * must therefore not depend, in its schema_update.sql or {@link #apply()}, on the completed result of an earlier @@ -20,13 +20,13 @@ package org.thingsboard.server.service.install.lts; * {@link #applyAfterCommit()} must therefore tolerate the schema changes of every later migration in the same run -- * equivalently, later DDL must not drop, rename, or retype anything an earlier migration's backfill reads or writes. */ -public interface LtsMigration { +public interface Migration { String getVersion(); /** * Programmatic data migration that runs in the SAME transaction as the version's schema_update.sql - * (see {@link LtsMigrationService#applyMigrations}). Use for work that must be atomic with the schema + * (see {@link MigrationService#applyMigrations}). Use for work that must be atomic with the schema * change. Do NOT put heavy table rewrites here: on the no-downtime path the schema_update.sql DDL holds * its locks until this transaction commits, so a long apply() keeps those locks held while the node serves. *

@@ -38,13 +38,13 @@ public interface LtsMigration { /** * Programmatic data migration that runs AFTER the version's schema transaction has committed, outside any - * transaction (see {@link LtsMigrationService#applyMigrations} and {@link LtsMigrationService#runDataMigrations}). + * transaction (see {@link MigrationService#applyMigrations} and {@link MigrationService#runDataMigrations}). * Use for heavy or long-running data backfills that must not extend the lifetime of the schema-change locks: * the implementation is responsible for chunking the work into its own small, self-committing transactions so * it only ever holds row-level locks and never blocks concurrent readers/writers. *

- * Must be idempotent and resumable: {@link LtsMigrationService#applyMigrations} does not record the version - * itself, and the caller records it (see {@link LtsMigrationService#recordVersions}) only once whatever it + * Must be idempotent and resumable: {@link MigrationService#applyMigrations} does not record the version + * itself, and the caller records it (see {@link MigrationService#recordVersions}) only once whatever it * needs after this method returns has also succeeded. A crash, or that later failure, before the version is * recorded selects the migration again on the next startup and runs this method again from the start -- it * must skip already-migrated rows rather than redo or double-count them. diff --git a/application/src/main/java/org/thingsboard/server/service/install/lts/LtsMigrationService.java b/application/src/main/java/org/thingsboard/server/service/install/lts/MigrationService.java similarity index 81% rename from application/src/main/java/org/thingsboard/server/service/install/lts/LtsMigrationService.java rename to application/src/main/java/org/thingsboard/server/service/install/lts/MigrationService.java index bfc045457a..b4f3908dec 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/lts/LtsMigrationService.java +++ b/application/src/main/java/org/thingsboard/server/service/install/lts/MigrationService.java @@ -24,10 +24,10 @@ import java.util.List; import java.util.Set; /** - * Applies {@link LtsMigration} beans (in version order) for an LTS upgrade. Each migration has up to four idempotent + * Applies {@link Migration} beans (in version order) for an upgrade. Each migration has up to four idempotent * parts: (1) its {@code schema_update.sql} DDL, run via {@link #executeSchemaSql} (absent file = no-op); (2) - * {@link LtsMigration#apply()}, schema-coupled changes that must be atomic with the DDL; (3) - * {@link LtsMigration#applyAfterCommit()}, the heavy backfill, run outside the DDL transaction and self-committing in + * {@link Migration#apply()}, schema-coupled changes that must be atomic with the DDL; (3) + * {@link Migration#applyAfterCommit()}, the heavy backfill, run outside the DDL transaction and self-committing in * chunks; and (4) recording the version, which callers must delay until (2) and (3) -- and anything else they * interpose -- have succeeded (see {@link #recordVersions}). *

@@ -42,7 +42,7 @@ import java.util.Set; *

  • Offline major upgrade -- runs in the install/upgrade process (node not serving), split across that * process's schema and data phases: {@link #runSchemaMigrations} (DDL only) runs with the rest of the schema * upgrade, then {@link #runDataMigrations} (apply() + backfill) runs later, after the install flow has created the - * new tables, views/functions and indexes the data migrations may depend on. Neither records the LTS version; the + * new tables, views/functions and indexes the data migrations may depend on. Neither records the migration version; the * offline upgrade flow tracks the package version itself.
  • * *

    @@ -56,12 +56,12 @@ import java.util.Set; @Slf4j @Component @TbCoreComponent -public class LtsMigrationService { +public class MigrationService { private static final String SCHEMA_UPDATE_SQL = "schema_update.sql"; /** A migration paired with its parsed version, so the version is parsed exactly once per bean. */ - private record VersionedMigration(LtsVersion version, LtsMigration migration) {} + private record VersionedMigration(Version version, Migration migration) {} private final JdbcTemplate jdbcTemplate; private final InstallScripts installScripts; @@ -69,27 +69,27 @@ public class LtsMigrationService { private final TransactionTemplate transactionTemplate; private final List migrations; - public LtsMigrationService(JdbcTemplate jdbcTemplate, - InstallScripts installScripts, - DatabaseSchemaSettingsService schemaSettingsService, - PlatformTransactionManager transactionManager, - List migrations) { + public MigrationService(JdbcTemplate jdbcTemplate, + InstallScripts installScripts, + DatabaseSchemaSettingsService schemaSettingsService, + PlatformTransactionManager transactionManager, + List migrations) { this.jdbcTemplate = jdbcTemplate; this.installScripts = installScripts; this.schemaSettingsService = schemaSettingsService; this.transactionTemplate = new TransactionTemplate(transactionManager); this.migrations = validateAndSort(migrations); - log.info("Discovered {} LTS migration(s): {}", this.migrations.size(), + log.info("Discovered {} migration(s): {}", this.migrations.size(), this.migrations.stream().map(versionedMigration -> versionedMigration.migration().getVersion()).toList()); } - private static List validateAndSort(List migrations) { + private static List validateAndSort(List migrations) { Set seen = new HashSet<>(); List versioned = new ArrayList<>(); - for (LtsMigration migration : migrations) { - LtsVersion version = LtsVersion.parse(migration.getVersion()); // fail loud on unparseable version + for (Migration migration : migrations) { + Version version = Version.parse(migration.getVersion()); // fail loud on unparseable version if (!seen.add(migration.getVersion())) { - throw new IllegalStateException("Duplicate LTS migration version: " + migration.getVersion()); + throw new IllegalStateException("Duplicate migration version: " + migration.getVersion()); } versioned.add(new VersionedMigration(version, migration)); } @@ -110,17 +110,17 @@ public class LtsMigrationService { public List applyMigrations(String fromVersion, String toVersion, boolean forcedRun, Runnable afterSchemaPhase) { List selected = select(fromVersion, toVersion, forcedRun); for (VersionedMigration versionedMigration : selected) { - LtsMigration migration = versionedMigration.migration(); + Migration migration = versionedMigration.migration(); transactionTemplate.executeWithoutResult(status -> { executeSchemaSql(migration.getVersion()); migration.apply(); }); - log.info("Applied LTS schema update {}", migration.getVersion()); + log.info("Applied schema update {}", migration.getVersion()); } afterSchemaPhase.run(); List appliedVersions = new ArrayList<>(); for (VersionedMigration versionedMigration : selected) { - LtsMigration migration = versionedMigration.migration(); + Migration migration = versionedMigration.migration(); migration.applyAfterCommit(); // outside the schema transaction (see class doc) appliedVersions.add(migration.getVersion()); } @@ -130,12 +130,12 @@ public class LtsMigrationService { /** * Records the versions {@link #applyMigrations} returned, once the caller's own post-schema work has succeeded. * Stamped together rather than one per backfill, so a later failure re-runs the earlier migrations' backfills on - * the next startup - which {@link LtsMigration#applyAfterCommit} is required to tolerate. + * the next startup - which {@link Migration#applyAfterCommit} is required to tolerate. */ public void recordVersions(List versions) { for (String version : versions) { schemaSettingsService.updateSchemaVersion(version); - log.info("Applied LTS migration {}", version); + log.info("Applied migration {}", version); } } @@ -150,7 +150,7 @@ public class LtsMigrationService { for (VersionedMigration versionedMigration : select(fromVersion, toVersion, forcedRun)) { String version = versionedMigration.migration().getVersion(); transactionTemplate.executeWithoutResult(status -> executeSchemaSql(version)); - log.info("Applied LTS schema migration {}", version); + log.info("Applied schema migration {}", version); } } @@ -163,16 +163,16 @@ public class LtsMigrationService { */ public void runDataMigrations(String fromVersion, String toVersion, boolean forcedRun) { for (VersionedMigration versionedMigration : select(fromVersion, toVersion, forcedRun)) { - LtsMigration migration = versionedMigration.migration(); + Migration migration = versionedMigration.migration(); migration.apply(); migration.applyAfterCommit(); - log.info("Applied LTS data migration {}", migration.getVersion()); + log.info("Applied data migration {}", migration.getVersion()); } } private List select(String fromVersion, String toVersion, boolean forcedRun) { - LtsVersion from = LtsVersion.parse(fromVersion); - LtsVersion to = LtsVersion.parse(toVersion); + Version from = Version.parse(fromVersion); + Version to = Version.parse(toVersion); // Select every migration in the (from, to] range, regardless of family. On a cross-family offline // upgrade (e.g. 4.3.x -> 4.4) this is what makes the real in-range older-family beans run: it picks the // 4.3.1.x schema/data changes the source has not yet passed AND the new target-family beans, each exactly @@ -184,8 +184,8 @@ public class LtsMigrationService { // range. A reproduction-duplicate bean (one that re-does an older bean's work on a newer-family branch) // must sit STRICTLY BELOW the minimum supported upgrade source, so it can never be selected together with // the bean it duplicates. The pairs today are 4.2.2.3 <-> 4.3.1.3 and 4.2.2.4 <-> 4.3.1.4, and the - // supported-source floor is 4.3.0.0 (SUPPORTED_VERSIONS_FOR_UPGRADE), well above both 4.2.2.x beans. - // LtsMigrationServiceTest guards this. + // supported-source floor is 4.3.0.0 (SUPPORTED_FAMILIES_FOR_UPGRADE), well above both 4.2.2.x beans. + // MigrationServiceTest guards this. // // A forced run takes the closed [from, to] instead, so the source version's own migration re-runs rather than // the range being empty -- see the class doc. It does not weaken that invariant in any new way: forcing @@ -202,14 +202,14 @@ public class LtsMigrationService { private void executeSchemaSql(String version) { Path sqlFile = Paths.get(installScripts.getDataDir(), "upgrade", "lts", version, SCHEMA_UPDATE_SQL); if (!Files.exists(sqlFile)) { - log.trace("No LTS schema update file for version {} at {}", version, sqlFile); + log.trace("No schema update file for version {} at {}", version, sqlFile); return; } try { jdbcTemplate.execute(Files.readString(sqlFile)); - log.info("Applied LTS SQL schema update from {}", sqlFile); + log.info("Applied SQL schema update from {}", sqlFile); } catch (IOException e) { - throw new UncheckedIOException("Failed to read LTS schema update file: " + sqlFile, e); + throw new UncheckedIOException("Failed to read schema update file: " + sqlFile, e); } } } diff --git a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_2_2_3Migration.java b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_2_2_3Migration.java index 4421b6ee41..ca46ee5e14 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_2_2_3Migration.java +++ b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_2_2_3Migration.java @@ -39,7 +39,7 @@ import java.util.stream.Stream; @Component @TbCoreComponent @RequiredArgsConstructor -public class V4_2_2_3Migration implements LtsMigration { +public class V4_2_2_3Migration implements Migration { // Match on the bundle ALIAS, not the JSON filename stem. // The "industrial_widgets" bundle shipped in a misspelled file (industial_widgets.json), diff --git a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_2Migration.java b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_2Migration.java index 3593d99b64..7b50027d35 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_2Migration.java +++ b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_2Migration.java @@ -9,18 +9,18 @@ import org.thingsboard.server.queue.util.TbCoreComponent; /** * Registration-only migration with no {@link #apply()} (no data migration), kept intentionally. *

    - * {@link LtsMigrationService} selects migrations from the injected {@link LtsMigration} beans, not from the + * {@link MigrationService} selects migrations from the injected {@link Migration} beans, not from the * on-disk {@code data/upgrade/lts//} directories. So this bean is what makes the runner discover * version {@code 4.3.1.2} and execute its {@code data/upgrade/lts/4.3.1.2/schema_update.sql} (which adds the * 4.3.1.2 columns: {@code api_usage_state.ai}, {@code calculated_field.additional_info}, * {@code role.excluded_permissions}, {@code tb_user.external_id} plus the {@code tb_user_external_id_unq_key} * constraint). A directory holding a {@code schema_update.sql} but lacking a matching bean would be silently skipped. *

    - * The dir/bean consistency (both ways) is guarded by a test in {@code LtsMigrationIntegrationTest}. + * The dir/bean consistency (both ways) is guarded by a test in {@code MigrationIntegrationTest}. */ @Component @TbCoreComponent -public class V4_3_1_2Migration implements LtsMigration { +public class V4_3_1_2Migration implements Migration { @Override public String getVersion() { diff --git a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_3Migration.java b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_3Migration.java index 7cfa8c7332..2491a34c3b 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_3Migration.java +++ b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_3Migration.java @@ -42,7 +42,7 @@ import java.util.stream.Stream; @Component @TbCoreComponent @RequiredArgsConstructor -public class V4_3_1_3Migration implements LtsMigration { +public class V4_3_1_3Migration implements Migration { // Match on the bundle ALIAS, not the JSON filename stem. // The "industrial_widgets" bundle shipped in a misspelled file (industial_widgets.json), @@ -77,7 +77,7 @@ public class V4_3_1_3Migration implements LtsMigration { @Override public void applyAfterCommit() { // Heavy per-tenant backfill: runs outside the schema transaction so it never holds the schema-change - // locks while walking tenants (see LtsMigration#applyAfterCommit). + // locks while walking tenants (see Migration#applyAfterCommit). migrateLegacySolutionTemplatesToIotHub(); } diff --git a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_4Migration.java b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_4Migration.java index 264b52f056..b796a1ecd7 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_4Migration.java +++ b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_4Migration.java @@ -17,7 +17,7 @@ import java.util.UUID; /** * Alarm sharding: drops the {@code alarm_comment -> alarm} cascade FK and adds {@code entity_alarm.originator_id}. *

    - * {@link LtsMigrationService} selects migrations from the injected {@link LtsMigration} beans, not from the on-disk + * {@link MigrationService} selects migrations from the injected {@link Migration} beans, not from the on-disk * {@code data/upgrade/lts//} directories, so this bean is what makes the runner discover version * {@code 4.3.1.4} and execute its {@code schema_update.sql} at all. *

    @@ -34,7 +34,7 @@ import java.util.UUID; @Slf4j @Component @TbCoreComponent -public class V4_3_1_4Migration implements LtsMigration { +public class V4_3_1_4Migration implements Migration { // entity_alarm is walked in keyset-paginated windows of this size, each in its own committed transaction, so // the backfill only ever holds row-level locks on the current window and never blocks concurrent readers. @@ -86,7 +86,7 @@ public class V4_3_1_4Migration implements LtsMigration { /** * Backfills entity_alarm.originator_id from the parent alarm for rows that predate the column added by this - * version's schema_update.sql. Runs OUTSIDE the schema transaction (see {@link LtsMigration#applyAfterCommit}) + * version's schema_update.sql. Runs OUTSIDE the schema transaction (see {@link Migration#applyAfterCommit}) * so the ADD COLUMN's ACCESS EXCLUSIVE lock is already released; each batch commits on its own and takes only * a ROW EXCLUSIVE lock, so a serving node keeps reading and writing entity_alarm throughout. *

    diff --git a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_5Migration.java b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_5Migration.java index 3642e23c41..87361ff51d 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_5Migration.java +++ b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_5Migration.java @@ -22,14 +22,14 @@ import java.util.Set; import static org.thingsboard.server.dao.trendz.TrendzSyncService.TRENDZ_API_KEY_DESCRIPTION; /** - * LTS migration for version {@code 4.3.1.5}. + * Migration for version {@code 4.3.1.5}. *

    - * {@link LtsMigrationService} selects migrations from the injected {@link LtsMigration} beans, not from the on-disk + * {@link MigrationService} selects migrations from the injected {@link Migration} beans, not from the on-disk * {@code data/upgrade/lts//} directories, so this bean is what makes the runner discover version * {@code 4.3.1.5} at all. *

    * There is no {@code data/upgrade/lts/4.3.1.5/} directory: everything this version changes is programmatic, so the - * version is listed in {@code SQL_LESS_ALLOWED} in {@code LtsMigrationIntegrationTest}, which otherwise fails a bean + * version is listed in {@code SQL_LESS_ALLOWED} in {@code MigrationIntegrationTest}, which otherwise fails a bean * that has no matching directory. Should this version later need DDL, add the directory and drop that entry. *

    * Each thing this version migrates lives in its own private method called from {@link #apply()}, with the constants @@ -39,7 +39,7 @@ import static org.thingsboard.server.dao.trendz.TrendzSyncService.TRENDZ_API_KEY @Component @TbCoreComponent @RequiredArgsConstructor -public class V4_3_1_5Migration implements LtsMigration { +public class V4_3_1_5Migration implements Migration { private final ApiKeyService apiKeyService; @@ -50,7 +50,7 @@ public class V4_3_1_5Migration implements LtsMigration { /** * Runs in the same transaction as the version's schema SQL on the no-downtime path, and outside any transaction - * on the offline path (see {@link LtsMigration#apply}). Every step below must therefore be light enough to sit in + * on the offline path (see {@link Migration#apply}). Every step below must therefore be light enough to sit in * a schema transaction, and idempotent, since a crash before the version is recorded re-runs it. */ @Override diff --git a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_6Migration.java b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_6Migration.java index 1756033ef1..434394b586 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_6Migration.java +++ b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_3_1_6Migration.java @@ -20,7 +20,7 @@ import java.util.UUID; @Component @TbCoreComponent @RequiredArgsConstructor -public class V4_3_1_6Migration implements LtsMigration { +public class V4_3_1_6Migration implements Migration { private final JdbcTemplate jdbcTemplate; diff --git a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_4_0_0Migration.java b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_4_0_0Migration.java index a9e4b47e05..3341520dd1 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/lts/V4_4_0_0Migration.java +++ b/application/src/main/java/org/thingsboard/server/service/install/lts/V4_4_0_0Migration.java @@ -19,30 +19,30 @@ import java.util.UUID; * Registration-only migration with no {@link #apply()} (no data migration), plus an {@link #applyAfterCommit()} * backfill that closes the pre-existing legacy stuck-RPC backlog. *

    - * {@link LtsMigrationService} selects migrations from the injected {@link LtsMigration} beans, not from the + * {@link MigrationService} selects migrations from the injected {@link Migration} beans, not from the * on-disk {@code data/upgrade/lts//} directories. So this bean is what makes the runner discover * version {@code 4.4.0.0} and execute its {@code data/upgrade/lts/4.4.0.0/schema_update.sql}, which -- among the * other 4.4 changes -- adds the nullable {@code rpc.request_id} and {@code rpc.oneway} columns. *

    * The RPC change rides the {@code 4.4.0.0} slot rather than a 4.3/4.2-family one because it ships in 4.4 only. * {@code 4.3.1.4} is already released (and, in PE, already carries the {@code entity_alarm.originator_id} - * backfill), and {@link LtsVersion#isInRange} is exclusive at the lower bound -- so an installation already on + * backfill), and {@link Version#isInRange} is exclusive at the lower bound -- so an installation already on * {@code 4.3.1.4} would never re-run that version. Every supported upgrade source ({@code 4.3.0.x}, * {@code 4.3.1.x}) is below {@code 4.4.0.0}, so all of them select this migration exactly once. *

    - * The dir/bean consistency (both ways) is guarded by a test in {@code LtsMigrationIntegrationTest}. + * The dir/bean consistency (both ways) is guarded by a test in {@code MigrationIntegrationTest}. *

    * {@link #applyAfterCommit()} closes rows left stuck by earlier server versions that predate {@code request_id} * tracking: any {@code rpc} row with {@code request_id IS NULL} that is past its expiration and still sitting in * {@code SENT} or {@code TIMEOUT}, or in {@code DELIVERED} for a two-way call (one-way {@code DELIVERED} is already terminal * success), is force-closed to {@code EXPIRED} with a canned response. It walks the {@code rpc} table by primary * key in keyset-paginated, self-committing batches so it never holds a long transaction or blocks concurrent - * readers/writers; see the class-level backfill contract on {@link LtsMigration#applyAfterCommit()}. + * readers/writers; see the class-level backfill contract on {@link Migration#applyAfterCommit()}. */ @Slf4j @Component @TbCoreComponent -public class V4_4_0_0Migration implements LtsMigration { +public class V4_4_0_0Migration implements Migration { // Same wording as DeviceActorMessageProcessor.LEGACY_UNTRACKED_MESSAGE, so a row closed by this one-time // backfill reads identically to one closed live by the actor on reload. diff --git a/application/src/main/java/org/thingsboard/server/service/install/lts/LtsVersion.java b/application/src/main/java/org/thingsboard/server/service/install/lts/Version.java similarity index 80% rename from application/src/main/java/org/thingsboard/server/service/install/lts/LtsVersion.java rename to application/src/main/java/org/thingsboard/server/service/install/lts/Version.java index a46c556095..7abf7c3420 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/lts/LtsVersion.java +++ b/application/src/main/java/org/thingsboard/server/service/install/lts/Version.java @@ -3,9 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 AND BUSL-1.1 package org.thingsboard.server.service.install.lts; -public record LtsVersion(int major, int minor, int maintenance, int patch) implements Comparable { +public record Version(int major, int minor, int maintenance, int patch) implements Comparable { - public static LtsVersion parse(String version) { + public static Version parse(String version) { if (version == null) { throw new IllegalArgumentException("Version is null"); } @@ -15,13 +15,13 @@ public record LtsVersion(int major, int minor, int maintenance, int patch) imple int minor = parts.length > 1 ? Integer.parseInt(parts[1]) : 0; int maintenance = parts.length > 2 ? Integer.parseInt(parts[2]) : 0; int patch = parts.length > 3 ? Integer.parseInt(parts[3]) : 0; - return new LtsVersion(major, minor, maintenance, patch); + return new Version(major, minor, maintenance, patch); } catch (NumberFormatException e) { throw new IllegalArgumentException("Invalid version: " + version, e); } } - public boolean sameFamily(LtsVersion other) { + public boolean sameFamily(Version other) { return major == other.major && minor == other.minor; } @@ -29,20 +29,20 @@ public record LtsVersion(int major, int minor, int maintenance, int patch) imple * Half-open range check: {@code from < this <= to}. The lower bound is exclusive (a source already at * {@code from} has applied that version) and the upper bound inclusive (the target version's own migration runs). */ - public boolean isInRange(LtsVersion from, LtsVersion to) { + public boolean isInRange(Version from, Version to) { return compareTo(from) > 0 && compareTo(to) <= 0; } /** * Closed range check: {@code from <= this <= to}. Only for a run an operator has forced past its version check, - * where the source's own migration has to be re-run (see {@link LtsMigrationService}). + * where the source's own migration has to be re-run (see {@link MigrationService}). */ - public boolean isInClosedRange(LtsVersion from, LtsVersion to) { + public boolean isInClosedRange(Version from, Version to) { return compareTo(from) >= 0 && compareTo(to) <= 0; } @Override - public int compareTo(LtsVersion o) { + public int compareTo(Version o) { int c = Integer.compare(major, o.major); if (c != 0) { return c; diff --git a/application/src/main/java/org/thingsboard/server/service/install/update/DefaultDataUpdateService.java b/application/src/main/java/org/thingsboard/server/service/install/update/DefaultDataUpdateService.java index e01e9b92b5..eb9ddb2c6a 100644 --- a/application/src/main/java/org/thingsboard/server/service/install/update/DefaultDataUpdateService.java +++ b/application/src/main/java/org/thingsboard/server/service/install/update/DefaultDataUpdateService.java @@ -55,7 +55,7 @@ import org.thingsboard.server.service.component.RuleNodeClassInfo; import org.thingsboard.server.service.install.DatabaseSchemaSettingsService; import org.thingsboard.server.service.install.DbUpgradeExecutorService; import org.thingsboard.server.service.install.SystemDataLoaderService; -import org.thingsboard.server.service.install.lts.LtsMigrationService; +import org.thingsboard.server.service.install.lts.MigrationService; import org.thingsboard.server.utils.TbNodeUpgradeUtils; import java.lang.reflect.Field; @@ -99,7 +99,7 @@ public class DefaultDataUpdateService implements DataUpdateService { private final ComponentDiscoveryService componentDiscoveryService; private final DbUpgradeExecutorService executorService; private final DatabaseSchemaSettingsService schemaSettingsService; - private final LtsMigrationService ltsMigrationService; + private final MigrationService migrationService; @Override public void updateData(boolean fromCe) throws Exception { @@ -109,7 +109,7 @@ public class DefaultDataUpdateService implements DataUpdateService { } //TODO: should be cleaned after each release backfillForExistingTenants(); - ltsMigrationService.runDataMigrations(schemaSettingsService.getDbSchemaVersion(), schemaSettingsService.getPackageSchemaVersion(), + migrationService.runDataMigrations(schemaSettingsService.getDbSchemaVersion(), schemaSettingsService.getPackageSchemaVersion(), schemaSettingsService.isForcedReUpgrade()); log.info("Data updated."); } diff --git a/application/src/main/java/org/thingsboard/server/service/system/SystemPatchApplier.java b/application/src/main/java/org/thingsboard/server/service/system/SystemPatchApplier.java index 50b2cd3b7b..bafaee6a3f 100644 --- a/application/src/main/java/org/thingsboard/server/service/system/SystemPatchApplier.java +++ b/application/src/main/java/org/thingsboard/server/service/system/SystemPatchApplier.java @@ -23,8 +23,8 @@ import org.thingsboard.server.dao.widget.WidgetsBundleService; import org.thingsboard.server.queue.util.TbCoreComponent; import org.thingsboard.server.service.install.DatabaseSchemaSettingsService; import org.thingsboard.server.service.install.InstallScripts; -import org.thingsboard.server.service.install.lts.LtsMigrationService; -import org.thingsboard.server.service.install.lts.LtsVersion; +import org.thingsboard.server.service.install.lts.MigrationService; +import org.thingsboard.server.service.install.lts.Version; import org.thingsboard.server.service.install.update.DefaultDataUpdateService; import java.io.IOException; @@ -64,7 +64,7 @@ public class SystemPatchApplier { private final WidgetTypeService widgetTypeService; private final WidgetsBundleService widgetsBundleService; private final ImageService imageService; - private final LtsMigrationService ltsMigrationService; + private final MigrationService migrationService; @PostConstruct private void init() { @@ -100,7 +100,7 @@ public class SystemPatchApplier { // skipVersionCheck got us here with the database possibly already at the package version, where the // default half-open selection would be empty: pass it on so that run still applies the stored version's // own migration. - List appliedVersions = ltsMigrationService.applyMigrations(dbVersion, packageVersion, skipVersionCheck, () -> { + List appliedVersions = migrationService.applyMigrations(dbVersion, packageVersion, skipVersionCheck, () -> { // Between the schema and backfill phases: the schema phase may have added columns these definitions // reference, and the refreshed definitions are then in effect for the whole backfill run. Each file // is one jdbcTemplate.execute, so PostgreSQL runs it in a single implicit transaction and other @@ -124,7 +124,7 @@ public class SystemPatchApplier { int createdImages = createMissingSystemImages(); log.info("Created {} new system images", createdImages); - ltsMigrationService.recordVersions(appliedVersions); + migrationService.recordVersions(appliedVersions); schemaSettingsService.updateSchemaVersion(); log.info("System data patch update completed successfully"); @@ -139,11 +139,11 @@ public class SystemPatchApplier { log.trace("Package version: {}, DB schema version: {}", packageVersion, dbVersion); - LtsVersion packageVersionInfo; - LtsVersion dbVersionInfo; + Version packageVersionInfo; + Version dbVersionInfo; try { - packageVersionInfo = LtsVersion.parse(packageVersion); - dbVersionInfo = LtsVersion.parse(dbVersion); + packageVersionInfo = Version.parse(packageVersion); + dbVersionInfo = Version.parse(dbVersion); } catch (IllegalArgumentException e) { log.warn("Unable to parse versions. Package: {}, DB: {}", packageVersion, dbVersion); return false; diff --git a/application/src/test/java/org/thingsboard/server/install/ThingsboardInstallServiceTest.java b/application/src/test/java/org/thingsboard/server/install/ThingsboardInstallServiceTest.java index 8591952462..d45fdf064d 100644 --- a/application/src/test/java/org/thingsboard/server/install/ThingsboardInstallServiceTest.java +++ b/application/src/test/java/org/thingsboard/server/install/ThingsboardInstallServiceTest.java @@ -134,7 +134,7 @@ class ThingsboardInstallServiceTest { installService.performInstall(); - // The LTS files the chain applies reference PE-only tables and each of them runs as a single transaction, + // The migration files the chain applies reference PE-only tables and each of them runs as a single transaction, // so a converted CE database must be given those tables before the chain runs rather than after it. InOrder inOrder = inOrder(entityDatabaseSchemaService, databaseEntitiesUpgradeService, dataUpdateService); inOrder.verify(entityDatabaseSchemaService).createDatabaseSchema(false); diff --git a/application/src/test/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsServiceTest.java b/application/src/test/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsServiceTest.java index 2fc1d1a7fd..d412245ea4 100644 --- a/application/src/test/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsServiceTest.java +++ b/application/src/test/java/org/thingsboard/server/service/install/DefaultDatabaseSchemaSettingsServiceTest.java @@ -23,8 +23,8 @@ import static org.mockito.Mockito.when; @MockitoSettings(strictness = Strictness.LENIENT) class DefaultDatabaseSchemaSettingsServiceTest { - private static final String PACKAGE_VERSION = "4.4.0"; - private static final long V_4_3_1_4 = 4_003_001_004L; + private static final String PACKAGE_VERSION = "4.4.1"; + private static final long V_4_3_1_6 = 4_003_001_006L; @Mock private ProjectInfo projectInfo; @@ -49,7 +49,7 @@ class DefaultDatabaseSchemaSettingsServiceTest { @Test void aCeDatabaseAtTheSupportedVersionIsAcceptedAndTakesTheConversionBranch() { - givenSchemaSettings("CE", V_4_3_1_4); + givenSchemaSettings("CE", V_4_3_1_6); service.validateSchemaSettings(); @@ -58,7 +58,7 @@ class DefaultDatabaseSchemaSettingsServiceTest { @Test void aPeDatabaseAtASupportedVersionIsAcceptedAndTakesThePlainUpgradeBranch() { - givenSchemaSettings("PE", V_4_3_1_4); + givenSchemaSettings("PE", V_4_3_1_6); service.validateSchemaSettings(); @@ -68,7 +68,7 @@ class DefaultDatabaseSchemaSettingsServiceTest { @Test void aCeDatabaseOnALaterPatchOfTheSupportedLineIsAlsoAccepted() { // 4.3 keeps receiving patches, so the CE floor is a minimum rather than a single release. - givenSchemaSettings("CE", 4_003_001_005L); + givenSchemaSettings("CE", 4_003_001_007L); service.validateSchemaSettings(); @@ -77,7 +77,7 @@ class DefaultDatabaseSchemaSettingsServiceTest { @Test void aCeDatabaseNewerThanThePePackageIsRejected() { - givenSchemaSettings("CE", 4_004_000_001L); + givenSchemaSettings("CE", 4_004_002_000L); assertThatThrownBy(() -> service.validateSchemaSettings()) .hasMessageContaining("newer than this ThingsBoard PE package"); @@ -85,22 +85,53 @@ class DefaultDatabaseSchemaSettingsServiceTest { @Test void aCeDatabaseBelowTheSupportedVersionIsRejectedAtTheWall() { - // 4.3.0.0: within the versions the PE branch accepts, but below the CE release that converts. - givenSchemaSettings("CE", 4_003_000_000L); + // 4.3.1.5: within the versions the PE branch accepts, but below the CE release that converts. + givenSchemaSettings("CE", 4_003_001_005L); assertThatThrownBy(() -> service.validateSchemaSettings()) .hasMessageContaining("transitioning from CE to PE") - .hasMessageContaining("4.3.1.4"); + .hasMessageContaining("4.3.1.6"); } @Test void aPeDatabaseAlreadyAtThePackageVersionIsRejected() { - givenSchemaSettings("PE", 4_004_000_000L); + givenSchemaSettings("PE", 4_004_001_000L); assertThatThrownBy(() -> service.validateSchemaSettings()) .hasMessageContaining("already upgraded to current version"); } + @Test + void aPeDatabaseAtTheFirstVersionOfTheSupportedFamilyIsAccepted() { + givenSchemaSettings("PE", 4_003_000_000L); + + service.validateSchemaSettings(); + } + + @Test + void aPeDatabaseOnAFutureMaintenanceVersionOfTheSupportedFamilyIsAccepted() { + givenSchemaSettings("PE", 4_003_002_000L); + + service.validateSchemaSettings(); + } + + @Test + void aPeDatabaseOnAnOlderVersionOfThePackageFamilyIsRejectedAsNotNeedingAnUpgrade() { + givenSchemaSettings("PE", 4_004_000_001L); + + assertThatThrownBy(() -> service.validateSchemaSettings()) + .hasMessageContaining("same LTS family") + .hasMessageContaining("applied automatically when ThingsBoard starts"); + } + + @Test + void aPeDatabaseOnANewerVersionOfThePackageFamilyIsRejected() { + givenSchemaSettings("PE", 4_004_002_000L); + + assertThatThrownBy(() -> service.validateSchemaSettings()) + .hasMessageContaining("is not supported for upgrade"); + } + @Test void aPeDatabaseAtAnUnsupportedVersionIsRejected() { givenSchemaSettings("PE", 4_002_002_000L); @@ -113,7 +144,7 @@ class DefaultDatabaseSchemaSettingsServiceTest { void aDatabaseWithAnUnknownProductMarkerIsRejected() { // Neither CE nor PE: unchecked, the marker would silently select the PE branch and the CE-to-PE // conversion would be skipped on a database that needs it. - givenSchemaSettings("TB", V_4_3_1_4); + givenSchemaSettings("TB", V_4_3_1_6); assertThatThrownBy(() -> service.validateSchemaSettings()) .hasMessageContaining("unrecognized product"); @@ -121,7 +152,7 @@ class DefaultDatabaseSchemaSettingsServiceTest { @Test void aDatabaseWithoutAProductMarkerIsRejected() { - givenSchemaSettings(null, V_4_3_1_4); + givenSchemaSettings(null, V_4_3_1_6); assertThatThrownBy(() -> service.validateSchemaSettings()) .hasMessageContaining("unrecognized product"); @@ -131,7 +162,7 @@ class DefaultDatabaseSchemaSettingsServiceTest { void anUnrecognizedProductMarkerIsRejectedByTheBranchSelectorItself() { // The guard has to live where the branch is chosen: validateSchemaSettings() returns early when // SKIP_SCHEMA_VERSION_CHECK is set, and the upgrade then asks isUpgradeFromCe() regardless. - givenSchemaSettings("TB", V_4_3_1_4); + givenSchemaSettings("TB", V_4_3_1_6); assertThatThrownBy(() -> service.isUpgradeFromCe()) .hasMessageContaining("unrecognized product"); @@ -139,7 +170,7 @@ class DefaultDatabaseSchemaSettingsServiceTest { @Test void aMissingProductMarkerIsRejectedByTheBranchSelectorItself() { - givenSchemaSettings(null, V_4_3_1_4); + givenSchemaSettings(null, V_4_3_1_6); assertThatThrownBy(() -> service.isUpgradeFromCe()) .hasMessageContaining("unrecognized product"); diff --git a/application/src/test/java/org/thingsboard/server/service/install/PeUpgradeAlarmShardingIntegrationTest.java b/application/src/test/java/org/thingsboard/server/service/install/PeUpgradeAlarmShardingIntegrationTest.java index 3105391880..d13a14fb84 100644 --- a/application/src/test/java/org/thingsboard/server/service/install/PeUpgradeAlarmShardingIntegrationTest.java +++ b/application/src/test/java/org/thingsboard/server/service/install/PeUpgradeAlarmShardingIntegrationTest.java @@ -19,7 +19,7 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; /** - * CE-to-PE twin of the 4.3.1.4 alarm-sharding coverage in {@code LtsMigrationIntegrationTest}: the same schema + * CE-to-PE twin of the 4.3.1.4 alarm-sharding coverage in {@code MigrationIntegrationTest}: the same schema * change (alarm_comment FK drop, entity_alarm.originator_id ADD COLUMN) plus the deliberately single-statement * originator backfill live in upgrade/pe/schema_update.sql and are executed by no other test. The whole file is * idempotent by design (SqlDatabaseUpgradeService sends it as one execute), so the test runs it verbatim — twice, diff --git a/application/src/test/java/org/thingsboard/server/service/install/PeUpgradeChainIntegrationTest.java b/application/src/test/java/org/thingsboard/server/service/install/PeUpgradeChainIntegrationTest.java index 526c7cdccd..131cb96444 100644 --- a/application/src/test/java/org/thingsboard/server/service/install/PeUpgradeChainIntegrationTest.java +++ b/application/src/test/java/org/thingsboard/server/service/install/PeUpgradeChainIntegrationTest.java @@ -35,7 +35,7 @@ import org.thingsboard.server.dao.tenant.TenantService; import org.thingsboard.server.dao.user.UserService; import org.thingsboard.server.dao.wl.WhiteLabelingService; import org.thingsboard.server.service.component.ComponentDiscoveryService; -import org.thingsboard.server.service.install.lts.LtsMigrationService; +import org.thingsboard.server.service.install.lts.MigrationService; import org.thingsboard.server.service.install.update.DefaultDataUpdateService; import java.util.ArrayList; @@ -55,7 +55,7 @@ import static org.mockito.Mockito.when; /** * Two parts of the offline upgrade driven against a real database: the CE-to-PE data conversion * ({@code updateData(true)}) replayed the way a crashed conversion replays it, and a PE database stamped at a - * pre-4.4 version taken to the package version by the real LTS chain ({@code upgradeDatabase(false)}), from the + * pre-4.4 version taken to the package version by the real migration chain ({@code upgradeDatabase(false)}), from the * position the chain now runs from for both sources. *

    * What is not here is the CE schema fork, {@code upgradeDatabase(true)}. The fixture below builds CE-shaped @@ -81,7 +81,7 @@ public class PeUpgradeChainIntegrationTest extends AbstractControllerTest { private static final List COUNTED_TABLES = List.of( "entity_group", "relation", "tenant", "customer", "tb_user", "device", "asset", "dashboard"); - // Columns added by the LTS files the chain selects. report is the PE-only table the whole ordering fix exists + // Columns added by the migration files the chain selects. report is the PE-only table the whole ordering fix exists // for, so its two 4.4 columns are in the set even though report_info_view's SELECT r.* captures them. private static final List V_4_3_1_2_COLUMNS = List.of( new Column("calculated_field", "additional_info", "varchar"), @@ -104,7 +104,7 @@ public class PeUpgradeChainIntegrationTest extends AbstractControllerTest { @Autowired private InstallScripts installScripts; @Autowired - private LtsMigrationService ltsMigrationService; + private MigrationService migrationService; @Autowired private PlatformTransactionManager transactionManager; @@ -281,8 +281,8 @@ public class PeUpgradeChainIntegrationTest extends AbstractControllerTest { /** * The real conversion, wired to the real DAO services. Only the collaborators outside it are stood in for: - * the two install-profile beans a test context does not have, and the LTS data phase, which - * {@link org.thingsboard.server.service.install.lts.LtsMigrationIntegrationTest} owns. + * the two install-profile beans a test context does not have, and the migration data phase, which + * {@link org.thingsboard.server.service.install.lts.MigrationIntegrationTest} owns. */ private DefaultDataUpdateService ceDataUpdateService() { return new DefaultDataUpdateService(tenantService, relationService, ruleChainService, integrationService, @@ -290,7 +290,7 @@ public class PeUpgradeChainIntegrationTest extends AbstractControllerTest { dashboardService, entityViewService, edgeService, agentProfileService, mock(SystemDataLoaderService.class), mock(ComponentDiscoveryService.class), inlineUpgradeExecutor(), schemaSettingsStubbedAt("4.3.1.4"), - mock(LtsMigrationService.class)); + mock(MigrationService.class)); } /** @@ -310,7 +310,7 @@ public class PeUpgradeChainIntegrationTest extends AbstractControllerTest { /** The real schema upgrade, with only the version pair it is driven over stubbed. */ private SqlDatabaseUpgradeService upgradeService(String fromVersion) { return new SqlDatabaseUpgradeService(installScripts, jdbcTemplate, transactionManager, - schemaSettingsStubbedAt(fromVersion), ltsMigrationService); + schemaSettingsStubbedAt(fromVersion), migrationService); } private DatabaseSchemaSettingsService schemaSettingsStubbedAt(String dbVersion) { diff --git a/application/src/test/java/org/thingsboard/server/service/install/SqlDatabaseUpgradeServiceTest.java b/application/src/test/java/org/thingsboard/server/service/install/SqlDatabaseUpgradeServiceTest.java index 98e9ff24f9..4b79aa5c18 100644 --- a/application/src/test/java/org/thingsboard/server/service/install/SqlDatabaseUpgradeServiceTest.java +++ b/application/src/test/java/org/thingsboard/server/service/install/SqlDatabaseUpgradeServiceTest.java @@ -12,7 +12,7 @@ import org.mockito.junit.jupiter.MockitoExtension; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.StatementCallback; import org.springframework.transaction.PlatformTransactionManager; -import org.thingsboard.server.service.install.lts.LtsMigrationService; +import org.thingsboard.server.service.install.lts.MigrationService; import java.io.IOException; import java.nio.file.Files; @@ -27,14 +27,13 @@ import static org.mockito.Mockito.when; /** * A converted CE database is at a CE version, not at the package version, so the CE-to-PE delta cannot be the whole - * schema upgrade: the delta gives the database the PE shape of the version it is already at, and the LTS chain then + * schema upgrade: the delta gives the database the PE shape of the version it is already at, and the migration chain then * has to take it the rest of the way exactly as it does for a PE source. */ @ExtendWith(MockitoExtension.class) class SqlDatabaseUpgradeServiceTest { private static final String PE_DELTA_SQL = "-- the CE to PE delta\n"; - private static final String BASIC_SQL = "-- the basic schema update\n"; private static final String DB_VERSION = "4.3.1.4"; private static final String PACKAGE_VERSION = "4.4.0.0"; @@ -47,7 +46,7 @@ class SqlDatabaseUpgradeServiceTest { @Mock private DatabaseSchemaSettingsService schemaSettingsService; @Mock - private LtsMigrationService ltsMigrationService; + private MigrationService migrationService; @Mock private Statement statement; @@ -60,24 +59,22 @@ class SqlDatabaseUpgradeServiceTest { @SuppressWarnings("unchecked") void setUp() throws IOException { writeSchemaUpdate("pe", PE_DELTA_SQL); - writeSchemaUpdate("basic", BASIC_SQL); when(installScripts.getDataDir()).thenReturn(dataDir.toString()); when(schemaSettingsService.getDbSchemaVersion()).thenReturn(DB_VERSION); when(schemaSettingsService.getPackageSchemaVersion()).thenReturn(PACKAGE_VERSION); // Run the callback the service passes, so the SQL it hands to the statement can be asserted on. when(jdbcTemplate.execute(any(StatementCallback.class))) .thenAnswer(invocation -> ((StatementCallback) invocation.getArgument(0)).doInStatement(statement)); - service = new SqlDatabaseUpgradeService(installScripts, jdbcTemplate, transactionManager, schemaSettingsService, ltsMigrationService); + service = new SqlDatabaseUpgradeService(installScripts, jdbcTemplate, transactionManager, schemaSettingsService, migrationService); } @Test void ceToPeUpgradeAppliesTheDeltaAndThenTheRestOfTheChain() throws Exception { service.upgradeDatabase(true); - InOrder inOrder = inOrder(statement, ltsMigrationService); + InOrder inOrder = inOrder(statement, migrationService); inOrder.verify(statement).execute(PE_DELTA_SQL); - inOrder.verify(statement).execute(BASIC_SQL); - inOrder.verify(ltsMigrationService).runSchemaMigrations(DB_VERSION, PACKAGE_VERSION, false); + inOrder.verify(migrationService).runSchemaMigrations(DB_VERSION, PACKAGE_VERSION, false); } @Test @@ -85,20 +82,18 @@ class SqlDatabaseUpgradeServiceTest { service.upgradeDatabase(false); verify(statement, never()).execute(PE_DELTA_SQL); - InOrder inOrder = inOrder(statement, ltsMigrationService); - inOrder.verify(statement).execute(BASIC_SQL); - inOrder.verify(ltsMigrationService).runSchemaMigrations(DB_VERSION, PACKAGE_VERSION, false); + verify(migrationService).runSchemaMigrations(DB_VERSION, PACKAGE_VERSION, false); } @Test - void aForcedReUpgradeIsCarriedIntoTheLtsMigrations() throws Exception { + void aForcedReUpgradeIsCarriedIntoTheMigrations() throws Exception { // The only test that can tell the flag apart from a hard-coded false: everywhere else it is Mockito's // default that the assertion reads back. when(schemaSettingsService.isForcedReUpgrade()).thenReturn(true); service.upgradeDatabase(false); - verify(ltsMigrationService).runSchemaMigrations(DB_VERSION, PACKAGE_VERSION, true); + verify(migrationService).runSchemaMigrations(DB_VERSION, PACKAGE_VERSION, true); } private void writeSchemaUpdate(String directory, String sql) throws IOException { diff --git a/application/src/test/java/org/thingsboard/server/service/install/SqlEntityDatabaseSchemaServiceClusterIdTest.java b/application/src/test/java/org/thingsboard/server/service/install/SqlEntityDatabaseSchemaServiceClusterIdTest.java index f8f1cd800d..74b22e8ec5 100644 --- a/application/src/test/java/org/thingsboard/server/service/install/SqlEntityDatabaseSchemaServiceClusterIdTest.java +++ b/application/src/test/java/org/thingsboard/server/service/install/SqlEntityDatabaseSchemaServiceClusterIdTest.java @@ -130,7 +130,7 @@ class SqlEntityDatabaseSchemaServiceClusterIdTest extends AbstractPostgresContai .hasCauseInstanceOf(SQLException.class); } - /** The production DDL, not retyped: LtsMigrationIntegrationTest pins these constants against schema-entities.sql. */ + /** The production DDL, not retyped: MigrationIntegrationTest pins these constants against schema-entities.sql. */ private static List productionClusterDdl() { return List.of(TbClusterSchema.CREATE_CLUSTER_TABLE_QUERY, TbClusterSchema.CREATE_CLUSTER_SINGLE_ROW_INDEX_QUERY); } diff --git a/application/src/test/java/org/thingsboard/server/service/install/lts/LtsMigrationIntegrationTest.java b/application/src/test/java/org/thingsboard/server/service/install/lts/MigrationIntegrationTest.java similarity index 95% rename from application/src/test/java/org/thingsboard/server/service/install/lts/LtsMigrationIntegrationTest.java rename to application/src/test/java/org/thingsboard/server/service/install/lts/MigrationIntegrationTest.java index 8d2fdd61cc..4d0e570e04 100644 --- a/application/src/test/java/org/thingsboard/server/service/install/lts/LtsMigrationIntegrationTest.java +++ b/application/src/test/java/org/thingsboard/server/service/install/lts/MigrationIntegrationTest.java @@ -48,7 +48,7 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; @DaoSqlTest -public class LtsMigrationIntegrationTest extends AbstractControllerTest { +public class MigrationIntegrationTest extends AbstractControllerTest { private static final long V_4_2_2_2 = 4_002_002_002L; private static final long V_4_2_2_3 = 4_002_002_003L; @@ -62,7 +62,7 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { private static final Set SQL_LESS_ALLOWED = Set.of("4.3.1.5"); @Autowired - private LtsMigrationService ltsMigrationService; + private MigrationService migrationService; @Autowired private WidgetsBundleService widgetsBundleService; @Autowired @@ -72,7 +72,7 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { @Autowired private InstallScripts installScripts; @Autowired - private List migrations; + private List migrations; @Autowired private V4_3_1_4Migration v4314Migration; @@ -135,7 +135,7 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { // applyMigrations returns the applied versions; recordVersions stamps them (see SystemPatchApplier for // where that call sits relative to its own sync work). - ltsMigrationService.recordVersions(ltsMigrationService.applyMigrations("4.2.2.2", "4.2.2.3", false, () -> {})); + migrationService.recordVersions(migrationService.applyMigrations("4.2.2.2", "4.2.2.3", false, () -> {})); // 1. The version's SQL ran: iot_hub_installed_item table now exists. assertTrue(tableExists("iot_hub_installed_item")); @@ -152,9 +152,9 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { @Test public void reRunFromCurrentVersionIsNoOp() { - ltsMigrationService.recordVersions(ltsMigrationService.applyMigrations("4.2.2.2", "4.2.2.3", false, () -> {})); + migrationService.recordVersions(migrationService.applyMigrations("4.2.2.2", "4.2.2.3", false, () -> {})); // Re-running from the now-current version selects an empty range — nothing changes, nothing throws. - ltsMigrationService.applyMigrations("4.2.2.3", "4.2.2.3", false, () -> {}); + migrationService.applyMigrations("4.2.2.3", "4.2.2.3", false, () -> {}); assertEquals(Long.valueOf(V_4_2_2_3), jdbcTemplate.queryForObject("SELECT schema_version FROM tb_schema_settings", Long.class)); @@ -169,7 +169,7 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { jdbcTemplate.execute("DROP TABLE IF EXISTS iot_hub_installed_item"); // Drive the offline major-upgrade path over the real supported range against the real DB. - ltsMigrationService.runSchemaMigrations("4.2.2.2", "4.2.2.3", false); + migrationService.runSchemaMigrations("4.2.2.2", "4.2.2.3", false); // (a) the schema effects landed: the table the 4.2.2.3 SQL creates now exists. assertTrue(tableExists("iot_hub_installed_item")); // (c) the offline schema phase records NO schema version -- the offline flow tracks the package version @@ -177,7 +177,7 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { assertEquals(Long.valueOf(V_4_2_2_2), jdbcTemplate.queryForObject("SELECT schema_version FROM tb_schema_settings", Long.class)); - ltsMigrationService.runDataMigrations("4.2.2.2", "4.2.2.3", false); + migrationService.runDataMigrations("4.2.2.2", "4.2.2.3", false); // (b) the data apply() ran: the obsolete bundle was deleted and its type marked deprecated. assertNull(widgetsBundleService.findWidgetsBundleByTenantIdAndAlias(TenantId.SYS_TENANT_ID, OBSOLETE_ALIAS)); WidgetTypeDetails type = widgetTypeService.findWidgetTypeDetailsById(TenantId.SYS_TENANT_ID, widgetTypeId); @@ -212,7 +212,7 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { try { // Drive the runner over a range whose target (4.3.1.2) selects only the 4.3.1.2 migration. - ltsMigrationService.applyMigrations("4.3.1.1", "4.3.1.2", false, () -> {}); + migrationService.applyMigrations("4.3.1.1", "4.3.1.2", false, () -> {}); // The 4.3.1.2 schema SQL ran: every PE-specific column and the unique constraint exist again. assertTrue(columnExists("api_usage_state", "ai")); @@ -256,7 +256,7 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { try { // Drive the runner over a range whose target (4.3.1.4) selects only the 4.3.1.4 migration. - ltsMigrationService.recordVersions(ltsMigrationService.applyMigrations("4.3.1.3", "4.3.1.4", false, () -> {})); + migrationService.recordVersions(migrationService.applyMigrations("4.3.1.3", "4.3.1.4", false, () -> {})); // The schema_update.sql ran: the alarm_comment -> alarm cascade FK is gone and the column is back. assertFalse(constraintExists("fk_alarm_comment_alarm_id")); @@ -327,7 +327,7 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { v4314Migration.batchSize = 3; try { // Drive the runner over a range whose target (4.3.1.4) selects only the 4.3.1.4 migration. - ltsMigrationService.applyMigrations("4.3.1.3", "4.3.1.4", false, () -> {}); + migrationService.applyMigrations("4.3.1.3", "4.3.1.4", false, () -> {}); // Every seeded row got ITS OWN alarm's originator, across all three windows and both boundaries. for (int i = 0; i < rowAlarms.size(); i++) { @@ -369,7 +369,7 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { jdbcTemplate.execute("DROP TABLE IF EXISTS tb_cluster"); assertFalse(tableExists("tb_cluster")); - ltsMigrationService.applyMigrations("4.3.1.5", "4.3.1.6", false, () -> {}); + migrationService.applyMigrations("4.3.1.5", "4.3.1.6", false, () -> {}); assertTrue(tableExists("tb_cluster")); assertEquals(Long.valueOf(1L), jdbcTemplate.queryForObject("SELECT COUNT(*) FROM tb_cluster", Long.class)); @@ -384,10 +384,10 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { try { UUID existing = UUID.randomUUID(); jdbcTemplate.execute("DROP TABLE IF EXISTS tb_cluster"); - ltsMigrationService.applyMigrations("4.3.1.5", "4.3.1.6", false, () -> {}); + migrationService.applyMigrations("4.3.1.5", "4.3.1.6", false, () -> {}); jdbcTemplate.update("UPDATE tb_cluster SET cluster_id = ?::uuid", existing.toString()); - ltsMigrationService.applyMigrations("4.3.1.5", "4.3.1.6", false, () -> {}); + migrationService.applyMigrations("4.3.1.5", "4.3.1.6", false, () -> {}); assertEquals(List.of(existing.toString()), jdbcTemplate.queryForList("SELECT cluster_id FROM tb_cluster", String.class)); @@ -472,7 +472,7 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { // The walk discovers by the same DDL forms the comparison parses, so a script whose tb_cluster block // was reformatted past those regexes would leave the compared set without a word - the one blind spot // a self-selecting scan has. These two always carry the shape, so they are the floor under it: - // upgrade/pe makes the table on a CE-to-PE conversion, the current LTS baseline on a fresh upgrade. + // upgrade/pe makes the table on a CE-to-PE conversion, the current baseline on a fresh upgrade. List required = List.of( upgradeDir().resolve(Paths.get("pe", SCHEMA_UPDATE_SQL)), upgradeDir().resolve(Paths.get("lts", "4.4.0.0", SCHEMA_UPDATE_SQL))); @@ -525,7 +525,7 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { /** * Every shipped script that carries a copy of the {@code tb_cluster} shape, found by walking the upgrade - * tree rather than from a list: the next LTS directory to touch the table would otherwise be checked by + * tree rather than from a list: the next migration directory to touch the table would otherwise be checked by * nothing while the test above read as proof of coverage. Discovery is by the DDL forms the comparison * itself parses, not by a mention of the table name - a script that only names it in a comment or deletes * from it says nothing about shape and would fail here for nothing. @@ -560,9 +560,9 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { assertFalse(tableExists("iot_hub_installed_item")); // Offline schema phase over the whole supported cross-family range. - ltsMigrationService.runSchemaMigrations("4.3.0.0", "4.4.0.0", false); + migrationService.runSchemaMigrations("4.3.0.0", "4.4.0.0", false); - // 4.4.0.0 baseline DDL landed (this is what used to live in basic/schema_update.sql)... + // 4.4.0.0 baseline DDL landed... assertTrue(columnExists("rule_chain", "notes")); // ...and the in-range older-family 4.3.1.x beans ran too. assertTrue(columnExists("calculated_field", "additional_info")); @@ -573,14 +573,14 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { public void migrationDirectoriesAndBeansStayInSyncBothWays() { Path ltsDir = Paths.get(installScripts.getDataDir(), "upgrade", "lts"); Set dirVersions = listDirVersions(ltsDir); - Set beanVersions = migrations.stream().map(LtsMigration::getVersion).collect(Collectors.toSet()); + Set beanVersions = migrations.stream().map(Migration::getVersion).collect(Collectors.toSet()); // Every on-disk migration directory must have a registered bean with the same version. // Otherwise select() (which iterates beans, not dirs) silently skips the SQL dir. Set dirsWithoutBean = dirVersions.stream() .filter(v -> !beanVersions.contains(v)) .collect(Collectors.toSet()); - assertTrue("Migration directories without a registered LtsMigration bean: " + dirsWithoutBean, + assertTrue("Migration directories without a registered Migration bean: " + dirsWithoutBean, dirsWithoutBean.isEmpty()); // Every registered bean must have a matching directory, unless it is explicitly allowed to be SQL-less. @@ -589,7 +589,7 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { .filter(v -> !dirVersions.contains(v)) .filter(v -> !SQL_LESS_ALLOWED.contains(v)) .collect(Collectors.toSet()); - assertTrue("Registered LtsMigration beans without a matching directory (and not SQL-less allowed): " + beansWithoutDir, + assertTrue("Registered Migration beans without a matching directory (and not SQL-less allowed): " + beansWithoutDir, beansWithoutDir.isEmpty()); } @@ -602,7 +602,7 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { .map(p -> p.getFileName().toString()) .collect(Collectors.toSet()); } catch (IOException e) { - throw new UncheckedIOException("Failed to list LTS migration directories: " + ltsDir, e); + throw new UncheckedIOException("Failed to list migration directories: " + ltsDir, e); } } @@ -686,7 +686,7 @@ public class LtsMigrationIntegrationTest extends AbstractControllerTest { } private static String readResource(String name) { - try (InputStream in = LtsMigrationIntegrationTest.class.getClassLoader().getResourceAsStream(name)) { + try (InputStream in = MigrationIntegrationTest.class.getClassLoader().getResourceAsStream(name)) { assertNotNull(name + " on the test classpath", in); return new String(in.readAllBytes(), StandardCharsets.UTF_8); } catch (IOException e) { diff --git a/application/src/test/java/org/thingsboard/server/service/install/lts/LtsMigrationServiceTest.java b/application/src/test/java/org/thingsboard/server/service/install/lts/MigrationServiceTest.java similarity index 85% rename from application/src/test/java/org/thingsboard/server/service/install/lts/LtsMigrationServiceTest.java rename to application/src/test/java/org/thingsboard/server/service/install/lts/MigrationServiceTest.java index f9fe083fe7..4245e47206 100644 --- a/application/src/test/java/org/thingsboard/server/service/install/lts/LtsMigrationServiceTest.java +++ b/application/src/test/java/org/thingsboard/server/service/install/lts/MigrationServiceTest.java @@ -28,7 +28,7 @@ import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -class LtsMigrationServiceTest { +class MigrationServiceTest { private JdbcTemplate jdbcTemplate; private InstallScripts installScripts; @@ -55,24 +55,24 @@ class LtsMigrationServiceTest { } /** Records which apply() hooks fired, in order. */ - private LtsMigration migration(String version, List applied) { - return new LtsMigration() { + private Migration migration(String version, List applied) { + return new Migration() { @Override public String getVersion() { return version; } @Override public void apply() { applied.add(version); } }; } /** Records apply() and applyAfterCommit() calls (distinctly tagged) into a single shared ordered list. */ - private LtsMigration migrationWithAfterCommit(String version, List sequence) { - return new LtsMigration() { + private Migration migrationWithAfterCommit(String version, List sequence) { + return new Migration() { @Override public String getVersion() { return version; } @Override public void apply() { sequence.add("apply(" + version + ")"); } @Override public void applyAfterCommit() { sequence.add("applyAfterCommit(" + version + ")"); } }; } - private LtsMigrationService service(List migrations) { - return new LtsMigrationService(jdbcTemplate, installScripts, schemaSettingsService, txManager, migrations); + private MigrationService service(List migrations) { + return new MigrationService(jdbcTemplate, installScripts, schemaSettingsService, txManager, migrations); } @Test @@ -81,7 +81,7 @@ class LtsMigrationServiceTest { writeSql("4.2.2.3", "SELECT 1;"); writeSql("4.2.2.4", "SELECT 2;"); // intentionally unsorted input; service must sort ascending - LtsMigrationService service = service(List.of( + MigrationService service = service(List.of( migration("4.2.2.4", applied), migration("4.2.2.2", applied), migration("4.2.2.3", applied))); @@ -100,7 +100,7 @@ class LtsMigrationServiceTest { List applied = new ArrayList<>(); writeSql("4.2.2.3", "SELECT 1;"); writeSql("4.2.2.4", "SELECT 2;"); - LtsMigrationService service = service(List.of( + MigrationService service = service(List.of( migration("4.2.2.3", applied), migration("4.2.2.4", applied))); List appliedVersions = service.applyMigrations("4.2.2.2", "4.2.2.4", false, () -> {}); @@ -117,7 +117,7 @@ class LtsMigrationServiceTest { // A cross-family 4.3 -> 4.4 offline upgrade now runs the real in-range 4.3.1.x beans (the source has // not passed them) alongside the new 4.4 baseline bean -- each exactly once. No 4.4-family bean // reproduces the 4.3.1.x work anymore. - LtsMigrationService service = service(List.of( + MigrationService service = service(List.of( migration("4.2.2.3", applied), migration("4.3.1.2", applied), migration("4.3.1.3", applied), @@ -132,7 +132,7 @@ class LtsMigrationServiceTest { @Test void applyMigrationsRunsAndReturnsEachInRangeVersionOnCrossFamilyUpgrade() { List applied = new ArrayList<>(); - LtsMigrationService service = service(List.of( + MigrationService service = service(List.of( migration("4.2.2.3", applied), migration("4.3.1.2", applied), migration("4.3.1.3", applied), @@ -152,7 +152,7 @@ class LtsMigrationServiceTest { writeSql("4.3.1.2", "SELECT 2;"); writeSql("4.3.1.3", "SELECT 3;"); writeSql("4.4.0.0", "SELECT 4;"); - LtsMigrationService service = service(List.of( + MigrationService service = service(List.of( migration("4.2.2.3", applied), migration("4.3.1.2", applied), migration("4.3.1.3", applied), @@ -169,46 +169,46 @@ class LtsMigrationServiceTest { @Test void isInRangePredicate() { - LtsVersion from = LtsVersion.parse("4.3.1.1"); - LtsVersion to = LtsVersion.parse("4.3.1.3"); + Version from = Version.parse("4.3.1.1"); + Version to = Version.parse("4.3.1.3"); // within-family in range - assertTrue(LtsVersion.parse("4.3.1.2").isInRange(from, to)); + assertTrue(Version.parse("4.3.1.2").isInRange(from, to)); // the target itself (upper boundary, inclusive) assertTrue(to.isInRange(from, to)); // at from (lower boundary, exclusive) assertFalse(from.isInRange(from, to)); // below from - assertFalse(LtsVersion.parse("4.3.1.0").isInRange(from, to)); + assertFalse(Version.parse("4.3.1.0").isInRange(from, to)); // above to - assertFalse(LtsVersion.parse("4.3.1.4").isInRange(from, to)); + assertFalse(Version.parse("4.3.1.4").isInRange(from, to)); // Cross-family: an in-range older-family bean IS now selected (the whole point of the loosened filter), // as is the target-family baseline; only a bean below `from` stays out of range. - LtsVersion crossFrom = LtsVersion.parse("4.3.0.0"); - LtsVersion crossTo = LtsVersion.parse("4.4.0.0"); - assertTrue(LtsVersion.parse("4.3.1.3").isInRange(crossFrom, crossTo)); + Version crossFrom = Version.parse("4.3.0.0"); + Version crossTo = Version.parse("4.4.0.0"); + assertTrue(Version.parse("4.3.1.3").isInRange(crossFrom, crossTo)); assertTrue(crossTo.isInRange(crossFrom, crossTo)); - assertFalse(LtsVersion.parse("4.2.2.3").isInRange(crossFrom, crossTo)); + assertFalse(Version.parse("4.2.2.3").isInRange(crossFrom, crossTo)); } @Test void reproductionDuplicateBeanSitsBelowSupportedSourceFloor() { - // Load-bearing invariant (see LtsMigrationService.select): the only reproduction-duplicate pair is + // Load-bearing invariant (see MigrationService.select): the only reproduction-duplicate pair is // 4.2.2.3 <-> 4.3.1.3 (both do the solution-template / widget-bundle work). For the loosened (from, to] // filter to never select both in a single supported upgrade, the duplicate 4.2.2.3 must sit strictly - // below the minimum supported upgrade source. That floor is 4.3.0.0 (SUPPORTED_VERSIONS_FOR_UPGRADE). - LtsVersion duplicate = LtsVersion.parse("4.2.2.3"); - LtsVersion supportedSourceFloor = LtsVersion.parse("4.3.0.0"); + // below the minimum supported upgrade source. That floor is 4.3.0.0 (SUPPORTED_FAMILIES_FOR_UPGRADE). + Version duplicate = Version.parse("4.2.2.3"); + Version supportedSourceFloor = Version.parse("4.3.0.0"); assertTrue(duplicate.compareTo(supportedSourceFloor) < 0); // So on any supported cross-family upgrade (from >= floor), the duplicate is out of range. - assertFalse(duplicate.isInRange(supportedSourceFloor, LtsVersion.parse("4.4.0.0"))); + assertFalse(duplicate.isInRange(supportedSourceFloor, Version.parse("4.4.0.0"))); } @Test void reRunAtCurrentVersionIsNoOp() throws Exception { List applied = new ArrayList<>(); writeSql("4.2.2.3", "SELECT 1;"); - LtsMigrationService service = service(List.of(migration("4.2.2.3", applied))); + MigrationService service = service(List.of(migration("4.2.2.3", applied))); List appliedVersions = service.applyMigrations("4.2.2.3", "4.2.2.3", false, () -> {}); @@ -223,7 +223,7 @@ class LtsMigrationServiceTest { writeSql("4.3.1.3", "SELECT 1;"); writeSql("4.4.0.0", "SELECT 2;"); writeSql("4.4.0.1", "SELECT 3;"); - LtsMigrationService service = service(List.of( + MigrationService service = service(List.of( migration("4.3.1.3", applied), migration("4.4.0.0", applied), migration("4.4.0.1", applied))); // SKIP_SCHEMA_VERSION_CHECK on a database already at the package version: the point of the flag is that this @@ -238,7 +238,7 @@ class LtsMigrationServiceTest { @Test void forcedRunAtCurrentVersionReRunsThatVersionDataOnly() { List applied = new ArrayList<>(); - LtsMigrationService service = service(List.of( + MigrationService service = service(List.of( migration("4.3.1.3", applied), migration("4.4.0.0", applied), migration("4.4.0.1", applied))); service.runDataMigrations("4.4.0.0", "4.4.0.0", true); @@ -270,7 +270,7 @@ class LtsMigrationServiceTest { @Test void forcedApplyMigrationsAtCurrentVersionReRunsAndReturnsThatVersion() { List applied = new ArrayList<>(); - LtsMigrationService service = service(List.of( + MigrationService service = service(List.of( migration("4.3.1.3", applied), migration("4.4.0.0", applied), migration("4.4.0.1", applied))); // The no-downtime twin of the above: SKIP_PATCH_VERSION_CHECK got the patch past its version check with the @@ -301,14 +301,14 @@ class LtsMigrationServiceTest { @Test void isInClosedRangePredicate() { - LtsVersion from = LtsVersion.parse("4.3.1.1"); - LtsVersion to = LtsVersion.parse("4.3.1.3"); + Version from = Version.parse("4.3.1.1"); + Version to = Version.parse("4.3.1.3"); // both boundaries inclusive, unlike isInRange assertTrue(from.isInClosedRange(from, to)); assertTrue(to.isInClosedRange(from, to)); - assertTrue(LtsVersion.parse("4.3.1.2").isInClosedRange(from, to)); - assertFalse(LtsVersion.parse("4.3.1.0").isInClosedRange(from, to)); - assertFalse(LtsVersion.parse("4.3.1.4").isInClosedRange(from, to)); + assertTrue(Version.parse("4.3.1.2").isInClosedRange(from, to)); + assertFalse(Version.parse("4.3.1.0").isInClosedRange(from, to)); + assertFalse(Version.parse("4.3.1.4").isInClosedRange(from, to)); // a single-version range holds exactly that version assertTrue(to.isInClosedRange(to, to)); assertFalse(from.isInClosedRange(to, to)); @@ -318,7 +318,7 @@ class LtsMigrationServiceTest { void runSchemaMigrationsRunsSqlButNeverAppliesOrRecords() throws Exception { List applied = new ArrayList<>(); writeSql("4.2.2.3", "SELECT 1;"); - LtsMigrationService service = service(List.of(migration("4.2.2.3", applied))); + MigrationService service = service(List.of(migration("4.2.2.3", applied))); service.runSchemaMigrations("4.2.2.2", "4.2.2.3", false); @@ -331,7 +331,7 @@ class LtsMigrationServiceTest { void runDataMigrationsAppliesButNeverRunsSqlOrRecords() throws Exception { List applied = new ArrayList<>(); writeSql("4.2.2.3", "SELECT 1;"); - LtsMigrationService service = service(List.of(migration("4.2.2.3", applied))); + MigrationService service = service(List.of(migration("4.2.2.3", applied))); service.runDataMigrations("4.2.2.2", "4.2.2.3", false); @@ -344,7 +344,7 @@ class LtsMigrationServiceTest { void runDataMigrationsAppliesAndAppliesAfterCommitButNeverRunsSqlOrRecords() throws Exception { List sequence = new ArrayList<>(); writeSql("4.2.2.3", "SELECT 1;"); - LtsMigrationService service = service(List.of(migrationWithAfterCommit("4.2.2.3", sequence))); + MigrationService service = service(List.of(migrationWithAfterCommit("4.2.2.3", sequence))); service.runDataMigrations("4.2.2.2", "4.2.2.3", false); @@ -356,7 +356,7 @@ class LtsMigrationServiceTest { @Test void migrationWithoutSqlFileStillAppliesAndReturnsVersion() { List applied = new ArrayList<>(); - LtsMigrationService service = service(List.of(migration("4.2.2.3", applied))); + MigrationService service = service(List.of(migration("4.2.2.3", applied))); List appliedVersions = service.applyMigrations("4.2.2.2", "4.2.2.3", false, () -> {}); @@ -368,7 +368,7 @@ class LtsMigrationServiceTest { @Test void applyMigrationsNeverCallsUpdateSchemaVersionItself() { List applied = new ArrayList<>(); - LtsMigrationService service = service(List.of(migration("4.2.2.3", applied))); + MigrationService service = service(List.of(migration("4.2.2.3", applied))); service.applyMigrations("4.2.2.2", "4.2.2.3", false, () -> {}); @@ -381,7 +381,7 @@ class LtsMigrationServiceTest { List events = new ArrayList<>(); Mockito.doAnswer(invocation -> events.add("record:" + invocation.getArgument(0))) .when(schemaSettingsService).updateSchemaVersion(anyString()); - LtsMigrationService service = service(List.of()); + MigrationService service = service(List.of()); service.recordVersions(List.of("4.3.1.2", "4.3.1.3")); @@ -389,8 +389,8 @@ class LtsMigrationServiceTest { } // Records apply() and applyAfterCommit() into a shared, ordered event log so their sequence can be asserted. - private LtsMigration recordingMigration(String version, List events) { - return new LtsMigration() { + private Migration recordingMigration(String version, List events) { + return new Migration() { @Override public String getVersion() { return version; } @Override public void apply() { events.add("apply:" + version); } @Override public void applyAfterCommit() { events.add("afterCommit:" + version); } @@ -400,7 +400,7 @@ class LtsMigrationServiceTest { @Test void applyMigrationsRunsApplyThenAfterCommitAndReturnsTheAppliedVersion() { List events = new ArrayList<>(); - LtsMigrationService service = service(List.of(recordingMigration("4.3.1.3", events))); + MigrationService service = service(List.of(recordingMigration("4.3.1.3", events))); List appliedVersions = service.applyMigrations("4.3.1.2", "4.3.1.3", false, () -> {}); @@ -411,7 +411,7 @@ class LtsMigrationServiceTest { @Test void applyMigrationsPropagatesAnAfterCommitFailureAndStampsNoVersion() { - LtsMigrationService service = service(List.of(new LtsMigration() { + MigrationService service = service(List.of(new Migration() { @Override public String getVersion() { return "4.3.1.3"; } @Override public void applyAfterCommit() { throw new IllegalStateException("backfill failed"); } })); @@ -427,7 +427,7 @@ class LtsMigrationServiceTest { List events = new ArrayList<>(); writeSql("4.3.1.2", "SELECT 1;"); writeSql("4.3.1.3", "SELECT 2;"); - LtsMigrationService service = service(List.of( + MigrationService service = service(List.of( recordingMigration("4.3.1.2", events), recordingMigration("4.3.1.3", events))); Runnable afterSchemaPhase = () -> events.add("replay"); @@ -447,7 +447,7 @@ class LtsMigrationServiceTest { @Test void applyMigrationsWithReplayNeverRunsBackfillOrReturnsWhenReplayThrows() { List events = new ArrayList<>(); - LtsMigrationService service = service(List.of( + MigrationService service = service(List.of( recordingMigration("4.3.1.2", events), recordingMigration("4.3.1.3", events))); Runnable afterSchemaPhase = () -> { throw new IllegalStateException("replay failed"); }; @@ -461,12 +461,12 @@ class LtsMigrationServiceTest { @Test void applyMigrationsReturnsNothingWhenALaterBackfillFailsEvenIfAnEarlierOneSucceeded() { List events = new ArrayList<>(); - LtsMigration first = recordingMigration("4.3.1.2", events); - LtsMigration second = new LtsMigration() { + Migration first = recordingMigration("4.3.1.2", events); + Migration second = new Migration() { @Override public String getVersion() { return "4.3.1.3"; } @Override public void applyAfterCommit() { throw new IllegalStateException("backfill failed"); } }; - LtsMigrationService service = service(List.of(first, second)); + MigrationService service = service(List.of(first, second)); // applyMigrations only returns its applied-versions list on a normal return; the second backfill throws // before that return, so the caller never learns the first one succeeded either, and recordVersions is @@ -481,7 +481,7 @@ class LtsMigrationServiceTest { @Test void runDataMigrationsRunsApplyThenAfterCommit() { List events = new ArrayList<>(); - LtsMigrationService service = service(List.of(recordingMigration("4.3.1.3", events))); + MigrationService service = service(List.of(recordingMigration("4.3.1.3", events))); service.runDataMigrations("4.3.1.2", "4.3.1.3", false); @@ -505,7 +505,7 @@ class LtsMigrationServiceTest { @Test void applyMigrationsRunsAllApplyThenAfterSchemaPhaseThenAllApplyAfterCommit() { List sequence = new ArrayList<>(); - LtsMigrationService service = service(List.of( + MigrationService service = service(List.of( migrationWithAfterCommit("4.2.2.3", sequence), migrationWithAfterCommit("4.2.2.4", sequence))); Runnable afterSchemaPhase = () -> sequence.add("afterSchemaPhase"); diff --git a/application/src/test/java/org/thingsboard/server/service/install/lts/V4_3_1_5MigrationTest.java b/application/src/test/java/org/thingsboard/server/service/install/lts/V4_3_1_5MigrationTest.java index 5bb0bb642e..c8ea0407c6 100644 --- a/application/src/test/java/org/thingsboard/server/service/install/lts/V4_3_1_5MigrationTest.java +++ b/application/src/test/java/org/thingsboard/server/service/install/lts/V4_3_1_5MigrationTest.java @@ -69,7 +69,7 @@ class V4_3_1_5MigrationTest { } /** - * {@link LtsMigration#apply()} re-runs when a node crashes before the version is recorded, so a key that already + * {@link Migration#apply()} re-runs when a node crashes before the version is recorded, so a key that already * carries the operation must not be written again. */ @Test diff --git a/application/src/test/java/org/thingsboard/server/service/install/lts/LtsVersionTest.java b/application/src/test/java/org/thingsboard/server/service/install/lts/VersionTest.java similarity index 59% rename from application/src/test/java/org/thingsboard/server/service/install/lts/LtsVersionTest.java rename to application/src/test/java/org/thingsboard/server/service/install/lts/VersionTest.java index 82d7f0c76e..f5f352bb7f 100644 --- a/application/src/test/java/org/thingsboard/server/service/install/lts/LtsVersionTest.java +++ b/application/src/test/java/org/thingsboard/server/service/install/lts/VersionTest.java @@ -12,7 +12,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; -class LtsVersionTest { +class VersionTest { @ParameterizedTest @CsvSource({ @@ -24,7 +24,7 @@ class LtsVersionTest { "10.20.30.40, 10, 20, 30, 40" }) void parsesValidVersions(String input, int major, int minor, int maintenance, int patch) { - LtsVersion v = LtsVersion.parse(input); + Version v = Version.parse(input); assertEquals(major, v.major()); assertEquals(minor, v.minor()); assertEquals(maintenance, v.maintenance()); @@ -34,32 +34,32 @@ class LtsVersionTest { @ParameterizedTest @ValueSource(strings = {"invalid", "a.b.c", "1.2.y.x", "1.x.3", ""}) void throwsOnInvalidVersions(String input) { - assertThrows(IllegalArgumentException.class, () -> LtsVersion.parse(input)); + assertThrows(IllegalArgumentException.class, () -> Version.parse(input)); } @Test void throwsOnNull() { - assertThrows(IllegalArgumentException.class, () -> LtsVersion.parse(null)); + assertThrows(IllegalArgumentException.class, () -> Version.parse(null)); } @Test void comparesByEachComponent() { - assertTrue(LtsVersion.parse("4.2.2.3").compareTo(LtsVersion.parse("4.2.2.2")) > 0); - assertTrue(LtsVersion.parse("4.2.2.0").compareTo(LtsVersion.parse("4.2.1.9")) > 0); - assertTrue(LtsVersion.parse("4.3.0.0").compareTo(LtsVersion.parse("4.2.9.9")) > 0); - assertEquals(0, LtsVersion.parse("4.2.2.3").compareTo(LtsVersion.parse("4.2.2.3"))); + assertTrue(Version.parse("4.2.2.3").compareTo(Version.parse("4.2.2.2")) > 0); + assertTrue(Version.parse("4.2.2.0").compareTo(Version.parse("4.2.1.9")) > 0); + assertTrue(Version.parse("4.3.0.0").compareTo(Version.parse("4.2.9.9")) > 0); + assertEquals(0, Version.parse("4.2.2.3").compareTo(Version.parse("4.2.2.3"))); } @Test void sameFamilyComparesMajorAndMinorOnly() { - assertTrue(LtsVersion.parse("4.2.2.3").sameFamily(LtsVersion.parse("4.2.0.0"))); - assertFalse(LtsVersion.parse("4.3.0.0").sameFamily(LtsVersion.parse("4.2.9.9"))); - assertFalse(LtsVersion.parse("5.2.0.0").sameFamily(LtsVersion.parse("4.2.0.0"))); + assertTrue(Version.parse("4.2.2.3").sameFamily(Version.parse("4.2.0.0"))); + assertFalse(Version.parse("4.3.0.0").sameFamily(Version.parse("4.2.9.9"))); + assertFalse(Version.parse("5.2.0.0").sameFamily(Version.parse("4.2.0.0"))); } @Test void toStringIsFourComponentDotForm() { - assertEquals("4.2.2.3", LtsVersion.parse("4.2.2.3").toString()); - assertEquals("4.2.0.0", LtsVersion.parse("4.2").toString()); + assertEquals("4.2.2.3", Version.parse("4.2.2.3").toString()); + assertEquals("4.2.0.0", Version.parse("4.2").toString()); } } diff --git a/application/src/test/java/org/thingsboard/server/service/install/update/DefaultDataUpdateServiceTest.java b/application/src/test/java/org/thingsboard/server/service/install/update/DefaultDataUpdateServiceTest.java index 201da09a4e..2e8020df80 100644 --- a/application/src/test/java/org/thingsboard/server/service/install/update/DefaultDataUpdateServiceTest.java +++ b/application/src/test/java/org/thingsboard/server/service/install/update/DefaultDataUpdateServiceTest.java @@ -32,7 +32,7 @@ import org.thingsboard.server.service.component.ComponentDiscoveryService; import org.thingsboard.server.service.install.DatabaseSchemaSettingsService; import org.thingsboard.server.service.install.DbUpgradeExecutorService; import org.thingsboard.server.service.install.SystemDataLoaderService; -import org.thingsboard.server.service.install.lts.LtsMigrationService; +import org.thingsboard.server.service.install.lts.MigrationService; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.atLeastOnce; @@ -42,7 +42,7 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; /** - * The CE-to-PE conversion is a step on the way to the package version, not an alternative to it: the LTS data + * The CE-to-PE conversion is a step on the way to the package version, not an alternative to it: the migration data * migrations have to run on a converted CE database too, or the conversion silently skips every data migration * between the CE source version and the package version. */ @@ -88,34 +88,34 @@ class DefaultDataUpdateServiceTest { @Mock private DatabaseSchemaSettingsService schemaSettingsService; @Mock - private LtsMigrationService ltsMigrationService; + private MigrationService migrationService; @InjectMocks private DefaultDataUpdateService service; @Test - void ceToPeUpgradeRunsTheLtsDataMigrationsAfterTheConversion() throws Exception { + void ceToPeUpgradeRunsTheDataMigrationsAfterTheConversion() throws Exception { givenAnEmptyDatabase(); service.updateData(true); - InOrder inOrder = inOrder(tenantService, ltsMigrationService); + InOrder inOrder = inOrder(tenantService, migrationService); inOrder.verify(tenantService, atLeastOnce()).findTenants(any(PageLink.class)); - inOrder.verify(ltsMigrationService).runDataMigrations(DB_VERSION, PACKAGE_VERSION, false); + inOrder.verify(migrationService).runDataMigrations(DB_VERSION, PACKAGE_VERSION, false); } @Test - void peUpgradeRunsOnlyTheLtsDataMigrations() throws Exception { + void peUpgradeRunsOnlyTheDataMigrations() throws Exception { givenAnEmptyDatabase(); service.updateData(false); verify(tenantService, never()).findTenants(any(PageLink.class)); - verify(ltsMigrationService).runDataMigrations(DB_VERSION, PACKAGE_VERSION, false); + verify(migrationService).runDataMigrations(DB_VERSION, PACKAGE_VERSION, false); } @Test - void aForcedReUpgradeIsCarriedIntoTheLtsMigrations() throws Exception { + void aForcedReUpgradeIsCarriedIntoTheMigrations() throws Exception { // The only test that can tell the flag apart from a hard-coded false: everywhere else it is Mockito's // default that the assertion reads back. givenAnEmptyDatabase(); @@ -123,7 +123,7 @@ class DefaultDataUpdateServiceTest { service.updateData(false); - verify(ltsMigrationService).runDataMigrations(DB_VERSION, PACKAGE_VERSION, true); + verify(migrationService).runDataMigrations(DB_VERSION, PACKAGE_VERSION, true); } private void givenAnEmptyDatabase() { diff --git a/application/src/test/java/org/thingsboard/server/system/SystemPatchApplierTest.java b/application/src/test/java/org/thingsboard/server/system/SystemPatchApplierTest.java index 53d4b887b7..a5589b36ce 100644 --- a/application/src/test/java/org/thingsboard/server/system/SystemPatchApplierTest.java +++ b/application/src/test/java/org/thingsboard/server/system/SystemPatchApplierTest.java @@ -29,7 +29,7 @@ import org.thingsboard.server.dao.widget.WidgetTypeService; import org.thingsboard.server.dao.widget.WidgetsBundleService; import org.thingsboard.server.service.install.DatabaseSchemaSettingsService; import org.thingsboard.server.service.install.InstallScripts; -import org.thingsboard.server.service.install.lts.LtsMigrationService; +import org.thingsboard.server.service.install.lts.MigrationService; import org.thingsboard.server.service.system.SystemPatchApplier; import java.nio.charset.StandardCharsets; @@ -84,7 +84,7 @@ public class SystemPatchApplierTest { private ImageService imageService; @Mock - private LtsMigrationService ltsMigrationService; + private MigrationService migrationService; @InjectMocks private SystemPatchApplier reconciler; @@ -492,7 +492,7 @@ public class SystemPatchApplierTest { // nested back inside that callback (round-1's defect), none of the three calls below would happen at all, // so this also proves the legs are NOT reached through it. List appliedVersions = List.of("4.3.1.0"); - when(ltsMigrationService.applyMigrations(eq("4.3.0.0"), eq("4.3.1.0"), eq(false), any())).thenReturn(appliedVersions); + when(migrationService.applyMigrations(eq("4.3.0.0"), eq("4.3.1.0"), eq(false), any())).thenReturn(appliedVersions); ReflectionTestUtils.invokeMethod(reconciler, "applyPatchIfNeeded"); @@ -500,12 +500,12 @@ public class SystemPatchApplierTest { // call returns and strictly before recordVersions and the final stamp, so a sync failure still blocks the // stamp instead of racing past it. Each leg's signal sits on a different mock, so one InOrder pins all three // at once. - InOrder inOrder = inOrder(ltsMigrationService, widgetTypeService, widgetsBundleService, imageService, schemaSettingsService); - inOrder.verify(ltsMigrationService).applyMigrations(eq("4.3.0.0"), eq("4.3.1.0"), eq(false), any()); + InOrder inOrder = inOrder(migrationService, widgetTypeService, widgetsBundleService, imageService, schemaSettingsService); + inOrder.verify(migrationService).applyMigrations(eq("4.3.0.0"), eq("4.3.1.0"), eq(false), any()); inOrder.verify(widgetTypeService).saveWidgetType(argThat(w -> "new_widget".equals(w.getFqn()))); inOrder.verify(widgetsBundleService).saveWidgetsBundle(argThat(b -> "New Title".equals(b.getTitle()))); inOrder.verify(imageService).createOrUpdateSystemImage(eq("new_icon.svg"), eq(imageBytes)); - inOrder.verify(ltsMigrationService).recordVersions(appliedVersions); + inOrder.verify(migrationService).recordVersions(appliedVersions); inOrder.verify(schemaSettingsService).updateSchemaVersion(); } @@ -524,7 +524,7 @@ public class SystemPatchApplierTest { ReflectionTestUtils.invokeMethod(reconciler, "applyPatchIfNeeded"); ArgumentCaptor betweenPhases = ArgumentCaptor.forClass(Runnable.class); - verify(ltsMigrationService).applyMigrations(eq("4.3.0.0"), eq("4.3.1.0"), eq(false), betweenPhases.capture()); + verify(migrationService).applyMigrations(eq("4.3.0.0"), eq("4.3.1.0"), eq(false), betweenPhases.capture()); String schemaViewsSql = Resources.toString(Resources.getResource("sql/schema-views.sql"), StandardCharsets.UTF_8); String schemaFunctionsSql = Resources.toString(Resources.getResource("sql/schema-functions.sql"), StandardCharsets.UTF_8); @@ -558,7 +558,7 @@ public class SystemPatchApplierTest { assertThrows(RuntimeException.class, () -> ReflectionTestUtils.invokeMethod(reconciler, "applyPatchIfNeeded")); - verify(ltsMigrationService, never()).recordVersions(any()); + verify(migrationService, never()).recordVersions(any()); verify(schemaSettingsService, never()).updateSchemaVersion(); } @@ -602,8 +602,8 @@ public class SystemPatchApplierTest { ReflectionTestUtils.invokeMethod(reconciler, "applyPatchIfNeeded"); - InOrder inOrder = inOrder(ltsMigrationService, schemaSettingsService); - inOrder.verify(ltsMigrationService).applyMigrations(eq("4.3.1.0"), eq("4.3.2.0"), eq(false), any()); + InOrder inOrder = inOrder(migrationService, schemaSettingsService); + inOrder.verify(migrationService).applyMigrations(eq("4.3.1.0"), eq("4.3.2.0"), eq(false), any()); inOrder.verify(schemaSettingsService).updateSchemaVersion(); } diff --git a/dao/src/main/resources/sql/schema-entities.sql b/dao/src/main/resources/sql/schema-entities.sql index 987c852ed0..0f55b4fae0 100644 --- a/dao/src/main/resources/sql/schema-entities.sql +++ b/dao/src/main/resources/sql/schema-entities.sql @@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS tb_instance_registry ( last_activity_ts bigint NOT NULL ); --- Also copied by the upgrade scripts that reach this table; LtsMigrationIntegrationTest keeps them in sync. +-- Also copied by the upgrade scripts that reach this table; MigrationIntegrationTest keeps them in sync. CREATE TABLE IF NOT EXISTS tb_cluster ( cluster_id uuid NOT NULL, license_secret varchar,