Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Aquaticat/Monochromatic. TypeScript and Rust monorepo: Claude Code and Pi coding-agent plugins, a m
Something went wrong. Try again.
## module-p-map-fork.fuzz
Property-based fuzz campaign for
[`@monochromatic-dev/module-p-map-fork`](../p-map-fork/README.md).
Non-runtime sidecar,
mirroring `css-edit.fuzz`:
the runtime package's `src` stays pure production code
while the workload generators,
properties,
and campaign tasks live here.
### Properties
#### Iteration invariants
On every generated workload
(mixed resolve,
reject,
sync-throw,
and skip mapper
calls,
value or promise elements,
sync or async sources,
and a generated
release-order permutation)
started mapper calls begin in input order,
every
start observes at most `concurrency` running calls,
each call settles with
its specified outcome,
and collected results follow input order minus skips.
#### Streaming invariants
The streaming variant yields mapper results in input order,
keeps the
resolved-but-unconsumed backlog within `backpressure`,
and surfaces exactly
one mapper failure through the async iterator.
#### Input totality
Any configuration input yields a run,
a stream,
or exactly one
configuration error
(`InvalidInputError`,
`MapperRequiredError`,
`InvalidConcurrencyError`,
`InvalidBackpressureError`,
or a plain `TypeError`),
never another failure mode.
#### Upstream differential oracle
The same workloads drive upstream `p-map` 7.0.8
(the dependency this fork
replaces) and the fork:
mapper start order,
per-start overlap,
settlements,
result order,
skip handling,
source pull and close counts,
streaming yields,
backpressure backlog,
and configuration error messages must all match.
### Running
```bash
# package/module/p-map-fork.fuzz/mise.toml
# Cheap default budget (200 runs per property), as part of the unit suite
mise run //package/module/p-map-fork.fuzz:test:unit
# Longer campaign
mise run //package/module/p-map-fork.fuzz:fuzz -- --runs 20000
# Coverage-reachability gate (check against the frozen baseline)
mise run //package/module/p-map-fork.fuzz:fuzz:coverage
# Refreeze the baseline after intentionally changing reachable runtime functi…