Skip to content

Commit b69a65f

Browse files
fix: document Java gatherer preview requirements
1 parent 105b638 commit b69a65f

19 files changed

Lines changed: 55 additions & 40 deletions

File tree

.github/workflows/release-please.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ jobs:
148148
printf '{"private":true}\n' > "$commitlint_home/package.json"
149149
cp commitlint.config.cjs "$commitlint_home/commitlint.config.cjs"
150150
npm --prefix "$commitlint_home" install --silent \
151-
@commitlint/cli@21.0.1 \
152-
@commitlint/config-conventional@21.0.1
151+
@commitlint/cli@21.0.2 \
152+
@commitlint/config-conventional@21.0.2
153153
154154
commitlint_bin="$commitlint_home/node_modules/.bin/commitlint"
155155
commitlint_config="$commitlint_home/commitlint.config.cjs"

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ problems:
175175

176176
### With The Skill: `Gatherers.mapConcurrent`
177177

178+
When the project uses Java 24 with preview features enabled, `Gatherers.mapConcurrent` gives a
179+
bounded concurrent stream operation for this kind of blocking per-element work:
180+
178181
```java
179182
List<Product> favoriteProducts(User user) {
180183
return user.favoriteProducts().stream()
@@ -227,7 +230,7 @@ Good fit:
227230
- avoiding null-sensitive sorting and duplicate-key `toMap` failures;
228231
- deciding whether `parallelStream()` is actually appropriate;
229232
- choosing Java-version-compatible APIs such as `takeWhile`, `mapMulti`, `Stream.toList()`, and
230-
gatherers.
233+
gatherers. For Java 24 gatherers, the project must explicitly enable preview features.
231234

232235
Poor fit:
233236

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Review Java stream concurrency changes involving blocking per-element calls and Java 24 gatherers.
1+
Review Java stream concurrency changes involving blocking per-element calls and Java 24 preview-enabled gatherers.

evals-reference/12-remote-stock-review/criteria.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"context": "Reference review: parallelStream is a weak answer for blocking remote calls; Java 24 allows discussing Gatherers.mapConcurrent.",
2+
"context": "Reference review: parallelStream is a weak answer for blocking remote calls; Java 24 with preview features enabled allows discussing Gatherers.mapConcurrent.",
33
"type": "weighted_checklist",
44
"checklist": [
55
{
@@ -21,10 +21,10 @@
2121
"description": "Explains that parallelStream uses the common fork-join pool, remains blocking, and is not the right default for remote API calls."
2222
},
2323
{
24-
"name": "Recommends Java 24 mapConcurrent or explicit async boundary",
24+
"name": "Recommends Java 24 preview mapConcurrent or explicit async boundary",
2525
"category": "stream_quality",
2626
"max_score": 30,
27-
"description": "Recommends Gatherers.mapConcurrent with a bounded concurrency value, or an explicit executor/async design, rather than casual parallelStream."
27+
"description": "Recommends Java 24 preview-enabled Gatherers.mapConcurrent with a bounded concurrency value, or an explicit executor/async design, rather than casual parallelStream."
2828
},
2929
{
3030
"name": "Keeps sorting after stock checks",

evals-reference/12-remote-stock-review/task.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Review remote stock stream change
22

3-
Assume Java 24.
3+
Assume Java 24 with preview features enabled.
44

55
Use `$java-streams` to review this proposed change. Create `review.md` with a short review decision
66
and a safer recommendation.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Implement a Java 24 stream chain for bounded concurrent offer availability checks without using parallelStream.
1+
Implement a Java 24 preview-enabled stream chain for bounded concurrent offer availability checks without using parallelStream.

evals/01-offer-availability-mapconcurrent/criteria.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"context": "Main eval weighted implementation: lowest without-context baseline in the all-eval run; Java 24 blocking per-element remote checks should use bounded Gatherers.mapConcurrent rather than parallelStream or unbounded async work.",
2+
"context": "Main eval weighted implementation: lowest without-context baseline in the all-eval run; Java 24 preview-enabled blocking per-element remote checks should use bounded Gatherers.mapConcurrent rather than parallelStream or unbounded async work.",
33
"type": "weighted_checklist",
44
"checklist": [
55
{
6-
"name": "Creates coherent Java 24 artifact",
6+
"name": "Creates coherent Java 24 preview artifact",
77
"category": "safety",
88
"max_score": 25,
9-
"description": "Creates OfferAvailability.java with the requested method, nested types, imports, and Java 24-compatible code."
9+
"description": "Creates OfferAvailability.java with the requested method, nested types, imports, and Java 24 preview-compatible code."
1010
},
1111
{
1212
"name": "Preserves offer behavior",

evals/01-offer-availability-mapconcurrent/task.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Implement offer availability filtering
22

3-
Use `$java-streams` to create `OfferAvailability.java`. Assume Java 24.
3+
Use `$java-streams` to create `OfferAvailability.java`. Assume Java 24 with preview features
4+
enabled.
45

56
Implement:
67

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Implement a Java 24 stream chain for service-limited concurrent remote checks.
1+
Implement a Java 24 preview-enabled stream chain for service-limited concurrent remote checks.

evals/02-favorite-products-mapconcurrent/criteria.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"context": "Main eval weighted natural implementation: second-lowest without-context baseline in the all-eval run; Java 24 blocking per-element remote checks with a per-operation service concurrency limit should use a bounded stream concurrency shape rather than parallelStream or unbounded async work.",
2+
"context": "Main eval weighted natural implementation: second-lowest without-context baseline in the all-eval run; Java 24 preview-enabled blocking per-element remote checks with a per-operation service concurrency limit should use a bounded stream concurrency shape rather than parallelStream or unbounded async work.",
33
"type": "weighted_checklist",
44
"checklist": [
55
{
6-
"name": "Creates coherent Java 24 artifact",
6+
"name": "Creates coherent Java 24 preview artifact",
77
"category": "safety",
88
"max_score": 20,
9-
"description": "Creates FavoriteProducts.java with the requested method, nested types, imports, and Java 24-compatible code."
9+
"description": "Creates FavoriteProducts.java with the requested method, nested types, imports, and Java 24 preview-compatible code."
1010
},
1111
{
1212
"name": "Preserves favorite product behavior",

0 commit comments

Comments
 (0)