From f8fa4d66efefafae22e5439f026508388031d1f4 Mon Sep 17 00:00:00 2001 From: Jesse_Chen Date: Wed, 28 Oct 2026 06:49:18 +0800 Subject: [PATCH] Long-report render fast path on by default (issue #121, BUG-1335) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Byte-identical to the legacy path on four fictional charts (PyJHora masked), -19–26% end to end (median 23%). Short of the 25% written on the ticket; the product owner chose to turn it on anyway. JYOTISH_REPORT_RENDER_FAST=0 restores the old path. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DbBXoz1Qk3y9buDv1mkmTu --- docs/BUG_HISTORY.md | 3 ++- scripts/report_perf_flags.py | 14 ++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index 4d59ee87..f76735ca 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -18024,7 +18024,7 @@ ## BUG-1335 | 个人长报告的中文出稿和溯源哈希重复劳动 -- 状态:investigating +- 状态:resolved(2026-10-28 开关默认打开,产品选 A;待部署) - 首次发现 / 最近更新:2026-10-13 / 2026-10-14 - 来源:issue #61。任务书 `docs/tasks/TASK-report-reference-perf-20261013.md`。 - 现象:同一份个人长报告,中文正文要做多遍全文替换;大运补句的正则没有锚点,在长行上反复试;正文里根本没有的术语也会先编译再替换。溯源哈希对每一条「任意层的某个键」都把整包复制一遍。 @@ -18036,6 +18036,7 @@ - 相关记录:BUG-693、BUG-694、BUG-576、BUG-1336。 - 复发自:无。 - 修复版本:分支 `codex/report-reference-perf-20261013`,默认未开通,尚未合入 staging。 +- 更新 2026-10-28(issue #121):Linux 本机屏蔽 PyJHora、四张虚构盘各三次,开关开 / 关的报告逐字节相同(各字段 sha 一致),端到端快 19%~26%(中位 23%),单次溯源哈希约 0.55 s → 0.21 s。没达到 #121 写的 25%,产品选 A:照样默认打开(`RENDER_FAST_DEFAULT = True`),`JYOTISH_REPORT_RENDER_FAST=0` 可退回旧路径。原 35% 门槛由这次决定取代。验证:`tests/test_report_reference_perf.py`(快路径与旧路径逐字节相同)+ `scripts/research/report_reference_perf_ab.py --mask-pyjhora`。环境缺口:本机没装 PyJHora,不屏蔽 PyJHora 的那组待部署后在 staging 看报告生成用时。 ## BUG-1336 | 同一张盘同一天再要长报告,每次都重算 diff --git a/scripts/report_perf_flags.py b/scripts/report_perf_flags.py index 2278bf7d..45ae4f93 100644 --- a/scripts/report_perf_flags.py +++ b/scripts/report_perf_flags.py @@ -8,12 +8,14 @@ from __future__ import annotations import os -# Masked Windows A/B on 2026-10-14. Render shortcuts are byte-identical and use -# less memory, but the end-to-end drop was 20–23%, short of the 35% gate, so -# the fast path stays off. Cache hits matched the miss bytes and returned in -# about 0.06s, under the 1.5s gate. A missing or unknown GITHUB_SHA still -# disables the cache at the call site. -RENDER_FAST_DEFAULT = False +# Masked Windows A/B on 2026-10-14: render shortcuts byte-identical, less memory, +# end-to-end -20–23%, short of the 35% gate then set, so the path stayed off. +# Linux A/B on 2026-10-28 (four fictional charts, PyJHora masked): byte-identical +# again, -19–26% (median 23%). The product owner chose to turn it on anyway +# (issue #121, option A); JYOTISH_REPORT_RENDER_FAST=0 restores the old path. +# Cache hits matched the miss bytes and returned in about 0.06s, under the 1.5s +# gate. A missing or unknown GITHUB_SHA still disables the cache at the call site. +RENDER_FAST_DEFAULT = True REFERENCE_CACHE_DEFAULT = True _ON = {"1", "true", "yes", "on"}