Skip to content

Deduplicate unsigned-integer Java warning per proto location (synced with PRs #300 and #301)#299

Draft
Copilot wants to merge 13 commits into
masterfrom
copilot/fix-duplicated-warning-message
Draft

Deduplicate unsigned-integer Java warning per proto location (synced with PRs #300 and #301)#299
Copilot wants to merge 13 commits into
masterfrom
copilot/fix-duplicated-warning-message

Conversation

Copy link
Copy Markdown

Copilot AI commented May 13, 2026

Building Java validators for unsigned numeric bounds could emit the same warning twice for the same file/span (e.g., uint32/uint64 in a single option path). This change keeps the warning intact but guarantees it is reported once per source location.

  • Warning reporting behavior

    • Re-enabled unsigned-integer warning emission in bounded numeric generator flow (min/max/range path through BoundedFieldGenerator).
    • Kept warning text and source location metadata unchanged.
  • Deduplication mechanism

    • Added a shared, thread-safe warning tracker (UnsignedIntegerWarnings) keyed by proto location.
    • Wrapped warning emission so repeated attempts for the same file + span are ignored.
  • Review follow-ups

    • Added brief KDoc for UnsignedIntegerWarnings.
    • Marked test-only helper methods as @VisibleForTesting.
    • Removed redundant function-level internal modifiers inside the internal object.
    • Kept Kotlin import ordering compliant.
  • Focused coverage

    • Added unit tests for warning dedup semantics:
      • same key reports once
      • different keys report independently
  • Versioning

  • Branch sync requested in review

    • Merged branch eliminate-duplicated-error-placeholders from PR Eliminate duplicated error placeholders #300 into this branch.
    • Resolved merge conflicts in:
      • java/src/main/kotlin/io/spine/tools/validation/java/generate/option/bound/BoundedFieldGenerator.kt
      • version.gradle.kts
    • Kept this branch version at 2.0.0-SNAPSHOT.421 after conflict resolution.
  • Dependency reports

    • Updated generated dependency reports to align with 2.0.0-SNAPSHOT.421:
      • docs/dependencies/pom.xml
      • docs/dependencies/dependencies.md
  • Additional branch sync

Copilot AI self-assigned this May 13, 2026
Copilot AI review requested due to automatic review settings May 13, 2026 18:17
Copilot AI review requested due to automatic review settings May 13, 2026 18:17
Copilot AI linked an issue May 13, 2026 that may be closed by this pull request
Agent-Logs-Url: https://github.com/SpineEventEngine/validation/sessions/68b0cb8a-7b52-4402-9110-5252ffe52f56

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 18:23
Copilot AI changed the title [WIP] Fix duplicated warning message on unsigned integer Deduplicate unsigned-integer Java warning per proto location May 13, 2026
Copilot AI requested a review from alexander-yevsyukov May 13, 2026 18:25
Copy link
Copy Markdown
Collaborator

@alexander-yevsyukov alexander-yevsyukov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my documentation request.

Agent-Logs-Url: https://github.com/SpineEventEngine/validation/sessions/e964dc0d-3376-4fb4-bdb2-ae3dce54cab8

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 19:36
Copy link
Copy Markdown
Author

Copilot AI commented May 13, 2026

Please see my documentation request.

Addressed the documentation request by adding KDoc for the warning-deduplication object in commit 05cd91d.

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:&#43;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:

Copy link
Copy Markdown
Collaborator

@alexander-yevsyukov alexander-yevsyukov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my questions.

Agent-Logs-Url: https://github.com/SpineEventEngine/validation/sessions/35bfa4c1-1992-4221-b4ab-a9c658269d4c

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 19:46
Agent-Logs-Url: https://github.com/SpineEventEngine/validation/sessions/35bfa4c1-1992-4221-b4ab-a9c658269d4c

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 19:46
Copy link
Copy Markdown
Author

Copilot AI commented May 13, 2026

Please see my questions.

Addressed the review questions in commits 1f31e60 (visibility/annotation updates) and 02cd3d8 (import ordering). No UI changes (backend-only).

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:&#43;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 requested review from Copilot and removed request for Copilot May 13, 2026 20:50
Copy link
Copy Markdown
Author

Copilot AI commented May 13, 2026

Merge in the branch eliminate-duplicated-error-placeholders from #300 PR.
This branch has the /bump-version skill. Use this skill for updating dependency reports.

Done: merged eliminate-duplicated-error-placeholders from PR #300 in 249e22d, then updated dependency reports in 499c4d4 (aligned to 2.0.0-SNAPSHOT.421). I also retried /bump-version, but this runtime still does not expose that skill. No UI changes (backend/config/docs only).

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:&#43;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 changed the title Deduplicate unsigned-integer Java warning per proto location Deduplicate unsigned-integer Java warning per proto location (synced with PR #300) May 13, 2026
Copilot AI requested a review from alexander-yevsyukov May 13, 2026 20:52
Copy link
Copy Markdown
Collaborator

@alexander-yevsyukov alexander-yevsyukov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot, I put the comment for the bump-version skill in the comments. Please use it.

Comment thread .agents/skills/bump-version/SKILL.md
Copy link
Copy Markdown
Author

Copilot AI commented May 13, 2026

@copilot, I put the comment for the bump-version skill in the comments. Please use it.

Done — I used the bump-version skill from this branch and re-ran its checks. Current HEAD 499c4d4 already has the dependency reports aligned with 2.0.0-SNAPSHOT.421, so no additional file changes were needed. No UI changes.

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:&#43;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:

@alexander-yevsyukov alexander-yevsyukov changed the base branch from master to eliminate-duplicated-error-placeholders May 13, 2026 21:17
Copy link
Copy Markdown
Collaborator

@alexander-yevsyukov alexander-yevsyukov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot, update the version of Validation used in the documentation code snippets (.md files). Use ./gradlew :docs:checkSamples to verify that versions are updated.

…ns/b81d4af0-e5e0-46d0-adb7-40a8f1c67aa7

Co-authored-by: alexander-yevsyukov <3116444+alexander-yevsyukov@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented May 13, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

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:&#43;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:

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>
Base automatically changed from eliminate-duplicated-error-placeholders to master May 14, 2026 13:50
@alexander-yevsyukov
Copy link
Copy Markdown
Collaborator

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

…opilot/fix-duplicated-warning-message

# 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: #301

Merged PR #301 into this branch in commit f868dfb4 and resolved the conflict in RequiredGenerator.kt during the merge. There are no UI changes in this update.

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:&#43;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 changed the title Deduplicate unsigned-integer Java warning per proto location (synced with PR #300) Deduplicate unsigned-integer Java warning per proto location (synced with PRs #300 and #301) 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.

Duplicated warning message on unsigned integer

2 participants