Skip to content

fix(teched): make /build/teched feed query HANA-compatible - #2402

Merged
jung-thomas merged 1 commit into
DEVfrom
worktree-teched-feed-hana-fix
Sep 17, 2026
Merged

jung-thomas merged 1 commit into
DEVfrom
worktree-teched-feed-hana-fix

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

Summary

  • /build/teched returned {error: "Cannot set parameter at row: 1. Argument must be a string"} on DEV after the issue TechEd DEV branch Enhancements #2392 merges, breaking all three /teched islands (grid, schedule, calendar) — they fell back to a broken feed and showed no real data.
  • Root cause: loadTechEdFeed seeded its WHERE with where`1 = 1` and bound the all-day flag as allDay = ${true}. The HANA hdb driver rejects the numeric 1 literals and the JS boolean as bound params. SQLite tolerates both, so the in-memory unit tests were green and the regression was HANA-only.
  • Fix: build the WHERE incrementally without the 1=1 seed (first active predicate uses .where, rest chain via .and); use the SQL literal TRUE instead of a bound ${true}.

Verification (deployed DEV HANA)

Ran the fixed loadTechEdFeed against the live DEV tutorials-hana container for every opt path:

opts result
{} OK — 350 sessions, 344 with url, 2 all-day
{upcoming:true} OK — all-day rows retained
{venue:'BERLIN'} OK
{venue:'VIRTUAL', upcoming:true} OK

Session URLs follow the sap.com catalog pattern, e.g. https://www.sap.com/events/teched/berlin/flow/sap/te26/catalog/page/catalog/session/….

Out of scope (flagged)

The same where`1 = 1` pattern lives in srv/lib/mcp-events-search.js and srv/lib/mcp-teched-search.js, and a bound ${true} in srv/lib/mcp-channels-search.js — latent HANA hazards on those MCP search paths. Not touched here; they need their own testing.

Refs #2392

The loadTechEdFeed session query seeded its WHERE with `where`1 = 1`` and
bound the all-day flag as `allDay = ${true}`. Both trip the HANA hdb driver
at param-binding time ("Cannot set parameter at row: 1. Argument must be a
string"), so /build/teched returned {error:...} on DEV and every /teched
island (grid/schedule/calendar) failed to load real data. SQLite tolerates
both forms, so the in-memory unit tests passed and the regression only
surfaced against deployed HANA.

Build the WHERE incrementally without the 1=1 seed — the first active
predicate uses `.where`, later ones chain via `.and` — and use the SQL
literal `TRUE` instead of a bound boolean. Verified against DEV HANA: all
opt paths ({}, upcoming, venue, venue+upcoming) return rows; 344 sessions
carry the sap.com url, 2 all-day rows present, upcoming filter keeps them.

Note: the same `where`1 = 1`` pattern exists in srv/lib/mcp-events-search.js
and mcp-teched-search.js, and a bound `${true}` in mcp-channels-search.js —
latent HANA hazards on those MCP search paths, out of scope here.

Refs #2392
@jung-thomas
jung-thomas merged commit 5c07d42 into DEV Sep 17, 2026
5 checks passed
@jung-thomas
jung-thomas deleted the worktree-teched-feed-hana-fix branch September 17, 2026 19:34
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.

1 participant