refactor(skill): move generic functional style ownership out of streams#52
Open
martinfrancois wants to merge 2 commits into
Open
refactor(skill): move generic functional style ownership out of streams#52martinfrancois wants to merge 2 commits into
martinfrancois wants to merge 2 commits into
Conversation
Keep java-streams focused on stream and collector semantics while documenting java-functional-style as the owner for generic lambda, identity-function, supplier-laziness, no-op callback stage, and callback readability guidance. Existing stream eval criteria are left unchanged so the composed setup can be compared against the frozen baseline before any eval cleanup. Co-Authored-By: marvinbuff <marvinbuff@hotmail.com> Co-Authored-By: PReimers <preimers@pm.me>
Tighten stream-specific review guidance for ordered findFirst replacements and external-mutation performance claims, and add a narrow bridge for applying the companion callback rules inside stream pipelines. This keeps stream semantics in java-streams while allowing composed java-streams plus java-functional-style runs to satisfy existing focused callback-shape coverage without restoring generic functional-style ownership to streams. Co-Authored-By: marvinbuff <marvinbuff@hotmail.com> Co-Authored-By: PReimers <preimers@pm.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
java-streamswas carrying generic Java lambda and functional-interface style guidance alongside stream and collector semantics.java-functional-styleowns cross-cutting callback readability, identity functions, and no-op functional stages.Change Type
Linked Issue
User-Visible Behavior
java-streamsnow presents itself as the owner of stream and collector semantics: terminal operation choice, collector choice, duplicate-key and null behavior, encounter order, primitive streams, Java-version compatibility, parallel streams, gatherers, and stream-specific behavior preservation.Generic lambda and functional-interface cleanup is delegated to
martinfrancois/java-functional-style, which should be installed with this package when stream cleanup also involves non-trivial callbacks, identity functions, no-op functional stages, supplier laziness, or callback side effects.Bug Fix Details
Ownership Boundary
Moved out of streams: canonical guidance for method references, identity functions, no-op functional stages, multi-line/block callback extraction, supplier laziness as general callback style, and generic callback side-effect readability.
Kept in streams: terminal operation choice, collector semantics, duplicate keys, null keys/values, encounter order, primitive streams,
findFirstversusfindAny,parallelStream,Gatherers.mapConcurrent, stream Java-version compatibility, and stream behavior preservation.Issue #44 status:
Function.identity()is canonicaljava-functional-styleguidance. Streams keeps collector-shaped composition coverage and semantic warnings for merge functions, map suppliers, ordering expectations, key/value mappers, and Java baseline compatibility.Composition Gate
No PR was opened before the stream composition quality gate passed.
Criterion-level requirement:
current java-streams behavior <= slimmed java-streams + java-functional-style behavioron the existing stream evals.Final composed eval results after the last stream runtime-context change:
Because every retained scenario reached 100% under the composed setup, the composed result is equal or better than the baseline at criterion level, including the PR #37 affected lambda scenarios.
Validation
Checks most contributors can run:
python3 scripts/validate_skill.py skills/java-streams-> passedpython3 scripts/validate_eval_criteria.py evals evals-reference evals-regression-> passed,Validated 29 scenario(s): 11 natural, 18 explicit.python3 -m py_compile scripts/*.py-> passedbash -n scripts/*.sh-> passedpython3 scripts/validate_json_files.py-> passedpython3 scripts/validate_openai_agent_yaml.py-> passedtessl plugin lint .-> passedTessl-authenticated checks:
tessl review run --workspace martinfrancois --threshold 100 skills/java-streams/SKILL.md-> 100, run019f11af-6549-7278-98b9-770a69d3578c019f11b4-86f8-71cc-b4c6-c45ecaaa1014019f11b9-01a4-753d-b95a-b60541477283019f11c4-7244-7233-b28d-2038693a8854Details:
Human Verification
Review Checklist
docs/agents/workflow.md, or any Tessl blocker is documented.AI Assistance (if used)
AI prompts / session logs (optional)