feat: 项目记忆分图与逐图故障隔离,整合显式部署策略 - #770
Merged
Merged
Conversation
- Session 新增接纳时固定的 scope 宽键,缺失维度即 default,旧行不迁移 - SESSION_ADMISSION 支持维度 owner 注册,首次接纳时校验取值 - 新增 projects 插件拥有 project 维度,项目只改名或归档 - Akasha 声明 embedding 记忆槽位,按 global/isolated/off 策略路由到默认图或独立图 - Web 侧栏新增项目分组与新建项目弹窗,可选择记忆策略 - 决策 0073,新增 SES-010、MEM-013
…xes-20260925 # Conflicts: # plugins/akasha/plugin.py # plugins/conversation/plugin.py
kachofugetsu09
marked this pull request as ready for review
September 26, 2026 04:05
This was referenced Sep 26, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题与结果
Change intent
change_type:featuresemantic_delta:compatible(无 scope 的旧 Session 字节不变,缺失策略即 global,与现状一致)capability_owner:mixed(Core:Session scope 与维度注册;plugin:projects、akasha、conversation、akashic_clients;frontend)consumer_scope:Web chat、conversation 来源、Akasharuntime_patch:noneruntime_patch_reason:不适用authoritative_state_owner:sessions.attributes.scope归 Core(SESSION_ADMISSION);项目记录归 projects;记忆策略与独立图归 Akashaclient_only_alternative:不可行。项目归属与记忆路由必须是持久事实,前端分组无法决定 Akasha 写入哪张图concept_gate:requiredconcept_gate_reason:新增 Core 公共扩展点(维度 owner 注册)并改变 Akasha 的存储布局protected_state:sessions.db/sessions.attributes、sessions.db/owner_records、memory/akasha.db、memory/akasha-graphs/memory/akasha.db;删除项目或图文件改动范围
session/log.py(SessionAttributes.scope)、agent/plugin_composition/messages.py(register_dimension、首次接纳校验)、agent/plugin_composition/message_view.pyplugins/projects/(新增)、plugins/conversation/plugin.py、plugins/akashic_clients/web_chat.py、plugins/akasha/scopes.py(新增)以及 Akasha 的 plugin/runtime/consumer/rebuild/recall/toolsfrontend/chat/src的侧栏、项目导航、新建弹窗、controllerprojectneedSES-010/MEM-013、INDEX、持久化状态地图、测试基线sessions表结构不变,只有attributesJSON 可选增加scope键decode_attributes拒绝未知键),所以已经用过项目功能的 workspace 需要先恢复sessions.db备份再回滚;独立图目录可以原样保留验证
pytest -q tests44 passed(当前2d3b89c7)。Session scope 回归节点test_message_log.py::test_session_scope_is_fixed_at_admission_and_absent_for_old_sessions,守护基线 §1 的 C4(Session 固定事实不可改写)和 O(新增维度不改旧行),已登记为基线第 42 条。它在 main 上会失败,因为 main 没有SessionAttributes.scopedplugin_boundary.py checkR1–R3 均为 0;check_yoyo_migrations.py、generate_control_schema.py --check与generate_host_bridge_protocol.py --check通过;npm run typecheck通过session_dimensions的消息接纳后 scope 为(("project", pid),);未知项目被MessageConflict拒绝;改变 scope 被拒绝;同一取值的策略第二次写入被拒绝逐图故障隔离修复(2026-09-26)
0c8e88a7f994250805fabbea20ea92f79453fb2c、2d3b89c7b6aeffb5a1dcc8a108183021b1713072。维护者确认故障图明确不可用,其他图继续学习与召回。break;公共 health 又允许健康图清除其他图错误。现在分别记录公共 embedding 故障与逐图故障;已知图故障继续下一张图,错误包含图身份;未预期异常继续传播。recall_memory与remember_memory/forget_memory共用路由 guard,拒绝已记录故障的图并报告身份与原因;不改变已有查询回执恢复语义。3754afec上健康图等不到学习而超时;工具入口补丁前反馈错误不带图身份,新增断言两组失败。最终专门回归 2 passed,完整基线 44 passed(9.92s)。2d3b89c7补丁后重跑完整 pytest、tests/Akasha pyright 与 plugin_boundary;其余检查输入未变,沿用0c8e88a7的通过结果。Host Bridge 生成器用uv run --no-project --with grpcio-tools==1.78.0隔离运行。3754afec;可 revert 本修复,无持久数据迁移。修改前源码归档:/tmp/pr770-before-graph-health-3754afec-20260926.tar。正交性与概念完整性
yesconcept_review/ gpt-5.6-terra / xhigh2d3b89c7b6aeffb5a1dcc8a108183021b1713072;累计基线c4bc49343a9e90a66a57fb1aab877eea07723b6ascope:Core,接纳时固定project归 projectsRecallTool和FeedbackTool从持有单个路径改为按 Session 取图,以适配多图session_dimensions→ web_chat metadata → conversationaccept→SESSION_ADMISSION.ensure→ 维度 ownercheck→MessageLog.ensure_session。失败时在写入 Input 前抛错。维度注册走ctx.effect,插件卸载时随之清理project字面量;前端宿主按插件 ID(projects、akasha)组合查询,决策 0073 记录了以后改用project.settings槽位2d3b89c7在共享路由加入 guard,并扩展真实工具 binding 回归,补丁前失败、补丁后通过。工作手册
projectneed.md、相关决策和NOW.mdNOW.md:没有对应事项,不适用关联:#369、#370(Project Session / Project Akasha 草案,本 PR 只提升项目归属和记忆图两部分);#630
整合线上部署策略(2026-09-26)
feature/deploy-operator-policy@a700146e与本 PR,复核后合入 main,再更新 hua-home。8190b8170bb4e462eb3ae6e788c9145efcb57290。代码自动合并;重复决策号拆为 scope 0073、部署策略 0074,入站链接同步。concept_review/ gpt-5.6-terra / xhigh 对8190b8170bb4e462eb3ae6e788c9145efcb57290审查通过,无 must-fix。确认显式 targets、migration 审批、停止期 backup、Root CAS、resume 与 projects 正式安装链;未运行测试。此前2d3b89c7结论保留为 scope/图故障修复的相邻证据。8190b817的check-and-test与plugin-boundary均 success。c0324b7aa7a815968773dbcaf03e37f82424a760,其 tree 与已验证的8190b817一致。sha256:70c874db0183b8ebc9baaf62859d57d0e454da27042ef4f5ba1745514236540a。active receipt:deploy-4838d5e0a7dcf34251b27140.json,status/phase 为 active,doctor healthy。--backup安装完成;回执backupDir=null、migration_ids=[]。首次备份在任何插件更新前中断,未发布 manifest,保留现场但不作为完整恢复点。akasha@release、akashic_clients@release、conversation@release;随后经正式 plugin-install 安装 projects,update_idpr770-projects-c0324b7a-20260926再次查询为 selected/active。8c41b32edbe38bbcbc08a1c4178330232d1089868c7c6d5189f6cff396798465,64 selected / 64 active,source_failures 为空。逐项比较部署前 selection:只有三个计划目标改变,新增 projects,其余 60 项 ref 保持不变。