wowo
b96126a267
Merge pull request #20 from iflytek/bugfix/require-auth-for-download
...
fix: require authentication for downloads and fix download count increment
2026-03-14 17:22:38 +08:00
yun-zhi-ztl
3a5e03fd63
Merge pull request #5 from iflytek/feature/projcet-clawhub
...
feat: add ClawHub registry compatibility layer for public skill installation
2026-03-14 02:21:06 -07:00
wowo-zZ
871278d43a
fix(infra): add @Transactional to incrementDownloadCount
...
The @Modifying query requires a transaction context to execute.
Adding @Transactional at the repository method level ensures the
update query runs within a transaction, even when called from
async event listeners.
This fixes the issue where download counts were not being incremented
after skill downloads due to TransactionRequiredException.
2026-03-14 17:03:58 +08:00
wowo-zZ
56e7baed15
fix(auth): require authentication for skill downloads
...
- Remove download endpoints from permitAll list in SecurityConfig
- Add authentication checks to download tests
- Add login redirect for unauthenticated download attempts in frontend
This prevents unauthorized access to skill package downloads while
maintaining public access to skill metadata and file listings.
2026-03-14 16:54:10 +08:00
wowo-zZ
e97752735c
fix(auth): improve logout flow to always redirect to home
...
- Use window.location.href for full page refresh
- Move redirect to finally block to ensure it always executes
- Fix V7 migration to be a no-op since column is already jsonb
2026-03-14 15:40:53 +08:00
wowo
bd87e701cf
Merge pull request #14 from iflytek/feat/optimize-staging-build
...
feat: optimize development workflow with fast local dev and staging environments
2026-03-14 14:27:48 +08:00
wowo-zZ
5581bd6f06
feat(staging): optimize staging build with local Maven packaging
...
- Add server/Dockerfile.dev for fast local builds (JRE-only, ~70MB)
- Modify staging target to build JAR locally before Docker image
- Update .dockerignore to allow target/ directory for Dockerfile.dev
- Build time reduced from 17+ minutes to ~4 seconds
- Reuses local Maven cache (~/.m2/repository) instead of downloading in Docker
2026-03-14 14:21:06 +08:00
wowo-zZ
5254cd155e
update
2026-03-14 13:54:39 +08:00
wowo-zZ
797cfc5272
feat(dev): add Spring Boot DevTools for fast restart in local dev
2026-03-14 13:23:50 +08:00
wowo-zZ
d631b0e20a
fix(ops): resolve storage permission and audit log JSONB type issues
...
Fixes two critical issues when deploying with runtime.sh:
1. Storage Permission Error
- Problem: AccessDeniedException when publishing skills
- Root cause: /var/lib/skillhub/storage owned by root, but app runs as 'app' user
- Solution: Pre-create storage directory with correct permissions in Dockerfile
2. Audit Log JSONB Type Error
- Problem: PostgreSQL JSONB type mismatch when recording audit logs
- Root cause: Missing type mapping annotation in AuditLog entity
- Solution: Add @JdbcTypeCode(SqlTypes.JSON) annotation and V7 migration
Changes:
- server/Dockerfile: Add storage directory creation and permission setup
- server/skillhub-domain/.../AuditLog.java: Add @JdbcTypeCode annotation
- server/skillhub-app/.../V7__fix_audit_log_jsonb_type.sql: Migration for existing data
Impact:
- New deployments: Issues resolved automatically
- Existing deployments: Flyway auto-applies V7 migration on upgrade
2026-03-14 11:23:19 +08:00
vsxd
ac352314f7
Add extensible auth compatibility layer for private SSO
2026-03-13 18:00:22 +08:00
vsxd
9ae9b93ca7
Refine production compose runtime config
2026-03-13 17:00:47 +08:00
vsxd
14d86c290a
chore(release): v0.1.0-beta.7
2026-03-13 16:05:08 +08:00
yun-zhi-ztl
f96fa74413
feat(compat): add clawhub registry adapter
2026-03-13 16:04:33 +08:00
vsxd
3682a4646b
Auto-publish skills submitted by super admins
2026-03-13 15:36:56 +08:00
vsxd
d82665baba
feat(review): allow admins to review their own submissions
2026-03-13 14:23:20 +08:00
vsxd
763c908f74
Revert "fix(api): 统一所有分页接口为1-based page"
...
This reverts commit 3706e920df .
2026-03-13 12:56:29 +08:00
vsxd
3706e920df
fix(api): 统一所有分页接口为1-based page
...
前端传 page=1 表示第一页,后端原来是 0-based 导致首页数据丢失。
涉及: SkillSearch, SkillController, ReviewController,
PromotionController, UserManagement, AuditLog
2026-03-13 12:56:23 +08:00
vsxd
a85a9c3177
fix(publish): 放宽技能包上传校验
...
- application.yml 补齐缺失的文件扩展名白名单(.js,.ts,.png,.jpg,.svg)
- version 为空时自动生成时间戳版本号,不再强制报错
2026-03-13 12:47:34 +08:00
vsxd
ac32fce08f
fix(auth): preserve return target across oauth login
2026-03-13 11:59:17 +08:00
vsxd
84dd08503d
merge: bring feature/project-init into main for beta3
...
# Conflicts:
# scripts/smoke-test.sh
2026-03-13 11:45:56 +08:00
vsxd
6a9e0845d4
Complete phase 3 and 4 backend workflows
2026-03-13 11:36:34 +08:00
vsxd
76808ca794
test(auth): align auth module tests with current flows
2026-03-13 11:32:50 +08:00
vsxd
5bb2eb0d98
fix(auth): grant global membership to new users
2026-03-13 11:29:01 +08:00
vsxd
0c5e4200cb
fix(dev): provide explicit skill repository bean
2026-03-13 11:21:32 +08:00
vsxd
3cee8fbb5a
fix(phase4): harden smoke checks and metrics access
2026-03-13 10:56:28 +08:00
vsxd
0ca38e73ba
merge: bring phase4 worktree implementation into feature/project-init
...
# Conflicts:
# server/skillhub-app/src/main/java/com/iflytek/skillhub/controller/cli/CliPublishController.java
# server/skillhub-app/src/main/java/com/iflytek/skillhub/controller/portal/SkillPublishController.java
# server/skillhub-storage/src/main/java/com/iflytek/skillhub/storage/LocalFileStorageService.java
# web/src/app/router.tsx
2026-03-13 10:35:42 +08:00
vsxd
b982011614
fix(ops): align smoke test with csrf and metrics access
2026-03-13 10:23:46 +08:00
vsxd
07ea0fa822
merge: bring phase4 worktree implementation into main
...
# Conflicts:
# server/skillhub-app/src/main/java/com/iflytek/skillhub/controller/cli/CliPublishController.java
# server/skillhub-app/src/main/java/com/iflytek/skillhub/controller/portal/SkillPublishController.java
# server/skillhub-storage/src/main/java/com/iflytek/skillhub/storage/LocalFileStorageService.java
# web/src/app/router.tsx
2026-03-13 10:20:19 +08:00
vsxd
33c44fb9cc
feat(phase4): complete auth, governance, observability, and ops polish
2026-03-13 10:17:48 +08:00
vsxd
62d9d88546
chore(release): cut v0.1.0-beta.2
2026-03-13 10:13:50 +08:00
vsxd
d4deb2fb74
fix: address review-reported auth and publish issues
2026-03-13 10:06:25 +08:00
vsxd
f7798dddc5
Revert "merge: bring review fixes into feature/project-init"
...
This reverts commit 92f63f8b89 , reversing
changes made to 78e16f0fe7 .
2026-03-13 10:06:14 +08:00
vsxd
5bb887b292
fix: address review-reported auth and publish issues
2026-03-12 22:29:51 +08:00
vsxd
8c5b4d176a
feat(auth): add local username-password login
2026-03-12 21:59:28 +08:00
vsxd
3c9b95fd98
refactor(auth): remove local auth flow
2026-03-12 21:36:49 +08:00
vsxd
e63531ca3d
feat(dev): stabilize local env and phase3 flows
2026-03-12 21:33:25 +08:00
vsxd
05ec9bfbc2
feat(auth): add local username-password login
2026-03-12 21:27:01 +08:00
vsxd
559a9133ab
fix(backend): use DomainBadRequestException and ApiResponse envelope
...
- IdempotencyInterceptor: restructure Redis check to avoid swallowing
exceptions inside try-catch, use ApiResponse envelope for 409 response
- IdempotencyInterceptorTest: register JavaTimeModule for Instant
serialization, align mocks with actual implementation
- SkillRatingServiceTest: update expected exception type to match
DomainBadRequestException used in entity and service
2026-03-12 20:21:59 +08:00
vsxd
b028937abb
refactor(api): improve controllers with dedicated DTOs and better tests
...
- Extract admin DTOs (AdminUserSummary, AdminUserMutation, etc.)
- Add SkillRating request/response DTOs
- Improve controller input validation and error responses
- Strengthen controller test assertions
2026-03-12 20:12:04 +08:00
vsxd
50adf3545d
refactor(auth): improve DeviceAuthService error handling and tests
...
Strengthen device auth flow with better error messages and
additional test coverage.
2026-03-12 20:11:40 +08:00
vsxd
4dfa17dc4e
refactor(domain): improve SkillRating validation and add domain tests
...
- Add rating value validation in SkillRating entity
- Improve SkillRatingService error handling
- Add SkillPublishService and SkillQueryService test coverage
2026-03-12 20:11:32 +08:00
vsxd
cab627be02
feat(infra): add i18n messages, Redis config, and slug normalization migration
...
- Add rating/admin i18n message keys (en + zh)
- Improve IdempotencyInterceptor error handling
- Add RedisTemplateConfig for consistent serialization
- Add V4 migration to normalize skill slugs
- Fix RequestIdFilterTest
2026-03-12 20:11:24 +08:00
vsxd
c0e9c10e15
feat(admin): add idempotency layer and admin management API
...
- Add IdempotencyRecord entity with status tracking (PROCESSING/COMPLETED/FAILED)
- Implement IdempotencyInterceptor for request deduplication via X-Request-Id header
- Add scheduled cleanup tasks for expired and stale idempotency records
- Create admin API endpoints for user management (list/update role/update status)
- Create admin API endpoints for audit log viewing with filtering
- Add comprehensive unit tests for all components
- Configure test Redis mocks to support idempotency layer
2026-03-12 19:32:09 +08:00
vsxd
efd43ef3cd
feat(compat): add ClawHub compatibility layer
2026-03-12 19:20:02 +08:00
vsxd
fae775eb97
fix(test): provide mock RedisTemplate for test context
...
- Add TestRedisConfig with mock RedisTemplate bean
- Restore DeviceAuthService as normal @Service (no conditional)
- Restore controllers as normal @RestController (no conditional)
- Remove DeviceAuthConfig and DeviceAuthWebConfig (not needed)
- All 179 tests pass
2026-03-12 19:08:25 +08:00
vsxd
5cc595b0ff
feat(cli): add skill package check endpoint
2026-03-12 18:26:50 +08:00
vsxd
f47377cff1
feat(cli): add Device Auth controllers
2026-03-12 18:19:03 +08:00
vsxd
9a4d64b11b
feat(cli): implement DeviceAuthService with Redis storage
2026-03-12 18:13:46 +08:00
vsxd
37fd831ce7
feat(cli): add Device Flow data models
2026-03-12 18:11:13 +08:00