Skip to content

feat(catalog): 更新组件目录和校验逻辑#1404

Open
henry-hub wants to merge 5 commits into
ihub-pub:mainfrom
henry-hub:agent
Open

feat(catalog): 更新组件目录和校验逻辑#1404
henry-hub wants to merge 5 commits into
ihub-pub:mainfrom
henry-hub:agent

Conversation

@henry-hub
Copy link
Copy Markdown
Member

  • 在合并目录中添加 components 字段
  • 更新多个领域组件的 gradle_ref 为数组形式
  • 添加 migration 领域和相关组件
  • 增强校验脚本,添加 ID 唯一性和 stage 有效性检查
  • 更新 taxonomy 结构,添加 migration 领域和调整 stage 名称

Copilot AI review requested due to automatic review settings May 4, 2026 13:15
@henry-hub henry-hub added the enhancement New feature or request label May 4, 2026
@ihub-bot ihub-bot Bot added this to the 1.7.7 milestone May 4, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

本次 PR 为 IHub capability catalog 引入了更完整的“领域化语义目录 + 校验/合并工具链”,并对 Gradle Version Catalog(libs.versions.toml)按能力域重新分组,方便后续自动化生成/校验 catalog.json 以及在项目中按域引用依赖。

Changes:

  • 重组 gradle/libs.versions.toml:按领域分区整理 versions/libraries,并新增大量按域聚合的 bundles。
  • 新增 capability taxonomy 与领域组件条目:补齐 infrastructure/data/ddd/mapping/.../migration 等 domain JSON,并生成合并产物所需的结构(domains/components/indexes)。
  • 新增/增强工具脚本:提供 catalog 合并脚本与一致性校验脚本(包含 ID 唯一性、stage 合法性、gradle_ref/version_ref 存在性等检查)。

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
gradle/libs.versions.toml 按能力域重排 versions/libraries,并新增大量 domain bundles 便于按域引用依赖
gradle/ihub-catalog/taxonomy.json 新增 taxonomy:domains/stages/type/layer/status 结构定义,作为语义目录的元信息
gradle/ihub-catalog/merge-catalog.py 新增合并脚本:汇总 taxonomy + domain JSON,生成 catalog.json(含索引)
gradle/ihub-catalog/check-consistency.py 新增一致性校验:检查 id 唯一性、stage 合法性、gradle_ref/version_ref 存在性等
gradle/ihub-catalog/domains/infrastructure.json 新增基础设施领域组件条目(Spring BOM、日志、Groovy、IHub BOM 等)
gradle/ihub-catalog/domains/data.json 新增数据与持久化领域条目(MyBatis-Plus、MPE、Easy-Query、Dynamic DS)
gradle/ihub-catalog/domains/ddd.json 新增 DDD/模块化条目(jMolecules、Spring Modulith)
gradle/ihub-catalog/domains/mapping.json 新增映射/序列化条目(MapStruct、Fastjson2、EasyExcel 等)
gradle/ihub-catalog/domains/security.json 新增安全认证条目(Sa-Token、JustAuth)
gradle/ihub-catalog/domains/distributed.json 新增分布式条目(DynamicTp、EasyTrans、Redisson、SnailJob)
gradle/ihub-catalog/domains/workflow.json 新增工作流条目(Warm-Flow)
gradle/ihub-catalog/domains/observability.json 新增可观测性条目(SkyWalking toolkit)
gradle/ihub-catalog/domains/documentation.json 新增文档/API 条目(SpringDoc、Therapi Javadoc)
gradle/ihub-catalog/domains/testing.json 新增测试与质量条目(Spock、JUnit5、PMD)
gradle/ihub-catalog/domains/utilities.json 新增通用工具条目(Hutool、SMS4J、X-File-Storage、AnyLine)
gradle/ihub-catalog/domains/messaging.json 新增 messaging 占位条目(规划中)
gradle/ihub-catalog/domains/meta.json 新增 meta 指南条目,解释目录与 Gradle catalog 的关系/用法
gradle/ihub-catalog/domains/migration.json 新增 migration 领域条目(迁移分析/agent 方向组件占位与说明)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +28 to +56
# Find [versions] section
v_match = re.search(r'\[versions\](.*?)(?=\[|$)', content, re.DOTALL)
if v_match:
for line in v_match.group(1).strip().split('\n'):
line = line.strip()
if line and not line.startswith('#'):
m = re.match(r'^([\w.-]+)\s*=', line)
if m:
versions.add(m.group(1))

