Skip to content

fix(prompts): 自然闲聊与侧写事实判断(v3.18.8) - #113

Merged
69gg merged 4 commits into
mainfrom
bugfix/natural-chat-and-profile-trust
Oct 24, 2026
Merged

69gg merged 4 commits into
mainfrom
bugfix/natural-chat-and-profile-trust

Conversation

@69gg

@69gg 69gg commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

变更说明

日常随口问“你怎么还记得”时,Bot 容易主动展开记忆机制、附加没问的解释与辩解;群聊里的玩梗和复读也可能被当成真实身份。本 PR 调整提示词中的表达取舍和事实判断,并统一版本为 3.18.8,补充对应 changelog。

影响范围

  • 两套主提示词与每轮提醒:区分随口接话和认真问原理,日常短句默认用空格代替逗号;明确的技术追问、引用、代码与数据保留所需细节和标点。
  • 观察提取、事件改写与侧写合并:玩笑、角色台词和未确认转述不升级为人物资料,多人复读及同源重复不算独立佐证;本人认真自述与明确纠正仍可采纳。
  • 侧写维护:先判断可信度再比较新旧,无可靠信息时允许不建档;明确发现误记时清理错误条目及派生标签、评价与锐评,不猜替代身份。
  • 后端、Console、Chat 及各自锁文件统一为 3.18.8,依赖版本保持一致。

关联 Issue

无。

自检

  • uv run ruff check .、uv run ruff format --check . 与 uv run mypy .(提交钩子执行)
  • UNDEFINED_DEPLOY_WHEEL_CHECK=1 uv run pytest tests/ --cov --cov-report=term -q(4611 项通过、1 项跳过,覆盖率 70.27%,达到 65% 门槛)
  • npm --prefix apps/undefined-console run check(提交钩子执行)
  • npm --prefix apps/undefined-chat run check(提交钩子执行,含 507 项单测、50 项端到端测试、构建回归及 76 项 Rust 测试)
  • uv run python scripts/release_notes.py validate --tag v3.18.8
  • uv build --wheel,并核对打包后的提示词、end 工具说明和版本文件与源码一致
  • 配置项与界面截图:不适用,原生客户端仅变更版本元数据。

备注

提示词调整尚未做真实模型对照,不能保证识破所有玩笑或误导。既有侧写不会自动批量清洗,后续合并取得明确纠错依据时才修正。更新随包提示词后需重启 Bot 加载资源。

Summary by CodeRabbit

  • 对话体验

    • 日常短句停顿默认使用空格,简短回复通常不以句号收尾;正式、引用或结构化内容仍保留适当标点。
    • 使用记忆回应时,简要说明有依据的来由;明确询问相关内容时再作解释。
  • 记忆与侧写

    • 更谨慎地区分认真自述、行为、玩笑、反讽、角色扮演和未确认转述;重复说法不再作为独立佐证。
    • 侧写优先采用可靠、稳定的信息。确认旧画像有误时,可清除错误条目及其派生内容;既有侧写不会自动批量清理。

69gg added 4 commits October 24, 2026 11:20
Distinguish casual recognition from requests for implementation details, and avoid unasked system explanations and defensive caveats.
Make spaces the default replacement for casual commas while preserving required punctuation in formal prose, quotations, code, and data.
Require contextual evidence before treating claims as identity facts across observation collection, rewriting, and profile merging. Do not count repetition as corroboration, allow missing profiles to remain absent, and remove confirmed misrecords without inventing replacement identities.
Summarize natural conversation and profile fact handling changes, and synchronize the backend and native client versions.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-24T03:40:21.862105Z
We couldn’t complete this review. Comment @codex review to try again.
81118a8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 2680cf2 and 81118a8.

Files ignored due to path filters: 5
  • apps/undefined-chat/package-lock.json is excluded by !**/package-lock.json
  • apps/undefined-chat/src-tauri/Cargo.lock is excluded by !**/*.lock
  • apps/undefined-console/package-lock.json is excluded by !**/package-lock.json
  • apps/undefined-console/src-tauri/Cargo.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
Files selected for processing: 20
  • CHANGELOG.md
  • apps/undefined-chat/package.json
  • apps/undefined-chat/src-tauri/Cargo.toml
  • apps/undefined-chat/src-tauri/tauri.conf.json
  • apps/undefined-console/package.json
  • apps/undefined-console/src-tauri/Cargo.toml
  • apps/undefined-console/src-tauri/tauri.conf.json
  • docs/cognitive-memory.md
  • docs/usage.md
  • pyproject.toml
  • res/IMPORTANT/each.md
  • res/prompts/historian_profile_merge.md
  • res/prompts/historian_rewrite.md
  • res/prompts/undefined.xml
  • res/prompts/undefined_nagaagent.xml
  • src/Undefined/__init__.py
  • src/Undefined/cognitive/historian/tools.py
  • src/Undefined/skills/tools/end/config.json
  • tests/test_cognitive_historian.py
  • tests/test_prompt_structure.py

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

Walkthrough

This release updates conversational guidance, memory evidence rules, and historian profile merging. It adds regression checks for prompt variants and historian inputs, updates user-facing documentation, and changes project and application versions to 3.18.8.

Changes: Conversation and memory guidance

Layer / File(s) Summary
Conversational response guidance
docs/usage.md, res/IMPORTANT/each.md, res/prompts/undefined*.xml, tests/test_prompt_structure.py
Prompt and documentation guidance now favors space-separated pauses in casual short messages, limits unsolicited explanations of memory, and distinguishes casual remarks from direct questions about assistant capabilities.
Observation evidence rules
res/IMPORTANT/each.md, res/prompts/undefined*.xml, src/Undefined/skills/tools/end/config.json, tests/test_prompt_structure.py
Guidance distinguishes reliable self-reports and corrections from jokes, repetition, role-play, and unconfirmed claims. Historical context may clarify statements but cannot supply new observation facts. Tests check shared guidance and memory regression cases.
Historian rewrite and profile merging
docs/cognitive-memory.md, docs/usage.md, res/prompts/historian_*.md, src/Undefined/cognitive/historian/tools.py, tests/test_cognitive_historian.py, tests/test_prompt_structure.py
Historian guidance checks source context and reliability before recording or merging facts. It updates profile skip and correction conditions, and tests cover varied source messages, observations, and prompt evidence placeholders.
Release version alignment
CHANGELOG.md, pyproject.toml, src/Undefined/__init__.py, apps/undefined-chat/..., apps/undefined-console/...
The changelog and project and application metadata change to version 3.18.8.

Priority: Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Possibly related PRs

  • 69gg/Undefined#112: Establishes earlier casual-reply and punctuation rules in the same prompt and documentation files.
  • 69gg/Undefined#111: Establishes earlier memory and task-context boundaries that this change extends to observation and profile merging.
Merge Risk: Minimal · up to 81118

This release adjusts casual-reply tone, punctuation defaults, and how memory and profiles treat jokes and repeated claims. No blocking risk was found. Prompt behavior has not been tested against real models, and existing profiles are not cleaned automatically, but that is documented and intended.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed 标题明确说明了自然闲聊、侧写事实判断和版本变更,准确覆盖了本次 PR 的主要改动。
Description check Passed 描述完整覆盖变更说明、影响范围、关联 Issue、自检和备注。已说明测试结果、限制条件、部署注意事项,以及配置项和界面截图不适用的原因。
Docstring Coverage Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 4 files. (16 skipped: 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 4 files. (16 skipped: 16 unsupported.)

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@69gg
69gg merged commit f479504 into main Oct 24, 2026
6 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