PddProductDetailCollector.moveSpecPanelToTop always swiped DOWN at
least once even when the panel already showed its topmost color
heading, and required two identical viewport signatures to stop. On
a real device that extra swipe could drag the bottom sheet and make
the color/size headings disappear, after which the purchase spec
probe silently reported spec_probe_completed with zero dimensions
and the server reported the generic PURCHASE_SPEC_NOT_MATCHED,
hiding the real cause (goods 8580, tasks 551/552).
- moveSpecPanelToTop now skips the restore swipe when the panel is
already at top (the first parsed dimension is "color" with visible
values), and stops and fails explicitly (SPEC_PANEL_TOP_COLLAPSED)
if a restore swipe makes headings/dimensions vanish, instead of
swiping further or returning an empty success.
- New AgentDiagnosticReason.SPEC_PANEL_TOP_ALREADY /
SPEC_PANEL_TOP_COLLAPSED record swipe count and heading/dimension
counts before/after (booleans/counts only, no page text).
- New PurchaseSpecProbePolicy demotes an Agent spec_probe_completed
outcome with zero collected dimensions into an explicit
PURCHASE_SPEC_PROBE_EMPTY failure ("规格探测未读取到任何颜色或尺码")
before it is persisted/reported, instead of reaching the server as
a normal empty probe.
- Server resolveProbedSpecs uses the same explicit
PURCHASE_SPEC_PROBE_EMPTY code/message when a probe result has zero
colors and zero sizes, as defense in depth for older Agent builds.
Tests: PddProductDetailCollectorTest (already-at-top skips the
restore swipe; not-at-top restores and still collects; vanishing
headings stop swiping and fail), PurchaseSpecProbePolicyTest, and
service_test.go TestLiveProbeWithNoDimensionsFailsWithExplicitEmptyProbeCode.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NTDbDcwbDw1TSAcE6wfh2F