Repository navigation
feat(memory): 支持 Portal 查看经验记忆 - #734
openjiuwen-sync-bot[bot] wants to merge 1 commit into
Conversation
|
|
1 similar comment
|
|
|
head_sha: 变更摘要本 PR 为 Portal 增加“经验记忆”只读查看能力:宿主可通过 主要改动
测试覆盖:新增/扩展了 |
|
head_sha: 代码审查审查结论发现汇总(共 4 条)
逐文件复核情况
总体风险判断改动方向清晰、防线基本闭合:组织取自认证身份、空间由宿主签发时绑定、浏览器不能自带 Scope、经验条目在 Portal 侧统一只读(含
💬 仅评论 |
| try: | ||
| self._authorize(security, target, Action.READ, "experience_source") | ||
| except (NotFoundError, PermissionDeniedError): | ||
| continue |
There was a problem hiding this comment.
head_sha: 11604cb65f415d14d20e0b0c8ddf61f24b0e46a2
🟡 Medium Priority
改动行(query_ops.py 983-1007):新增的 experience_task_sources 是本 PR 唯一新增的跨 Scope 鉴权路径——它按复现事件里的五元组重建来源 Scope,再用新登记的入口 experience_source 逐条做内容轴 READ 鉴权(space_roles.py 212),失败才跳过。
证据链与未被覆盖的失效模式:
建议:在 tests 中构造一条带 repro 事件(write_reproduction_event,source_scope 五元组与轨迹同用户)的经验,断言同用户可见来源、跨用户或来源空间无读权限时 sources 为空;并在 write_document 参数化分支里补一次 experience_rate + experience_get 的往返断言。
| if(name==='search'){await switchTab('memories');setSearchMode('semantic');$('memory-filter').focus();return;} | ||
| notice('');closeDetail();clearTimeout(filterTimer);renderNavigation(name); | ||
| if(name==='experience')await browserReady; | ||
| if(activeTab!==name)return; |
There was a problem hiding this comment.
head_sha: 11604cb65f415d14d20e0b0c8ddf61f24b0e46a2
🟡 Medium Priority
建议:把 await browserReady 包在 try/catch 中:失败时显示提示(notice/bootstrapFailed)并 return,避免未处理拒绝与残留弹窗;或改为不在 switchTab 中 await,让 loadMemories→request() 现有的错误处理负责提示。
11604cb to
10efa7c
Compare
10efa7c to
b055f49
Compare
Paired: GitHub #734 ↔ GitCode !523
What type of PR is this?
/kind
Self-checklist:(请自检,在[ ]内打上x,我们将检视你的完成情况,否则会导致pr无法合入)
Linked Closing Issues: