Skip to content

fix(model,tools): BoxLang IN-list extraction parity and coverage-tool repairs - #3442

Merged
bpamiri merged 2 commits into
developfrom
fix/boxlang-inlist-coverage
Aug 29, 2026
Merged

fix(model,tools): BoxLang IN-list extraction parity and coverage-tool repairs#3442
bpamiri merged 2 commits into
developfrom
fix/boxlang-inlist-coverage

Conversation

@bpamiri

@bpamiri bpamiri commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-ups from the post-merge matrix dispatch:

  1. BoxLang IN-list extraction parity — the BoxLang branch of $addWhereClauseParameters regex-stripped quote pairs, corrupting doubled-apostrophe values. It now matches the Lucee/Adobe ReplaceList path byte-for-byte: IN-lists keep their quoted items verbatim (unquoted downstream by $cleanInStatementValue), single values drop exactly one pair of outer quotes. Fixes crudSpec's "should respect parenthesis commas and single quotes when using IN statement" on every BoxLang leg.

  2. Job monitor + retry queries bounded in SQL text, not driver maxrows — BoxLang's JDBC layer calls setLargeMaxRows(), which the PostgreSQL driver does not implement ("is not yet implemented"), so getMonitorData's queries threw and its catch returned empty arrays (B3 failed on BoxLang + PostgreSQL/CockroachDB). All three queries now use the existing dialect-aware $candidateLimitClause.

  3. Coverage-tool repairs (found while producing the fresh CRAP measurement):

    • mask strings/comments before matching (JS function name(){ inside CFML string literals no longer gets a counter inserted mid-string — the parse break in controller/channels.cfc)
    • capture only the <cffunction> name as the counter id
    • instrument guarded closure assignments like the complexity analyzer does
    • collect all insertion points before mutating
    • combine accepts both the dict form (--baseline write) and list form (--json) of the complexity input

Verification

  • Complexity gate: PASS
  • BoxLang + SQLite: model area 979/0/0; jobs 86/0/0 · BoxLang + PostgreSQL: jobs 86/0/0
  • Extraction probes byte-identical between Lucee and BoxLang
  • Instrumentation round-trip verified on Lucee 7 (1720 functions, events 87/0/0, revert exact)

… repairs

- model/sql.cfc: the BoxLang branch of $addWhereClauseParameters now
  matches the Lucee/Adobe ReplaceList path byte-for-byte — IN-lists keep
  their quoted items verbatim (the list branch of $queryParams unquotes
  via $cleanInStatementValue), and single values drop exactly one pair of
  outer quotes so inner apostrophes survive. Fixes crudSpec's
  'parenthesis commas and single quotes' IN spec on every BoxLang leg
  (the previous regex-strip corrupted doubled-apostrophe values).
- tools/code-quality/cfml-coverage.py:
  - mask strings and comments before matching so JS function literals
    inside CFML strings no longer get counters inserted mid-string
    (compile break in controller/channels.cfc)
  - capture only the cffunction NAME as the counter id (whole-tag ids
    embedded quotes = invalid CFML)
  - instrument guarded closure assignments (variables.$x = function)
    like the complexity analyzer does
  - collect all insertion points before mutating so counter insertions
    cannot shift later matches
  - combine accepts both the dict form (--baseline write) and the list
    form (--json) of the complexity input

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

BoxLang's JDBC layer calls setLargeMaxRows(), which the PostgreSQL
driver does not implement ('is not yet implemented') — getMonitorData's
recentJobs/oldestPending queries threw, the surrounding catch returned
empty arrays, and B3 failed on the BoxLang + PostgreSQL/CockroachDB
legs. Bound all three queries with the existing dialect-aware
$candidateLimitClause (LIMIT / FETCH FIRST / OFFSET-FETCH) instead of
the driver maxrows option, with a CFML break as a backstop on the
recent-jobs array build.

Verified: jobs area 86/0/0 on BoxLang + PostgreSQL and BoxLang + SQLite.
Signed-off-by: Peter Amiri <peter@alurium.com>
@bpamiri
bpamiri merged commit 3d5ba52 into develop Aug 29, 2026
13 checks passed
@bpamiri
bpamiri deleted the fix/boxlang-inlist-coverage branch August 29, 2026 06:33
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