Skip to content

docs(design): PIP-7 lessons learned + concurrent-path discipline memory - #5596

Merged
oferchen merged 1 commit into
masterfrom
docs/pip-lessons-concurrent-discipline
Jun 10, 2026
Merged

oferchen merged 1 commit into
masterfrom
docs/pip-lessons-concurrent-discipline

Conversation

@oferchen

@oferchen oferchen commented Jun 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • New post-mortem docs/design/pip-7-lessons-learned.md generalises the PIP-7 receiver-corruption defect into a broader discipline: sequential-ordering unit tests passed, the corruption only surfaced under adversarial chunk arrival at the dispatch boundary, and the same shape applies to every future concurrent path (DASYNC, RUSSH-ASY, ASY-G, DG-series races).
  • Feedback memory note (out-of-tree, in private project memory) codifies the rule: any new concurrent code path must ship with adversarial-ordering stress fuzz BEFORE flipping default-on.
  • Section 4 of the post-mortem distils 5 minimal test scenarios from PIP-9.c that would have caught PIP-7 earlier (threshold-trip mid-batch, reverse-completion within a file, first-file dispatch after pipeline construction, slot recycle while DecrementGuard alive, cross-file chunk arrival).
  • New fuzz target parallel_receive_delta_adversarial drives ParallelDeltaApplier with adversarial chunk orderings and asserts a SHA-256 oracle against the sequential reference. Seeded corpus carries forward the PIP-7 threshold-trip and DG-3 slot-recycle regression shapes as a permanent floor.

Test plan

  • Corpus seeds load: confirm pip_7_threshold_trip.bin (154 B) and dg_3_slot_recycle_race.bin (562 B) parse under the fuzz target's binary format and produce non-zero record counts.
  • Memory note format check: feedback_concurrent_path_discipline.md matches the existing feedback-frontmatter pattern (name, description, metadata.type=feedback) and the MEMORY.md User Feedback index links it.
  • All cross-referenced files exist in-tree (pip-7-parallel-receive-delta-receiver-corruption-2026-05-22.md, pip-9-parallel-receive-delta-wire-up-2026-05-22.md, pip-10b-adversarial-chunk-ordering-stress.md, crates/engine/tests/parallel_apply_dg3_stress.rs, crates/engine/tests/parallel_apply_concurrent.rs).

Bundles the PIP-LESSONS series (#4000-#4003) as a single docs change:

- docs/design/pip-7-lessons-learned.md captures the broader lesson from
  the PIP-7 receiver-corruption defect. The defect post-mortem already
  lives in pip-7-parallel-receive-delta-receiver-corruption-2026-05-22.md;
  this new doc generalises it: sequential-ordering unit tests passed,
  the corruption only surfaced under adversarial chunk arrival at the
  dispatch boundary. The discipline applies to every future concurrent
  path (DASYNC, RUSSH-ASY, ASY-G, DG-series races): ship adversarial-
  ordering stress fuzz BEFORE flipping default-on.

- fuzz/fuzz_targets/parallel_receive_delta_adversarial.rs drives
  ParallelDeltaApplier with adversarial chunk orderings and asserts a
  SHA-256 oracle against the sequential reference.

- fuzz/corpus/parallel_receive_delta_adversarial/ seeds the corpus with
  the two known regression shapes:
    - pip_7_threshold_trip.bin: the threshold-trip mid-batch ordering
      that caught PIP-7 (file_0 dispatched after later files).
    - dg_3_slot_recycle_race.bin: the reverse-interleaved ordering that
      stresses the slot-recycle race shape from the DG-3 series.

- fuzz/Cargo.toml: adds engine and sha2 deps for the new target.
@oferchen
oferchen force-pushed the docs/pip-lessons-concurrent-discipline branch from 9d9137c to 596ad7b Compare June 10, 2026 18:49
@oferchen
oferchen merged commit 05b06c4 into master Jun 10, 2026
11 checks passed
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 10, 2026
@oferchen
oferchen deleted the docs/pip-lessons-concurrent-discipline branch June 11, 2026 03:12
oferchen added a commit that referenced this pull request Aug 24, 2026
…ry (#5596)

Bundles the PIP-LESSONS series (#4000-#4003) as a single docs change:

- docs/design/pip-7-lessons-learned.md captures the broader lesson from
  the PIP-7 receiver-corruption defect. The defect post-mortem already
  lives in pip-7-parallel-receive-delta-receiver-corruption-2026-05-22.md;
  this new doc generalises it: sequential-ordering unit tests passed,
  the corruption only surfaced under adversarial chunk arrival at the
  dispatch boundary. The discipline applies to every future concurrent
  path (DASYNC, RUSSH-ASY, ASY-G, DG-series races): ship adversarial-
  ordering stress fuzz BEFORE flipping default-on.

- fuzz/fuzz_targets/parallel_receive_delta_adversarial.rs drives
  ParallelDeltaApplier with adversarial chunk orderings and asserts a
  SHA-256 oracle against the sequential reference.

- fuzz/corpus/parallel_receive_delta_adversarial/ seeds the corpus with
  the two known regression shapes:
    - pip_7_threshold_trip.bin: the threshold-trip mid-batch ordering
      that caught PIP-7 (file_0 dispatched after later files).
    - dg_3_slot_recycle_race.bin: the reverse-interleaved ordering that
      stresses the slot-recycle race shape from the DG-3 series.

- fuzz/Cargo.toml: adds engine and sha2 deps for the new target.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant