test(job-array-single-wal-record): close remaining array expansion gaps

Adds 2 targeted tests after confirming tasks 3.1/3.2/3.3 already
cover most of this task's observable criteria:
- N-way expansion swept across sizes {2,3,100,1000} with exact-
  endpoint non-leakage checks (existing coverage only tested size 5)
- Requirement 5.2 (individually addressable exactly as a per-element
  job) exercised through the real production command dispatch
  (job_ctrl(), not the raw key_find() every existing test used) --
  confirms an array-expanded element can be cancelled by identity,
  siblings stay untouched, and an out-of-range jobid is rejected

Idempotent no-op, forced-failure-then-retry, and partial-reapply
were already fully covered by 3.1/3.2 -- no new tests needed.
Requirement 9.4's node-fencing behavior is confirmed out of this
task's boundary (Live Apply Resource Fence, task 4.x); restore_job_
array()'s own atomicity contract that the fence depends on is
already proven. No production code changed -- test-only.

Task 3.4 of job-array-single-wal-record.
This commit is contained in:
Rongsong Shen 2026-07-15 02:56:20 +00:00
parent b0c7cfe548
commit 107e3839d9
2 changed files with 158 additions and 1 deletions

View file

@ -73,7 +73,7 @@
- _Requirements: 3.1, 3.2, 4.1 — delivered by task 3.2 alone (see Implementation Notes); this task is defensive parity, not an independent delivery path_
- _Boundary: Array Apply Expansion_
- [ ] 3.4 Unit tests for array expansion
- [x] 3.4 Unit tests for array expansion
- Verify N-way expansion produces the correct contiguous set of element identities for several array sizes
- Verify idempotent re-apply of an already-fully-applied record is a no-op that creates nothing new
- Verify, using 3.1's forceable failure point, that a failure partway through leaves nothing visible, and that a subsequent successful retry produces the complete, non-duplicated set