代码体检:找出屎山代码和拖慢加载、推理的大问题,拆成小单交给 Claude 直接修 #118
Open
opened 2026-10-28 01:53:45 +08:00 by jesse
·
4 comments
No Branch/Tag Specified
main
codex/rectification-d60-two-way-20261028
staging
codex/subject-switcher-details-20261028
codex/rectification-screen-146-147-20261028
codex/rectification-entry-page-20261028
codex/upstream-sync9b-20261028
codex/upstream-sync9-20261028
codex/home-crash-saved-people-20261027
codex/voice-reading-20261027
codex/ui-kit-fix3-20261027
codex/lagna-precheck-20261027
codex/ui-kit-onboarding-fix-20261026
codex/gate-birth-journey-contract-20261025
codex/ui-kit-7-cleanup-20261023
codex/ui-kit-6-rectification-20261023
codex/ui-kit-5-pages-20261023
codex/ui-kit-4-people-20261023
codex/ui-kit-3-chart-20261023
codex/ui-kit-2-chat-20261023
codex/onboarding-4-motion-20261022
codex/ui-kit-1-shell-20261023
codex/onboarding-3-checklist-20261022
codex/onboarding-2-intake-20261022
codex/ui-kit-0-base-20261023
codex/full-data-parity-3-20261022
codex/full-data-parity-2-20261021
codex/full-data-parity-1-20261021
codex/rectification-explicit-open-20261023
codex/chart-table-span-20261023
codex/onboarding-1-data-20261022
codex/report-english-han-leak-20261021
codex/chart-dasha-yogini-20261021
codex/goel-jaimini-strength-20261022
codex/synastry-staging-fix-20261021
codex/chart-subject-table-20261021
codex/chart-ascendant-slash-20261021
codex/report-export-dialog-polish-20261021
codex/synastry-report-chat-20261018
codex/synastry-full-report-20261018
codex/niryaana-shoola-pvr-20261018
codex/rectification-narrower-delivery-20261016
codex/full-reading-module-parity-20261018
codex/marriage-match-p1-20261017
codex/upstream-sync8-20261017
codex/people-archive-limit-20-20261017
codex/api-server-service-extract-20261013
codex/dasha-unify-20261013
codex/python-hygiene-20261013
codex/contracts-helpers-dedupe-20261013
codex/pl9-render-split-20261013
codex/consult-route-split-20261013
codex/beta-safety-net-20261014
codex/beta-capacity-20261014
codex/answer-effort-ab-20261013
codex/api-chart-subprocess-gate-20261013
codex/chart-ascendant-row-20261015
codex/data-layer-types-20261013
codex/release-path-production-20261014
codex/beta-main-path-20261014
codex/frontend-dead-code-20261013
codex/consult-prep-parallel-20261013
codex/report-reference-perf-20261013
codex/home-sidebar-rerender-20261013
codex/node-runtime-resources-20261013
codex/api-disk-cache-retention-20261013
codex/rect-scoring-perf-20261013
codex/upstream-sync7-20261014
codex/rectification-step0-entry-20261013
codex/report-focus-card-20261013
codex/report-translation-gaps-20261013
codex/composer-first-glyph-clip-20261013
codex/agent-loop-pilot-20261013
codex/rectification-offer-opened-state-20261012
codex/rectification-nearest-boundary-opening-20261012
codex/rectification-d12-parent-probes-research-20261012
codex/rectification-explicit-entry-20261012
codex/consult-career-type-residual-20261009
codex/consult-card-full-source-20261007
codex/rashi-dashas-native-20261008
codex/ephemeris-nutation-20261008
codex/report-full-data-edition-20261007
codex/special-lagnas-native-20261008
codex/upstream-sync6-20261007
codex/rectification-delivery-dup-adopt-20261006
codex/consult-conversational-answer-20261006
codex/consult-latency-quickwins-20261005
codex/rectification-nadi-seconds-research-20261005
codex/gate-log-volume-20261004
codex/astrologer-rulings-batch6-20261004
codex/consult-timeline-no-plan-20261001
codex/consult-answer-clock-20261001
codex/consult-plain-answer-20261001
codex/rectification-varga-resolution-fix-20261001
review/rectification-varga-resolution-20260930
codex/jev-intent-v2-20260927
codex/consult-evidence-card-research-20260927
codex/people-archive-p1-20260924
codex/chart-dasha-western-redesign-20260924
codex/home-page-split-20260925
codex/report-reader-main-20260924
codex/rectification-midnight-date-anchor-20260920
codex/rectification-cross-midnight-gate-fix-20260920
codex/rectification-cross-midnight-20260920
codex/owner-case-purge-20260919
codex/rectification-jev-intent-research-fix2-20260919
codex/rectification-jev-intent-research-fix-20260919
codex/rectification-jev-intent-classifier-research-20260919
docs/three-channel-redesign-20260918
codex/session-list-single-source-fix-20260917
codex/session-list-single-source-20260917
codex/rectification-session-composer-guard-20260917
codex/chart-copy-trim-20260917
codex/rectification-dead-d9-choice-fix-20260916
codex/rectification-mobile-timeline-readout-20260917
codex/session-capacity-bool-assert-20260916
codex/home-state-lowering-20260915
codex/freeze-metric-change-20260915
codex/rectification-engine-memoization-fix-20260915
codex/consultation-session-capacity-20260915
codex/consultation-context-memory-20260915
codex/consultation-external-evidence-cache-20260915
codex/rectification-request-dossier-cache-20260915
codex/rectification-settled-render-split-20260915
codex/rectification-engine-memoization-20260915
codex/rectification-failure-attribution-20260915
fix/sidebar-hard-nav
codex/rectification-spoken-orphan-20260914
codex/rectification-targeted-collect-spoken-focus-20260913
codex/rectification-house-lord-gochara-research-20260913
codex/rectification-new-minute-inherit-20260908
codex/rectification-same-year-probe-dedupe-20260908
codex/rectification-probe-replay-loss-20260908
codex/rectification-range-delivery-fix-20260907
codex/rectification-range-delivery-card-20260907
codex/rectification-stale-compare-fix-20260907
codex/rectification-declared-uncertainty-20260907
codex/report-md-page-20260906
codex/rectification-collect-vs-offer-consistency-20260905
codex/rectification-probe-answer-covers-domain-20260905
codex/rectification-quality-probe-dedupe-20260904
codex/rectification-post-adopt-verify-20260904
codex/report-candidate-range-20260904
codex/report-sensitivity-crash-20260904
codex/rectification-adopt-narration-fix2-20260904
codex/rectification-adopt-narration-fix-20260904
codex/rectification-adopt-narration-20260904
codex/repo-hygiene-20260903
codex/rectification-ux-20260903
codex/rectification-ux-20260902
codex/diagnose-rectification-request-20260827
fix/staging-gate-checkout-retry
No results found.
Labels
Clear labels
agent/待执行
agent/待真机
agent/待规划
agent/待验收
agent/执行中
agent/排队
agent/规划中
agent/试点
agent/部署中
agent/需拍板
agent/验收中
ready-for-agent
wayfinder:map
wayfinder:task
Grok 领:按任务书实现
产品负责人真机走查
Claude 领:诊断并写任务书
Claude 领:验收 Grok 回报的 SHA
锁:Grok 执行中
任务书已写好,等前置单合入 staging 后由 Claude 改成 agent/待执行;循环两侧都不处理
锁:Claude 规划中
试点期只处理带此标签的 issue
已推 staging,等部署核对(脚本自动)
需要产品负责人决定
锁:Claude 验收中
Fully specified, ready for an agent
Wayfinder map issue holding the notes and child tickets
Wayfinder child ticket
No labels
agent/试点
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: root/Jyotisha#118
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.
要做什么
请把整个仓库(前端、API 服务、排盘/推理相关代码)仔细过一遍,重点查两类问题:
怎么查
产出
已接手,正在查(基于 staging 最新
0f0fea325;10-13 那次体检拆出的 #57~#72 先逐条核实是否真修掉,不重复提)。结论和拆出的小单清单会先贴在这里。@jesse 代码体检做完了,基于 staging 最新
0f0fea325。10-13 那次体检拆出的 #57~#72 先逐条核实过(看代码,不看状态板),已经修掉的不再提。排在前面的几条我亲手抽查过,都属实。一句话:回答慢主要是模型「想太久」,有现成的开关一直没开;报告生成和星盘页打开都有现成的、改动不大的提速点。屎山主要是几个超长函数,加上 200 多个没人用的脚本。
一、体检结论(按影响从大到小)
回答和推理速度
frontend/src/mastra/consultation-tools.tsconsultAnswerReasoningEffortscripts/report_perf_flags.pypl9_full_data_export.read_full_data_domain、calculation_profile_contract.hash_bound_resultreport_render/annual_method_reference.py、annual_pyjhora_replay.py、tajika.pyscripts/vedastro_foreground.py、vedastro_service_adapter.pyscripts/consult_full_data_cache.pyrectification-agentic/v9/agent-run-attempt.tsprepareSteproute.ts的classifyConsultationTurn、第 0 步设置scripts/jyotish_api_server.py(ThreadingHTTPServer)_attach_vedastro_minute_sensitive_to_score、前端score-persist.tsconsultation-tools.tsexecuteWindowConsultation打开速度
components/chart-page/chart-page-view.tsx、people-archive-view.tsapp/(app)/page.tsx订阅streamingReply;ChatChartSplit、PanelBoardapp/(app)/page.tsx?c=链接打开一条对话,内容要排到第二轮才去读/chart、/people、/synastry首页首屏现在实测 703 KB(gzip),按第 14~16 条做完,估计能降到约 595 KB(−15%);第 12 条做完,星盘页从 579 KB 降到约 471 KB(−19%)。
屎山(不拖慢速度,但每次改都容易出错)
dasha_analyzer.build_dasha_timelinevsjyotish_engine.cmd_dashajyotish_api_server._load_local_modulescripts/根目录10-13 体检核实:已修 6 项(报告 worker 内存泄漏、校正打分重复算两项、打分响应过大、缓存清理扫错目录、旧校正链);修了一部分的 4 项(长报告缓存、
/api/chart子进程、报告渲染函数、大运两套实现);没动的 1 项(只被测试用的脚本,从 138 个变成 226 个)。二、拆成的小单(建议顺序)
一张单只改一件事,都由我直接做。✋ 表示要你先拍板。
?c=链接一打开就去读对话/admin/usage:答题步思考字数和用时下降,盲评质量不变差scripts/根目录文件数下降超长函数(第 22 条)和两套实现(第 23 条)先不单开:前面几单会顺带收拢一部分,剩下的等这批做完再看。
要你回的:
完整的体检报告(含实测数字和测法)在我这边,需要的话我放进仓库
docs/research/。1 同意 2 一天 我给你模型密钥 16 关掉思考会不会影响输出 17 同意 18 同意 体检报告需要放
@jesse 收到,按你的回复办了:
docs/research/code_health_audit_2026_10_28.md(staginga31b6dda3,只改文档,不触发部署)。你问的第 16 单(#135):关掉思考会不会影响输出?
咨询每一轮分好几步。第一步只决定「去调哪几个排盘工具、传什么参数」,不写回答;回答是后面几步写的,那里的思考照常开着。所以回答本身的思考深度不受影响。
可能的影响是第一步工具选得没那么准,比如该同时看事业和财运,却只调了一个。那样回答会缺数据。
我的建议是和第 15 单(#134)放在同一轮对比测试里做:同一批问题,开着和关着各跑一遍,比两件事。一是第一步选的工具和参数是否一致,二是最后回答的盲评。一致率不够高就不做。你同意的话,我把它从「需拍板」改成「排队」。
模型密钥(第 15、16 单要用):请不要贴在 Gitea 上,这里所有人都看得到。直接在我这边的 Claude 会话里发给我就行。我只把它存进本机一个只有本人能读的文件,不进仓库,也不写进任何单子。告诉我是哪家的模型(例如 DeepSeek),我就用它跑对比。
我现在从第 1 单(#120)开始做。