lili 1c8da86e82 fix(knowledge): unbind 真软删(修 @TableLogic 空操作)+ 投影读回嵌入式 DB 坐实
8aad7a4 的 markDeletedByBindingId 用实体 setDeleted(true) 试图软删,但 deleted 是 @TableLogic 字段,会被 MyBatis-Plus 在普通 update 剥离 → 解绑实际未生效,行仍出现在 selectActiveByWorkId 读回。改用 setSql("deleted = true") 强制写该列(H2/PG 通用)。

反假绿:新增 MuseKnowledgeSourceBindingProjectionRoundTripTest(嵌入式 H2 真往返)端到端坐实 bind 写投影→按 work 读回、unbind 后读回消失、同源绑定到其它作品的投影存活;此 bug 即由该测试挖出(此前仅 mock 写证据无法暴露)。MapperTest 改为断言 setSql 真机制(原断言 update.getDeleted()==TRUE 实为被剥离的空操作)。

附:补齐 knowledge 模块首套嵌入式 DB 测试基建(application-unit-test.yaml + create_tables.sql + clean.sql,logic-delete 对齐 muse-server 生产 true/false)。

验证:RoundTripTest 2/2、knowledge-server 整套件 216/216 绿(clean 重编译,反假绿)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 10:03:09 -07:00
2026-06-19 04:26:32 -07:00
2026-06-19 04:26:32 -07:00
Description
No description provided
36 MiB
Languages
Java 64.8%
TypeScript 17.2%
Vue 13.8%
HTML 1.5%
JavaScript 1.2%
Other 1.3%