Skip to content

#2993: make dad reconcile gate test green on DEV HANA - #3146

Merged
Thomas Jung (jung-thomas) merged 1 commit into
DEVfrom
worktree-spike-2993-cascade
Nov 17, 2026
Merged

Thomas Jung (jung-thomas) merged 1 commit into
DEVfrom
worktree-spike-2993-cascade

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

Follow-up to #3141 (merged the gate test, but it couldn't actually exercise dad in the hybrid profile).

The gate test test/hybrid/admin-drafts-dad-reconcile.hybrid.test.js was booting without the dad path active — the hybrid profile doesn't carry draft_admin_integrity/deleteStrategy (they're in base cds.fiori, and CDS_* env overrides don't reach cds.env.fiori.*), it 500'd on the @cap-js/ai recommendation hook with no AICore bound, and timed out on the cold HANA boot.

Fixes (module-load, before cds.test):

  • force cds.env.fiori.draft_admin_integrity/draft_orphan_cleanup = true + cds.env.drafts.deleteStrategy = 'dad' so the test verifies the real path regardless of ambient profile
  • mock auth + AICore for the in-process boot
  • hookTimeout 120s for the full cold HANA boot

Verified GREEN against DEV HANA (46/46 cascade constraints present, preflight confirmed): a Mission draftEdit→discard under dad fires the after('DISCARD') rollup reconcile AND leaves zero orphaned child draft rows. The #2909 handler-bypass risk does not occur.

This closes the PROD-blocking verification gate for #2993.

… DEV

The gate test booted without actually exercising dad: the hybrid profile
did not carry draft_admin_integrity/deleteStrategy (they live in base
cds.fiori, false in a main-based checkout), and CDS_* env overrides don't
reach cds.env.fiori.*. It also 500'd on the @cap-js/ai recommendation hook
(unbound AICore) and timed out on cold HANA boot. Fixes, all at module load:
- force cds.env.fiori.draft_admin_integrity/draft_orphan_cleanup = true and
  cds.env.drafts.deleteStrategy = 'dad' so the test verifies the real path
- mock auth (cds_requires_auth_kind) + AICore (cds_requires_AICore_kind)
- raise hookTimeout to 120s for the full cold HANA boot

Verified GREEN against DEV HANA (46/46 cascade constraints present):
draftEdit->discard under dad fires rollup reconcile AND leaves zero orphaned
child draft rows.
@jung-thomas
Thomas Jung (jung-thomas) merged commit 9faf706 into DEV Nov 17, 2026
3 of 4 checks passed
@jung-thomas
Thomas Jung (jung-thomas) deleted the worktree-spike-2993-cascade branch November 17, 2026 02:35
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