fix(voice): speak first without loosening truth or question-slot rules #48
Open
jesse
wants to merge 0 commits from
codex/agent-voice-20260901 into staging
pull from: codex/agent-voice-20260901
merge into: root:staging
root:main
root:codex/report-writer-failure-20260902
root:staging
root:codex/rectification-question-in-message-20260902
root:codex/report-blocked-repairs-20260902
root:codex/fix-rectification-duplicate-collect-20260902
root:codex/rectification-ux-20260902
root:codex/unified-loading-20260902
root:codex/streaming-ux-20260901
root:codex/consultation-birth-accuracy-20260901
root:codex/rectification-tails-20260901
root:codex/rectification-provisional-adopt-20260901
root:codex/frontend-optimization-20260828
root:codex/diagnose-rectification-request-20260827
root:codex/staging-skill-style-present-20260820
root:codex/fix-sidebar-contract-ci-20260820
root:codex/rectification-p0-p1-20260820
root:codex/fix-report-scroll-product-admin-20260818
root:codex/fix-daily-starlanguage-guard-20260818
root:codex/ui-optimize-staging-20260817
root:codex/remove-admin-step-up-20260816
root:codex/fix-rectification-focus-baseline
root:codex/pr8-local-gate-closure
root:codex/pr8-evals-observability
root:codex/pr7-product-domain-registry
root:codex/pr6-report-document-v2
root:codex/pr5-report-evidence-bundle-v2
root:codex/pr4-rectification-event-contract-v2
root:codex/pr3-rectification-v10
root:codex/pr2-final-response
root:codex/pr1-skill-registry
root:codex/fix-rectification-home-new-session-20260812
root:codex/fix-rectification-turn-projection-20260812
root:codex/rectification-same-turn-confirm-20260812
root:codex/fix-rectification-current-turn-binding-20260812
root:codex/fix-rectification-history-hydration-20260812
root:codex/rectification-activity-birth-context-20260812
root:codex/fix-rectification-free-settlement-20260811
root:codex/fix-rectification-case-context-20260811
root:codex/fix-rectification-session-model-20260811
root:codex/fix-feature-flag-admin-runtime-policy-20260811
root:codex/staging-gate-repair-20260811
root:codex/admin-account-reset
root:codex/agentic-consultation-runtime
root:codex/production-selfhosted-migration
root:docs/correct-report-smoke
root:docs/close-staging-release-acceptance
root:fix/staging-admin-verification-host
root:fix/staging-public-verification-race
root:fix/staging-gate-build-timeout
root:fix/staging-gate-retry-and-admin-audit
root:fix/staging-gate-checkout-retry
root:docs/close-staging-controller-incident
root:fix/staging-gate-attested-controller
root:fix/staging-controller-fetch-timeout
root:docs/personal-report-staging-acceptance
root:fix/staging-ssh-secret-and-env-owner
root:docs/record-staging-env-owner-drift
root:docs/record-staging-host-key-rotation
root:feat/one-way-skill-personal-report
root:codex/fix-staging-artifact-resolution-20260805
root:codex/fix-vendored-artifact-inputs-20260805
root:codex/run-vendored-artifact-uploader-20260805
root:codex/fix-local-artifact-inputs-20260805
root:codex/internal-gitea-artifact-action-20260805
root:codex/use-gitea-artifact-action-20260805
root:codex/fix-gitea-artifact-upload-20260805
root:codex/fix-gitea-manifest-auth-20260805
root:codex/integrate-github-main-gitea-20260805
root:revert/staging-from-main
root:delivery/payment-package-epay
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "codex/agent-voice-20260901"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Agent 可见输出改成先说人话,再守红线。基线是当时的
origin/staging@8617eb56;提交前已并入当前origin/staging(8b7eda9f,skill-parity 任务书)。顺序:任务 0 对照 → A → B → C → E → D。frontend/src/lib/rectification-agentic/user-copy.ts。user_meaning仍给模型/审计;用户可见面走engineMeaningToDisplayCopy。Python 引擎字段未改。skill 仍是 10.0.14。任务 0 · 事故 case
f83d9b42改前 / 改后形状:Skill 10.0.14;开场窗 04:45–05:15(30 分钟)收到 05:00–05:07(7 分钟);代表分钟 05:00。改前串按
8617eb56硬编码 + route 直出复排,冻在ACCIDENT_CASE_BEFORE_COPY。改后由accidentCaseHardcodedTurns从 copy 模块重建。校正 assistant 串
对照里开场不再出现语义重复的两连问(E-1)。
婚姻主题咨询开场三段
改前: 第一眼就是
## 统一参数与原始结构,然后## 关系,文末## 技法审计表。改后: 先 3–6 句无标题口语(方向 + 一句承接),再
## 统一参数与原始结构→## 关系→## 技法审计表(Level 2 顺序不变)。红线 1 · 真实性 / 边界语义
natalSpokenReportContract+ consult user turn)。answer_policy/ precise-timing 守卫未动。containsBoundarySemantics+REPRESENTATIVE_MINUTE_DISCLAIMER。事故 case 交付句见上表。frontend/tests/agent-voice-copy-contract.test.ts(delivery/adopt 语义、中间轮不含完整边界句);rectification-provisional-adopt.test.tsB2;rectification-answer-choice.test.ts采用叙述。红线 2 · 问题槽归属
GENERIC_COLLECT_QUESTION仍由spokenFollowupForUser/ focus.prompt 写出,不由模型自拟。rectification-server-focus.test.ts、rectification-decision-authority.test.tsinvariant 3(answer_choice仍把p_assistant_message === currentQuestion.prompt写入历史)、agent-voice-copy-contract.test.ts的 prompt 源扫描。任务 E-1 · 结构化判定(不得用正文正则)
shouldPersistFocusPromptTurn为 false 仅当:action === "opening"且 (kind === "collect_spoken"或intent === "collect_method_evidence") 且assistantBodyPresent === true。矩阵(测试锁定):
源码证明:
shouldPersistFocusPromptTurn函数体没有.test(/.match(/.search(/includes(。stream 路径把assistantBodyPresent: Boolean(result.answerText?.trim())传入,只问「有没有非空正文」,不问正文说了什么。BUG-467 记在docs/BUG_HISTORY.md(复发自 BUG-460;不得用正文字符串判断「是否已问过」)。任务 E-2 · user_meaning 分层
用户可见(已改走 display copy):
rectification-board.tsx)ConfirmationGateDisclosure)event_quality选择卡 prompt(choice-card.ts)prospectiveWindowsNarration/ hostNarration 附加句仍进模型/审计(原样,含「不得…」):
sessionOutcomeView、buildNextUserAction、skill verification report、probe briefs、Python 引擎user_meaning引擎字段未删、未改语义。
文案 旧 → 新 → 保留的语义约束
UNVERIFIED_BIRTH_TIME_NOTICE按任务书跳过。测试断言若从逐字旧句改为语义匹配,上表即对应清单。机器腔词表(≥8 条,含本次清理的全部旧词)在
agent-voice-copy-contract.test.ts。Test plan
cd frontend && ./node_modules/.bin/tsc --noEmitexit 0rectification-*非数据库测试 fail=0(730)consultation-*/consult-*/chat-*fail=0(289,含 voice contract)agent-voice-copy-contract.test.ts:词表、边界语义、E-1 矩阵、E-2 display copyjyotisha.chat上跑开场双问或婚姻咨询rectification-*-database.test.ts:本机 Docker 下有 3 条database migration failed(并行时)/ 串行重试后 PR-4 与 agent-api migration 仍失败。本 PR 未改 SQL 或 migration runner;与文案无关。ingest P0、v9 open、evidence lifecycle、legacy backfill、profile gating(重试)已绿。未验证
没有在线上 staging 用事故 case 走一遍真实模型开场。对照与红线证明来自本机源码和测试。
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.