There is a CSuite test "wt7989_compact_checkpoint" that reveals the issue when compact operation quits prematurely if run in parallel with a checkpoint.
In order to reproduce the issue, you'll need to uncomment the assert check at the bottom of
"run_test(...)" in "test/csuite/wt7989_compact_checkpoint/main.c", recompile, and run it. To get better visibility you can enable compact verbose messaging by adding "verbose=[compact,compact_progress]" to "conn_config". There're two test cases, one of them fails 100%
The scope of this ticket is to fix the failing test. Please commit the inverted assert in the test module along with the actual fix of the issue.