From 8adb951a572a844f5d3fd4c861bb6b0524fac9a9 Mon Sep 17 00:00:00 2001 From: aholstrup1 Date: Thu, 23 Jul 2026 12:03:00 +0200 Subject: [PATCH 1/3] Fix AA0217 in BCPT Setup Card test and build System App Modules apps under strict ruleset Replace inline literal format string in nested StrSubstNo with a Locked label (OrValueLbl) in BCPTSetupCardTest to satisfy AA0217, which is an error under internal.module.ruleset.json. Add the monolithic System Application / Business Foundation apps and the Tools apps (Performance Toolkit, AI Test Toolkit, Test Framework libraries and Test Runner) to the System Application Modules AL-Go project so they compile under the strict ruleset, matching the internal BuildAppModulesClean build. Copilot-Session: b1498119-78c5-4792-bfb9-f8b791782ab3 --- .../.AL-Go/settings.json | 17 +++++++++++++++-- .../Test/src/BCPTSetupCardTest.Codeunit.al | 3 ++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/build/projects/System Application Modules/.AL-Go/settings.json b/build/projects/System Application Modules/.AL-Go/settings.json index e2dd41d0ec7..fe0e74c5164 100644 --- a/build/projects/System Application Modules/.AL-Go/settings.json +++ b/build/projects/System Application Modules/.AL-Go/settings.json @@ -3,13 +3,26 @@ "projectName": "System Application Modules", "appFolders": [ "../../../src/System Application/App/*", - "../../../src/Business Foundation/App/*" + "../../../src/System Application/App", + "../../../src/Business Foundation/App/*", + "../../../src/Business Foundation/App", + "../../../src/Tools/Performance Toolkit/App", + "../../../src/Tools/AI Test Toolkit", + "../../../src/Tools/Test Framework/Test Libraries/*", + "../../../src/Tools/Test Framework/*" ], "testFolders": [ "../../../src/System Application/Test/*", "../../../src/System Application/Test Library/*", + "../../../src/System Application/Test", + "../../../src/System Application/Test Library", + "../../../src/System Application/Partner Test", + "../../../src/System Application/Partner Test/AI", "../../../src/Business Foundation/Test/*", - "../../../src/Business Foundation/Test Library/*" + "../../../src/Business Foundation/Test Library/*", + "../../../src/Business Foundation/Test", + "../../../src/Business Foundation/Test Library", + "../../../src/Tools/Performance Toolkit/Test" ], "doNotPublishApps": true, "rulesetFile": "../../../src/rulesets/internal.module.ruleset.json", diff --git a/src/Tools/Performance Toolkit/Test/src/BCPTSetupCardTest.Codeunit.al b/src/Tools/Performance Toolkit/Test/src/BCPTSetupCardTest.Codeunit.al index 0b402417a3c..7c1a054b5ec 100644 --- a/src/Tools/Performance Toolkit/Test/src/BCPTSetupCardTest.Codeunit.al +++ b/src/Tools/Performance Toolkit/Test/src/BCPTSetupCardTest.Codeunit.al @@ -131,6 +131,7 @@ codeunit 144741 "BCPT Setup Card Test" BCPTSetupCard: TestPage "BCPT Setup Card"; ActualNoOfIterations: Integer; UnexpectedNoOfSqlStmtsLbl: Label 'Unexpected value in %1. Expected %2, Actual %3', Locked = true; + OrValueLbl: Label '%1 or %2', Locked = true; begin Initialize(); @@ -152,7 +153,7 @@ codeunit 144741 "BCPT Setup Card Test" // counts 2 extra SQL statements from system tables. Therefore the total is either ActualNoOfIterations or ActualNoOfIterations + 2. Assert.IsTrue( BCPTSetupCard.BCPTLines.NoOfSQLStmts.AsInteger() in [ActualNoOfIterations, ActualNoOfIterations + 2], - StrSubstNo(UnexpectedNoOfSqlStmtsLbl, BCPTLogEntry.FieldCaption("No. of SQL Statements"), StrSubstNo('%1 or %2', ActualNoOfIterations, ActualNoOfIterations + 2), BCPTSetupCard.BCPTLines.NoOfSQLStmts.AsInteger())); + StrSubstNo(UnexpectedNoOfSqlStmtsLbl, BCPTLogEntry.FieldCaption("No. of SQL Statements"), StrSubstNo(OrValueLbl, ActualNoOfIterations, ActualNoOfIterations + 2), BCPTSetupCard.BCPTLines.NoOfSQLStmts.AsInteger())); BCPTSetupCard.BCPTLines.AvgSQLStmts.AssertEquals(1); BCPTSetupCard.Close(); end; From 44aa0ab268185b39d6f26e44f86dfdc92bcb8e3c Mon Sep 17 00:00:00 2001 From: aholstrup1 Date: Thu, 23 Jul 2026 13:23:34 +0200 Subject: [PATCH 2/3] Skip execute-permissions verification for src/Tools apps Adding the Tools apps to the System Application Modules project ran them through the project's PreCompileApp execute-permissions check, which is a public-CI-only guard not present in the internal build. Tools apps (test framework, performance toolkit, AI test toolkit) are dev/test tooling and were never subject to this check, so exempt anything under src/Tools while keeping the guard on System Application and Business Foundation. Copilot-Session: b1498119-78c5-4792-bfb9-f8b791782ab3 --- .../System Application Modules/.AL-Go/PreCompileApp.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/projects/System Application Modules/.AL-Go/PreCompileApp.ps1 b/build/projects/System Application Modules/.AL-Go/PreCompileApp.ps1 index 1f18c2f9a8d..cf9d8733f83 100644 --- a/build/projects/System Application Modules/.AL-Go/PreCompileApp.ps1 +++ b/build/projects/System Application Modules/.AL-Go/PreCompileApp.ps1 @@ -13,6 +13,13 @@ if($appType -eq 'app') # iterate through all projects in the workspace file foreach ($project in $workspace.folders) { $appFolder = $project.path + # The execute-permissions check applies to the System Application and Business Foundation + # modules. Apps under src/Tools (test framework, performance toolkit, etc.) are dev and + # test tooling and are exempt. + if ($appFolder -match '[\\/]src[\\/]Tools[\\/]') { + Write-Host "Skipping execute permissions verification for Tools app folder: $appFolder" + continue + } Write-Host "Verifying execute permissions for app folder: $appFolder" . $scriptPath -AppFolder $appFolder } From 17a44d193d44bd3934922da385d6b36692123762 Mon Sep 17 00:00:00 2001 From: aholstrup1 Date: Thu, 23 Jul 2026 15:49:41 +0200 Subject: [PATCH 3/3] Build Tools apps as test-type instead of skipping permission check Instead of exempting src/Tools from VerifyExecutePermissions via a PreCompileApp hook, move the Tools apps (Performance Toolkit, AI Test Toolkit, Test Framework libraries, Test Runner) into testFolders. They then compile as appType 'test', so the execute-permissions check (gated on appType -eq 'app') skips them naturally, matching the internal build which treats everything under Tools as a test module. No app-type System Application or Business Foundation module depends on the moved apps, so nothing in this job breaks. Reverts the earlier PreCompileApp.ps1 change. Copilot-Session: b1498119-78c5-4792-bfb9-f8b791782ab3 --- .../.AL-Go/PreCompileApp.ps1 | 7 ------- .../System Application Modules/.AL-Go/settings.json | 12 ++++++------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/build/projects/System Application Modules/.AL-Go/PreCompileApp.ps1 b/build/projects/System Application Modules/.AL-Go/PreCompileApp.ps1 index cf9d8733f83..1f18c2f9a8d 100644 --- a/build/projects/System Application Modules/.AL-Go/PreCompileApp.ps1 +++ b/build/projects/System Application Modules/.AL-Go/PreCompileApp.ps1 @@ -13,13 +13,6 @@ if($appType -eq 'app') # iterate through all projects in the workspace file foreach ($project in $workspace.folders) { $appFolder = $project.path - # The execute-permissions check applies to the System Application and Business Foundation - # modules. Apps under src/Tools (test framework, performance toolkit, etc.) are dev and - # test tooling and are exempt. - if ($appFolder -match '[\\/]src[\\/]Tools[\\/]') { - Write-Host "Skipping execute permissions verification for Tools app folder: $appFolder" - continue - } Write-Host "Verifying execute permissions for app folder: $appFolder" . $scriptPath -AppFolder $appFolder } diff --git a/build/projects/System Application Modules/.AL-Go/settings.json b/build/projects/System Application Modules/.AL-Go/settings.json index fe0e74c5164..28784f35e56 100644 --- a/build/projects/System Application Modules/.AL-Go/settings.json +++ b/build/projects/System Application Modules/.AL-Go/settings.json @@ -5,11 +5,7 @@ "../../../src/System Application/App/*", "../../../src/System Application/App", "../../../src/Business Foundation/App/*", - "../../../src/Business Foundation/App", - "../../../src/Tools/Performance Toolkit/App", - "../../../src/Tools/AI Test Toolkit", - "../../../src/Tools/Test Framework/Test Libraries/*", - "../../../src/Tools/Test Framework/*" + "../../../src/Business Foundation/App" ], "testFolders": [ "../../../src/System Application/Test/*", @@ -22,7 +18,11 @@ "../../../src/Business Foundation/Test Library/*", "../../../src/Business Foundation/Test", "../../../src/Business Foundation/Test Library", - "../../../src/Tools/Performance Toolkit/Test" + "../../../src/Tools/Performance Toolkit/App", + "../../../src/Tools/Performance Toolkit/Test", + "../../../src/Tools/AI Test Toolkit", + "../../../src/Tools/Test Framework/Test Libraries/*", + "../../../src/Tools/Test Framework/*" ], "doNotPublishApps": true, "rulesetFile": "../../../src/rulesets/internal.module.ruleset.json",