Skip to content

[codex] 修复日程长期项保留和系统动作展示语义#191

Merged
utopiafar merged 1 commit into
memex-lab:mainfrom
utopiafar:codex/schedule-retention-latest
May 26, 2026
Merged

[codex] 修复日程长期项保留和系统动作展示语义#191
utopiafar merged 1 commit into
memex-lab:mainfrom
utopiafar:codex/schedule-retention-latest

Conversation

@utopiafar
Copy link
Copy Markdown
Collaborator

背景

这组改动修复从备份排查中发现的日程聚合体验问题:无日期长期关注项无法清除、未来真实日期事件被窗口漏掉、Action Center 清空误等同拒绝系统动作,以及诊断输入误触发系统动作创建。

最新 main 已经把系统动作拆到独立 SystemActionAgent,所以本 PR 保持 PKM agent prompt 不变,只在系统动作 agent/skill 上加窄范围保护。

Fixes #190

主要改动

  • 为无日期非 task 日程项增加 7 天展示期限:

    • 写入 display_first_seen_at / display_until
    • 继承历史期限,刷新不续期
    • 过期后在保存/读取路径过滤
    • task/todo 和有具体日期的非 task 不受影响
  • 修正日程聚合窗口:

    • 默认 lookahead 从 7 天扩到 30 天
    • dirty refresh 同时参考 fact 日期和卡片真实 start_time / due_date
    • 防止 5 月记录、6 月发生的事件被漏掉
  • 修正系统动作语义:

    • Action Center 批量清空改为 dismissed,不再写成 rejected
    • 来源卡片和日程仍可展示 dismissed 动作
    • hard reject 仍继续隐藏
    • 日程查询纳入非 rejected 的 calendar/reminder,并按标题+时间去重
  • 兼容最新 agent 重构:

    • 不改 PKM agent prompt
    • SystemActionAgent / SystemActionSkill 中明确诊断/排查输入不是创建日程同意
    • getScheduleAggregation 先做长期项过滤,再做 live task hydration
    • hydration 只读取真实 factId,跳过 system_action:* 等合成 id

验证

  • flutter test --no-pub --concurrency=1 test/agent/skills/schedule_aggregation_skill_test.dart test/agent/skills/schedule_aggregation_retention_test.dart test/agent/schedule_aggregation_run_context_test.dart test/data/services/system_action_service_test.dart test/data/repositories/get_schedule_aggregation_test.dart test/domain/models/schedule_aggregation_model_test.dart test/ui/schedule/widgets/schedule_widgets_test.dart test/ui/card_attachments/widgets/system_action_card_test.dart test/agent/task_completion_agent_test.dart
  • flutter analyze --no-pub(touched files)
  • git diff --check

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

PR Preflight Summary / PR 预检汇总

中文

  • 统一结论:低风险:两个预检均已完成,质量预检通过,可走普通手动合并流程。
  • Policy preflight:低风险。未命中打回、高风险或警告规则。
  • Flutter quality:通过。Analyzer 和 test baseline 均未发现新增问题。
  • PR head:b0ff325455748ff64f742228dc395ee96d952faf
  • Policy run:26461947897
  • Flutter run:26461947972

English

  • Combined result: Low risk: both preflights completed and quality passed; use the normal manual merge flow.
  • Policy preflight: LOW RISK. No blocking, high-risk, or warning policy signal was found.
  • Flutter quality: PASS. Analyzer and test baselines found no newly introduced issue.
  • PR head: b0ff325455748ff64f742228dc395ee96d952faf
  • Policy run: 26461947897
  • Flutter run: 26461947972
PR Policy Preflight / PR 规则预检

PR Policy Preflight / PR 规则预检

中文

  • 判定:低风险
  • 变更文件数:0
  • 变更行数:0
  • Diff 是否截断:false

未发现确定性规则问题。

English

  • Decision: LOW RISK
  • Changed files: 0
  • Changed lines: 0
  • Diff truncated: false

No deterministic policy findings.

PR Flutter Quality / Flutter 质量预检

PR Flutter Quality / Flutter 质量预检

中文

  • 总体:通过
  • Analyzer baseline:通过
  • Test baseline:通过

English

  • Overall: PASS
  • Analyzer baseline: PASS
  • Test baseline: PASS

Flutter Analyzer Baseline

  • Base issues: 312
  • PR issues: 307
  • New issues: 0

No new analyzer issues introduced by this PR.

Flutter Test Baseline

  • Base failures: 0
  • PR failures: 0
  • New failures: 0

No new Flutter test failures introduced by this PR.

@utopiafar utopiafar marked this pull request as ready for review May 26, 2026 16:42
@utopiafar utopiafar merged commit 9f650c0 into memex-lab:main May 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

日程聚合中长期关注项、未来日期和系统动作的展示语义不一致

1 participant