Jesse_Chen and Claude Opus 5
a2c1f1fbda
docs(tasks): C 端界面向 claude.ai 产品界面对齐任务书(三轮串行)
...
根因:CLAUDE_DESIGN.md 扒的是 claude.com 营销官网,它自己在 Known Gaps
里写明 claude.ai 产品界面不在范围内,而 DESIGN.md 把它当成了产品界面的
实现契约。于是营销页语汇(hero band、3-up feature card)进了聊天空状态,
拉丁 display face 的衬线规则套到中文界面变成了宋体。
R1 字体 + 强调色 + chrome 瘦身(BUG-737/738)
R2 空状态重做
R3 侧栏拍平 + 入口收敛 + 去头像
三轮都动 globals.css,不得并行。附原型图链接。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_0193vBv6w5MV2cifdTUu9H5P
2026-09-16 03:42:28 +00:00
Jesse_Chen and Claude Opus 5
5094fd2620
docs(tasks): 后门单改写为 mixin 方案(产品选 B),修正闭包规模
...
第一版写「8 方法 / 314 行」错了一个数量级。错因:闭包只跟 self._x(),而
_compute_consultation_workflow 只有 6 行、转给模块级
execute_consultation_workflow(self, ...),那个函数体 394 行、对传进来的
handler 调 16 个方法再往下扇出。跟丢那一跳,300 行被当成了全部。
执行方重算:约 115 方法 / 4,104 行,占全类 51% 方法;碰 HTTP 上下文的
仍是 0 个——本单成立的前提没变。
产品在 A/B/C 中选定 B(mixin 抽取),并授权把 §4「不得搬 ≥150 行业务
方法」按本意解释:那条红线针对的是 C 那种逐行改写,而 mixin 是把方法体
原样挪家、self 含义不变、靠 MRO 解析,HTTP 那一面零变化。决策记录里已
写明这是该红线的推翻记录。
新增 spike 闸门:搬进 mixin 后 test_api_server_security.py 一字不改直接
跑,绿则继续、红则退回 A(7 方法/300 行、关 2 个伪造点)。已查明两个降
风险事实(security 测试无结构性断言、增长合同用整文件正则),并点名真
风险是循环 import——闭包引用同文件 44 个模块级函数 + 21 个常量/类。
另修正 __new__ 归零口径:合同基线 33 = scripts 4 + tests 29,tests 侧含
不许改的 security 测试,所以归零只针对 scripts 侧 4 → 0。
纯文档推送,不触发门禁、不发布镜像、不部署。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-16 03:14:41 +00:00
Jesse_Chen and Claude Opus 5
7ae6df3ebb
docs(tasks): 状态下沉第二批进度记录与真人走查清单
...
Independent Staging Quality Gate / validate (push) Failing after 6m17s
Independent Staging Quality Gate / publish (push) Skipped
进度记录含三簇 20 个状态的分类表(每个写明谁在读)、改前改后实测、
既有断言改动的三栏说明、反向验证、lint warning 逐条比对、以及
session 簇留 4 个在外壳的让步说明。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-16 02:02:22 +00:00
Jesse_Chen and Claude Opus 5
6df40c322c
fix(rectification): 记录与校正区间冲突时记录优先、分歧并列(BUG-691)
...
Independent Staging Quality Gate / validate (push) Canceled after 3m23s
Independent Staging Quality Gate / publish (push) Canceled after 0s
医院记录那一分钟落在校正区间外时,交付卡以前只说一句「相差 N 分钟」:
没说默认按哪个时间排盘,采用按钮也仍写中性的「更像这个」,用户看不出
点下去会把之后的排盘换成另一分钟。
产品负责人 2026-09-14 拍板「记录优先,分歧如实呈现」:
- 冲突文案补满三层——默认仍按出生记录时间排盘、经历指向另一段时间相差
N 分钟、两条路都可以走。
- 冲突态采用按钮改「改用校正结果」,按钮下按列写明
「选它之后,排盘会从出生记录时间 hh:mm 换成 hh:mm」。
- 新增 FORBIDDEN_RECORD_VERDICT_PHRASE 锁住 D4:不得宣布记录不准,
也不得宣布校正结果无效。
只改文案层与采用入口措辞。打分、判据、采用 RPC、置信度与确认门控、
数据库一律未动;不新增入口、不加确认弹窗;记录落在范围内或来源是
「大概时间 / 时间段」时卡片与今天完全一致。Skill 未 bump,只补
references §6.1。
验收:tsc 0 错;lint 0 error;npm test 3335 项 fail 31,失败清单与基线
37e6c519 逐条一致(全部是无 Docker / 无外网的既有环境缺口);next build
通过且 / 仍 ○ Static;首屏 chunks gzip +269 B(+0.019%)。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-16 02:02:03 +00:00
Jesse_Chen and Claude Opus 5
63c419f375
perf(consultation): 健康探测加 TTL、yoga 表达式只编译一次
...
Independent Staging Quality Gate / validate (push) Canceled after 27s
Independent Staging Quality Gate / publish (push) Canceled after 0s
BUG-734: probe_official_rest_health 不是 ping —— 它把一份虚构 smoke 排盘
POST 给官方 HoroscopePredictions(实测单次 1,034 ms),还经 call() 吃掉对方
每分钟 5 个限流令牌之一,而结论零 TTL。连续 6 轮前台请求下,第 6 次探测会被
本地限流器挡下、反过来报出假的 official_blocked,真正的业务调用还要和它抢令牌。
加进程级 TTL 缓存(成功 60 s / 失败 10 s,配置变即失效,缓存键只记 key 配没配
的布尔)。force_refresh 默认 True:诊断端点调的是裸 gateway_status() 且该文件
本轮不得改,默认实时才不会让运维看到旧结论;run_gateway_packet 显式走 False。
探测在锁外执行。6 轮实测:探测 6→1、握手 5→1、限流令牌 6→1。
连接复用(任务书 6.2)按让步顺序砍掉:实测 urllib.request 没有连接池,模块级
共享 opener 在 6 次请求下仍开 6 条 TCP 连接,按任务书写法只能骗过「同一个
opener 实例」的断言而省不掉任何握手。另立单。
BUG-735: yoga_engine._eval_custom 对静态规则表的表达式每请求重新编译。实测每次
检测 386 次源码编译(182 次 eval 字符串 + 204 次 ast.parse/compile)。拆出
_build_custom_exec_globals(每次新建,绑定当前盘 ctx)与 lru_cache 的
_compiled_eval_code / _compiled_exec_code,只缓存 code object,绝不缓存求值
结果。求值语义逐条对齐改前。第二次检测起编译 0 次,单次 27.4 ms → 3.3 ms。
等价用同进程差分(BUG-733 的做法):192 条去重表达式 × 3 张公开虚构示例盘,
与逐字复刻的改前实现同值,另有反向验证证明差分非恒真。
未改 scripts/jyotish_api_server.py。既有断言一条未改。新增 23 条测试。
快速门唯一红的 test_chat_page_uses_authenticated_cloud_persistence 经干净
origin/staging 检出复跑确认为基线红,记入 BLOCKED.md BLK-002,不顺手修。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-16 02:01:33 +00:00
Jesse_Chen and Claude Opus 5
10afdcddeb
docs(tasks): 校正标题修补迁移的进度记录与 Bug 历史回填
...
Independent Staging Quality Gate / validate (push) Canceled after 38s
Independent Staging Quality Gate / publish (push) Canceled after 0s
- PROGRESS-rectification-title-repair-migration-20260916.md:前提复核、
逐字一致的复核命令、幂等两层的说明、基线比对与环境缺口。
- BUG_HISTORY:BUG-699 / BUG-704 的「修复」补记改由迁移承担,「验证」
的欠账改成待产品在 staging 应用后从 NOTICE 回填。不新增编号。
- BLOCKED.md:BLK-002 无 Docker / 无本地 PostgreSQL,test:db 未跑、
db:migrate:check 缺 SCHEMA_DATABASE_URL,附已实跑的替代证据。
- deploy/README.md:一次性数据修补走同一个 Migrate Staging Database
按钮,行数看日志里的 notice 行。
- docs/tasks/README.md:该单改记待验收。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-16 01:39:03 +00:00
Jesse_Chen and Claude Opus 5
37e6c519f7
docs(tasks): 校正状态板 + 状态下沉第二批 + 后门单 + 对账清单
...
① 状态板校正:09-15~16 这 10 份任务书的实现早已合入 staging 并经逐单
验收,状态板却仍写「待领取 / 待验收」。改成「已验收」并补上落点 SHA
与验收要点;顺带补齐 8 个 PROGRESS 列。防复发写进「命名与归档」:
实现合入的同一次推送必须同时改状态板那一行。
② 新增 TASK-home-state-lowering-batch2-20260916(不占 BUG 号):
第一批 f8e607c2 已验收(useState 66→52、useRef 41→39、散装
rectification* 归零)。本单搬剩下三簇 session*10 / profile*6 /
synastry*4,目标 52→≤36;并修第一批尾巴——
createRectificationShellSetters 每帧新身份多出的那条 exhaustive-deps
warning(119→120),正解是稳住 setter 身份而不是塞进 deps。
③ 新增 TASK-api-server-backdoor-close-20260916(不占 BUG 号):
实测四处 __new__ 的传递闭包只有 8 方法 / 314 行且 0 个碰 HTTP 上下文,
占全类 4%。所以关后门不必捆绑 2,000+ 行体量搬运。产品拍板阶段 2/3
不立单,由 3b17c1b2 换好的门禁长期推进。原 decomposition 单标为已取代。
④ 新增 RECONCILE-20260916:另外 7 份 09-10~14 的单没有 PROGRESS、但
引用的 BUG 号都是 resolved,无法从 README 判断,列成一页纸让执行方
回填;另附三条确定没做的证据、两条未闭环状态、BLK-001 仍红。
纯文档推送,不触发门禁、不发布镜像、不部署。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-16 01:13:26 +00:00
Jesse_Chen and Claude Opus 5
4f643aa095
docs(tasks): 缓存生效后剩下的两块——外网健康探测与运行时重复编译
...
在 f8e607c2 上重测:BUG-727 的快照缓存确实每轮命中、响应体 52 万→40 万
字符,但耗时几乎没变。6 次调用累计 5.30 s,网络仍占 70%(poll 2.42 +
ssl read 0.76 + 握手 0.56),本地 swisseph 只剩 2.4%。
- BUG-734:剩下那一次外网是 gateway_status 的健康探测。它不是 ping——
probe_calculate_health 把一份虚构排盘 POST 给 api.vedastro.org,并且
consume_rate_token() 会烧掉对方一个业务限流令牌;opener 默认 None,
每次新建 TLS(6 次调用 3 次握手,单次 0.186 s);结果零 TTL。
修法:成功 60 s / 失败 10 s 的 TTL,配置变即失效,诊断端点走
force_refresh 保持实时;共享 opener 摊掉握手。
- BUG-735:yoga_engine._eval_custom 对 references/yoga_rules.json 的
192 条静态表达式每请求重新编译 102 次,多语句的还要先抛一次
SyntaxError 再 parse + 改写 AST + compile,占 9.4%。
修法:lru_cache 存 (mode, code object)。硬红线:绝不缓存求值结果,
那会跨用户串盘。
等价证明沿用 BUG-733 的同进程差分,不再写跨机 golden。
纯文档推送,不触发门禁、不发布镜像、不部署。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-16 00:55:05 +00:00
jesse-ux
f8e607c29a
refactor(home): 校正面 15 个状态从 Home 下沉
...
Independent Staging Quality Gate / validate (push) Failing after 6m43s
Independent Staging Quality Gate / publish (push) Skipped
Home() useState 66->52, useRef 41->39. Shell-facing fields merge into one object;
subtree state lives in useRectificationSurface. Chat props 20->7. Growth contract
rebaselined. Zero behavior/copy change.
2026-09-16 08:33:48 +08:00
jesse-ux
3b17c1b242
test(freeze): 增长冻结改盯耦合,行数降为粗护栏
...
Independent Staging Quality Gate / validate (push) Failing after 6m21s
Independent Staging Quality Gate / publish (push) Skipped
Home() useState/useRef 与 JyotishAPIHandler 类方法/__new__ 不得增长。行数改为开工实测基线加余量。产品授权删除参数式 hook 零 React hook 规则。
2026-09-16 08:02:43 +08:00
jesse-ux
2b7b45657b
test(rectification): prove memoization in-process; tolerate golden float drift (BUG-733)
...
Independent Staging Quality Gate / validate (push) Canceled after 5m0s
Independent Staging Quality Gate / publish (push) Canceled after 0s
Replace whole-structure golden == with same-process cached vs None fallback equality, plus discrete-strict / measured-tolerance golden comparison. Do not rebuild the golden JSON.
2026-09-16 07:56:56 +08:00
jesse-ux
51a65d927f
docs(tasks): record BUG-732 implementation SHA
Independent Staging Quality Gate / validate (push) Failing after 6m19s
Independent Staging Quality Gate / publish (push) Skipped
2026-09-16 07:41:41 +08:00
jesse-ux
dcfc2f15af
fix(consultation): count visible text only for session quota (BUG-732)
...
Replace append_consultation_question so the 200,000 quota sums only user-visible text, and add a 1,000,000-byte whole-JSON physical cap. Both still return session_full. Advisory lock, request_id idempotency, and the 200-message cap are unchanged.
2026-09-16 07:41:41 +08:00
Jesse_Chen and Claude Opus 5
7227b1ed8d
docs(tasks): R1 验收修复单——等价 golden 跨机不稳,门禁靠运气绿
...
对 BUG-721(引擎记忆化)的验收:实现通过,等价性我独立复核过——改前
6b3248bf 与改后 e4788dfc 在同一台机器上跑同一 payload,candidate_scores
逐字相同(8.6273 / 8.6226 / 8.1701),9 条计数断言全过;tsc 0、lint 0
error、全量前端 3291(fail 31) → 3304(fail 31) 失败清单逐条一致、next
build 绿且 / 仍 Static、首屏 gzip 0.00% 变化。
唯一一条红的是 test_score_candidates_matches_baseline_golden:golden 与
本机实际输出有 4 处浮点尾数差(score 1.0e-4 ×2、margin_percent 1.1e-3
×2),改前改后都对不上,说明是 golden 存全精度浮点跨机不稳,不是实现
改坏了。复发自 BUG-712。而 tests/test_rectification_*.py 在
CORE_PYTEST_TARGETS 里,staging 自动门禁会跑它——今天绿只是因为 CI 那台
机器的舍入和执行方一致。
修复单只改测试:主证据换成同进程差分(四个缓存键置 None 即回退旧路径,
A/B 严格相等,不经过任何跨机变量),golden 降为离散字段严格相等 + 浮点
带容差;禁止用重建 golden 来修;防复发升级为仓库级并排查另外五份 golden。
纯文档推送,不触发门禁、不发布镜像、不部署。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-15 23:39:30 +00:00
jesse-ux
149e1ec4c3
fix(consult): drop traces, budget checkpoints, silent summary inherit
...
Independent Staging Quality Gate / validate (push) Canceled after 3m8s
Independent Staging Quality Gate / publish (push) Canceled after 0s
BUG-729: dropped history rounds leave an omission marker in the model-visible summary slot.
BUG-730: checkpoint threshold is 0.4 of historyBudgetChars (128k still 16,000).
BUG-731: session_full new chat copies owned context_summary on the server; clients send only continued_from_session_id.
2026-09-16 07:38:36 +08:00
jesse-ux
e61535f464
fix(consultation): 外网证据按盘+日期缓存,超时取消前台任务
...
Independent Staging Quality Gate / validate (push) Canceled after 2m21s
Independent Staging Quality Gate / publish (push) Canceled after 0s
BUG-727:同日 VedAstro 快照零等待,跨日先用旧的并后台刷新;join 超时必须 cancel,budget 不超过 2×join。BUG-728:western_evidence_packet 无读取点,默认不再进咨询响应。jyotish_api_server.py 未增长(11334→11291)。
2026-09-16 07:36:09 +08:00
jesse-ux
b9c053778a
fix(rectification): 请求内 Case 档案只读投影写即失效缓存
...
Independent Staging Quality Gate / validate (push) Canceled after 2m18s
Independent Staging Quality Gate / publish (push) Canceled after 0s
同一请求里 dossier/compute 按 (fn, userId, caseId) 合并重复读,其它 RPC 与 .from 立即失效。路由入口各包一处,零调用点改动。
2026-09-16 07:32:34 +08:00
Jesse_Chen and Claude Opus 5
e4788dfc00
docs(tasks): 换掉两条增长冻结口径 + page.tsx 状态下沉第一簇 + C1 提前
...
产品 2026-09-15 三项拍板,落成两份新单与两处既有单的修订:
- 新增 TASK-freeze-metric-change-20260915(无 BUG 号,后面两单的前置):
两条冻结余量已用完(page.tsx 1951/1951 余 0;api server 11334/11363 余 29),
冻结从「逼新代码往外走」退化成拦路。实证:page.tsx 行数砍 59% 但 Home()
的 useState 从 56 涨到 66;api server 225 个类方法只有 12 处真碰 HTTP。
主门换成耦合指标,行数降为粗护栏;同时推翻 §6「参数式 hook 内部保持
0 个 React hook」——那正是状态搬不走的原因。
- 新增 TASK-home-state-lowering-20260915(无 BUG 号):先搬 rectification*
那 15 个 state 进已经是 dynamic 子树的校正面,Home() useState 66 → ≤53。
零行为变化;串行在 freeze-metric-change + C2 + R3 之后。
- 修订 TASK-consultation-external-evidence-cache-20260915:依赖反转,C1 排在
API server 拆解之前(它动模块级函数,拆解动类方法);补「不得新增类方法、
行数余量仅 29」的硬红线。
- 修订 TASK-api-server-decomposition-20260916:串行依赖加 C1 与
freeze-metric-change;__new__ 计数按 grep 的 4 计(原文 3 是文件数);
阶段 4 收尾口径改写;基线 11,314 → 11,334。
纯文档推送,不触发门禁、不发布镜像、不部署。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-15 23:15:37 +00:00
jesse-ux
58ccafb67c
fix(rectification): stop re-parsing settled messages on every stream frame
Independent Staging Quality Gate / validate (push) Failing after 6m18s
Independent Staging Quality Gate / publish (push) Skipped
2026-09-16 07:13:12 +08:00
jesse-ux
53a37ce944
fix(rectification): 候选分钟不变量记忆化(BUG-721)
...
Independent Staging Quality Gate / validate (push) Canceled after 1m57s
Independent Staging Quality Gate / publish (push) Canceled after 0s
Shadbala / Ashtakavarga / Dasha 时间轴进 static context;过境盘按事件日期缓存 chart;探针网格相同时只算一次。打分与决策回执与基线 golden 逐字相同(剔除计时字段)。
2026-09-16 07:11:07 +08:00
jesse-ux
8b982baf64
fix(rectification): 分类器失败、引擎忙、整轮超时不再归因错
...
Independent Staging Quality Gate / validate (push) Canceled after 4m2s
Independent Staging Quality Gate / publish (push) Canceled after 0s
点选题把分类器两次异常说成用户没说清(BUG-722);引擎 429 被压成坏了且重算静默失败(BUG-723);两次 attempt 总预算大于路由 maxDuration(BUG-724)。本单只改归因:classifier_unavailable 请用户重发、busy 分档并可见「这次没有重新比较」、整轮 225s 预算不够则 host fallback。不改计费、分类模型、并发闸门。
2026-09-16 07:06:57 +08:00
Jesse_Chen and Claude Opus 5
11893c7f97
docs(tasks): 普通聊天审计三单(外网缓存 / 记忆三缺口 / 对话上限)
...
只读审计 origin/staging @ 6b3248bf 后出的三份任务书,含产品 2026-09-15
拍板的三项口径:
- external-evidence-cache(BUG-727/728,Python,串行在 api-server-decomposition
之后):每轮每域同步等 api.vedastro.org,cProfile 前三名全是 TLS 往返,本地
swisseph 只占 0.022 s;前台 1.5 s / 后台 8 s / 2 个 worker 且超时不 cancel。
定案按「出生数据+岁差+交点+UTC 日期」缓存,与引擎内部同键;不许「干脆不调」,
那会重开 BUG-301。另 western_evidence_packet 122 KB 无人读。
- context-memory(BUG-729/730/731,TS,可并行):droppedCount 算了没人读、
摘要阈值与预算脱钩(窗口 < 70,667 即每轮静默丢)、写满时不继承摘要。
定案静默继承,摘要文本永不由客户端提供。
- session-capacity(BUG-732,一份迁移,可并行):200,000 额度一半被思考文本
吃掉,约 19 轮即写满。定案思考文本不计入,另设按整条 JSON 计的物理上限。
纯文档推送,不触发门禁、不发布镜像、不部署。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-15 22:47:55 +00:00
Jesse_Chen and Claude Opus 5
a8d29d1b6c
docs(tasks): 记录产品两项决定(分类用会话模型 / 年份采样不改)
...
产品 2026-09-15 对审计单里挂着的两个待拍板项给出结论,两项都是「不改」:
- 意图分类继续用会话选定的模型,不引入便宜快模型,模型目录不新增
「工具模型」角色。failure-attribution 单 §4.6 立为决策记录,§10 从
「待产品拍板后另开单」改为已决定不做;本单只改归因,不改用哪个模型。
- 只给年份的事件继续采满 12 个月,降采样不做、研究单也不立。
engine-memoization 单 §4.2 / §11 同步,并写明后续不得以性能为由重提。
两条都加了「要重提必须先拿到产品新的授权」,避免下一轮被当成遗漏又提一次。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-15 17:17:29 +00:00
Jesse_Chen and Claude Opus 5
e4f9f3ee0f
docs(tasks): 校正链路审计四单(引擎记忆化 / 故障归因 / 渲染拆分 / 档案缓存)
...
只读审计 origin/staging @ 6b3248bf 后出的四份任务书:
- engine-memoization(BUG-721,纯 Python 可并行):一次重算 45% CPU 在重复
算同一份 Shadbala,过境盘按候选算了 2196 次(应 36),鉴别探针算两遍,
_cached_rows 是死代码。本机等价实验 3358 → 1604 ms,candidate_scores 与
decision_receipt 逐字相同。只做记忆化,不改算法。
- failure-attribution(BUG-722/723/724,独占 route.ts):分类器失败被说成
用户说不清且丢证据;引擎 429 被当成引擎坏、不重试不打日志(复发自
BUG-715);attempt 210s × 2 > maxDuration 240s(复发自 BUG-059)。
- settled-render-split(BUG-725,前端可并行):校正会话流式每帧重渲整条
对话并重跑已结算消息的 Markdown;BUG-473 的咨询面拆分没有跟过来。
- request-dossier-cache(BUG-726,串行在 failure-attribution 之后):一轮
取 3.44 次整份 Case 档案,改成写即失效的请求作用域缓存,零调用点改动。
纯文档推送,不触发门禁、不发布镜像、不部署。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-15 17:13:52 +00:00
jesse-ux
6b3248bf53
fix(vedastro): pin SDK at install and cap free-tier wait
...
Independent Staging Quality Gate / validate (push) Successful in 9m36s
Independent Staging Quality Gate / publish (push) Successful in 18m18s
Image build patches vedastro.check_for_update to a no-op after pip install so import cannot hit pypi or upgrade the pin. Free-tier queue waits are capped to VEDASTRO_TIMEOUT_SECONDS and fail fast as free_tier_rate_limited. Gateway status exposes runtime mode as booleans without secrets. BUG-719 resolved; BUG-720 stays investigating until production env is filled in.
2026-09-16 00:25:15 +08:00
jesse-ux
62be52dacf
fix(chart): skip VedAstro on chart-page first paint
...
Independent Staging Quality Gate / validate (push) Canceled after 2m16s
Independent Staging Quality Gate / publish (push) Canceled after 0s
The natal /api/chart request from the chart page now sends skip_vedastro_main_entry_overview, matching the ephemeris page. Mapper and contract never read that evidence. BUG-718 recurs from BUG-161. Tests lock both foreground natal paths.
2026-09-16 00:22:00 +08:00
Jesse_Chen and Claude Fable 5
ce1939b074
docs(tasks): 星盘页与 VedAstro 外网调用脱钩 + 运行期真相两单
...
星盘页首屏那一发 /api/chart 没传 skip_vedastro_main_entry_overview,
本机实测冷算 0.40–0.66 秒里约 0.36 秒是 VedAstro 空转(连 endpoint 都
没配的情况下);带标志的同一调用是 5 毫秒。生产 env 开着 network 与
fanout,等于首屏同步等 24 个外部请求加 3 次领域扫描,而前端 mapper 与
contract 根本不读这份证据。BUG-718,复发自 BUG-161。
运行期单记录两条新发现:官方 vedastro==1.23.25 其实是 REST 客户端,
且 import 时请求 pypi 并 pip install --upgrade 自升级(实测 pin 装完
一 import 即变 1.23.26);无 key 时免费层排队是同步 sleep 加进程级
全局锁,24 个请求约 4.8 分钟堵住前台线程。台账补 ERR-107 / ERR-108,
生产 env 核对清单交产品负责人执行。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_0155nFCgCHtoA7jhSDGmZmMu
2026-09-15 15:47:32 +00:00
jesse-ux
69ede4367f
fix(ci): migrate staging automatically before deploy
...
Independent Staging Quality Gate / validate (push) Successful in 10m6s
Independent Staging Quality Gate / publish (push) Successful in 4m18s
Quality gate now dispatches Migrate Staging Database, waits for success, then dispatches Deploy staging. Automatic migrate attests the in-progress gate run so the two jobs cannot deadlock. Manual migrate is unchanged. Staging schema changes must stay backward-compatible with the currently deployed app.
2026-09-15 23:36:09 +08:00
jesse-ux
1a73f64ecd
fix(ci): let staging migration resolve the latest gated SHA
...
Independent Staging Quality Gate / validate (push) Successful in 9m38s
Independent Staging Quality Gate / publish (push) Successful in 2m7s
Leave Migrate Staging Database deploy_sha empty (or type latest) to use the newest successful backend-quality-gate push. Filled 40-hex still takes the original path. Production workflows stay required.
2026-09-15 23:19:44 +08:00
Jesse_Chen and Claude Fable 5
9bf13df023
docs(tasks): auto-migrate staging before deploy instead of a manual button
...
今天 backend-quality-gate 通过后自动 dispatch deploy-staging,但
deploy-staging.yml 里一次都没提到迁移——忘点 Migrate Staging Database 就让
新代码跑在旧 schema 上,没有任何东西会拦。这已经靠人记着(见
PROGRESS-consultation-context-and-cache-20260906「部署前须先 Migrate」)。
判据是现成的:db-migrate.mjs 的 check 模式有挂起返 3、无挂起返 0,还顺带查
checksum 漂移。而且迁移本身靠 migration.schema_migrations 台账幂等,无挂起时
天然 no-op——所以不必先检测再决定跑不跑,直接每次都跑,少一个分支。两个
workflow 又共用 concurrency group staging-mutation,链式触发不会互相踩。
新顺序:gate 通过 → 触发迁移并等它成功 → 才 dispatch 部署。迁移失败不部署。
这条顺序引入一个以前不存在的纪律:迁移完成到镜像替换之间,旧代码会短暂跑在
新 schema 上。所以 staging 迁移必须对当前已部署的代码向后兼容,破坏性变更要
拆成"先加、发代码、再删"两轮。以前迁移窗口由人控制所以不需要这条,自动化后
它是硬约束,必须同轮写进 AGENTS.md §7.6——不写就是埋雷。
回滚部署不自动迁移(迁移不会因镜像回退而撤销)。生产两个 workflow 一行不碰:
restore_verified 本质上是人对恢复点的担保,不可自动化。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_0155nFCgCHtoA7jhSDGmZmMu
2026-09-15 15:14:21 +00:00
Jesse_Chen and Claude Fable 5
de47c06d97
docs(tasks): stop making the product owner hand-copy a 40-hex SHA
...
migrate-staging-database 的 deploy_sha 挡的是「迁移必须钉在真正过了门禁的
修订上」:格式校验、查该 SHA 有没有成功的 backend-quality-gate 运行、与
staging head 比对后把纯文档前进的判定交给背书过的 controller。这三条不能丢。
但产品手填的那个值,恰恰就是「最新一个过了门禁的 staging 提交」——机器能
自己算,而且需要的 API 查询在同一步里已经写好了。改成:留空即自动解析,
填了就完全走原路径(回滚与迁移到更早修订的唯一手段)。解析出来后仍然照常
跑一遍全部校验,两条路径共用同一套门。
范围比看上去小:Deploy Staging 在门禁通过后由 backend-quality-gate 自动
dispatch,正常根本不用点;真正每次都要手填的只有 Migrate Staging Database
一个按钮。
生产两个按钮保持手填。它们额外要 allow_rollback / recovery_reference /
restore_verified,设计意图就是逼人说清楚要发什么;在生产省掉这步不是便利,
是拆护栏。
AGENTS.md §2.7 禁止代理改 workflow,产品本次明确授权,已写进决策记录,
否则执行方会拒改;授权范围仅限本单点名的文件与改动。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_0155nFCgCHtoA7jhSDGmZmMu
2026-09-15 15:07:08 +00:00
Jesse_Chen and Claude Fable 5
ebd6175b40
docs(tasks): give the title repair a button — move it into a migration
...
BUG-699 / 704 的数据修补写成了 repair-rectification-session-titles.mjs,要
SCHEMA_DATABASE_URL。但 deploy/run-staging-migration.sh 只做三件事:跑
002-ensure-business-compatibility-roles.sql、compose --profile migration run
--rm migrator 应用 frontend/supabase/migrations/ 下的 SQL、打印已应用清单,
不执行任意 Node 脚本。其余 workflow 也都不跑它。于是一个已经验收的修复卡在
"没有按钮"上,用户的历史会话名字还全是错日期。
脚本里 TITLE_MATCH_SQL / TITLE_APPLY_SQL 和活跃时间回填本来就是纯 SQL,
Node 只负责连库和打印。搬进一次性迁移就能复用产品已经会用的
Migrate Staging Database 按钮,不用 SSH、不用口令。
生产安全性已核实:7b620c7a 没有 use-rectification-surface.ts,标题是固定的
「生时校正」也不写库,where 在生产上自然匹配 0 行,天然 no-op。
红线:SQL 逐字照搬不许优化;不得动 workflow 或 compose;用户手写标题不碰;
必须幂等;两段 update 各要 RAISE NOTICE 打行数——那是产品唯一看得到数字的
地方。脚本降级为只读核对工具,不删。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_0155nFCgCHtoA7jhSDGmZmMu
2026-09-15 15:01:30 +00:00
Jesse_Chen and Claude Fable 5
e7016551db
docs(tasks): accept the chart-page unblocking (BUG-715~717)
...
/chart 从 ƒ Dynamic 变回 ○ Static——外壳预渲染、数据客户端取,整页不再阻塞
在五个引擎调用上。引擎超时 45s → 10s(实测单次最慢 0.60s)。postEngine 返回
ok/busy/http_error/timeout/bad_payload 并各留一条只含路径、状态码、耗时的
console.warn,不含出生资料。用户文案分两档:429 说「正忙,稍等几秒」,其它说
「算不出来,已经记录下来了」,不再把可能永不恢复的情况说成暂时的。eyebrow
只剩成功分支一处,改成「主盘直接算 · 分盘按需 · 不消耗点数」,去掉速度承诺。
引擎结果缓存也落地了,任务 3.2 未走让步。
门禁:tsc 0 错;lint 0 error / 119 warning;全量 fail 31 → 30 且零新增,总数
3275 → 3288;build exit 0、/ 仍 ○ Static;首屏 gzip +0.003%。
红线复核:page.tsx 未增长;限流名单与配额未动;四个体系数据一个没删。
欠:浏览器走查;staging 仍停在 2533d5a3 未部署。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_0155nFCgCHtoA7jhSDGmZmMu
2026-09-15 14:57:12 +00:00
jesse-ux
5a8328e591
fix(web): paint the chart page shell before engine calls
...
Independent Staging Quality Gate / validate (push) Successful in 27m22s
Independent Staging Quality Gate / publish (push) Canceled after 47s
BUG-715/716/717: typed engine failures with logs and split copy, natal-only open, on-demand tabs, 10s timeout, in-memory cache, no speed-promise eyebrow.
2026-09-15 22:51:15 +08:00
Jesse_Chen and Claude Fable 5
8caa2a2b4c
docs(tasks): P1 — the chart page blocks the whole document on five engine calls
...
先排除了两个嫌疑,都有实测:本机起 6.9.16 引擎,按 chart-view-load 的同一
套参数逐个计时,/api/chart 0.60s、chara 0.00s、varga_full(17 分盘) 0.00s、
western 0.00s、qizheng 0.15s,合计 0.75 秒;把这五个真实响应喂给
buildChartView 跑 13 种形态(四种 birthTimeStatus、三种 ayanamsa、缺
placeLabel/timezoneId/name,以及 chara/varga/western/qizheng 分别为 null),
13 种全部 status=ok,一次没抛。引擎不慢,mapper 不抛。
瓶颈是结构:/chart 在构建里是 ƒ Dynamic,而 c6ecb86f 把侧栏入口从
router.push 改成 window.location.assign,于是点一下就整文档重载,服务端
SSR 里 await 完 1 串 4 并才开始画,浏览器在此之前什么都没有;engineTimeoutMs
是 45 秒,maxDuration 60,白屏能真跑满 45 秒(BUG-716)。
失败又不可诊断:postEngine 的 !response.ok 与 catch{} 把 429、500、超时、
坏 JSON 全碾成同一个 null,零日志;chart-view-load 末尾还有一个 catch{}。
「引擎忙等一下会好」和「这张盘有 bug 等多久都不会好」共用一句「过一会儿
再打开」(BUG-715)。
开页还并行打 /api/western 与 /api/qizheng——两个都在 HEAVY_COMPUTE_PATHS
里、配额只有 2,一次开页吃满整台容器的重计算配额,而这两路只喂给用户
可能根本不点的两个 tab;cache: "no-store" 且无服务端缓存。eyebrow
「直接计算 · 打开即有 · 不消耗点数」在失败分支也印一遍,正压在「算不出来」
上面(BUG-717)。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_0155nFCgCHtoA7jhSDGmZmMu
2026-09-15 14:13:59 +00:00
jesse-ux
298a73e8e5
fix(ci): keep vendor/** on both quality-gate path filters
...
Independent Staging Quality Gate / validate (push) Successful in 9m36s
Independent Staging Quality Gate / publish (push) Successful in 8m7s
BUG-714: deploy/gated-paths.txt already listed vendor/** after the
qizheng vendoring, but backend-quality-gate.yml did not. The contract
test requires the two lists to match.
2026-09-15 18:31:46 +08:00
jesse-ux
8d6a4bd065
fix(audit): include /ephemeris in the capability-audit route set
...
Independent Staging Quality Gate / validate (push) Failing after 9m31s
Independent Staging Quality Gate / publish (push) Skipped
BUG-713: the staging quality gate failed because _scan_app_routes
found the new ephemeris page and the exact allowlist did not.
2026-09-15 18:16:57 +08:00
Jesse_Chen and Claude Fable 5
766028399c
docs(tasks): accept the page.tsx growth fix — rectification P0 scope is green
...
page.tsx 1964 → 1951,正好回到冻结上限。tsc 0 错;lint 0 error / 118 warning;
定向 8 套件 134 项全绿;全量 fail 33 → 31 且无新增;build exit 0、/ 仍 ○ Static;
首屏 gzip +0.14%。
行为逐条核对未变:resolveBootstrapSessionSelection 与 readLoginSessionReturn
整体下沉进 home-cloud-sync 的 resolveLookupBootstrap,BUG-705 的 found /
missing / unavailable 三分支原样;await 后的 aborted 早返回改成抛 AbortError,
与该 effect 既有写法一致,外层 catch 本就放行 AbortError。
BUG-699 / 704 / 705 / 706 / 708 / 709 全部验收通过。
剩余 4 条红全属另一会话的星历 / 星盘页,已由 TASK-readonly-pages-fix-20260916
接手;staging 仍停在 2d7698ea 未部署。另记两条无自动化覆盖的欠账:动了数据库
结构但 test:db 没跑(门禁 workflow 里也没有),以及标题 / updated_at 修补脚本
在 staging 未执行。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_0155nFCgCHtoA7jhSDGmZmMu
2026-09-15 10:05:01 +00:00
jesse-ux
a38a941522
fix(qizheng): pass school options into the vendored chart and stabilize gates
...
Independent Staging Quality Gate / validate (push) Failing after 8m1s
Independent Staging Quality Gate / publish (push) Skipped
BUG-710: call getSevenGovernorsChart with ketuMode/siderealMode so
calculation.ketu_mode is the engine school, not the request echo.
BUG-711: stop forbidding /ephemeris in the sidebar contract.
BUG-712: compare ephemeris event longitudes at 6 decimals and fail
closed when the golden is missing.
2026-09-15 17:54:20 +08:00
jesse-ux
6bb892b826
fix(chat): keep page.tsx at the 1951-line freeze after lookup wiring
...
Independent Staging Quality Gate / validate (push) Failing after 6m40s
Independent Staging Quality Gate / publish (push) Skipped
Move BUG-705 bootstrap selection + session lookup into
resolveLookupBootstrap so Home only awaits once. The 1951 cap in
chart-view-route.test.ts is unchanged.
2026-09-15 17:40:17 +08:00
Jesse_Chen and Claude Opus 5
fadb64fbcf
docs(tasks): accept the three read-only page briefs and file the fixes
...
Re-ran the checks independently rather than taking the progress notes at
their word. Most red lines hold: the api server sits at 11334 of 11363,
vendor/** is gated, the image installs nodejs and copies vendor, NOTICE
carries the Apache-2.0 attribution, the forbidden CLI subcommands are
blocked, neither new BFF imports billing or mastra, vedic-chart-svg did
not move, tsc is clean and lint has no errors.
Three findings. The qizheng adapter validates ketu_mode and
sidereal_mode, echoes them into calculation.*, and never passes them to
the engine: asking for descending-node returns 200 with a chart still
computed on the apogee school and no warning. The ephemeris brief
asserted that app-sidebar must not mention /ephemeris, which contradicts
the chart-page brief that was told to add both entries, so staging is
red. The ephemeris_events golden compares full-precision floats and
regenerates itself when missing.
Staging also still reports deployment.gitCommit 2d7698ea , six commits
behind, with gated paths changed in between.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-15 09:35:49 +00:00
Jesse_Chen and Claude Fable 5
4161222b2b
docs(tasks): accept f51e494c and file the page.tsx growth-freeze fix
...
六条缺陷(BUG-699/704/705/706/708/709)全部实现,实现方式与任务书一致:
lookup 三分支(found/missing/unavailable,5xx 不宣告删除也不清 ?c=)、
交付卡保留而只置灰采用、按钮判据用 vargaStyleFollowupRenderable 复用
buildChoiceCard 的同一套门而不是复制条件、「相对支持度」进 MACHINE_VOICE_
LEXICON。文档齐全,生产 7b620c7a 受影响面也核对过了(不受影响)。
Linux 门禁:tsc 0 错;lint 0 error / 119 warning;本轮 8 个合同套件 130 项
全绿;build exit 0、/ 仍 ○ Static;首屏 gzip +0.13%。全量失败 父提交
d3a2c48b 32 → f51e494c 33。
多的一条是 page.tsx 从 1951 涨到 1964 行,撞了 chart-view-route.test.ts 的
<= 1951 上限,即 AGENTS.md §6 的增长冻结。d3a2c48b 绿、f51e494c 红,各跑
两次稳定复现。逻辑本身已经在 lib 里,超的只是十来行接线,搬出去即可,
不得放宽上限。
连带:staging 的 deployment.gitCommit 停在 2d7698ea,其后 6 个含门禁路径的
提交未部署,这条红很可能是原因之一。修好前产品没有环境可以实测。
另记两条无自动化覆盖的欠账:本轮动了数据库结构(新增触发器与函数)但
test:db 没跑,而门禁 workflow 里也不跑 DB 套件;标题与 updated_at 的修补
脚本在 staging 未执行,损坏面数字还空着。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_0155nFCgCHtoA7jhSDGmZmMu
2026-09-15 09:23:30 +00:00
jesse-ux
f51e494c5a
fix(chat): keep rectification sessions findable and keep the delivery card
...
Independent Staging Quality Gate / validate (push) Failing after 6m45s
Independent Staging Quality Gate / publish (push) Skipped
Rectification answers now advance chat_sessions.updated_at (BUG-704).
A ?c= id missing from the loaded page is fetched before anyone may call
it deleted (BUG-705). The range card no longer has a post-card tie-break
button; live questions leave the card visible with adopt locked
(BUG-706/708). Spoken copy bans 相对支持度 (BUG-709).
Task docs assigned 700-704; qizheng already took 700-703.
2026-09-15 17:10:53 +08:00
jesse-ux
d3a2c48ba5
feat(web): add read-only /ephemeris page
Independent Staging Quality Gate / validate (push) Failing after 7m30s
Independent Staging Quality Gate / publish (push) Skipped
2026-09-15 16:40:56 +08:00
jesse-ux
f7386e0717
fix(qizheng): pin vendor bytes to local a911c890 checkout
...
Independent Staging Quality Gate / validate (push) Failing after 6m58s
Independent Staging Quality Gate / publish (push) Skipped
Re-copy LICENSE/README/package.json/cli.cjs from the local yinduzhanxing snapshot. Drop dist/index.cjs that was assembled from npm. Do not include 6c27aab6 or 8bba9cb5.
2026-09-15 16:33:31 +08:00
jesse-ux
830799fafb
feat(chart): add a read-only natal chart page
...
Independent Staging Quality Gate / validate (push) Canceled after 5m23s
Independent Staging Quality Gate / publish (push) Canceled after 0s
Open /chart from the sidebar without billing or a model. Five tabs; Western and Qizheng stay unavailable until those endpoints land. Ephemeris nav points at /ephemeris (404 until that page ships).
2026-09-15 16:27:50 +08:00
jesse-ux
a3dbbde4a3
docs(tasks): record qizheng staging SHA e776cf9d
2026-09-15 16:24:33 +08:00
jesse-ux
e776cf9d83
fix(qizheng): copy vendored stem-branch files from local upstream checkout
...
Independent Staging Quality Gate / validate (push) Canceled after 4m51s
Independent Staging Quality Gate / publish (push) Canceled after 0s
Read G:/Ferti/yinduzhanxing-codex-add-birth-time-rectification-skill (a911c890) and copy the listed vendor files by content. Rebuild the adapter from the 168-line CLI wrapper, then apply school parameters, boundary rewrite, and sanitized errors.
2026-09-15 16:21:04 +08:00
jesse-ux
25851dd338
feat(qizheng): vendor stem-branch and expose three read-only chart APIs
...
Add Apache-2.0 @4n6h4x0r/stem-branch 0.8.0, a seven-governors adapter,
and POST /api/qizheng, /api/western, /api/ephemeris_events.
BUG-700 remains blocked (do not call --pillars). BUG-701 and BUG-702 are
resolved. BUG-703 is investigating (panchanga Lahiri). Skill is not bumped.
2026-09-15 16:10:21 +08:00
Jesse_Chen and Claude Fable 5
3e58e85f8f
docs(tasks): P0 — tie-break entry destroys the delivery card; session list lies about rectification
...
两组缺陷,分两单。
会话列表单追加 BUG-700/701:全仓只有 append_consultation_question 这个
咨询 RPC 写 chat_sessions.updated_at,校正的 turn 走自己的表从不推进,于是
校正会话的 updated_at 冻结在创建时刻——连着几小时答题也不动位置。叠加
BUG-699 的改名,列表变成「名字是今天、排序是旧日期」。而 resolveBootstrap-
SessionSelection 的 ?c= 只比对当前已加载那一页(SESSION_PAGE_SIZE = 40),
翻不到就判 missing、打「该对话不存在或已被删除」并清掉 URL。查过了没有任何
删除路径被触发,会话大概率仍在库里。
新单 BUG-702~704:applyLiveCandidateOffer 遇到任何未答的 choice/collect_spoken
就把 candidateOffer 从每一条消息上剥掉,而 requestTieBreak 必然写入这样一道题
——点卡上的按钮必然丢卡。按钮亮不亮看 tieBreakPersonalityAvailable(只看
followup),题能不能画成选择题看 buildChoiceCard 的 styleOptions.ok /
canRenderYearlessChoice,两个判据不一致,于是按钮亮着、点开是裸题,卡又没了,
两条路都断。交付旁白还写了 VOICE 明令禁止的「相对支持度」,并在自称不再问
分盘题的同一屏提供分盘题入口。
产品重申 BUG-686 的原意:卡上不要参考题按钮,出卡前收集完,以卡结算。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_0155nFCgCHtoA7jhSDGmZmMu
2026-09-15 07:44:40 +00:00