Skip to content

Run test codeunits in ID order (#209) - #213

Merged
StefanMaron merged 1 commit into
masterfrom
run-test-codeunits-in-id-order
Nov 3, 2026
Merged

StefanMaron merged 1 commit into
masterfrom
run-test-codeunits-in-id-order

Conversation

@StefanMaron

Copy link
Copy Markdown
Collaborator

Fixes #209. This is not a BC 27.5 problem and not a permission difference in the tier. It comes from the order run-tests.sh runs codeunits in.

Cause. run-tests.sh took the codeunit list from the app's SymbolReference.json and kept that file's order, for example 94807, 94896, 94897, 94808. It also did this to the sorted list run-tests-hybrid.py passes it. BC caches Execute checks per session (NavSession.verifyExecutePermissionCollection), so what an earlier codeunit did changes what a later one may do. In the failing cases, NavForm.OpenFormAsync refuses Execute on the page's source table, and the page aborts with "has to close".

It looked specific to BC 27.5 because 27.x only has the websocket runner. BC 28+ sends these codeunits to the hub runner, and run-tests-altool.py already sorted by ID.

Measured with the corpus's probes (lt-y90-perm-shapes, with the #if BC28PLUS cases turned on):

BC Codeunits Order Y90_Open_CaptionAndGrants, Y90_Open_CodeunitStarSystemStarSet
28.5 94808 only - fail
28.5 94807, 94808 ID pass
27.5 and 28.5 94807-94810, 94896, 94897 symbol file fail
27.5 and 28.5 94807-94810, 94896, 94897 ID pass

With ID order, Y90_Part_ExactA and Y90_Part_ExactB also pass on BC 27.5. They passed in my symbol-order run too, so I did not reproduce that part of the issue locally. It may need the corpus's full batch.

What I did not establish:

  • I did not find which test in 94896 or 94897 changes the cache, or how.
  • I have no Windows run of my own. BcContainerHelper loads the suite with a range filter, so I expect ID order there, but I read that from its scripts and did not observe it.

No regression test. The order depends on how the compiler writes the symbol file, so a smoke test cannot force it.

Effect on consumers. Codeunits now run in a different order on the websocket runner. A corpus test that passed only because of the old order may change result. That is the same kind of difference as this issue, and ID order is the order the hub runner already uses.

https://claude.ai/code/session_01B5GPNVNEoh5CSGzgTPEthD

run-tests.sh ran codeunits in the order of the app's SymbolReference.json.
BC caches Execute checks per session, so the order changes what a later
codeunit may open under an exact permission set. The altool runner already
sorts by ID.

Claude-Session: https://claude.ai/code/session_01B5GPNVNEoh5CSGzgTPEthD
@StefanMaron
StefanMaron merged commit 622646e into master Nov 3, 2026
21 checks passed
@StefanMaron
StefanMaron deleted the run-test-codeunits-in-id-order branch November 3, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BC 27.5: page-trigger codeunit calls and unguarded parts abort under an exact permission set on Linux, but open on Windows

1 participant