提交图

11 提交

作者 SHA1 备注 提交日期
cdc402888b fix: clear the three P0 defects that were bleeding in production
All three shared a shape: the symptom was invisible from the data, so every
acceptance run stayed green while the VM was failing.

daily_state still called _ensure_daily_news_reading, removed when the news
feature was retired. The VM threw AttributeError 14 times in three hours and
marked the "today's schedule" maintenance step failed, but the crash sits
after the plan is saved -- so the stored plan always looked correct. Removed
the call and added a repo-wide scan rather than a single-point assertion,
since this kind of residue is by definition somewhere you did not look.

enable_memory_companion_bridge, the master switch for the whole archive
chain, was never added to _conf_schema.json. _cfg_bool falls back to True, so
the feature worked and only its operability was missing -- nothing could have
failed. It now sits in the visible external_memory_config group, with an
assertion that _flat_get still resolves it by flat key.

A fallback plan carried today's date, and all three reuse branches key on the
date alone, so one startup timing hiccup froze a template plan into the day
and archived it as real. source="fallback" was produced and never consumed;
now a fallback can be upgraded once the provider is back, capped at three
attempts and bucketed per day.

Also fixed two test files whose classes sat after the __main__ guard (silently
dropped when run directly) and the retired-config prefix list, which only
listed the uppercase WEB_EXPLORATION_ form and missed the lowercase schema keys.

VM after restart: 0 AttributeError, 0 ERRO/Traceback, plan intact at v2/llm,
switch materialised as True. Companion suite 218 passed, joint E2E 135/135.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 05:01:56 +08:00
2518f7b6bf fix: make the daily plan chain survive startup timing and same-day rewrites
Two defects that only showed up on the real machine, both of which left the
schedule frozen on a fallback plan with nothing in the logs to say so.

