Fix AA0217 in BCPT Setup Card test and build System App Modules under strict ruleset#9685
Merged
Conversation
…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
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
spetersenms
previously approved these changes
Jul 23, 2026
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
aholstrup1
enabled auto-merge
July 23, 2026 13:50
mazhelez
approved these changes
Jul 23, 2026
aholstrup1
disabled auto-merge
July 23, 2026 20:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The internal NAV
BuildAppModulesCleanvalidation broke (Bug 643259) witherror AA0217: Use a text constant or label for format string in StrSubstNoinBCPTSetupCardTest.Codeunit.al. The offending line used a nestedStrSubstNo('%1 or %2', ...)with a literal format string.This passed on public BCApps CI but failed internally because of a coverage gap: the only public job that compiles under the strict
internal.module.ruleset.json(where AA0217 is an error) isSystem Application Modules (Clean), and that job does not build the Performance Toolkit from source. The Performance Toolkit is only built publicly underApps W1, which usesbase.ruleset.jsonwhere AA0217 is downgraded to a warning. So the strict ruleset and the offending file never met in public CI, while the internal build compiles every module under the strict ruleset in one pass.This PR does two things:
'%1 or %2'literal into aLockedlabel (OrValueLbl) and referencing it. Behavior is unchanged.System Application ModulesAL-Go project now also compiles the monolithic System Application / Business Foundation apps and the Tools apps (Performance Toolkit + tests, AI Test Toolkit, Test Framework libraries, Test Runner) under the strict ruleset, matching what internalBuildAppModulesCleanbuilds. This adds the 16 apps the internal build compiles that the public strict job was missing.Linked work
AB#643259
How I validated this
What I tested and the outcome
buildappmodulescleanlog:BCPTSetupCardTest.Codeunit.al(155,103): error AA0217. Confirmed the culprit is the nestedStrSubstNo('%1 or %2', ...)literal, introduced by commit a08aabe (PR Re-enable BCPT Setup Card tests: fix NoOfSqlCallsAreLogged SQL assertion (Bug 618568) #8823).System Application Modules (Clean)job log (run 29968954797) that it compiles 258 modules and never compiles the Performance Toolkit source (0 AA0217 / BCPTSetupCardTest occurrences), vs 274 in the internal build.Risk & compatibility
Tools/Performance Toolkit/Test(and the other listed apps) under the strictinternal.module.ruleset.jsonin public CI for the first time. If any of these apps carry other latent strict-ruleset violations, this job will now surface them. The known AA0217 offender is fixed in the same PR.