# Find [libraries] section
l_match = re.search(r'\[libraries\](.*?)(?=\[|$)', content, re.DOTALL)
if l_match:
for line in l_match.group(1).strip().split('\n'):
line = line.strip()
if line and not line.startswith('#'):
m = re.match(r'^([\w.-]+)\s*=', line)
if m:
libraries.add(m.group(1))

# Find [bundles] section
b_match = re.search(r'\[bundles\](.*?)$', content, re.DOTALL)
if b_match:
for line in b_match.group(1).strip().split('\n'):
line = line.strip()
if line and not line.startswith('#'):
m = re.match(r'^([\w.-]+)\s*=', line)
if m:
bundles.add(m.group(1))
Comment on lines +25 to +27
with open(toml_path, 'r') as f:
content = f.read()

Comment on lines +91 to +94
vref = entry.get('version_ref')
if vref and vref not in versions:
errors.append(f'{eid}: version_ref "{vref}" not found in [versions]')

errors.append(f'{eid}: gradle_ref "{ref}" not found in [libraries] or [bundles]')

# Check stage values
for s in entry.get('stage') or []:
Comment on lines +259 to +268
"ihub_layers": {
"L2": {
"name": "IHub 能力板块",
"description": "libs 仓库中的组件,提供可复用的技术能力"
},
"L3": {
"name": "IHub 集成方案",
"description": "modules/integrations 仓库中的组件,提供场景化集成方案"
}
},
Comment on lines +16 to +17
"groupId": "org.mapstruct",
"artifactId": "mapstruct",
Comment on lines +14 to +16
def load_json(path):
with open(path, 'r') as f:
return json.load(f)
"subdomains": [
"analyze",
"rewrite",
"agent"
henry-hub and others added 3 commits May 5, 2026 12:01
…c entries

Introduce gradle/ihub-catalog/ as an AI-friendly semantic overlay on top of
libs.versions.toml. The catalog adds domain grouping, use_case descriptions,
and structured ai_context for LLM consumption without duplicating version info.

- Add taxonomy.json defining 13 domains, 8 journey stages, and component types
- Populate core domains: infrastructure (7 entries), data (4), ddd (2), security (2)
- Add meta.json with LLM usage guide for the catalog system
- Reorganize libs.versions.toml with domain partition comments (non-destructive)
- Add 30+ domain-based bundles alongside preserved legacy bundles
- Add merge-catalog.py and check-consistency.py scripts

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Complete the IHub capability catalog with full ai_context for all domains:
- mapping: MapStruct, MapStruct-Plus, FastJSON2, EasyExcel
- distributed: DynamicTP, EasyTrans, Redisson, SnailJob
- workflow: Warm-Flow (placeholder, detailed integration guide)
- observability: SkyWalking Toolkit
- documentation: SpringDoc OpenAPI, Therapi Runtime Javadoc
- testing: Spock Framework, JUnit 5, PMD static analysis
- messaging: placeholder with Spring BOM usage guide (P2)
- utilities: Hutool, SMS4J, X File Storage, AnyLine

Also fix check-consistency.py to handle gradle_ref as list or string.
All 36 entries pass consistency check against libs.versions.toml.
- 在合并目录中添加 components 字段
- 更新多个领域组件的 gradle_ref 为数组形式
- 添加 migration 领域和相关组件
- 增强校验脚本,添加 ID 唯一性和 stage 有效性检查
- 更新 taxonomy 结构,添加 migration 领域和调整 stage 名称
henry-hub added 2 commits May 16, 2026 14:50
- 采用 main 更新的版本号:easy-query 3.2.6、snailjob 2.0.0、fastjson 2.0.62、warm-flow 1.8.7、spring-ai-bom 1.1.6、redisson 4.4.0、swagger-core 2.2.50、anyline-dependency 8.7.5-20260507
- 保留 agent 分支的能力领域分区注释结构
- 补充 warm-flow 裸库条目(version.ref 引用)
@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.44%. Comparing base (f07ee1e) to head (a8d75c9).
⚠️ Report is 816 commits behind head on main.

Additional details and impacted files
@@              Coverage Diff              @@
##                main    #1404      +/-   ##
=============================================
- Coverage     100.00%   99.44%   -0.56%     
+ Complexity       153      113      -40     
=============================================
  Files             23       15       -8     
  Lines            302      181     -121     
  Branches          12        5       -7     
=============================================
- Hits             302      180     -122     
- Partials           0        1       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants