Skip to content

Suppress false assumed-(required) handling for primitive entity IDs and merge compiler dependency updates#301

Draft
Copilot wants to merge 16 commits into
masterfrom
copilot/fix-false-warning-for-required-id
Draft

Suppress false assumed-(required) handling for primitive entity IDs and merge compiler dependency updates#301
Copilot wants to merge 16 commits into
masterfrom
copilot/fix-false-warning-for-required-id

Conversation

Copy link
Copy Markdown

Copilot AI commented May 13, 2026

Entity state IDs are implicitly treated as (required), but that assumption was leaking onto primitive IDs such as int32, producing misleading warnings and incorrect validation behavior. This change narrows implicit required handling to field types that actually support (required).

This branch also now includes the merged changes from the dependency-update work on bump-compilers, so the resulting PR contains both the primitive-ID fix and the latest compiler/dependency refresh.

  • Behavior change

    • Skip generated (required) validation for implicitly required IDs whose field type does not support the option.
    • This prevents primitive entity IDs from being treated as missing/invalid solely because they are the first field.
  • Regression coverage

    • Add a validating test fixture for an entity state with an int32 ID.
    • Add runtime coverage asserting such a message remains valid when the primitive ID is omitted.
    • Add compiler-side coverage asserting no warning is emitted for the implicit primitive ID case.
  • Merged dependency update scope

    • Pull in updated local dependencies on recently updated CoreJvm Compiler, Time, and Validation.
    • Include the related build, config, docs, and test updates from the merged branch.
    • Preserve the primitive-ID safeguard while resolving the RequiredGenerator changes introduced by the dependency update.
  • Why this matters

    • Keeps implicit entity ID conventions aligned with actual (required) semantics.
    • Avoids diagnostics that imply a field is incorrectly using (required) when the field was only inferred by convention.
    • Brings this branch up to date with the latest compiler/dependency changes that were requested to be merged in.

Example covered by the change:

message NumberStats {
    option (entity).kind = ENTITY;
    int32 id = 1;
}

Before this change, the first field could be treated as implicitly (required) despite int32 not supporting that option. With this update, primitive IDs like the above are ignored by required-field generation.

Copilot AI self-assigned this May 13, 2026
Copilot AI review requested due to automatic review settings May 13, 2026 21:16
Copilot AI review requested due to automatic review settings May 13, 2026 21:16
Agent-Logs-Url: https://github.com/SpineEventEngine/validation/sessions/c0c59d00-5e83-41d0-8488-c2618a6ea31a

Co-authored-by: alexander-yevsyukov <3116444+alexander-yevsyukov@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 13, 2026 21:28
Copilot AI changed the title [WIP] Fix false warning for assumed required ID of entity state Suppress false assumed-(required) handling for primitive entity IDs May 13, 2026
Copilot AI requested a review from alexander-yevsyukov May 13, 2026 21:31
@alexander-yevsyukov
Copy link
Copy Markdown
Collaborator

@copilot, please merge in the changes from this PR: #306

…o copilot/fix-false-warning-for-required-id

# Conflicts:
#	java/src/main/kotlin/io/spine/tools/validation/java/generate/option/RequiredGenerator.kt

Co-authored-by: alexander-yevsyukov <3116444+alexander-yevsyukov@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 20, 2026 00:38
Copy link
Copy Markdown
Author

Copilot AI commented May 20, 2026

@copilot, please merge in the changes from this PR: #306

Merged PR #306 into this branch and resolved the single conflict in RequiredGenerator.kt in 1a055d6.

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:

  • checkstyle.org
    • Triggering command: /opt/hostedtoolcache/CodeQL/2.25.1/x64/codeql/tools/linux64/java/bin/java /opt/hostedtoolcache/CodeQL/2.25.1/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.25.1/x64/codeql/xml/tools/xml-extractor.jar --fileList=/tmp/codeql-scratch-250614b4c3c0c5e1/dbs/java/working/files-to-index6893641623374540969.list --sourceArchiveDir=/tmp/codeql-scratch-250614b4c3c0c5e1/dbs/java/src --outputDir=/tmp/codeql-scratch-250614b4c3c0c5e1/dbs/java/trap/java --global ash copilot.originalgit (dns block)
  • 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:&#43;UseParallelGC -Xmx4096m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)
  • www.puppycrawl.com
    • Triggering command: /opt/hostedtoolcache/CodeQL/2.25.1/x64/codeql/tools/linux64/java/bin/java /opt/hostedtoolcache/CodeQL/2.25.1/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.25.1/x64/codeql/xml/tools/xml-extractor.jar --fileList=/tmp/codeql-scratch-250614b4c3c0c5e1/dbs/java/working/files-to-index6893641623374540969.list --sourceArchiveDir=/tmp/codeql-scratch-250614b4c3c0c5e1/dbs/java/src --outputDir=/tmp/codeql-scratch-250614b4c3c0c5e1/dbs/java/trap/java --global ash copilot.originalgit (dns block)

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

Copilot AI changed the title Suppress false assumed-(required) handling for primitive entity IDs Suppress false assumed-(required) handling for primitive entity IDs and merge compiler dependency updates May 20, 2026
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.

False warning for assumed (required) ID of entity state with the int32 type

2 participants