feat(linear-static-3d-euler-beam): step 17 - parallel-for-tbb-review-fix
This commit is contained in:
@@ -681,3 +681,38 @@
|
||||
- handoff: Step 18 can inject either backend for independent element-local
|
||||
computation into caller-owned stable element-order slots before its separate
|
||||
deterministic COO-to-CSR reduction.
|
||||
|
||||
### Step 17 Review Fix Round 1 — atomic test evidence
|
||||
|
||||
- classification: test-evidence reliability hardening; no production defect
|
||||
was observed or corrected.
|
||||
- baseline_GREEN: before changing the test,
|
||||
`ctest --test-dir .harness/build -C Debug -R ParallelFor --output-on-failure`
|
||||
exited 0 with the existing production adapter passing 3/3. Because the
|
||||
review changes only how a test observes duplicate callbacks, no
|
||||
implementation-owned RED was expected or manufactured.
|
||||
- reliability_issue: the prior `std::vector` scalar writes were race-free only
|
||||
if the exact-once contract was already true. A duplicate concurrent callback
|
||||
for one index could write the same non-atomic scalar concurrently, making the
|
||||
negative case undefined instead of a deterministic test failure.
|
||||
- correction: T17-PFOR-001 now uses an explicitly initialized atomic zero-count
|
||||
counter and explicitly initialized per-index atomic visit counters.
|
||||
T17-PFOR-002 uses explicitly initialized atomic serial/TBB output slots plus
|
||||
per-index atomic visit counters. All callback increments use
|
||||
`fetch_add(1, memory_order_relaxed)` and post-execution assertions require
|
||||
every count to equal one, so duplicate same-index callbacks are observed
|
||||
without a data race. Output stores/loads are relaxed atomics because only
|
||||
per-slot observation is required after the blocking adapter returns.
|
||||
- scope: only `tests/unit/assembly/parallel_for_test.cpp`, this cumulative
|
||||
Step 17 section, and the ignored `task-17-report.md` changed. Production,
|
||||
CMake, the phase index, upstream contracts, and reference artifacts were not
|
||||
modified in this review round; the exact three test names remain unchanged.
|
||||
|
||||
| stage | exact command | exit_code | observed_result |
|
||||
| --- | --- | ---: | --- |
|
||||
| REVIEW1-baseline-GREEN | `ctest --test-dir .harness/build -C Debug -R ParallelFor --output-on-failure` | 0 | existing correct production passed 3/3 before test hardening; no implementation RED expected |
|
||||
| REVIEW1-VERIFY-build | `cmake --build .harness/build --config Debug` | 0 | C++17 atomic test evidence compiled and linked under MSVC `/W4 /WX` without a warning |
|
||||
| REVIEW1-VERIFY-targeted | `ctest --test-dir .harness/build -C Debug -R ParallelFor --output-on-failure` | 0 | hardened exact three ParallelFor tests passed 3/3 |
|
||||
| REVIEW1-VERIFY-discovery | `ctest --test-dir .harness/build -C Debug --show-only=json-v1` | 0 | 42 tests discovered, including the unchanged three exact ParallelFor names |
|
||||
| REVIEW1-VERIFY-full | `ctest --test-dir .harness/build -C Debug --output-on-failure` | 0 | full accumulated suite passed 42/42 |
|
||||
| REVIEW1-VERIFY-scans | public TBB leak, production scope, atomic reliability, reference, and diff/whitespace scans | 0 | public leaks 0; forbidden production scope 0; atomic vectors 5; relaxed duplicate counters 4; legacy non-atomic visit/output paths 0; reference unchanged; diff clean |
|
||||
|
||||
Reference in New Issue
Block a user