Skip to content

release 1.45.0: Private / Pre-release Tutorials (DEV → main) - #3174

Merged
Thomas Jung (jung-thomas) merged 43 commits into
mainfrom
release/dev-to-main-1.45.0
Nov 22, 2026
Merged

Thomas Jung (jung-thomas) merged 43 commits into
mainfrom
release/dev-to-main-1.45.0

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

Release 1.45.0 — DEV → main

Promotes origin/DEV to main for a PROD deploy. Version bump 1.44.4 → 1.45.0 (minor — net-new feature per convention) in .deploy/mta.yaml (deploy source of truth).

Headline — Private / Pre-release Tutorials (#3099, #3168)

Tutorial authors can mark a tutorial's visibility (listed / non-listed / role-gated) so pre-release content is:

  • hard-gated behind the new Tutorial.PreRelease XSUAA scope with a fail-closed nav handler,
  • excluded from the public navigator, search index, sitemap.md, llms-full.txt, and semantic_search (closes the Research "Private" Tutorials #3099 leak),
  • served through a scope-gated approuter route,
  • editable from the Admin UI (visibility column),
  • backed by a QA-style pre-release build channel + navigator branch + e2e smoke.

Also in this release

Deploy

Standard DEV→main release. After merge, the PROD MTA deploy is a separate, manually-authorized step (mbt build + cf deploy … -e deploy/prod.mtaext). whats_new.json is regenerated by build:whats-new-snapshot during the deploy build — no manual edit needed.

🤖 Generated with Claude Code

…ss-file CDS singleton leak

The test deployed a hand-picked subset omitting db/schema.cds to the shared
sqlite::memory: DB. cds.deploy().to() mutates the process-wide cds.db/cds.model
singleton for the whole vitest fork worker, so on CI (maxWorkers:4, dense
file-to-worker packing) a later file in the same worker inherited a schema
missing DeveloperEnvironmentTabs. #977 made the GDPR anonymize cascade's
nested-subject resolution issue a SELECT ID FROM DeveloperEnvironmentTabs,
which then hard-failed with 'no such table', reddening admin-service.test.js
and anonymize-dsr-request-number.test.js in the full suite (green in isolation).

Deploying all of db/ restores every table + @personaldata annotation into the
singleton; the job under test only needs an empty DB.
…h-design

docs(navigator): design + plan for #3112 search count-guard fix
…llution-977

fix(test): stop CDS singleton leak reddening anonymize unit tests in CI
…cade

The data-subject resolver returned the nested-marker `via: 'DeveloperEnvironmentTabs'`
(bare name). The GDPR anonymize actions are bound to the served AdminService, so
the cascade's `SELECT.from('DeveloperEnvironmentTabs')` resolved to the AdminService
*projection* in that request context and CAP emitted literal
`SELECT ID FROM DeveloperEnvironmentTabs` — a table that does not exist (the physical
table is com_sap_developers_ims_DeveloperEnvironmentTabs). Result: 500 'no such table:
DeveloperEnvironmentTabs' in anonymizeUser/anonymizeByDsrRequest, reddening the unit
suite on CI (green in isolation / direct-db unit context, where the bare name resolves
to the db entity).

Qualify `via` to the full CDS name so it always resolves to the db-layer entity and the
correct namespaced table, in both the served and direct-db contexts. Update the two
tests that asserted the old bare marker/SQL.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
…llution-977

fix(#977): qualify DeveloperEnvironmentTabs via-name to fix anonymize 'no such table' in CI
Research spike for issue #3099. Scopes how to serve tutorials to a
restricted audience (account allowlist / event-membership / geo-IP)
reusing the existing authoring + render pipeline.

Findings: serving is fully anonymous today (no visibility flag, no
account gate, no geo/IP). Strongest reuse templates are srv-qa
(coarse channel scope-gate) and srv-sage (per-identity in-handler
gate). Ranks four gating options; recommends a srv-sage-based
account-gating POC with defense-in-depth for credential content.
…s-research

docs(research): Private Tutorials scoping (#3099)
Approved design for two visibility behaviors on a new Tutorials.visibility
field (LISTED/UNLISTED/ROLE_GATED):
- event-hidden (UNLISTED): hide-only; suppressed from navigator/search/
  sitemap, served at normal URL.
- pre-release (ROLE_GATED): hard gate; gated prefix route + Tutorial.PreRelease
  XSUAA scope + distinct CAP mount, public route 404s + no-store.

Incorporates builder-check fixes: distinct-path trust signal (not a
spoofable header), cache fail-closed rules, catalog carries visibility
(consumers filter), XSUAA sequencing.
8-task TDD plan implementing the approved design: visibility enum,
navigator/search/catalog/sitemap suppression, XSUAA scope + gated
approuter route, fail-closed serve gate, admin edit + smoke.
PR #3165 (#3099) added docs/developers/reference/private-tutorials-research.md
without a sidebar entry, so predocs:build's check-docs-sidebar guard failed
and broke the Deploy Docs to GitHub Pages workflow on DEV.
Add visibility filter to NavigatorCatalog WHERE clause so only
LISTED tutorials (or rows with null visibility, for pre-activation
backward compat) appear in the navigator view. UNLISTED and ROLE_GATED
tutorials are now excluded.

TDD: navigator-visibility.test.js seeds all four visibility states
wired into a published mission/path and asserts the correct rows
are present/absent.
Add visibility filter to the Tutorials branch of SearchableItems view.
Only LISTED or null-visibility tutorials appear in search results;
UNLISTED and ROLE_GATED tutorials are excluded. Null is treated as
LISTED to avoid hiding pre-activation rows.
- serveHandler now accepts { gated } option; public mount uses gated=false,
  gated mount (/content/tutorials-prerelease/*) uses gated=true via closure.
  The flag is not client-settable (set server-side by route match only).
- Visibility check runs BEFORE cache.get: serveHandler reads visibility from
  the Tutorials table (added to existing metadata-only status SELECT), then
  gates ROLE_GATED on !gated → serveNotFound (404, not 403) before calling
  serveStoredSlug. Defence-in-depth repeat check inside serveStoredSlug.
- ROLE_GATED responses: cache.get is skipped (isRoleGated ? null : cache.get),
  cache.set is skipped, and Cache-Control is set to `private, no-store`
  instead of the public max-age value.
- UNLISTED visibility still serves 200 on the public route (hide-only).
- Fail-closed: null/undefined visibility treated as LISTED, not ROLE_GATED.
- _tutorials-table.js: adds visibilityCol to both HANA and SQLite branches.
- Tests (4): public+ROLE_GATED→404; gated+ROLE_GATED→200; public+UNLISTED→200;
  gated-then-public no-cache-leak→404.
…3099)

- Add `isPrivateVisibility(visibility)` pure function to render-frontmatter.ts:
  returns true for UNLISTED / ROLE_GATED, false for LISTED / null / undefined.
- Add `private?: boolean` arg to RenderHugoFrontmatterArgs; emit `private: true`
  in Hugo front-matter when set, absent otherwise.
- Add `visibility?` param to writeHugoPage; passes isPrivateVisibility(visibility)
  into renderHugoFrontmatter.
- Add `visibility?` to CatalogTutorialMeta type (types.ts).
- Pass `visibility` through fetchBuildCatalog in cap.ts.
- Build a visibilityBySlug map from the CAP cache before the Phase 3 task pool;
  feed it into each writeHugoPage call site.
- Hugo sitemap.xml already keys off `.Params.private` — no template change needed.
- TDD: 9 tests (5 isPrivateVisibility unit + 4 writeHugoPage integration) RED→GREEN.
- Annotate AdminService.Tutorials.visibility with @Common.Label +
  @Common.ValueListWithFixedValues so the enum renders as a dropdown
  (LISTED / UNLISTED / ROLE_GATED) on the Tutorials Object Page.
  Field is auto-exposed via the existing '*' wildcard projection.
- Add visibility to FieldGroup#Lifecycle so it appears on the admin OP
  Lifecycle tab, alongside status and deletionReason.
- Add test/smoke/private-tutorials-gate.smoke.test.js: post-deploy
  assertions that the gated /tutorials-prerelease/* route returns
  401/403/302 without Tutorial.PreRelease scope, and that a ROLE_GATED
  tutorial returns 404 on the public /tutorials/<slug> route.
  Self-skips cleanly (all 3 tests skipped) when SMOKE_BASE_URL is unset.
… srv-only (#3099)

- cds build --production regenerates db/last-dev/csn.json + the Tutorials
  hdbmigrationtable (v7->v8, adds visibility column) — required by the
  check-cds-build-staging guard on any schema shape change.
- Add GET /content/tutorials-prerelease/*slug to ALLOWLIST_ONLY_ON_SRV in
  check-srv-qa-route-drift.ts: pre-release is a prod-channel hard-gate
  (Tutorial.PreRelease scope, no QA equivalent); srv-qa serves tutorials
  behind requireAuthorScope and has no pre-release surface.
…-3165

fix(docs): register private-tutorials-research in sidebar
…3099)

- db-qa/schema.cds: add visibility column to the minimal QA Tutorials
  entity. The shared serve handler's status SELECT reads visibility
  unconditionally (#3099), so the QA namespace table must have the column
  or GET /content/tutorials/:slug 500s on srv-qa (caught by
  test/srv-qa/content-service.test.js in the full CI suite). QA has no
  pre-release channel, so QA tutorials are always LISTED (the default).
- .deploy/xs-security.json: sync byte-identical with root after the
  Tutorial.PreRelease additions (drift guard: xs-security-authorities.test.js).
…s-design

feat: Private Tutorials — event-hidden + pre-release visibility (#3099)
…ase route (#3099)

The deployed approuter enforces XSUAA by returning a 200 HTML login
interstitial (fragmentAfterLogin/locationAfterLogin cookie shim) for an
unauthenticated request to a protected route, NOT a 302/401/403 — same as
the admin-shell and /me smoke tests. The pre-release smoke assertions
expected only [401,403,302], so they failed the post-deploy smoke gate on
DEV even though the gate works (unauth callers get the login page, never
pre-release content — verified identical to the proven-gated /tutorials-qa/
route).

Fix: assertGated() accepts 302/401/403 OR a 200 whose body IS the login
interstitial, and FAILS a 200 carrying real content (a genuine leak). This
keeps the assertion a real security check, not a weakening. Verified green
against deployed DEV.
…rtion

fix(smoke): pre-release gate smoke test accepts XSUAA login interstitial (#3099)
- Extract `buildNavTutorials(slugSet, contentRows, {visibilityFilter})` from
  `navHandlerFallback` — shared helper used by both the public cold-start fallback
  and the new gated live feed.
- Visibility filter: 'ROLE_GATED' keeps only ROLE_GATED tutorials; default public
  path excludes ROLE_GATED (defense-in-depth; hardens the fallback — hot path uses
  the baked __nav__ blob, unchanged).
- Add `preReleaseNavHandler` — enumerates ContentCurrent/ContentFiles slugs, calls
  buildNavTutorials with ROLE_GATED filter, sets Cache-Control: private, no-store.
  Does NOT read/write the shared slug-keyed cache (#3099 cache-leak rule).
- Export via _defaults + module re-exports in packages/content/content-store.js,
  and re-export from srv/lib/content-store.js shim.
- Mount at GET /content/tutorials-prerelease/_nav in srv/server.js, registered
  BEFORE the *slug wildcard so `_nav` is not swallowed as a slug.
- TDD: 3 tests in srv/__tests__/lib/prerelease-nav.test.js — RED first, then GREEN.
  All 135 tests pass (21 test files, no regressions).
- Extend Channel union to 'prod' | 'qa' | 'prerelease' in fetch-tutorials.ts
- parseChannel accepts --channel prerelease (throws Unknown channel on unknown)
- getQaCacheDir → .tutorial-cache-prerelease
- getHugoContentDir → hugo/content-prerelease
- getNavJsonDir → hugo/static-prerelease/tutorials
- browseDataFile → hugo/data-prerelease/browse.json
- buildAllCards uses /tutorials-prerelease prefix for prerelease
- main(): writes content-prerelease/_index.md + tutorial-navigator/_index.md
- main(): filters allTutorials to visibility===ROLE_GATED for prerelease channel
- main(): skips discovery baseline upload (non-prod, same as qa)
- main(): allows feed drift on fast-path reuse (same as qa)
- main(): dimensionsPath → hugo/data-prerelease/image_dimensions.json
- New hugo.prerelease.toml: dataDir=data-prerelease, params.prerelease=true, baseURL=/tutorials-prerelease/
- New scripts/sync-island-manifest-prerelease.cjs: copies island_manifest.json to data-prerelease/
- package.json: fetch-tutorials:prerelease, build:prerelease, publish-content:prerelease, prerelease:full
  build:prerelease reuses verify-qa-build.ts (takes dir as argv[2]) for public-prerelease
- TDD: scripts/__tests__/fetch-tutorials-channel.test.ts, 16 tests pass (green after impl)
- Full channel build deferred to deploy-time (CAP_BASE_URL not set locally)
- Note: build:prerelease not in build:all, same as QA pattern; deploy wiring is Task 6
- Extend both `{{ if not site.Params.qa }}` gates to also suppress the
  browse-pill and homepage discovery sections (hero, featured, recent,
  topics) when `site.Params.prerelease` is set.
- Add `{{ else if site.Params.prerelease }}` branch on the island mount
  node: emits `data-nav-base="/tutorials-prerelease"`,
  `data-href-base="/tutorials-prerelease"`, `data-client-search="true"`.
  No `data-search-base` (prerelease uses client-side search only —
  `clientSearch=true` in TutorialNavigator.vue disables server search).
- Add a "Pre-release" fd-object-status badge above the island mount so
  holders know they are on the gated surface.
- Add `$hrefBase = "/tutorials-prerelease"` assignment in the SSR
  featured-rail block (defensive; that section is already gated off for
  prerelease, but keeps the value consistent).
…unit test (#3168)

Item A — verify-qa-build.ts prerelease channel awareness:
- Extract shared `checkBrowseDataTag` and `checkNoHomeSections` helpers to
  avoid duplication between QA and prerelease checks.
- Add `checkPrereleaseIndex` exported function that checks prerelease-specific
  markers: `data-nav-base="/tutorials-prerelease"` + `data-client-search="true"`
  (no `data-search-base` required — prerelease uses client-side search only).
- Make `main()` detect prerelease from the public-dir arg (path contains
  "prerelease") and dispatch to the right check + manifest path
  (`data-prerelease/island_manifest.json`).
- Keep `checkQaIndex` behavior 100% unchanged; all 6 existing tests still pass.
- Add 6 new `checkPrereleaseIndex` tests in verify-qa-build.test.ts.

Item B — ROLE_GATED visibility filter unit test:
- Extract `keepForChannel(visibility, channel)` pure predicate from the
  inline filter in `main()` and export it. The predicate encodes:
    prerelease → only ROLE_GATED pass
    prod       → ROLE_GATED excluded (mirrors semantic-search exclusion, #3168)
    qa         → all pass (repo-scoped, not visibility-scoped)
- Wire up `main()` to use `keepForChannel` for all non-qa channels, replacing
  the previous prerelease-only inline filter.
- Add 18 new `keepForChannel` tests in fetch-tutorials-channel.test.ts covering
  all channels × all visibility values + mixed-catalog scenarios.
- TDD evidence: `keepForChannel` import in the test file failed until the export
  was added; tests went red first.

All tests: 44 pass (32 channel-filter + 12 verify-qa-build).
…oke (#3168)

- .deploy/mta.yaml: add static/prerelease to wipe-first list; add
  mkdir/cp/rm-tutorials block after QA block (approuter builder)
- mta.yaml: add npm run build:prerelease + mkdir/cp/rm-tutorials block
  after QA block (CI before-all)
- scripts/deploy-mta.cjs: add Step 2.8 (fetch-tutorials:prerelease +
  build:prerelease) between Step 2.7 (QA) and Step 3 (mbt), mirroring
  the QA channel pattern exactly
- .github/workflows/deploy.yml: add Prefetch prerelease tutorials step
  after QA prefetch (warms .tutorial-cache-prerelease before mbt build)
- test/e2e/prerelease-navigator.spec.ts: new Playwright smoke spec; P1
  asserts /tutorials-prerelease/ loads + island mounts; P2 asserts
  client-side search narrows results; P3 asserts slug page renders
  <main>+<h1>; self-skips without SMOKE_BASE_URL + credentials
…il-closed nav handler (#3168)

C1 (Critical): /content/tutorials-prerelease/* was reachable anonymously via the
broad catch-all route ^/content/(.*)$ (authenticationType: none) at index ~83 in
xs-app.json. The new scoped routes for /tutorials-prerelease/* were at indices 98-101,
so the catch-all always won for direct /content/tutorials-prerelease/* requests,
exposing both the _nav listing and the gated-bytes serve path.

Fix part 1 (PRIMARY gate — approuter): add route for ^/content/tutorials-prerelease/(.*)$
with authenticationType: xsuaa + scope: Tutorial.PreRelease, placed ABOVE the anonymous
^/content/(.*)$ catch-all. This closes the _nav listing leak AND the pre-existing #3099
gated-bytes exposure via the content mount.

Fix part 2 (DEFENSE-IN-DEPTH — handler fail-closed): preReleaseNavHandler now accepts
{ gated = false } and returns 404 immediately when gated !== true. The server.js mount
passes { gated: true } via closure; no client-settable header or param can spoof this.
Mirrors the existing serveStoredSlug { gated } pattern from #3099.

TDD: new test asserts 404 + no tutorial data without flag (was RED); passing with flag
(GREEN). Existing tests updated to pass { gated: true }. 5/5 tests pass.
…tch steps (#3168)

T6: Three comments in deploy.yml referenced 'two fetches' (prod + QA) after a third
prerelease fetch step was added. Updated to 'three fetches' (prod + QA + prerelease).
Comment-only change, no functional impact.
…lease-navigator

feat(prerelease): scope-gated pre-release navigator (#3168)
A fourth scheduler-stall mode was uncovered by the three existing self-heal
passes: a scheduled-job outbox row dead-lettered at attempts=maxAttempts (10)
with status=NULL. CAP never retries it; reap/reseed/flush all skip it; and a
rolling restart preserves attempts. Caused a PROD stall on 2026-11-22.

- New resetDeadLetteredScheduledJobRows() pass (srv/lib/scheduler-reaper.js):
  resets attempts=0, lastError=NULL for registered-job target=queue rows at
  attempts>=maxAttempts and status!=processing. Fail-open, HANA-casing-safe,
  SCHEDULER_MAX_ATTEMPTS-overridable.
- Wired into the ~10-min self-heal tick (before cds.flush so a reset row drains
  same tick) and as a deferred boot sweep in CronService.init() (parity with
  the reaper; a dead-lettered row survives restarts).
- Canary alert body now names this tick's self-heal actions (reset/reaped/
  reseeded counts) so operators distinguish dead-letter from tombstone/missing.
- Unit + hybrid coverage; runbook gains failure mode #4, recognition query,
  manual reset SQL, and an item-3 boot-crash-window investigation note.

Item 3 (boot-crash-window timeout tuning) is a runbook investigation note only
pending reproduction, not a config change.
…letter

fix(scheduler): auto-recover dead-lettered outbox rows (#3171)
…3168)

A prerelease channel legitimately has zero cards until an author marks a
tutorial visibility=ROLE_GATED. verify-qa-build treated an empty #browse-data
grid as a hard failure, blocking the DEV deploy ('static/prerelease would ship
empty'). checkBrowseDataTag now takes allowEmpty (prerelease=true); it still
fails on an absent tag or a non-array 'all' (real build breaks). QA stays
strict (allowEmpty=false) — an empty QA grid is still a contribution-fetch
failure.
…-prerelease

fix(prerelease): allow empty prerelease browse grid in verify-build (#3168)
- Bump .deploy/mta.yaml 1.44.4 -> 1.45.0 (minor; net-new feature per version
  convention). Deploy source of truth per deploy-mta.cjs.

Headline: Private / Pre-release Tutorials (#3099, #3168) — tutorial authors
can mark a tutorial's visibility (listed / non-listed / role-gated) so
pre-release content is hard-gated behind the new Tutorial.PreRelease XSUAA
scope, excluded from the public navigator, search index, sitemap.md,
llms-full.txt and semantic_search (closes the #3099 leak), and served through
a scope-gated approuter route with a fail-closed nav handler. Admins edit
visibility from the Admin UI; a QA-style pre-release build channel + navigator
branch + e2e smoke back it.

Also carries scheduler + CI hardening:
  #3171 scheduler auto-recovers dead-lettered outbox rows
  #3168 allow empty pre-release browse grid in verify-build; route-drift
        allowlist for /content/tutorials-prerelease/_nav
  #977  fix unit-test CDS singleton pollution (anonymize cascade + featured-
        topics job)
  #3112 navigator search count-guard design
  #3165 docs sidebar registration fix

Promotes origin/DEV (93572a6) to main.
@jung-thomas
Thomas Jung (jung-thomas) merged commit e07ae16 into main Nov 22, 2026
9 of 10 checks passed
@jung-thomas
Thomas Jung (jung-thomas) deleted the release/dev-to-main-1.45.0 branch November 22, 2026 14:45
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