fix(mobile): 修复 4 个开放 issue(#41 开售轮询 / #45 票价解析 / #51 搜索匹配 / #50 编码) - #53
Merged
Conversation
多 agent 根因分析 + 对抗验证后实施,真机(REDMI Turbo 4 Pro / 大麦 9.0.26)验证通过。 #41 (P0) 配 sell_start_time 后开抢晚 ~8s:btn_buy_view 在大麦 9.0.2x 已废弃, BuyButtonGuard 8s + 文案轮询 8s 对 Canvas 自绘 CTA 全盲。 - buy_button_guard:单一 resource-id 改多 ID 候选 + get_cta_center_coords 坐标兜底 - sale_waiter:重构 wait_for_sale_start 为交错轮询,Canvas 页开售前跳过昂贵 u2 查询, 到点即坐标兜底(event=cta_canvas_fallback),开抢延迟从 ~8s 收紧到与开售同秒 - orchestrator:_is_buy_button_sold_out 多 ID 候选 + 文档序陷阱防御 - page_probe/state_probe:详情页价格区容器多 ID(info_v2_price_layout 新增), 修复 probe_only 在 9.0.2x 详情页恒「关键控件未就绪」 #45 (P1) 票价识别错误:两位日份(「5月30号」的 30)被宽松正则当票价吞掉真价。 - prompt_parser:新增 _strip_schedule_fragments(剥离日期/时间/张数)+ _extract_numeric_price (上下文锚定优先 + 回溯封堵),price_range 同步先剥日程片段 #51 + #50(匹配) (P1) 搜索/标题匹配对词序/前缀/截断零容忍: - item_resolver:新增 title_similarity(子串/覆盖率+bigram Dice)与 find_conflicting_city - event_navigator:城市冲突 veto + 标题模糊回退 + clicked_title 锚定 + 失败卡黑名单 + 候选打分增强;失败时列 top-5 候选引导(绝不自动点低置信,杜绝误买) #50(编码) (P2) Windows GBK 解 pm dump 巨量中文崩溃: - 新增 mobile/proc_utils.run_captured(encoding=utf-8, errors=replace) - env_snapshot / prompt_runner 迁移至统一封装;macOS/Linux 行为零变化 测试:1067→1162 passed(+95),覆盖率 81.92%→83.06%,稳过 80% 门槛。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 11, 2026
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
多 agent 根因分析 + 对抗验证后实施 4 个开放技术 issue 的修复,真机(REDMI Turbo 4 Pro / Android 16 / 大麦 9.0.26)验证通过。
sell_start_time后btn_buy_view(9.0.2x 已废弃)锚点失效,guard 8s + 文案轮询 8s 对 Canvas 自绘 CTA 全盲,开抢晚 ~8s_parse_price_hints宽松正则从左取首个,两位日份(「30号」)被当票价吞掉真价subprocess text=True未指定 encoding,GBK 解pm dump巨量中文崩溃Closes #41, #45, #51, #50
各 issue 修复要点
#41(P0,核心)
buy_button_guard:单一btn_buy_view改多 ID 候选(旧 ID 在前保 v8.x 兼容)+ 新增get_cta_center_coords坐标兜底sale_waiter:重构wait_for_sale_start为交错轮询——Canvas 页开售前跳过昂贵/多余的 u2 查询,到点即坐标兜底并打event=cta_canvas_fallbackorchestrator:_is_buy_button_sold_out多 ID 候选 + XML 文档序陷阱防御page_probe/state_probe:详情页价格区容器多 ID(新增info_v2_price_layout),修复 probe_only 在 9.0.2x 详情页恒「关键控件未就绪」(真机验证中发现的连带缺陷)#45(P1)
prompt_parser:新增_strip_schedule_fragments(剥离日期/时间/张数片段)+_extract_numeric_price(票价/¥/元 上下文锚定优先、回溯封堵);_parse_price_range同步先剥日程#51 + #50 匹配(P1)
item_resolver:新增title_similarity(子串/字符覆盖率 + bigram Dice)与find_conflicting_cityevent_navigator:城市冲突 veto + 标题模糊回退(≥0.75)+clicked_title锚定校验 + 失败卡黑名单 + 打分增强;失败时列 top-5 候选引导(绝不自动点低置信候选,杜绝误买)#50 编码(P2)
mobile/proc_utils.run_captured(encoding='utf-8', errors='replace');env_snapshot/prompt_runner迁移至统一封装;macOS/Linux 行为零变化真机验证结果
cta_canvas_fallback coords=(794,2617),旧代码两条 8s 超时 WARNING 全部消失;开抢延迟连续三轮收紧 8s(原 bug)→ 2s → 1s → 与开售同秒;全程停在「立即提交」前,未提交订单5月30号…1380元→1380、7月18号 内场1399元→1399等)title_similarity/find_conflicting_city校准值符合预期,真机上不误拒正确演出pm dump输出 958KB(> 报错 position 191026),版本探测正常质量门槛
poetry run test:1162 passed, 1 xfailed,覆盖率 83.06%(基线 1067 passed / 81.92% → 净增 95 个测试,覆盖率不降反升,稳过 80% 门槛)。注意事项 / 遗留跟进
start_ticket_grabbing.sh不带--probe会强制改写配置为if_commit_order=true进正式提交模式;开发验证(到确认页不提交)须绕过脚本直接python -m mobile.damai_app配if_commit_order=falsebtn_buy_view依赖(本 PR 只修详情页锚点),若大麦后续把 SKU 确认按钮也 Canvas 化需跟进🤖 Generated with Claude Code