sourcecode 1.62.0__tar.gz → 1.63.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sourcecode-1.62.0 → sourcecode-1.63.0}/CHANGELOG.md +39 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/PKG-INFO +53 -1
- {sourcecode-1.62.0 → sourcecode-1.63.0}/README.md +52 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/pyproject.toml +1 -1
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/__init__.py +1 -1
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/cli.py +6 -3
- sourcecode-1.63.0/src/sourcecode/hibernate_strat.py +980 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/mcp/server.py +5 -1
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/migrate_check.py +21 -1
- sourcecode-1.62.0/src/sourcecode/hibernate_strat.py +0 -599
- {sourcecode-1.62.0 → sourcecode-1.63.0}/.github/workflows/build-windows.yml +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/.gitignore +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/.ruff.toml +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/CONTRIBUTING.md +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/LICENSE +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/SECURITY.md +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/raw +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/adaptive_scanner.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/architecture_analyzer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/architecture_summary.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/ast_extractor.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/cache.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/canonical_ir.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/cir_graphs.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/classifier.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/code_notes_analyzer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/confidence_analyzer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/context_scorer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/context_summarizer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/contract_model.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/contract_pipeline.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/coverage_parser.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/dependency_analyzer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/__init__.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/base.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/csproj_parser.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/dart.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/dotnet.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/elixir.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/go.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/heuristic.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/hybrid.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/java.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/jvm_ext.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/nodejs.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/parsers.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/php.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/project.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/python.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/ruby.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/rust.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/systems.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/terraform.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/detectors/tooling.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/doc_analyzer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/entrypoint_classifier.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/env_analyzer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/error_schema.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/explain.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/file_chunker.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/file_classifier.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/flow_analyzer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/format_contract.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/fqn_utils.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/git_analyzer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/graph_analyzer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/integration_detector.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/license.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/mcp/__init__.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/mcp/onboarding/__init__.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/mcp/onboarding/applier.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/mcp/onboarding/backup.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/mcp/onboarding/detector.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/mcp/onboarding/planner.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/mcp/orchestrator.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/mcp/registry.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/mcp/runner.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/mcp_nudge.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/metrics_analyzer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/openapi_surface.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/output_budget.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/path_filters.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/pr_comment_renderer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/pr_impact.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/prepare_context.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/progress.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/ranking_engine.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/redactor.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/relevance_scorer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/rename_refactor.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/repo_classifier.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/repository_ir.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/ris.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/runtime_classifier.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/scanner.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/schema.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/security_config.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/semantic_analyzer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/serializer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/spring_event_topology.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/spring_findings.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/spring_impact.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/spring_model.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/spring_security_audit.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/spring_semantic.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/spring_tx_analyzer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/summarizer.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/telemetry/__init__.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/telemetry/config.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/telemetry/consent.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/telemetry/events.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/telemetry/filters.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/telemetry/transport.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/tree_utils.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/validation_surface.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/version_check.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/src/sourcecode/workspace.py +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/supabase/functions/README.md +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/supabase/functions/get-license/index.ts +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/supabase/functions/lemonsqueezy-webhook/index.ts +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/supabase/functions/telemetry/index.ts +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/supabase/sql/license_event_ordering.sql +0 -0
- {sourcecode-1.62.0 → sourcecode-1.63.0}/supabase/sql/telemetry_events.sql +0 -0
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.63.0] — 2026-06-29
|
|
4
|
+
|
|
5
|
+
### Added — actionable Hibernate rewrite targets (`migrate-check`)
|
|
6
|
+
|
|
7
|
+
The Hibernate stratification went from **diagnostic** (how many files/occurrences
|
|
8
|
+
per layer) to **actionable** (what to rewrite, where, and to what) so a migration
|
|
9
|
+
agent can consume the output directly without re-parsing the repo. The `hibernate`
|
|
10
|
+
section gains a sub-`schema_version` (now **2.0**); all existing keys preserved.
|
|
11
|
+
|
|
12
|
+
- **`hibernate.rewrite_targets[]`** — one machine-readable target per call site:
|
|
13
|
+
`id`, `layer`, `source_file`, `line_start`/`line_end`, `current_pattern`,
|
|
14
|
+
`current_snippet`, `target_api` (the Hibernate-6 destination), `migration_kind`
|
|
15
|
+
(`manual_rewrite` / `assisted` / `mechanical` / `review`), `auto_migratable`,
|
|
16
|
+
`blocking_reason`, `symbol` (enclosing `Class#method`), `module`, `dynamic`.
|
|
17
|
+
Mapping rules: legacy `org.hibernate.Criteria`/`Restrictions`/`Projections` →
|
|
18
|
+
`CriteriaBuilder` (manual); `@Type(type=)` → `@Type(value=)`/`@JdbcTypeCode`
|
|
19
|
+
(mechanical, auto); `@TypeDef`/`@GenericGenerator` → assisted; concatenated HQL →
|
|
20
|
+
assisted + `runtime-resolved string`; `UserType`/`Interceptor`/`EventListener`/SPI
|
|
21
|
+
→ its H6 contract (manual). Standard JPA annotations emit **no** targets.
|
|
22
|
+
- **Per-layer migration-kind sub-counts** in `risk_matrix` (`manual_count`,
|
|
23
|
+
`assisted_count`, `mechanical_count`, `review_count`); Criteria adds
|
|
24
|
+
`static_count` vs `dynamic_count`; SPI adds `userType_rewrite_count` vs
|
|
25
|
+
`userType_resolvable_count` — so dynamic/reflexive cost is not blended into static.
|
|
26
|
+
- **Honest effort** — each layer carries `effort_range` `{low, high, confidence}`
|
|
27
|
+
(legacy `estimated_effort` string kept); `hibernate.total_effort_range_days`
|
|
28
|
+
aggregates them; `hibernate.effort_model` exposes the auditable formula and the
|
|
29
|
+
caveat that layers may share files (the total is an upper bound, not deduplicated).
|
|
30
|
+
- **`hibernate_readiness` (0–100)** — 4th readiness dimension alongside
|
|
31
|
+
jakarta/boot3/jdk. It does **not** sink the headline `readiness_score` (Hibernate
|
|
32
|
+
is an orthogonal rewrite axis), but in a rewrite zone `headline_blocker` is set to
|
|
33
|
+
`"hibernate_rewrite"` so a reader of "62/100" is not misled.
|
|
34
|
+
- **`hibernate.golden_sql_hotspots[]`** — classes/methods that concentrate dynamic
|
|
35
|
+
query generation, ranked by reflexive-query volume — where to pin golden-SQL tests.
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- `get_migration_readiness` MCP test asserted the pre-1.62 report `schema_version`
|
|
40
|
+
`1.3`; the v1.62.0 schema bump to `1.4` made it stale. Corrected to `1.4`.
|
|
41
|
+
|
|
3
42
|
## [1.62.0] — 2026-06-29
|
|
4
43
|
|
|
5
44
|
### Added — Hibernate 5.x → 6.x migration stratification (`migrate-check`)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sourcecode
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.63.0
|
|
4
4
|
Summary: Persistent structural context and ultra-fast repeated analysis for AI coding agents
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Keywords: agents,ai,codebase,context,developer-tools,llm
|
|
@@ -657,6 +657,58 @@ Detects migration blockers across Java source files, Spring XML config files, an
|
|
|
657
657
|
|
|
658
658
|
Each finding includes `severity`, `title`, `source_file`, `first_line`, `explanation`, `fix_hint`, `migration_target`, and `openrewrite_recipe` (when an automated recipe exists).
|
|
659
659
|
|
|
660
|
+
#### Hibernate 5.x → 6.x stratification (the `hibernate` output section)
|
|
661
|
+
|
|
662
|
+
A Hibernate major upgrade is **not** a single dependency bump for systems that use
|
|
663
|
+
dynamic persistence. `migrate-check` stratifies Hibernate exposure into four
|
|
664
|
+
independent migration domains — never one aggregated score — and emits **actionable,
|
|
665
|
+
machine-readable rewrite targets** so a migration agent can consume the output
|
|
666
|
+
directly instead of re-parsing the repo. Sub-`schema_version`: `2.0`.
|
|
667
|
+
|
|
668
|
+
**Four layers** (each on its own risk axis):
|
|
669
|
+
|
|
670
|
+
| Layer | Baseline | Escalates to |
|
|
671
|
+
|-------|----------|--------------|
|
|
672
|
+
| `jpa_annotations` | LOW (namespace handled by jakarta) | HIGH on deprecated `@Type(type=)` / `@TypeDef` / `@GenericGenerator` |
|
|
673
|
+
| `criteria_api` | HIGH (JPA Criteria semantics changed; legacy `org.hibernate.Criteria` removed) | **CRITICAL** when built via reflection / abstraction DAOs (`DynamicEntityDao`, `GenericDao`, `BasicPersistenceModule`) |
|
|
674
|
+
| `hql_string_queries` | MEDIUM (revalidate against H6 parser) | HIGH on string concatenation (SQL shape not statically inferable) |
|
|
675
|
+
| `hibernate_spi_internal` | CRITICAL blocker | `UserType`, `CompositeUserType`, `Interceptor`, `EventListener`, `org.hibernate.engine.spi` |
|
|
676
|
+
|
|
677
|
+
**Output keys (under `hibernate`):**
|
|
678
|
+
|
|
679
|
+
- `classification` — `upgrade_zone` / `upgrade_with_care` / `rewrite_zone`. Any of
|
|
680
|
+
{dynamic Criteria, custom SPI, reflection-built queries, concatenated query
|
|
681
|
+
strings} forces **`rewrite_zone`** ("HIGH RISK REWRITE ZONE, NOT UPGRADE ZONE").
|
|
682
|
+
- `risk_matrix[]` — per layer: `risk`, `reason`, `effort_range {low, high, confidence}`,
|
|
683
|
+
`file_count`, `occurrence_count`, migration-kind sub-counts (`manual_count`,
|
|
684
|
+
`assisted_count`, `mechanical_count`, `review_count`); Criteria adds
|
|
685
|
+
`static_count` vs `dynamic_count`; SPI adds `userType_rewrite_count` vs
|
|
686
|
+
`userType_resolvable_count`.
|
|
687
|
+
- `rewrite_targets[]` — one actionable target per call site: `id`, `layer`,
|
|
688
|
+
`source_file`, `line_start`/`line_end`, `current_pattern`, `current_snippet`,
|
|
689
|
+
`target_api` (the Hibernate-6 destination), `migration_kind`
|
|
690
|
+
(`manual_rewrite` / `assisted` / `mechanical` / `review`), `auto_migratable`,
|
|
691
|
+
`blocking_reason`, `symbol` (enclosing `Class#method`), `module`, `dynamic`.
|
|
692
|
+
- `module_exposure_map` — per Maven/Gradle module: `max_risk`, layers present, and
|
|
693
|
+
`dynamic-criteria` / `custom-SPI` / `reflection` tags.
|
|
694
|
+
- `critical_call_chains[]` — dynamic query-generation paths (reflection-based DAOs).
|
|
695
|
+
- `golden_sql_hotspots[]` — classes/methods ranked by dynamic-query volume — where
|
|
696
|
+
to pin golden-SQL behaviour tests before migrating.
|
|
697
|
+
- `total_effort_range_days` + `effort_model` — aggregate range plus the auditable
|
|
698
|
+
formula (and the caveat that layers may share files, so the total is an upper bound).
|
|
699
|
+
- `stop_conditions_triggered[]`, `risk_separation` (observable vs inferred runtime risk).
|
|
700
|
+
|
|
701
|
+
The report also exposes **`hibernate_readiness`** (0–100) as a fourth readiness
|
|
702
|
+
dimension alongside `jakarta_readiness` / `boot3_readiness` / `jdk_modernization`.
|
|
703
|
+
Hibernate is an orthogonal rewrite axis, so it does not sink the headline
|
|
704
|
+
`readiness_score`; instead, in a rewrite zone the top-level `headline_blocker` is set
|
|
705
|
+
to `"hibernate_rewrite"` so a reader of the headline score is not misled.
|
|
706
|
+
|
|
707
|
+
```bash
|
|
708
|
+
# inspect only the Hibernate rewrite targets
|
|
709
|
+
sourcecode migrate-check . --format json | jq '.hibernate.rewrite_targets[]'
|
|
710
|
+
```
|
|
711
|
+
|
|
660
712
|
### `rename-class` — Java class rename
|
|
661
713
|
|
|
662
714
|
```bash
|
|
@@ -619,6 +619,58 @@ Detects migration blockers across Java source files, Spring XML config files, an
|
|
|
619
619
|
|
|
620
620
|
Each finding includes `severity`, `title`, `source_file`, `first_line`, `explanation`, `fix_hint`, `migration_target`, and `openrewrite_recipe` (when an automated recipe exists).
|
|
621
621
|
|
|
622
|
+
#### Hibernate 5.x → 6.x stratification (the `hibernate` output section)
|
|
623
|
+
|
|
624
|
+
A Hibernate major upgrade is **not** a single dependency bump for systems that use
|
|
625
|
+
dynamic persistence. `migrate-check` stratifies Hibernate exposure into four
|
|
626
|
+
independent migration domains — never one aggregated score — and emits **actionable,
|
|
627
|
+
machine-readable rewrite targets** so a migration agent can consume the output
|
|
628
|
+
directly instead of re-parsing the repo. Sub-`schema_version`: `2.0`.
|
|
629
|
+
|
|
630
|
+
**Four layers** (each on its own risk axis):
|
|
631
|
+
|
|
632
|
+
| Layer | Baseline | Escalates to |
|
|
633
|
+
|-------|----------|--------------|
|
|
634
|
+
| `jpa_annotations` | LOW (namespace handled by jakarta) | HIGH on deprecated `@Type(type=)` / `@TypeDef` / `@GenericGenerator` |
|
|
635
|
+
| `criteria_api` | HIGH (JPA Criteria semantics changed; legacy `org.hibernate.Criteria` removed) | **CRITICAL** when built via reflection / abstraction DAOs (`DynamicEntityDao`, `GenericDao`, `BasicPersistenceModule`) |
|
|
636
|
+
| `hql_string_queries` | MEDIUM (revalidate against H6 parser) | HIGH on string concatenation (SQL shape not statically inferable) |
|
|
637
|
+
| `hibernate_spi_internal` | CRITICAL blocker | `UserType`, `CompositeUserType`, `Interceptor`, `EventListener`, `org.hibernate.engine.spi` |
|
|
638
|
+
|
|
639
|
+
**Output keys (under `hibernate`):**
|
|
640
|
+
|
|
641
|
+
- `classification` — `upgrade_zone` / `upgrade_with_care` / `rewrite_zone`. Any of
|
|
642
|
+
{dynamic Criteria, custom SPI, reflection-built queries, concatenated query
|
|
643
|
+
strings} forces **`rewrite_zone`** ("HIGH RISK REWRITE ZONE, NOT UPGRADE ZONE").
|
|
644
|
+
- `risk_matrix[]` — per layer: `risk`, `reason`, `effort_range {low, high, confidence}`,
|
|
645
|
+
`file_count`, `occurrence_count`, migration-kind sub-counts (`manual_count`,
|
|
646
|
+
`assisted_count`, `mechanical_count`, `review_count`); Criteria adds
|
|
647
|
+
`static_count` vs `dynamic_count`; SPI adds `userType_rewrite_count` vs
|
|
648
|
+
`userType_resolvable_count`.
|
|
649
|
+
- `rewrite_targets[]` — one actionable target per call site: `id`, `layer`,
|
|
650
|
+
`source_file`, `line_start`/`line_end`, `current_pattern`, `current_snippet`,
|
|
651
|
+
`target_api` (the Hibernate-6 destination), `migration_kind`
|
|
652
|
+
(`manual_rewrite` / `assisted` / `mechanical` / `review`), `auto_migratable`,
|
|
653
|
+
`blocking_reason`, `symbol` (enclosing `Class#method`), `module`, `dynamic`.
|
|
654
|
+
- `module_exposure_map` — per Maven/Gradle module: `max_risk`, layers present, and
|
|
655
|
+
`dynamic-criteria` / `custom-SPI` / `reflection` tags.
|
|
656
|
+
- `critical_call_chains[]` — dynamic query-generation paths (reflection-based DAOs).
|
|
657
|
+
- `golden_sql_hotspots[]` — classes/methods ranked by dynamic-query volume — where
|
|
658
|
+
to pin golden-SQL behaviour tests before migrating.
|
|
659
|
+
- `total_effort_range_days` + `effort_model` — aggregate range plus the auditable
|
|
660
|
+
formula (and the caveat that layers may share files, so the total is an upper bound).
|
|
661
|
+
- `stop_conditions_triggered[]`, `risk_separation` (observable vs inferred runtime risk).
|
|
662
|
+
|
|
663
|
+
The report also exposes **`hibernate_readiness`** (0–100) as a fourth readiness
|
|
664
|
+
dimension alongside `jakarta_readiness` / `boot3_readiness` / `jdk_modernization`.
|
|
665
|
+
Hibernate is an orthogonal rewrite axis, so it does not sink the headline
|
|
666
|
+
`readiness_score`; instead, in a rewrite zone the top-level `headline_blocker` is set
|
|
667
|
+
to `"hibernate_rewrite"` so a reader of the headline score is not misled.
|
|
668
|
+
|
|
669
|
+
```bash
|
|
670
|
+
# inspect only the Hibernate rewrite targets
|
|
671
|
+
sourcecode migrate-check . --format json | jq '.hibernate.rewrite_targets[]'
|
|
672
|
+
```
|
|
673
|
+
|
|
622
674
|
### `rename-class` — Java class rename
|
|
623
675
|
|
|
624
676
|
```bash
|
|
@@ -4841,9 +4841,12 @@ def migrate_check_cmd(
|
|
|
4841
4841
|
\b
|
|
4842
4842
|
Hibernate 5→6 stratification (in the 'hibernate' output section):
|
|
4843
4843
|
4 independent layers (JPA annotations / Criteria / HQL / SPI), a per-layer
|
|
4844
|
-
risk matrix, a module exposure map, critical call-chain
|
|
4845
|
-
|
|
4846
|
-
|
|
4844
|
+
risk matrix with effort ranges, a module exposure map, critical call-chain
|
|
4845
|
+
detection, golden-SQL hotspots, a hibernate_readiness score, and an UPGRADE
|
|
4846
|
+
vs REWRITE verdict (dynamic Criteria, custom SPI, reflection-built queries,
|
|
4847
|
+
or concatenated query strings force the REWRITE classification).
|
|
4848
|
+
Emits actionable rewrite_targets[] (call-site line ranges → target_api +
|
|
4849
|
+
migration_kind) so a migration agent can consume the output directly.
|
|
4847
4850
|
|
|
4848
4851
|
\b
|
|
4849
4852
|
Examples:
|