14 KiB
PROGRESS · 分盘宫位起算点检查(#183,BUG-1826,2026-11-11)
- 基线为 staging
1505645287c59d53bc0c608c2c10b2da32d61f6a。 - 工单分支为
codex/d9-reference-guard-20261111。 - 实施依据见
docs/tasks/TASK-d9-reference-guard-20261111.md。
实现
在既有回答拦截末尾新增 varga_house 检查。它先在一句或一格内绑定显式分盘、宫数、
起算点和该宫数前最近的实体,再用卡片的星座从指定起算点按整宫计数。修正提示给出正确
宫数,卡上有该盘上升时也给出原宫数对应的起算星座。
基线原句里的「月亮在 D9 金牛」因分盘名插在行星和星座之间,旧星座检查没有识别。
新检查在核实这种内联星座与卡一致后,同时记录已确认的 varga_sign,保留原句要求的
星座证据。原有星座规则、格局状态规则、BREAKER、layerSpans、去重和重写判定保留。
当宫数在同一括号的起算点前面,新宫位事实的定位落在起算点,使原星座事实与宫位事实
各有自己的文本范围。
覆盖范围
| 句式 | 验证 |
|---|---|
| D9 原反例 | 恰好一条宫位不符,绑定 D9、Moon、D9 上升、11 宫与卡上 5 宫。提示巨蟹为原值对应的起算星座 |
| 起算点变更 | D9 上升、上升起算、Lagna、巨蟹数/起/为第 1 宫、D9 金星数/起 |
| 值的位置 | 紧接起算点,或位于同一括号的起算点前面 |
| 其他分盘 | D10 例检查实体星座来源。卡片跨领域给出冲突 D10 时跳过 |
| 分句 | 正文按 。!?; 和换行断句,表格按格处理,格内同样保留逗号 |
| 修复 | 原值再次出现返回 still_mismatched,改为正确宫数后通过 |
本次覆盖范围限于阿拉伯数字 1–12、任务书列明的三类起算点及已有显式分盘范围。中文 数字、未写起算点、分开的括号、跨句跨格的实体或起算点,以及 Karakamsha、AL/UL、 月亮盘、D1 参照、行运、年盘和 KP 等其他体系不进入该检查。星座有歧义或与卡不符、卡 缺层或缺值,以及无法唯一配对的宫数与参照也跳过。
真实回答抽查与精度统计由独立验收侧完成。
验证
- 四份定向套件共 39 项通过,0 失败、0 取消。原
consult-answer-fact-guard-1789、 流式重写与consult-yoga-status-wording-1825的断言均原样保留。 - TypeScript
--noEmit通过。ESLint 0 error、62 warnings。隐私检查 62 项通过。 - 两份生产构建退出码均为 0,首页
/均为 Static。以首页 HTML 直接引用的 36 份 JS 资源按路径去重后分别 gzip,staging 和本单均为 515086 字节,变动 0%。基线构建 另有 Windows 文件跟踪复制警告。 - staging 基线
150564528的 Gitea 全量前端门禁 3631 通过、0 失败、0 取消。 PR 代码提交fafabf8e4的 Gitea 全量前端测试 3640 通过、0 失败、0 取消。 - Windows 本机
npm test -- --test-concurrency=4退出码 1,3231 通过、76 失败、0 取消。失败包含 Windows 路径和 Shell 兼容、Docker 夹具、启动子进程失败及断言。 将 32 个文件级失败单独以并发 1 重跑,365 项全部通过。管理员兑换码的单条失败 定向重跑也通过。 - 同机 staging 基线全量退出码 1,3599 通过、32 失败、0 取消。以两边 TAP 的顶层
测试名逐项对照,将本单 32 个文件级失败的占位行替换为重跑名录后,staging 的
3611 个测试名全部保留,新增 9 个。本机失败名有 30 个在两边重合,含两条回答
时钟断言。其余 13 个本单首轮失败未在基线复现,下文标出。同机基线另有
synastry reports reuse a pair, drop with the person, and settle the synastry.full reservation和database roles have no cluster privileges两项本单通过的失败。两组 Gitea 全量前端测试均通过,Windows 首轮失败保留在此供验收核查。
Windows 本机首次全量失败名
以下为 TAP 失败行去重后的测试名或测试文件。
admin code functions reject immutable codes, revoked redemption, and roll back on audit failureoperation-level admin email reauthentication is removed from routes and UIa lookup does not reset the answer clock: the same 70 s signal bounds the whole answer phasethe answer clock cutting the answer step mid-sentence is truncated, recorded and not chargeddated adoption 23:59 persists date/spec atomically and rejects malformed candidates(基线通过)staging backups are encrypted, atomic, private, and retain the newest threerejects destructive backup directory aliases and symlink components before mutationrejects unsafe writable backup parents before creating the targetrejects a direct canonical sticky shared backup directory before chmodcreates every absent backup path component privately despite a permissive caller umasksame-second backups publish once without overwriting the completed archivefind enumeration failures preserve existing backups and do not report completionrefuses full disks and removes a failed-pipeline partial fileactual subject deletion releases queued and running reservations once but never refunds delivered reports(基线通过)database env validator accepts punctuated literal required secretsdatabase env validator enforces an explicit staging owner uid without printing valuesdatabase env validator accepts a private valid file without printing valuesmigration runner is serialized, atomic, drift-safe, and read-only in check mode(基线通过)foundation grants no direct runtime table DML and exposes only reviewed functions(基线通过)personal report job migration is atomic, lease-bound, recoverable, and owner read-onlypersonal report sections enforce owner-read RLS and service-owned durable transitionsrectification session titles follow the result and do not bump updated_at(基线通过)a delivered report found by recovery is never refunded(基线通过)self-hosted identity migration creates Better Auth tables with least privilege(基线通过)session list query drops retired rectification rows and empty consultations(基线通过)retire archive migration clears archived_at without bumping updated_at(基线通过)createSynastryFullReport reserves synastry.full and enqueues a job on the real clientsynastry chat binds an owned section, rejects another report, and stays readable after delete(基线通过)staging model provider env preparation removes legacy settings and keeps one stable keystaging env validator rejects selector drift, duplicates, and unsafe permissionsproduction env validators accept only self-hosted production selectors and role URLsBetter Auth supports shared user OTP/password sessions for admins(基线通过)BUG-1526: outside self-hosted auth the profile read does not ask for avatar columns(基线通过)tests/notify-toasts-20260930.test.tstests/people-archive-order.test.tstests/people-archive-regressions.test.tstests/people-archive-view.test.tsxtests/people-pagination-lifecycle.test.tsxtests/personal-report-agent-telemetry.test.tstests/personal-report-api.test.tstests/personal-report-contract.test.tstests/personal-report-density-retry.test.tstests/personal-report-entitlement.test.tstests/personal-report-entry.test.tstests/personal-report-export.test.tstests/personal-report-generation-v2.test.tstests/personal-report-generation.test.tstests/personal-report-job-service.test.tstests/personal-report-job-state.test.tstests/personal-report-longform-appendix.test.tstests/personal-report-longform-md.test.tstests/personal-report-markdown-view.test.tstests/personal-report-markdown-view.test.tsxtests/personal-report-migration.test.tstests/personal-report-plan.test.tstests/personal-report-progress.test.tstests/personal-report-theme-contract.test.tstests/personal-report-view.test.tstests/personal-report-worker-sleep-listener.test.tstests/postgres-fixture-contract.test.tstests/pricing-simulation.test.tstests/product-domain-registry.test.tstests/profile-gender-20260927.test.tstests/profile-gender-ui-20260927.test.tsximmutable Skill migration enforces RPC-only identity, legacy adoption, and cascade-safe receiptsimporting the registry creates no runtime directorya used runtime root is removed when the process exitschanged staging workflows are syntactically valid YAMLlive staging sync preserves env, state, incoming files, and encrypted backupslive staging sync repairs nested deploy-tree drift without preserving foreign ownershipfirst immutable deployment rolls back to validated local image IDsdeployment scripts pass shell syntax validationis-docs-only-range.sh decides from local history and refuses non-ancestor rangesbounded npm install distinguishes forced timeout, OOM, and unknown failure and cleans its containersession and report lists keep legacy self rows and hide another person(基线通过)tests/synastry-report-chat.test.ts
第 1 次验收退回
验收针对 4c9e25ce585510fac579fe5845afff65f2ed4892。独立验收对 1844 份既有回答
回放,得到 105 条宫位记录。4 条不符中有 2 条误拦。返工按评论 40947 与
docs/tasks/FIX-d9-reference-guard-1.md 执行,保留同一 PR,并合入最新 staging
016d2677111170bdf6b75fe1211752ab42752f3b 至工单分支。合并冲突仅在 Bug 历史,
保留 staging 历史及本单 BUG-1826 条目。
- 紧跟宫数的行星优先成为实体。它若明确写了星座,仍须与证据卡一致。
- 「第 N 宫的宫主」「第 N 宫之主」「第 N 宫主星」等措辞跳过宫位检查。
- 向前绑定实体时以分号、破折号和冒号为界,括号内也生效。括号仍可将实体与其宫数连接。
新增用例名
a planet immediately after the house number is the entity for correct and incorrect countsa sign written after the house number and planet must agree with the evidencehouse-lord wording does not claim a planet placementbackward entity binding stops at semicolons, dashes and colons, including inside parentheses
在未修复的代码上四条新用例全部失败,原 9 条仍通过。修复后通过
node node_modules/tsx/dist/cli.mjs --test --test-concurrency=2 tests/consult-varga-house-reference-1826.test.ts tests/consult-answer-fact-guard-1789.test.ts tests/consult-fact-guard-stream-1789.test.ts tests/consult-yoga-status-wording-1825.test.ts
共 43 项,0 失败、0 取消。包括原误写仍恰好产生一条不符的断言,既有断言未改。
- Gitea 门禁 7152 对返工代码
e5e087daf通过。前端全量 3644 通过、0 失败、0 取消,Python 验证任务通过。 - 本机
npm test -- --test-concurrency=4退出码 1,3614 通过、30 失败、0 取消。当前 staging 与初次执行时的前端 Git tree 完全相同。对照同机 staging TAP 名录,3611 个 既有顶层测试名全部保留,本分支新增 13 个,其中本次返工新增 4 个。30 个失败里 29 个 与基线重合。数据库身份隔离用例在共享夹具目录报EPERM,改用独立临时目录单独重跑 通过。Windows 全量启动后补了一个冒号歧义断言,最终代码已由四个定向套件和 Gitea 全量覆盖。 - TypeScript
--noEmit和生产构建通过,首页/保持 Static。首页直接引用的 36 份 JS 合计 515086 字节 gzip,与 staging 基线相同。ESLint 0 error、62 warnings,隐私检查 62 项通过。 - 1844 份回答的原回放材料位于独立验收环境,同一套回放由验收侧复跑。
本机首次全量的 30 个失败名
operation-level admin email reauthentication is removed from routes and UIa lookup does not reset the answer clock: the same 70 s signal bounds the whole answer phasethe answer clock cutting the answer step mid-sentence is truncated, recorded and not chargedservice and restricted admin database identities stay separatedstaging backups are encrypted, atomic, private, and retain the newest threerejects destructive backup directory aliases and symlink components before mutationrejects unsafe writable backup parents before creating the targetrejects a direct canonical sticky shared backup directory before chmodcreates every absent backup path component privately despite a permissive caller umasksame-second backups publish once without overwriting the completed archivefind enumeration failures preserve existing backups and do not report completionrefuses full disks and removes a failed-pipeline partial filedatabase env validator accepts punctuated literal required secretsdatabase env validator enforces an explicit staging owner uid without printing valuesdatabase env validator accepts a private valid file without printing valuespersonal report job migration is atomic, lease-bound, recoverable, and owner read-onlypersonal report sections enforce owner-read RLS and service-owned durable transitionsstaging model provider env preparation removes legacy settings and keeps one stable keystaging env validator rejects selector drift, duplicates, and unsafe permissionsproduction env validators accept only self-hosted production selectors and role URLsimmutable Skill migration enforces RPC-only identity, legacy adoption, and cascade-safe receiptsimporting the registry creates no runtime directorya used runtime root is removed when the process exitschanged staging workflows are syntactically valid YAMLlive staging sync preserves env, state, incoming files, and encrypted backupslive staging sync repairs nested deploy-tree drift without preserving foreign ownershipfirst immutable deployment rolls back to validated local image IDsdeployment scripts pass shell syntax validationis-docs-only-range.sh decides from local history and refuses non-ancestor rangesbounded npm install distinguishes forced timeout, OOM, and unknown failure and cleans its container