Skip to content

Confirm (validate) nested-message behavior is already covered; no code change required - #298

Closed
alexander-yevsyukov with Copilot wants to merge 1 commit into
masterfrom
copilot/validate-nested-messages
Closed

Confirm (validate) nested-message behavior is already covered; no code change required#298
alexander-yevsyukov with Copilot wants to merge 1 commit into
masterfrom
copilot/validate-nested-messages

Conversation

Copilot AI commented May 13, 2026

Copy link
Copy Markdown
Contributor

This issue asked whether (validate) = true still generates nested message validation calls, specifically for enclosed message fields. Current implementation already performs nested validate(...) invocation, and test coverage already exercises this path across singular, repeated, map, and Any-wrapped messages.

  • What was verified

    • (validate) generation for message fields invokes nested validation rather than relying on callers to manually validate nested targets.
    • No regression was found in current generator/runtime behavior.
  • Existing coverage that addresses the issue

    • tests/validating/.../ValidateITest.kt — singular/repeated/map + Any nested validation cases.
    • tests/consumer/.../ValidateRuleITest.kt — consumer-level (validate) rule behavior for enclosed messages.
    • tests/runtime/.../EnclosedMessageValidationSpec.kt — runtime enclosed-message validation semantics.
  • Code path confirmed

    • java/.../option/ValidateGenerator.kt already emits nested validation calls:
if (unpacked instanceof ValidatableMessage validatable) {
    validatable.validate(fieldPath, typeName)
        .map(ValidationError::getConstraintViolationList)
        .ifPresent(violations::addAll);
}

No source or test modifications were necessary in this PR.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.jetbrains.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -XX:MaxMetaspaceSize=1024m -XX:+UseParallelGC -Xmx4096m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI self-assigned this May 13, 2026
Copilot AI review requested due to automatic review settings May 13, 2026 18:15
Copilot AI removed the request for review from Copilot May 13, 2026 18:15
Copilot AI changed the title [WIP] Fix issue with nested message validation Confirm (validate) nested-message behavior is already covered; no code change required May 13, 2026
Copilot AI requested a review from alexander-yevsyukov May 13, 2026 18:19
@alexander-yevsyukov
alexander-yevsyukov deleted the copilot/validate-nested-messages branch July 5, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(validate) field option should generate code for calling validate() for nested messages

2 participants