sourcecode 1.60.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.
Files changed (122) hide show
  1. {sourcecode-1.60.0 → sourcecode-1.63.0}/CHANGELOG.md +105 -0
  2. {sourcecode-1.60.0 → sourcecode-1.63.0}/PKG-INFO +53 -1
  3. {sourcecode-1.60.0 → sourcecode-1.63.0}/README.md +52 -0
  4. {sourcecode-1.60.0 → sourcecode-1.63.0}/pyproject.toml +1 -1
  5. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/__init__.py +1 -1
  6. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/cli.py +10 -0
  7. sourcecode-1.63.0/src/sourcecode/hibernate_strat.py +980 -0
  8. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/mcp/registry.py +6 -3
  9. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/mcp/server.py +8 -1
  10. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/migrate_check.py +243 -32
  11. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/serializer.py +44 -1
  12. {sourcecode-1.60.0 → sourcecode-1.63.0}/.github/workflows/build-windows.yml +0 -0
  13. {sourcecode-1.60.0 → sourcecode-1.63.0}/.gitignore +0 -0
  14. {sourcecode-1.60.0 → sourcecode-1.63.0}/.ruff.toml +0 -0
  15. {sourcecode-1.60.0 → sourcecode-1.63.0}/CONTRIBUTING.md +0 -0
  16. {sourcecode-1.60.0 → sourcecode-1.63.0}/LICENSE +0 -0
  17. {sourcecode-1.60.0 → sourcecode-1.63.0}/SECURITY.md +0 -0
  18. {sourcecode-1.60.0 → sourcecode-1.63.0}/raw +0 -0
  19. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/adaptive_scanner.py +0 -0
  20. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/architecture_analyzer.py +0 -0
  21. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/architecture_summary.py +0 -0
  22. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/ast_extractor.py +0 -0
  23. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/cache.py +0 -0
  24. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/canonical_ir.py +0 -0
  25. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/cir_graphs.py +0 -0
  26. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/classifier.py +0 -0
  27. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/code_notes_analyzer.py +0 -0
  28. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/confidence_analyzer.py +0 -0
  29. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/context_scorer.py +0 -0
  30. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/context_summarizer.py +0 -0
  31. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/contract_model.py +0 -0
  32. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/contract_pipeline.py +0 -0
  33. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/coverage_parser.py +0 -0
  34. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/dependency_analyzer.py +0 -0
  35. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/__init__.py +0 -0
  36. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/base.py +0 -0
  37. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/csproj_parser.py +0 -0
  38. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/dart.py +0 -0
  39. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/dotnet.py +0 -0
  40. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/elixir.py +0 -0
  41. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/go.py +0 -0
  42. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/heuristic.py +0 -0
  43. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/hybrid.py +0 -0
  44. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/java.py +0 -0
  45. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/jvm_ext.py +0 -0
  46. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/nodejs.py +0 -0
  47. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/parsers.py +0 -0
  48. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/php.py +0 -0
  49. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/project.py +0 -0
  50. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/python.py +0 -0
  51. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/ruby.py +0 -0
  52. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/rust.py +0 -0
  53. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/systems.py +0 -0
  54. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/terraform.py +0 -0
  55. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/detectors/tooling.py +0 -0
  56. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/doc_analyzer.py +0 -0
  57. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/entrypoint_classifier.py +0 -0
  58. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/env_analyzer.py +0 -0
  59. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/error_schema.py +0 -0
  60. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/explain.py +0 -0
  61. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/file_chunker.py +0 -0
  62. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/file_classifier.py +0 -0
  63. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/flow_analyzer.py +0 -0
  64. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/format_contract.py +0 -0
  65. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/fqn_utils.py +0 -0
  66. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/git_analyzer.py +0 -0
  67. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/graph_analyzer.py +0 -0
  68. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/integration_detector.py +0 -0
  69. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/license.py +0 -0
  70. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/mcp/__init__.py +0 -0
  71. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/mcp/onboarding/__init__.py +0 -0
  72. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/mcp/onboarding/applier.py +0 -0
  73. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/mcp/onboarding/backup.py +0 -0
  74. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/mcp/onboarding/detector.py +0 -0
  75. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/mcp/onboarding/planner.py +0 -0
  76. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/mcp/orchestrator.py +0 -0
  77. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/mcp/runner.py +0 -0
  78. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/mcp_nudge.py +0 -0
  79. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/metrics_analyzer.py +0 -0
  80. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/openapi_surface.py +0 -0
  81. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/output_budget.py +0 -0
  82. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/path_filters.py +0 -0
  83. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/pr_comment_renderer.py +0 -0
  84. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/pr_impact.py +0 -0
  85. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/prepare_context.py +0 -0
  86. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/progress.py +0 -0
  87. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/ranking_engine.py +0 -0
  88. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/redactor.py +0 -0
  89. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/relevance_scorer.py +0 -0
  90. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/rename_refactor.py +0 -0
  91. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/repo_classifier.py +0 -0
  92. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/repository_ir.py +0 -0
  93. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/ris.py +0 -0
  94. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/runtime_classifier.py +0 -0
  95. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/scanner.py +0 -0
  96. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/schema.py +0 -0
  97. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/security_config.py +0 -0
  98. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/semantic_analyzer.py +0 -0
  99. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/spring_event_topology.py +0 -0
  100. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/spring_findings.py +0 -0
  101. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/spring_impact.py +0 -0
  102. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/spring_model.py +0 -0
  103. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/spring_security_audit.py +0 -0
  104. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/spring_semantic.py +0 -0
  105. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/spring_tx_analyzer.py +0 -0
  106. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/summarizer.py +0 -0
  107. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/telemetry/__init__.py +0 -0
  108. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/telemetry/config.py +0 -0
  109. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/telemetry/consent.py +0 -0
  110. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/telemetry/events.py +0 -0
  111. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/telemetry/filters.py +0 -0
  112. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/telemetry/transport.py +0 -0
  113. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/tree_utils.py +0 -0
  114. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/validation_surface.py +0 -0
  115. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/version_check.py +0 -0
  116. {sourcecode-1.60.0 → sourcecode-1.63.0}/src/sourcecode/workspace.py +0 -0
  117. {sourcecode-1.60.0 → sourcecode-1.63.0}/supabase/functions/README.md +0 -0
  118. {sourcecode-1.60.0 → sourcecode-1.63.0}/supabase/functions/get-license/index.ts +0 -0
  119. {sourcecode-1.60.0 → sourcecode-1.63.0}/supabase/functions/lemonsqueezy-webhook/index.ts +0 -0
  120. {sourcecode-1.60.0 → sourcecode-1.63.0}/supabase/functions/telemetry/index.ts +0 -0
  121. {sourcecode-1.60.0 → sourcecode-1.63.0}/supabase/sql/license_event_ordering.sql +0 -0
  122. {sourcecode-1.60.0 → sourcecode-1.63.0}/supabase/sql/telemetry_events.sql +0 -0
