Repository navigation
Recognize spinbutton purchase forms with a button-type Add to Cart on declared product detail pages - #8037
Recognize spinbutton purchase forms with a button-type Add to Cart on declared product detail pages#8037chubes4 wants to merge 1 commit into
Conversation
… declared product detail pages
|
End-to-end check on the real site. The PR's transformer was dropped into the SSI v1.47.2 release with Isolating it with
Two remaining gaps:
Reduced inputs and the probe script are on the loop host. Re-check command: AI disclosure: Claude Opus (via Claude Code) ran the re-import and the isolation probes and wrote this comment. |
What changed
FormRuntimeRequirementAnalyzer::holdsQuantityAndAddToCartAction(): a form counts when it holds an enabled quantity control (ARIAspinbutton, a number input, or aquantity/qtyfield) plus a button whose text or accessible name says "add to cart". Any button type counts. It reads ARIA roles, accessible names and button text only, never vendor class names.CommerceFallbackReporter, the purchase-form pass already runs only on pages with a single Product declaration. It now also accepts these forms, so they get acommerce_add_to_cart_formbinding that the product row claims, which produces itswhole_page_candidate.tests/unit/product-detail-spinbutton-purchase-form.phpcompiles the issue's reduced artifact withArtifactCompilerand covers both the positive and the negative case.Verification
All gates passed on
0158f4e9d7fe. Basetrunk: gated on6befe400b4e3, target now6befe400b4e3, re-verified: no.( if git diff --quiet --no-renames 6befe400b4e3660754469bf3b7024b0ebf94a60a -- ':(literal)php-transformer'; then :; els…: passed, 33303 ms; retained gate metadata.php php-transformer/tests/run.php: passed, 67072 ms; retained gate evidence.( if git diff --quiet --no-renames 6befe400b4e3660754469bf3b7024b0ebf94a60a -- ':(literal)php-transformer'; then :; els…: passed, 85338 ms; retained gate metadata.Gate 2 output
[output truncated; retained tail] nt-recorder.php ok 0.0s tests/unit/subtree-classifier.php ok 0.1s tests/unit/source-style-element-identity.php ok 0.1s tests/unit/table-element-converter.php ok 0.1s tests/unit/raw-html-companion-editability.php ok 0.0s tests/unit/unreachable-text-trap-controls.php ok 0.0s tests/unit/unsupported-selector-declaration.php ok 0.0s tests/unit/wordpress-compat-anchor-boundary.php ok 0.0s tests/unit/wrapper-decision-retention.php ok 0.1s tests/unit/theme-json-projection-layered-deferral.php ok 0.0s tests/unit/wrapper-decision-lowering.php ok 0.0s tests/unit/wordpress-compat-source-liveness.php ok 0.0s tests/unit/wordpress-compat-specificity-shims.php ok 0.1s tests/unit/text-leaf-element-converter.php ok 0.1s tests/unit/theme-json-projection-typography-families.php ok 0.0s tests/unit/wrapper-decision-layout.php ok 0.0s tests/unit/wordpress-compat-impossible-navigation-hosts.php ok 0.0s tests/unit/wrapper-decision-conversion.php ok 0.0s tests/unit/wrapper-decision-patterns.php ok 0.0s tests/unit/wrapper-coalescer-disposition.php ok 2.8s tests/unit/image-auto-margin-centering.php ok 0.6s tests/contract/richtext-subject-arm-scaling.php ok 6.1s tests/contract/shared-author-stylesheet-scaling.php ok 0.0s tests/unit/form-custom-property-condition-scaling.php ok 3.7s tests/unit/gallery-compilation-scaling.php ok 3.4s tests/unit/recognizer-compilation-scaling.php ok 0.5s tests/unit/route-root-stylesheet-scaling.php ok 0.2s tests/unit/route-selector-match-index-scaling.php ok 0.0s tests/unit/site-plan-write-token-scaling.php Slowest: 36.6s tests/contract/runtime-entity-budget.php 20.6s tests/unit/design-system-usage-derivation.php 18.2s tests/contract/test-runner.php 17.8s tests/unit/boxless-image-figure-paint.php 17.6s tests/contract/shared-shell-extraction.php 2153 tests, 0 failed, 66.3s wall, 1287.7s cpu, 32 jobs, opcache file cache off, test workers on (59 own-process tests)Cook run
agent-task-db0bf8ea-a01c-46d0-8a1b-9b59bfe7c9c0agent-task-db0bf8ea-a01c-46d0-8a1b-9b59bfe7c9c0-attempt-1-c5326d7ee7f80fc447c89830ad07f63a301c421ee6603385e7f80fc447c89830ad07f63a301c421ee6603385e7f80fc447c89830ad07f63a301c421ee6603385Delivery
Evidence
php tests/run.phpreported 2153 tests, 0 failed. This is a local run, not the gate result.php -lon the three changed files, which reported no errors; lint itself is left to the gate run.AI disclosure
Tool: Homeboy Cook. Agent: Homeboy (roadie). Model: roadie · route cook-heavy · served claude-opus-5-5. Cook time: 11m08s.
The AI read the issue, traced the add-to-cart gating through the analyzer, reporter and entity collector, wrote the fix and the regression test, and ran local checks, under the direction of the Cook requester. Homeboy reports controller verification separately from this account of the AI's work. A human reviews before merge.
Refs #8035