Skip to content

feat: add SpringNullGuard — safe Spring nullability to JSpecify migration agent - #14

Open
spargy4050v wants to merge 1 commit into
mutagent-io:mainfrom
spargy4050v:rebuild/springnullguard-clean
Open

feat: add SpringNullGuard — safe Spring nullability to JSpecify migration agent#14
spargy4050v wants to merge 1 commit into
mutagent-io:mainfrom
spargy4050v:rebuild/springnullguard-clean

Conversation

@spargy4050v

Copy link
Copy Markdown

SpringNullGuard

SpringNullGuard is a migration agent for safely modernizing legacy Spring null-safety annotations to JSpecify.

Instead of performing a textual annotation replacement, it uses structural Java analysis and verification to preserve nullability semantics, including JSpecify TYPE_USE placement.

What it does

  • Detects legacy Spring nullability annotations
  • Performs structural Java migration using OpenRewrite
  • Handles fields, parameters, returns, generics, arrays, and package defaults
  • Fails closed on ambiguous or unsupported transformations
  • Runs offline Maven baseline and proposal verification
  • Requires independent verifier PASS before developer approval
  • Performs post-apply structural and compilation verification
  • Produces auditable migration evidence and traces

Real-world validation

A Bezkoder Spring Boot project is included under:

real-world/bezkoder-sb3/

The upstream project did not contain the target Spring nullability annotation, so one representative org.springframework.lang.Nullable annotation was intentionally seeded for evaluation and is explicitly disclosed in the submission.

Migration performed:

-import org.springframework.lang.Nullable;
+import org.jspecify.annotations.Nullable;

-@Nullable
-private String description;
+private @Nullable String description;

Copilot AI lite review requested due to automatic review settings August 8, 2026 02:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@spargy4050v
spargy4050v force-pushed the rebuild/springnullguard-clean branch from 0ba9c11 to d66ee5b Compare August 8, 2026 02:50
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.

2 participants