@@ -1,5 +1,110 @@
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
+
42
+ ## [1.62.0] — 2026-06-29
43
+
44
+ ### Added — Hibernate 5.x → 6.x migration stratification (`migrate-check`)
45
+
46
+ `migrate-check` no longer treats Hibernate as a single dependency-version bump.
47
+ For enterprise monoliths that use dynamic persistence (verified against the
48
+ Broadleaf Commerce CE Open Admin Platform pattern), a Hibernate major upgrade is
49
+ a **persistence-layer rewrite problem in the dynamic-ORM areas, not an upgrade**.
50
+ Output now carries a `hibernate` section (and a Hibernate block in `--format text`)
51
+ built by the new `hibernate_strat` module.
52
+
53
+ - **Four independent migration domains** — each classified on its own risk axis,
54
+ never aggregated into one score:
55
+ 1. **JPA Annotation Layer** — LOW, escalates to HIGH on deprecated/reworked
56
+ annotations (`@Type(type=)`, `@TypeDef`, `@GenericGenerator`).
57
+ 2. **Criteria API Layer** — HIGH, escalates to **CRITICAL** when Criteria is
58
+ built via reflection or abstraction DAOs (`DynamicEntityDao`, `GenericDao`,
59
+ `BasicPersistenceModule`). Legacy `org.hibernate.Criteria` /
60
+ `Restrictions` / `Projections` flagged (removed in Hibernate 6).
61
+ 3. **HQL / String Queries** — MEDIUM, escalates to HIGH on string concatenation
62
+ (SQL shape not statically inferable under H6 parser changes).
63
+ 4. **Hibernate SPI / Internal API** — CRITICAL blocker (`UserType`,
64
+ `CompositeUserType`, `Interceptor`, `EventListener`, `org.hibernate.engine.spi`).
65
+ - **Hibernate Migration Impact Matrix** — per-layer risk, reason, and estimated effort.
66
+ - **Module-level Hibernate exposure map** — per Maven/Gradle module: max risk,
67
+ layers present, and `dynamic-criteria` / `custom-SPI` / `reflection` tags.
68
+ - **Critical call-chain detection** — flags dynamic query-generation paths
69
+ (`DynamicEntityDaoImpl`, `BasicPersistenceModule`, reflection-based DAOs).
70
+ - **Stop-condition logic** — any of {dynamic Criteria, custom SPI, reflection-built
71
+ queries, concatenated query strings} forces the verdict
72
+ **"HIBERNATE 6 MIGRATION IS HIGH RISK REWRITE ZONE (NOT UPGRADE ZONE)"**;
73
+ otherwise UPGRADE-WITH-CARE or UPGRADE ZONE.
74
+ - **Risk separation** — observable code risk vs inferred runtime risk reported distinctly.
75
+
76
+ ## [1.61.0] — 2026-06-29
77
+
78
+ ### Fixed — `migrate-check` false positives on already-migrated Spring Boot 3 repos
79
+
80
+ Three defects made `migrate-check` report a Boot 3 / Jakarta repo as an
81
+ un-migrated Boot 2 project (verified on Broadleaf Commerce CE 7.0.x —
82
+ Boot 3.5.14, Java 17, `jakarta.*` fully adopted). The verdict contradicted the
83
+ code; this corrects all three at the root and adds regression guardrails.
84
+ Report `schema_version` bumped **1.2 → 1.3**.
85
+
86
+ - **`spring_boot_2_detected` no longer defaults to `true`.** The detector now
87
+ resolves Maven `${...}` properties before reading versions and recognises
88
+ Boot in every form: `spring-boot-starter-parent`, a managed
89
+ `spring-boot-dependencies` BOM, a `spring-boot*` dependency versioned by
90
+ property, and the Gradle plugin. The old heuristic used a `DOTALL` regex that
91
+ matched any stray `2.x` library version anywhere in the pom. The field is now
92
+ **tri-state** — `true` (Boot 2 confirmed) / `false` (Boot 3+ confirmed) /
93
+ `null` (undetermined). **Absence of evidence is never reported as `true`.**
94
+ A new `spring_boot_version_detected` exposes the resolved version. Massive
95
+ `jakarta.*` import adoption vetoes any Boot-2 verdict.
96
+ - **`readiness_score` no longer collapses to 0 on JDK-modernization volume.**
97
+ Blockers (critical/high) still floor a genuinely blocked repo, but orthogonal
98
+ JDK debt (`java.util.Date`, reflection) is capped so it can no longer sink a
99
+ jakarta-ready repo. The report now separates dimensions:
100
+ `jakarta_readiness`, `boot3_readiness`, and `jdk_modernization` (each 0–100).
101
+ - **`javax.*` JDK/JSR namespaces are no longer flagged with
102
+ `javax-to-jakarta-migration-risk`.** `javax.cache` (JSR-107), `javax.sql`,
103
+ `javax.xml` (JAXP), `javax.naming`, `javax.management`, `javax.crypto`, etc.
104
+ keep the `javax` prefix forever and are now allowlisted. Only the Jakarta EE 9
105
+ renamed namespaces (`javax.servlet`, `javax.persistence`, `javax.validation`,
106
+ `javax.xml.bind`, …) still carry the flag.
107
+
3
108
  ## [1.60.0] — 2026-06-29
4
109
 
5
110
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sourcecode
3
- Version: 1.60.0
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
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sourcecode"
7
- version = "1.60.0"
7
+ version = "1.63.0"
8
8
  description = "Persistent structural context and ultra-fast repeated analysis for AI coding agents"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -1,3 +1,3 @@
1
1
  """sourcecode — Deterministic codebase context maps for AI coding agents."""
2
2
 
3
- __version__ = "1.60.0"
3
+ __version__ = "1.63.0"
@@ -4838,6 +4838,16 @@ def migrate_check_cmd(
4838
4838
  MIG-007 javax.inject import (MEDIUM)
4839
4839
  MIG-008 javax.ws.rs import (MEDIUM — JAX-RS changed)
4840
4840
 
4841
+ \b
4842
+ Hibernate 5→6 stratification (in the 'hibernate' output section):
4843
+ 4 independent layers (JPA annotations / Criteria / HQL / SPI), a per-layer
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.
4850
+
4841
4851
  \b
4842
4852
  Examples:
4843
4853
  sourcecode migrate-check .