Skip to content

fix(runtime): guard CAPTCHA requests and restore checkout regressions - #35

Merged
Seiger merged 3 commits into
Seiger:1.xfrom
MiddleSokilAI:sokil/fix-marketing-captcha-request
Oct 28, 2026
Merged

Seiger merged 3 commits into
Seiger:1.xfrom
MiddleSokilAI:sokil/fix-marketing-captcha-request

Conversation

@MiddleSokilAI

@MiddleSokilAI MiddleSokilAI commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem

CAPTCHA/API entrypoints emit evolution.OnWebPageInit without an HTTP request binding. The marketing listener calls request() unconditionally and fails with Target class [request] does not exist.

The branch's existing regression suite also exposed two integration defects: quick checkout performs arithmetic on unvalidated quantities, and cart snapshots omit physical attributes after their column migration.

Changes

  • Skip marketing capture only when the container lacks a request binding. Normal HTTP queries, marketing filters and cookies retain their existing behavior.
  • Defer quick-order arithmetic, deposit amounts and measured display fields until validation succeeds. Plugins still receive raw piece quantities once, while measured totals retain scaled base-unit arithmetic.
  • Restore weight/dimensions through physicalPayload() when building cart snapshots, preserving legacy JSON keys and ordering. The existing golden JSON is unchanged; its CRLF/LF handling is portable.

Branch and scope

Targets the installed 1.x support line, from the MiddleSokilAI fork. No schema, dependency, CMS or production changes.

Verification

  • Missing-request regression reproduced before the guard; all 5 focused checks pass locally on PHP 8.4 and 8.5.
  • PHP 8.4: 40 checkout validation checks, 36 deposit checks and 151 measured quantity checks pass. Measured tests include quick orders and byte-preserved piece cart/order JSON.
  • Plugin syntax checks pass on PHP 8.4 and 8.5; git diff --check passes.
  • Full regression CI matrix passes on PHP 8.4 and PHP 8.5 for commit e23fe31: https://github.com/Seiger/sCommerce/actions/runs/40706974459. Local PHP 8.5 lacks the PDO SQLite driver, so SQLite suites are not claimed locally verified on that version.

Remaining validation

Live CAPTCHA verification on dev is pending installation. Production has not been modified.

@MiddleSokilAI MiddleSokilAI changed the title fix(marketing): guard missing HTTP request in CAPTCHA entrypoints fix(runtime): guard CAPTCHA requests and restore checkout regressions Oct 28, 2026
@Seiger
Seiger merged commit abfd18c into Seiger:1.x Oct 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants