Skip to content

fix(teched): bound public /build/teched feed (#2312) - #2336

Merged
jung-thomas merged 1 commit into
DEVfrom
fix/build-teched-bounded-2312
Sep 15, 2026
Merged

jung-thomas merged 1 commit into
DEVfrom
fix/build-teched-bounded-2312

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

What

Hardens the public GET /build/teched feed (added by the TechEd foundation, #2312). It previously did unbounded full-table SELECTs plus separate full-table NCLOB passes for abstract/bio/description on a route cached only 60s. Catalog is ~346 sessions so impact is modest — this is defensive bounding.

Changes

  • Bound the sessions query with LIMIT 1000 (well above the ~300/venue real size, so nothing is dropped) and a stable orderBy.
  • Optional scoping params (additive; page still fetches all + splits client-side): ?venue=BERLIN|VIRTUAL and ?upcoming=true (drops already-ended sessions).
  • LOBs fetched for emitted rows only: abstract is fetched via WHERE ID IN (...) scoped to the bounded session rows, batched under the HANA bound-parameter cap, through a new fetchLobColumnByIds helper. Keeps the LOB-locator-safe pattern (LOB in its own query, never alongside metadata).
  • Junction read scoped to the emitted sessions.
  • Tracks/speakers kept full-fetched (tiny dimension tables). Deliberately NOT capped: an unordered cap could non-deterministically drop a track/speaker that an emitted session references, leaving track:null or a missing speaker. Referential integrity preserved.

Not changed (shape preserved)

{sessions,speakers,tracks,buildAt} incl. venue per session and the relatedDevtoberfestSessions Devtoberfest cross-link; public projection (drops sourceId/contentHash/audit); Cache-Control: public, max-age=60.

Tests

Adds test/unit/srv/build-teched-endpoint.test.js (7 tests): shape + 60s cache, LOBs/venue/cross-link present, no leaked source/audit fields, bounded, ?venue and ?upcoming filters, and a referential-integrity guard (every emitted session resolves its track + all speakers). All pass against the in-memory cds.test('serve') harness (real HTTP).

The public /build/teched handler did unbounded full-table SELECTs plus
separate full-table NCLOB passes for abstract/bio/description on a route
cached only 60s. Harden it:

- LIMIT the sessions query to 1000 (well above the ~300/venue real size,
  so nothing is dropped) with a stable orderBy; add optional
  ?venue=BERLIN|VIRTUAL and ?upcoming=true scoping.
- Fetch the abstract LOB only for emitted (bounded) session rows via
  WHERE ID IN (...), batched under the HANA bound-parameter cap, via a
  new fetchLobColumnByIds helper (keeps the LOB-locator-safe pattern).
- Scope the session/speaker junction read to the emitted sessions.
- Keep tracks/speakers fully fetched (tiny dimension tables) so every
  emitted session resolves its track_ID and speaker links — no
  unordered cap that could silently drop a referenced row.

Response shape unchanged: {sessions,speakers,tracks,buildAt} incl. venue
per session and the relatedDevtoberfestSessions cross-link; public
projection (no source/audit fields); Cache-Control public, max-age=60.

Adds test/unit/srv/build-teched-endpoint.test.js.
@jung-thomas
jung-thomas merged commit 1b5bb77 into DEV Sep 15, 2026
5 checks passed
@jung-thomas
jung-thomas deleted the fix/build-teched-bounded-2312 branch September 15, 2026 22:22
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