Skip to content

Commit cb7337f

Browse files
fix: tighten stream audit edge guidance
1 parent daece07 commit cb7337f

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

evals-reference/08-primary-contact-review/criteria.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"name": "Review is concise and focused",
3737
"category": "maintainability",
3838
"max_score": 5,
39-
"description": "Keeps the review focused on stream ordering and parallelism; brief scan notes or small supporting structure are acceptable if they do not distract from the decision."
39+
"description": "Keeps the review focused on stream ordering and parallelism; do not deduct for brief references to the hard-stop scan/checklist or small supporting structure if they do not distract from the decision."
4040
}
4141
],
4242
"metadata": {

skills/java-streams/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ Keep these rules in view:
6161
5. Choose collectors by result semantics, and state duplicate-key/null contracts explicitly. When a
6262
later step needs an expensive check result, carry `element + result` with a baseline-compatible
6363
holder; use `Map.entry` only on Java 9+ when both values are non-null.
64+
For blocking remote checks, also state the concurrency bound, timeout behavior, and error
65+
propagation/retry policy instead of leaving those implicit.
6466
6. Preserve ordering, mutability, and short-circuit behavior. For top-N, sort before `limit`; for
6567
nullable sort keys, filter or use `Comparator.nullsFirst/nullsLast`; for mutable results, keep a
6668
mutable collector.

skills/java-streams/references/hard-stops.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ Use parallel streams only after checking:
5757
4. The pipeline does not perform blocking IO or remote calls. For Java 24+ blocking per-element
5858
calls, consider `Gatherers.mapConcurrent` only when the baseline supports it and virtual-thread
5959
concurrency is the intended design. Preserve element/result association explicitly with
60-
a baseline-compatible holder rather than null sentinels or side maps.
60+
a baseline-compatible holder rather than null sentinels or side maps. For remote calls, call out
61+
the concurrency limit, timeout handling for slow calls, and error propagation/retry policy.
6162
5. The terminal/collector is safe under parallel execution.
6263

6364
For acceptable CPU-heavy parallel streams, state that the benefit should be measured or benchmarked
@@ -80,4 +81,6 @@ rg -nUP "count\\(\\)\\s*>\\s*0|collect\\([^;]+\\)\\s*\\.\\s*(?:isEmpty|size)\\(|
8081
```
8182

8283
For each hit, decide whether it is legitimate for the project Java baseline and behavior. Fix
83-
stream-quality issues. If a marker remains because it is legitimate, state why.
84+
stream-quality issues. If a marker remains because it is legitimate, state why. When an audit asks
85+
for allowed stream markers or allowed usages, also call out plain `count()` when it is the requested
86+
numeric result rather than a `count() > 0` existence check.

0 commit comments

Comments
 (0)