The plugin asked for a chat provider 0.8s before AstrBot finished loading
them, wrote a template fallback, and stamped it with today's date -- so the
next 24 hours never retried. Resolution now falls back through get_config()
(4.26.6's Context exposes nothing else) and validates the configured id with
get_provider_by_id, because a configured default is not a loaded instance.
When nothing is ready yet the round is skipped instead of downgraded, up to
DAILY_PLAN_PROVIDER_MAX_WAITS rounds.

Once the model recovered, the real plan still could not reach the archive:
the idempotency key is always daily_plan:<date> but the plan dict never
carried a version, so every rewrite re-sent v1 and the memory side rejected
it as version_conflict. The companion swallowed that -- outbox state is only
touched when enqueue accepts, and a same key/version enqueue does not. Plans
now carry a version watermark drawn from both daily_plan and its history, and
any ok=False archive response logs a warning regardless of outbox state.

Verified on the VM: provider wait counted once and no fallback written, plan
generated at v2 with 10 segments from the model, and the stored record
upserted from the 8-segment fallback to the same v2 content.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 04:16:06 +08:00
agent-bot
2755c6e69d fix: disambiguate the two late-night windows on the timeline
深夜跨午夜(22:00-06:00),同一份计划里的 00:30 与 23:00 都叫「深夜」,
却分属两个日程日——按 window_for_datetime,7/27 的 00:30 属于 7/26 的深夜。
此前时间轴只用分钟数判定窗口,把这一维丢了,于是列表里出现两个一模一样的
「深夜」标题,看不出谁是昨夜谁是今夜。

新增 agenda_contracts.window_for_plan_minutes(计划日 + 分钟 -> 窗口名 + 窗口日期),
内部还原成真实时刻后交给 window_for_datetime,判定只保留那一处实现;
分钟数带 +1440 回绕偏移时先拆天偏移。标签渲染成「深夜 · 昨夜」/「深夜 · 今夜」。

新增 7 项回归,含与 window_for_minutes 的一致性校验。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 03:02:00 +08:00
agent-bot
eb8b1dd3b1 feat: mark four agenda windows on the overview timeline
总览时间轴此前只有条目自己的时钟区间,与运维页「当前时间段」、归档里的
窗口快照三者口径各说各的。现在统一走 agenda_contracts.window_for_minutes。

窗口标记放在时间列的色条上,不用整行底色——整行底色与透明度已经被 lifecycle
占用(is-current 用 background、is-completed 用 opacity、is-change 用 background),
再拿整行表示窗口会撞语义,尤其「深夜」与「已完成」都偏灰无法区分。
另加窗口分组小标,色觉障碍/打印/换肤时不依赖颜色也能读。

agenda_contracts 新增 window_for_minutes 与 WINDOW_SLUGS,页面与归档共用同一判定。
新增 5 项回归,含与 window_for_datetime 全天 24 小时逐点一致性校验。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 02:35:37 +08:00
agent-bot
fa0241ff99 fix: decouple MemoryCompanion bridge from LivingMemory switch; drop LivingMemory
关键修复:_memory_companion_bridge() 此前以 enable_livingmemory_integration
为总闸,而运维版把该开关硬编码成 False(原意只是「VM 不用 LivingMemory」),
把唯一长期记忆源一起关掉——Bot 个人归档链路在 VM 上整条静默停摆,
记忆库零条记录,页面显示「记忆插件 暂不可用」。改用独立的
enable_memory_companion_bridge(默认开启)。

同时删除全部 LivingMemory 代码:integration_status 的 7 个函数、
page_api 的 9 个函数与路由、main 的提示词槽位/关系网触发/状态命令/
WAL 候选路径/命令别名、group_observation 的群聊指引。

测试 178 项通过(新增 4 项钉住开关拆分与代码零残留)。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 02:11:18 +08:00
agent-bot
85d5069bbd feat: complete M6.1.3-R2 through M6.1.7 bot personal archive contract
M6.1.3-R2 非五类兼容(阻断修复):DTO date 缺失时从 occurred_at 派生,
刻意不做时区换算以与 _infer_window 同一时钟;calendar_event 取 start_at、
creative_progress 取 project.updated_at;未知 kind 不再默认 bot_observed_activity;
capture_hard_fact L4→L3;TYPE_CONTRACTS 覆盖全部 12 类,修复非五类 source_kind
兜底成 observed 污染本地记录;proactive_message 的 image_path 改为 has_image+
image_name(原样透传会被自身隐私校验整条静默丢弃);snapshot/daily_plan 透传 version。

M6.1.4 创作/媒体/主观分域:creative_progress 补 chunk 形参(生产调用点一直 TypeError
导致创作推进整步被阻断)并只留里程碑摘要;photo_generation 改为媒体索引
(原 payload 带 prompt 键与绝对路径,100% 静默丢弃);幂等键纳入隐私校验;
禁用键清单收窄,放行媒体标识键;两条 Bridge 路径统一送 body payload。

M6.1.5 Bot 专用检索 Profiles:按 Profile 分槽注入,固定槽位与条数、跨槽去重、
声明当前以本地运行态为准;旧版记忆插件回退通用检索。

M6.1.6 分层只读 API:新增 build_agenda_runtime_view 与 GET /agenda/runtime,
记忆插件停用时仍完整返回并标降级。

M6.1.7 隐私与残余收口:DTO 新增 contexts 禁用键;已删除娱乐功能(qzone/news/
web_exploration)的残余配置入口从展示面隐藏,旧值保留不删。

测试:174 项通过(pytest 与 unittest 双口径)。联合 E2E 135 项全部通过。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 01:37:40 +08:00
0e0db82519 feat: link bot personal memory bridge 2026-07-26 03:14:03 +08:00
cd9d554e0a feat: freeze ops backend page contracts 2026-07-26 00:05:56 +08:00
7b68b0625c feat: isolate bot self storage from user memory 2026-07-25 23:22:41 +08:00
0e2848db14 feat: add temporal companion calendar 2026-07-25 01:35:56 +08:00
f7c29f0e54 feat: add safe companion data migration 2026-07-24 21:10:46 +08:00