Commit graph

442 commits

Author SHA1 Message Date
XiaoSeS
3db3c9685f feat(redis): complete cluster connection support
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-07-29 17:36:06 +08:00
XiaoSeS
dad3c15f92 chore(redis): merge current main for cluster support
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-07-29 16:11:31 +08:00
XiaoSeS
2854b26b5d fix(helm): resolve deployment review blockers
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-07-29 14:04:26 +08:00
XiaoSeS
e72c17b09f chore(helm): merge current main for validation
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-07-29 13:49:18 +08:00
XiaoSeS
9f602f8184
Merge pull request #480 from yaffir/main
fix(auth): hide placeholder OAuth providers
2026-07-29 09:00:19 +08:00
XiaoSeS
7872e64177
Merge pull request #609 from iflytek/fix/auth-revoked-token-validation
test(auth): cover revoked CLI token lifecycles
2026-07-29 03:37:47 +08:00
XiaoSeS
19c3070291
Merge pull request #607 from gale-popai/fix/device-auth-redis-typing
fix(auth): read device-code state via ObjectMapper conversion, not cast
2026-07-29 03:37:25 +08:00
XiaoSeS
c5a2b18fd9
Merge pull request #592 from shychee/fix/label-search-sync-async
fix(search): rebuild search index asynchronously after label change
2026-07-28 23:35:11 +08:00
XiaoSeS
155ab8f6d5 fix(auth): hide placeholder OAuth providers
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-07-28 22:16:45 +08:00
ylhu16
fab07cbc92 Merge remote-tracking branch 'origin/main' into review/pr480-20260728 2026-07-28 22:10:53 +08:00
gale-popai
d977ea9dc4
fix(api): tell callers why a request was forbidden (#610)
* fix(api): tell callers why a request was forbidden

The scope filter already computes an exact reason ("Missing API token
scope: skill:delete", "API token cannot access endpoint: /x") and the
access-denied handler discarded it, returning a bare "Forbidden" for
every case: missing scope, endpoint closed to API tokens, and paths
that simply don't exist. Clients cannot tell those apart, so they
guess — the published CLI reports every 403 as "token may lack
required scope", which sent us debugging token scopes for an hour when
the real causes were a revoked token and a mistyped namespace path.

The reason now rides in the response via a new error.forbidden.detail
message (en + zh), and is logged alongside the exception type.

Signed-off-by: Gal Eyal <gal.e@popai.health>

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(api): safely expose API token denial reasons

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

---------

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-07-28 17:42:20 +08:00
Gal Eyal
8435ee1ab1 fix(auth): read device-code state via ObjectMapper conversion, not cast
The shared RedisTemplate uses GenericJackson2JsonRedisSerializer with
the application ObjectMapper, which embeds no type information, so
stored DeviceCodeData deserializes as a LinkedHashMap. The typed casts
in pollToken and authorizeDeviceCode then throw ClassCastException on
every call, making the whole device authorization flow unusable
(every poll returns 500).

Convert the raw value with ObjectMapper.convertValue instead of
casting; this reads both the current untyped map format and any typed
format, so no stored-data migration is needed. Adds bean setters to
DeviceCodeData for map conversion and regression tests that feed the
service exactly what Redis returns in production (untyped maps).

Fixes #604

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Gal Eyal <gal.e@popai.health>
2026-07-28 10:27:37 +03:00
dongmucat
5012b31af2 test(auth): cover CLI session fallback (#605)
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-28 15:22:11 +08:00
FenjuFu
4fdc7e3dc5
fix(publish): delete review tasks of any status when replacing a version (#601)
Some checks are pending
Deploy Docs / build (push) Waiting to run
Deploy Docs / Deploy (push) Blocked by required conditions
Security / Dependency Review (push) Waiting to run
Security / CodeQL (java-kotlin) (push) Waiting to run
Security / CodeQL (javascript-typescript) (push) Waiting to run
Security / CodeQL (python) (push) Waiting to run
* fix(publish): delete review tasks of any status when replacing a version

Re-uploading a rejected version under the same version number returned
HTTP 500. deleteReplaceableVersionArtifacts only removed a PENDING review
task, but a rejected version owns a REJECTED one; that row kept a foreign
key on the skill_version, so the subsequent delete hit a constraint
violation that surfaced as a 500.

Delete every review task attached to the version instead.

Signed-off-by: FenjuFu <92919259+FenjuFu@users.noreply.github.com>

* test(publish): drop the spring-test dependency from the new test

skillhub-domain has no spring-test on its test classpath, so
ReflectionTestUtils does not resolve there. Use plain JDK reflection for
setting the generated id and invoking the private method.

Signed-off-by: FenjuFu <92919259+FenjuFu@users.noreply.github.com>

* fix(publish): constrain rejected version replacement

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

* test(publish): verify replaced review is deleted

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

* test(e2e): use generated API response types

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>

---------

Signed-off-by: FenjuFu <92919259+FenjuFu@users.noreply.github.com>
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
Co-authored-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-07-28 13:57:35 +08:00
dongmucat
726eeac8b2 test(auth): cover token replay and private search (#605)
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-28 13:52:26 +08:00
dongmucat
06cecd4237 test(auth): cover restricted CLI read authorization (#605)
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-28 12:51:09 +08:00
dongmucat
52843c8020 fix(test): assert CLI download media type (#605)
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-28 12:16:28 +08:00
dongmucat
83b621880e test(auth): cover persisted CLI token states (#605)
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-28 12:03:24 +08:00
shychee
de033da537 fix(search): make index writes REQUIRES_NEW to survive async caller-runs fallback
The @Async rebuildSkill fix relied on a fresh thread giving a clean
transaction boundary. But skillhubEventExecutor uses CallerRunsPolicy:
under saturation the rejected task runs on the caller (request) thread,
back inside the afterCommit synchronization phase — the original failure
context where the @Transactional index write is silently dropped.

Mark SearchIndexService.index as REQUIRES_NEW so it always suspends any
lingering post-commit synchronization and commits in its own transaction,
independent of whether the async dispatch actually happened.

Add regression tests: detach removes the label keyword, and a synchronous
rebuild inside the afterCommit phase still persists the document (fails
without REQUIRES_NEW).

Signed-off-by: shychee <shychee96@gmail.com>
2026-07-22 18:54:38 +08:00
shychee
74bad000e3 fix(search): rebuild search index asynchronously after label change
Attaching or detaching a skill label triggers a search index rebuild via
an afterCommit callback. Because LabelSearchSyncService.rebuildSkill ran
synchronously on the request thread, the @Transactional index write
executed inside the already-committed transaction-synchronization phase
and was silently dropped -- the search document was never written, so
label keywords never became searchable.

Move rebuildSkill onto the skillhubEventExecutor with @Async (matching the
existing rebuildSkills batch path) so the rebuild runs on a fresh thread
and transaction. Add an integration test that fails on the old synchronous
path and passes with the async fix.

Signed-off-by: shychee <shychee96@gmail.com>
2026-07-22 18:38:00 +08:00
lhb6540
5d379dcaaf fix(helm): 修正组件启停与依赖配置并增加 values 校验
在配置进入 Kubernetes 前完成父 Chart 校验,并补齐剩余的依赖配置契约。

- 让 Service、HPA 和 PDB 正确遵循组件启用状态
- 校验 Ingress、自动扩缩容、外部依赖和共享存储的组合配置
- 增加 values.schema.json 和 Helm 配置契约测试并接入 CI
- 统一 PostgreSQL Primary 与 Read Replica 的 max_connections 配置
- 修正 Redis Sentinel 节点、依赖等待和独立密码配置
- 允许覆盖依赖等待容器镜像,支持完整私有镜像仓库部署
- 兼容现代与旧式 IngressClass,并支持多域名 TLS 和证书 SAN
- 增加 GitOps 稳定 Secret 模式,阻止离线渲染产生随机凭据漂移
- 引用用户可控的 ConfigMap 字符串,并推导 TLS 安全 Cookie 和设备认证默认值
- 补充 Sentinel、RWX 存储、TLS Cookie、PVC 保留、私有镜像和 GitOps 文档
- 增加 Redis 数据密码与 Sentinel 密码分离的应用配置测试

已通过 Helm 严格 lint、渲染场景、配置契约测试、kubeconform、后端测试套件和 Sentinel 专项配置测试。

Signed-off-by: lhb6540 <lhb6540@gmail.com>
2026-07-15 17:19:24 +08:00
dongmucat
3a254d7524 fix(auth): guard SUPER_ADMIN role mutations
Signed-off-by: dongmucat <1127093059@qq.com>
2026-07-01 16:23:45 +08:00
dongmucat
8413ee3950
Merge pull request #554 from iflytek/fix/auth-password-settings
Some checks failed
Security / Dependency Review (push) Has been cancelled
Security / CodeQL (java-kotlin) (push) Has been cancelled
Security / CodeQL (javascript-typescript) (push) Has been cancelled
fix(auth): restore password settings access
2026-06-24 10:50:26 +08:00
dongmucat
e501be9cf8 feat(promotion): improve promotion review dashboard
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-24 09:28:43 +08:00
dongmucat
665ee0499a feat(auth): add ISSUE-60 password capability field
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-22 12:40:01 +08:00
dongmucat
f8ea4e67e4
feat(cli): support anonymous public search and install
feat(cli): support anonymous public search and install
2026-06-18 14:29:45 +08:00
moses
cb950c2d21
Merge branch 'iflytek:main' into main 2026-06-18 13:57:42 +08:00
dongmucat
48a1de9640 fix(notification): preserve SSE headers for notification stream
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-17 15:19:07 +08:00
dongmucat
cf22f568f7 test(cli): align auth tests with bearer hardening
Refs: 25f57a32-5f1d-4d56-b6b7-9b6b7b868799
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-17 11:35:17 +08:00
dongmucat
cb4bf94711 fix(cli): filter installable search before pagination
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-17 11:35:16 +08:00
dongmucat
5a708a5bd6 fix(domain): reject anonymous restricted resolves cleanly
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-17 11:35:16 +08:00
dongmucat
f5259daa94 fix(cli): require installable latest in search
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-17 11:35:16 +08:00
dongmucat
32cc316b30 fix(cli): align anonymous installability rules
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-17 11:35:16 +08:00
dongmucat
b56973fb80 fix(auth): fail closed invalid cli bearer tokens
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-17 11:35:16 +08:00
dongmucat
e4e1639833
Merge pull request #536 from iflytek/fix/review-super-admin-self-promotion
fix(review): allow super admin self promotion review
2026-06-17 11:25:09 +08:00
dongmucat
a85298f7ae
Merge pull request #508 from iflytek/fix/security-review-hardening
fix(security): harden review findings
2026-06-17 11:08:38 +08:00
dongmucat
a23cbd84eb
Merge pull request #530 from iflytek/fix/issue-51-profile-review-notifications
fix: admin notifications for profile review requests
2026-06-17 11:08:10 +08:00
dongmucat
e50140272b fix(security): close review hardening gaps
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-16 17:48:15 +08:00
dongmucat
a73dba5f80
Merge pull request #533 from iflytek/fix/publish-notification-owner
fix(notification): avoid publish notice for promotion reviewers
2026-06-16 15:16:08 +08:00
dongmucat
73767a9022 fix(notification): avoid publish notice for promotion reviewers
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-16 12:19:27 +08:00
dongmucat
8527409742 fix(notification): keep SSE live push streams open (#524)
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-16 11:57:49 +08:00
dongmucat
256344cbde fix(review): allow super admin self promotion review
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-16 11:29:39 +08:00
dongmucat
a865960cf3 fix(notification): ISSUE-51 add profile review notifications
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-16 10:33:02 +08:00
dongmucat
6d6577faa2 fix(bootstrap): confirm builtin publish warnings
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-16 10:23:02 +08:00
dongmucat
abdad25df3 feat(bootstrap): add agentguard builtin skill
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-15 15:32:35 +08:00
dongmucat
40d7de8462 fix(security): harden review findings
Signed-off-by: dongmucat <1127093059@qq.com>
2026-06-12 14:40:30 +08:00
dongmucat
4776550391
Merge pull request #498 from iflytek/feature/cloud-url-builtin-skills
feat(bootstrap): sync built-in skills from cloud manifest
2026-06-11 17:27:26 +08:00
XiaoSeS
a88b09e51b fix(publish): accept case-insensitive SKILL.md uploads 2026-06-11 16:34:13 +08:00
yuchangfu
ffbaa15243 Merge branch 'main-1' 2026-06-11 11:53:47 +08:00
yuchangfu
92e7bd3def feat(redis): add standalone and cluster mode support with backward compatibility 2026-06-11 11:52:25 +08:00