fix(android): 采购核单缺少订单金额时延迟一次只读补采 #392
Open
opened 2026-10-14 10:45:14 +08:00 by ila
·
2 comments
No Branch/Tag Specified
main
fix/392-order-amount-reread
fix/393-no-pending-prompt
fix/391-summary-spec-proof
fix/390-panel-scroll-ratio
fix/389-syb-cancel-enum
fix/388-address-save-back
feat/387-cancel-by-device
fix/386-diagnostic-deadlock
fix/385-accessibility-pause
feat/384-client-key-agent-release
feat/383-collection-device-filter
feat/382-purchase-creator-filters
feat/381-syb-cancelled-block
feat/375-open-in-pdd
feat/380-status-device-connection
fix/370-horizontal-grid
feat/372-export-shop
feat/378-heartbeat-diagnostics
feat/372-export-price
feat/372-list-export
fix/377-rejected-purchase-outbox
fix/376-pre-address-spec-verification
fix/374-final-spec-confirmation
fix/373-navigation-diagnostics
fix/370-color-discovery
feat/367-last-batch-repurchase
fix/368-image-search-partial-link
integration/364-365-366-main
feat/364-purchase-failure-snapshot
integration/365-366-validation
fix/365-order-result-observation
fix/366-address-editor-ready
fix/359-auto-match-resume
feat/363-inner-code-page-size
fix/362-truncated-spec-card
fix/361-spec-probe-click
docs/agents-worktree-rules
fix/358-syb-size-weight
feat/357-syb-cancel-status
feat/356-purchase-order-filter
fix/355-syb-list-timeout
feat/353-syb-shop-multiselect
fix/354-syb-top-pagination
fix/352-syb-source-created
fix/348-reveal-swipe
feat/340-syb-excluded-products
fix/351-inner-code-apply-selection
fix/350-match-layout
fix/350-inner-code-matching
feat/349-batch-return-use
feat/347-batch-return-cancel
feat/345-yeeke-reship
fix/346-root-serves-spa
fix/344-inner-code-stall-match
fix/343-syb-writeback-session
feat/339-syb-page-size
feat/338-return-match
feat/337-yeeke-admin-ui
feat/336-yeeke-return-sync
fix/335-bottom-submit-node
fix/334-spec-probe-top-swipe
fix/333-purchaser-device-owner
fix/331-spec-panel-recognition
fix/330-syb-writeback-session
feat/327-syb-writeback-filter
feat/326-order-information
fix/325-order-result
feat/316-chrome-order-backfill
fix/307-backfill-entry
feat/305-syb-order-writeback
feat/306-order-paid-amount
release/283
fix/283-purchase-mapping-consistency
fix/230-horizontal-spec-selection
feat/263-spec-rematch
fix/262-purchase-handoff
fix/260-261-purchase-readiness
fix/259-partial-collection-link
feat/258-one-click-replace
fix/257-color-normalized-match
fix/256-collection-single-dimension
fix/255-current-page-reidentify
feat/253-one-click-link
fix/254-match-loading
fix/251-syb-spec-candidates
feat/250-continuous-collection
fix/249-local-purchase-diagnostics
fix/248-bottom-submit
fix/247-short-address-panel
fix/246-address-return-panel
fix/245-purchase-failure-diagnostics
fix/244-selected-card-duplicates
fix/243-spec-entry-recovery
feat/242-agent-order-backfill
feat/241-order-backfill-endpoint
fix/239-syb-partial-sync
fix/238-spec-panel-preswipe
feat/237-client-api-keys
feat/236-purchaser-syb-sync
fix/235-syb-pagination-overlap
release/234-integrated
fix/229-address-entry-dedup
fix/228-selection-proof-panel-transition
fix/227-address-panel-return
fix/226-reopen-pdd-on-manual-retry
fix/225-in-place-purchase-retry
fix/224-final-spec-revalidation
fix/223-probed-confirmed-mapping
chore/221-devharness-sync
feat/218-purchase-result-bubble
fix/217-agent-retry-current-spec
fix/216-syb-spec-role-order
feat/215-mandatory-live-spec-probe
feat/214-verified-purchase-actions
fix/212-syb-sync-shop-snapshot
feat/211-spec-entry-ready-wait
feat/210-order-result-payment-transition
feat/209-pdd-bottom-spec-entry
feat/200-ai-match-result-purchase-ready
feat/199-job-execution-logs
feat/198-syb-ai-parse
feat/195-scheduled-spec-auto-match
fix/197-ai-write-timeout
feat/190-syb-inline-correction
fix/193-address-entry-reveal
feat/194-one-click-spec-match
fix/192-order-result-scroll
No results found.
Labels
No items
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: OPC/goauto#392
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.
状态、来源与关联
已核验事实与证据边界
核验日期:2026-10-14。样例执行 Agent 0.9.71,相关代码基线
328afde;线上 Server 发布5183df3。本轮及 Claude 复核的 main9f918b0仍保留同一核单结束逻辑。正式实施前须重新核对最新 main,不能把这些提交当作未来固定基线。order_created,订单号、下单时间及下单前商品单价已保存,pdd_order_amount_cent为空。result_hash一致,确认当次上报未携带金额,而不是服务端收到后漏存。比对只在内存进行,不输出原始请求。PurchaseLiveAutomation.readOrderResult累积符合订单/待付款上下文帧的可见标签,并在parseOrderEvidence返回非空时立即结束;订单号、时间及原有状态证据齐全,即使金额为 null 也会返回,不再等金额。parsePayableAmount只识别单个 label 内符合“应付+金额+元”的内容;不会跨无关联节点拼接。不同金额冲突、缺失或溢出可导致 null。相同金额重复不构成冲突。PurchaseResultPayload仅在金额非 null 时携带该字段;Server 对合法非 null 金额已有落库路径。同设备其他成功订单能正常带回金额。目标与非目标
目标:第一次已确认订单创建、只缺订单金额时,停留当前页面,延迟约 1 秒进行最多一次额外只读采样;获取成功则补上金额,否则保持原结果。
非目标:
最小流程设计(非 UI)
设计依据:用户本轮确认的最小方向及 Claude #186,确认日期 2026-10-14。无界面变化,不要求 UI 原型;本正文作为待实施的流程和验收证据。
PurchaseOrderEvidence时保存首次订单号、时间和已累积的 labels。1000mspause,再capture一帧,最多一次。不重新进入原核单主循环,以免触发原循环的入口点击、返回或定期上滑路径。实际额外耗时还包括 capture,不承诺严格 1 秒墙钟上限。pageProblem,不得把已确认订单降级。保持既有线程取消/进程终止语义,不通过吞掉致命错误伪造完成。轻量诊断
若复用现有
panelDiagnostic可实现,补读仍无金额时记录结构化分类与计数,例如no_payable_label、conflict、invalid,及补读页面被忽略/读取异常;不得输出标签原文、价格、订单号、地址或控件树,不新增表/接口/上传管道。分类必须与实际判定一致:缺少符合现有规则的金额,不得伪装成已证明的页面加载慢;未匹配文案也不能仅凭 null 就断言格式非法。诊断失败不得影响首次订单事实。仅采用必要的小范围诊断,不为分类重构整个金额解析器。
依赖、子项目与并行边界
PurchaseLiveAutomation.readOrderResult、订单证据或金额解析的工单不可并行编辑;无代码依赖的其他模块可并行,但本单不分派额外范围。验收与测试
order_created所需证据,金额为空,不循环。风险、回退与授权
采购流程行为变化属于高风险,用户当前只要求建单。实施和真机操作按各自范围取得授权后进行。此改动只缓解金额迟到,不保证解决未识别文案或跨节点页面结构;不能据此承诺历史样例必然恢复。
保留首个成功结果是主要回归边界。回退为撤销本单独立补读逻辑;不涉及数据迁移、历史清理或订单撤销。部署/重启/真机执行不属于本单建单授权。
长期文档影响
实施确认后更新 Wiki
Business-Rules-and-Glossary的下单后核单金额读取流程:一次有界补读、首次事实保留、金额可空及无新增动作。若现有 API 契约仅描述字段和可选性,无需制造接口变化;实施时确认文档一致性。按 Wiki-first 在线修改、回读 revision,执行一轮 sync 与 sync --check 并提交镜像。本次只建单,不提前修改 Wiki 宣称功能已实现,不创建任务归档或本地第二事实来源。
2026-10-14 Claude Code:开始实施
用户回复「你安排subagent用sonnet做#392和#393,然后合并到main,勾选最新apk后安装到测试机」。
D:/OPC/goauto-worktrees/issue-392,分支fix/392-order-amount-reread,基线origin/main9f918b0(已含 #388、#390、#391)。2026-10-14 Claude Code:已合并 main 并装测试机(待验收)
bf8f0a1(PurchaseLiveAutomation.kt+62/−1,测试 +193/−4),主 Agent 审查后合并 maind1094a4(--no-ff),随后合并 #393(6a9c823)。readOrderResult首次取得订单证据但金额为空时,调用独立的rereadMissingOrderAmount。做一次pause(ORDER_AMOUNT_REREAD_DELAY_MS=1000)和一次capture,帧须是 PDD 页面且有订单或待付款上下文;与累积文字取并集后重新解析,订单号相同且金额非空才补上,否则返回首次结果。补读不点击、不返回、不滑动、不调用pageProblem。InterruptedException恢复中断标志后返回首次结果,CancellationException继续抛出。诊断orderAmountReread;outcome=...只记录枚举值。reread*用例,覆盖验收条目;去掉实现时,其中 9 个按预期失败。4 个原有测试的 capture 次数各 +1,原因是样例订单页没有「应付」金额,会多补读一次,这是本单要求的新行为。testDebugUnitTest,866 个用例、0 失败;assembleDebug通过;go test -count=1 ./app/goauto/purchase/... ./cmd/migrate/...通过。D:/OPC/goauto-worktrees/merge-370-380/android/app/build/outputs/apk/debug/app-debug.apk,SHA2560fe5fd2d190ccb71be0ede28a61b51fbae7890f5e1d62f4e3b9b684dd26d1ec9(采购机证书bf86d746…766dec),包含 #388、#390、#391、#392、#393。~/.android/debug.keystore重新签名(SHA2566a0e3297…82192c4b,证书3eab2527…c7c4f6,与已装版本一致)。在192.168.0.6:38593(序列号3B668T01GF400000,前台为系统设置、没有执行中的任务)上覆盖安装,11:34:40 起为 0.9.75 / 88,没有卸载。a36404c6e017b5b3661fe44cbfaf3c334147a0a8;镜像提交df640ec,sync --check通过。