8000 chore(wave3): foundation — FaultInjectingBackend, fuzz/ crate, proptest by adityamukho · Pull Request #254 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

chore(wave3): foundation — FaultInjectingBackend, fuzz/ crate, proptest - #254

Merged
adityamukho merged 16 commits into
mainfrom
wave3/pr1-foundation
May 16, 2026
Merged

adityamukho merged 16 commits into
mainfrom
wave3/pr1-foundation

Conversation

@adityamukho
Copy link
Copy Markdown
Collaborator

Wave 3 PR 1 — Foundation

Infrastructure prerequisite for all Wave 3 reliability work. No test content — this PR is pure infrastructure that unblocks PRs 2–4.

Changes

src/storage/backend/fault_inject.rs (new, #[cfg(test)])

  • FaultInjectingBackend<B> wraps any StorageBackend and injects io::Error on configurable write/sync/close call counts
  • FaultConfig with fail_write_after, fail_sync_after, fail_close_after thresholds
  • with_config() constructor returns (backend, Arc<Mutex<FaultConfig>>) for mid-scenario reconfiguration
  • 4 unit tests covering write fault, sync fault, read pass-through, and mid-scenario config update

Cargo.toml

  • proptest = "1" added to [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
  • "fuzz" added to workspace members

fuzz/ (new cargo-fuzz crate)

  • 6 stub fuzz targets: wal_entry, file_header, fact_page, btree_page, datalog_parser, datalog_eval
  • Stubs are replaced with real implementations in PRs 2 and 4

Unblocks

#209, #210, #213, #214, #221

🤖 Generated with Claude Code

adityamukho and others added 16 commits May 15, 2026 15:19
…le optimization)

Covers issues #207 and #206: extends optimizer::plan() to accept Expr
clauses and interleave them at the earliest position where their variables
are bound, and routes the StratifiedEvaluator mixed-rules path through
the updated planner.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d rules)

TDD plan covering optimizer.rs, matcher.rs, executor.rs, evaluator.rs,
and a new Criterion benchmark. 9 tasks, each with exact file paths,
code blocks, and expected test output.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…#205)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a concise 'WASM omission' comment at every existing and planned
#[cfg(not(feature = "wasm"))] ordering gate explaining why sorting is
disabled on WASM targets (small datasets, deterministic behaviour).
The full rationale lives in the selectivity_score() doc comment;
all other sites reference it with a short cross-reference.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers all 11 issues (#209, #210, #212, #213, #214, #215, #216, #217,
#219, #220, #221) across 6 PRs. Key decisions: cargo-fuzz for binary
fuzzing, FaultInjectingBackend wrapper for fault injection, proptest +
reference evaluator for semantic property tests, cargo-llvm-cov for
coverage gates.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- PR 1: foundation (FaultInjectingBackend, fuzz/ crate, proptest)
- PR 2: WAL cluster (#209, #210, #214)
- PR 3: storage/migration (#215, #216, #217)
- PR 4: query correctness (#221, #213, #212)
- PR 5: long-haul smoke suite (#220)
- PR 6: XTDB/Datomic compat corpus (#219)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…jectingBackend

- Remove unused `FaultInjectingBackend::new` constructor (only `with_config` is used)
- Collapse nested `if let Some(n)` + `if *count >= n` into `is_some_and` in `check_and_increment`
- Replace `io::Error::new(io::ErrorKind::Other, ...)` with `io::Error::other(...)`
- Move `proptest` from `[dev-dependencies]` to `[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
codecov Bot commented May 16, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@adityamukho
adityamukho merged commit a613d2a into main May 16, 2026
36 checks passed
@adityamukho
adityamukho deleted the wave3/pr1-foundation branch May 16, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4C34

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0