#3178

Fix repeated SECTIONs in one test cycle

Opentianrkingwants to merge intofrom

Summary

  • reject a previously-open SECTION when the same source location is encountered again after the current test cycle has completed
  • add tracker-level coverage for the repeated nested-section path

Root cause

A helper called twice in the same test cycle can reacquire a section that is still marked open after one of its children completed the cycle. The second acquisition skips reopening it, but the public section wrapper still treats it as open and later closes it from an invalid tracker position, causing a hang or crash.

Validation

  • cmake --build build --config Debug --target SelfTest --parallel 1
  • build/tests/Debug/SelfTest.exe "Tracker rejects a section encountered twice in one cycle" --reporter compact
  • build/tests/Debug/SelfTest.exe "Tracker" --reporter compact
  • a standalone nested-section reproducer: baseline hangs; with this change it fails immediately with a controlled Catch2 error

Fixes #2802