Skip to content

fix: repair Adobe CF compat-matrix failures (wave-4 templates, hardener specs, pagination params) - #3440

Merged
bpamiri merged 3 commits into
developfrom
fix/adobe-mysql-compat
Aug 29, 2026
Merged

fix: repair Adobe CF compat-matrix failures (wave-4 templates, hardener specs, pagination params)#3440
bpamiri merged 3 commits into
developfrom
fix/adobe-mysql-compat

Conversation

@bpamiri

@bpamiri bpamiri commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

The Aug 28 compatibility-matrix dispatch on develop exposed a cluster of Adobe-CF-only failures that PR CI never sees (the matrix doesn't run on PRs):

  • adobe2025 compile-wipe (tests=0): two Aug-24 hardener specs opened afterEach closures whose first two statements are a zero-arg $-member call followed by an argumented $-member call — Adobe 2025's compiler throws MissingNameException (attributed to the enclosing describe).
  • debug.cfm/cfmlerror.cfm: wave-4's template-scope helper declarations throw "routine declared twice" on Adobe when the template is included twice per request.
  • cfmlerror: struct-typed exception param rejects Adobe's cfcatch.
  • pagination: Len() on struct params throws on Adobe.
  • GlobalSurfaceIdentitySpec: Adobe ExpandPath mangles .. traversal.

Fixes

  • 31 template helpers → guarded closure assignments (probe-verified: Adobe declares script/tag functions unconditionally, even inside <cfif>; guarded closures are the only idempotent form)
  • $paginationLinkToArgs: stringify struct params before Len()
  • spec path derivation via string-replace on the resolved Global.cfc path
  • hardener afterEach reordering
  • cfml-complexity.py recognizes guarded closures (gate stays green)
  • CLAUDE.md: documents both parser traps (16b-ext)

Verification

  • Local Adobe 2023 + Adobe 2025: events 87/0, hardener 246/0 (1 local-only symlink artifact), global 219/0, security 290/0, cli 152/0
  • Lucee 7 full suite: 5353/0/0
  • Complexity gates green

Still investigating on this branch: the remaining Adobe+MySQL model-layer failures (crudSpec "saving null strings" + cascade, M2M8, OuterTransactionSignal) — git bisect is running against the Aug-23 matrix baseline.

…dobe CF

Template-scope function declarations throw 'routine declared twice' on Adobe
CF when an events template is included more than once per request (onrequestend
plus an in-process spec render). Adobe also ignores conditional script/tag
function declarations, so the helpers become guarded closure assignments —
the only probe-verified idempotent form.

- debug.cfm/cfmlerror.cfm/consoleeval.cfm/mcp.cfm/plugins.cfm/command.cfm:
  convert 31 template helpers to guarded closures
- cfmlerror.cfm: untype the exception argument (Adobe rejects cfcatch
  against struct-typed params)
- pagination.cfc: StructCount struct params before Len() (Adobe Len()
  accepts only simple values)
- GlobalSurfaceIdentitySpec: derive the front controller path from the
  resolved Global.cfc path (Adobe ExpandPath mangles '..' traversal)
- ControllerHardener{Should}Spec: reorder afterEach so a zero-arg
  $helper call isn't followed by an argumented $helper call as the first
  two closure statements (Adobe 2025 MissingNameException compile wipe)
- cfml-complexity.py: recognize guarded closure assignments as functions
- CLAUDE.md: document both Adobe traps (16b-ext)

Signed-off-by: Peter Amiri <peter@alurium.com>
Two post-Aug-23 regressions surfaced by the compat matrix (git bisect
landed on #3399; the query-param break came in with #3419):

- $queryParams: Adobe's IsNull() misreports dotted-path arguments holding
  the string 'Null' as null, so create()/save() bound SQL NULL for any
  'Null'-valued property and NOT NULL columns rejected the insert
  (cascade failures in crudSpec ordering, updateAll, and transaction
  specs). Guard with IsSimpleValue() first — a real null is never a
  simple value, the string always is.
- $isNewNestedCollectionKey: numeric keys above the signed 32-bit range
  (stale GetTickCount-style form markers) must count as new children so
  they never reach findByKey — Adobe's cfqueryparam throws 'Invalid data
  ... for CFSQLTYPE CF_SQL_INTEGER' where Lucee coerces silently.

Verified locally: model area 993/0/0 on Adobe 2023 + MySQL and on
Lucee 7 + MySQL; full Adobe 2023 + MySQL leg green apart from two
macOS-only environment artifacts (bind-mount symlink delete, case-
insensitive miscased-path resolution).

Signed-off-by: Peter Amiri <peter@alurium.com>
…al runs

Signed-off-by: Peter Amiri <peter@alurium.com>
@bpamiri
bpamiri merged commit 4f7c17d into develop Aug 29, 2026
11 checks passed
@bpamiri
bpamiri deleted the fix/adobe-mysql-compat branch August 29, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant