Repository navigation
#2993: PROD-blocking dad-discard reconcile HANA test - #3141
Merged
Merged
Conversation
…HANA
Adds test/hybrid/admin-drafts-dad-reconcile.hybrid.test.js — a hybrid
(real-HANA) vitest test that proves two invariants under deleteStrategy:dad:
(a) after('DISCARD','Missions.drafts') reconcile fires — seeds a User whose
MISSION TaskRecord is stale IN_PROGRESS, draftEdits + DISCARDs a Mission,
then vi.waitFor asserts the record heals to COMPLETED (8s, 100ms interval).
(b) Zero orphaned CompletionPathItems draft rows — raw db.run() query on
ADMINSERVICE_COMPLETIONPATHITEMS_DRAFTS by discarded DraftUUID → COUNT=0,
proving the ON DELETE CASCADE constraints are live on HANA.
Gated by isSafeForWrites() (blocks PROD). Unique dad5-<hex> prefix + exact-ID
cleanup in afterAll. Run: npm run test:hybrid -- test/hybrid/admin-drafts-dad-reconcile.hybrid.test.js
No handler changes (test-only). HANA execution pending (worktree session
isolation blocks cds bind --exec; cf target is on DEV eu10-005/dev).
Replace .slice(0,36).padEnd(36,'0') gymnastics with deterministic well-formed UUIDs: dad5000N-2993-0005-<hex4>-<hex8>0000 (8-4-4-4-12). Last segment = 8-char RUN_HEX + '0000' = exactly 12 hex chars. All five seed IDs validated as RFC-4122 format; no other changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #3136 (merged — the compiler pin + flag flip, already deployed+verified on DEV: preflight
verified (46/46)).Adds the PROD-blocking gate test that #3136's body listed as pending:
test/hybrid/admin-drafts-dad-reconcile.hybrid.test.js— proves, against real HANA, that underdeleteStrategy: dada Mission draftEdit→discard (a) still fires theafter('DISCARD')rollup reconcile (user MISSION TaskRecord heals IN_PROGRESS→COMPLETED) and (b) leaves zero orphanedADMINSERVICE_COMPLETIONPATHITEMS_DRAFTSrows (realON DELETE CASCADE).Both assertions verified non-vacuous in review (stale seed + pre-discard sanity count). Shared-HANA safe: randomised
dad5-prefix, FK-orderedafterAllcleanup (runs on assert failure), HANA-kind hard guard, PROD-write gate.Must be run before PROD promotion:
(worktree sandbox blocks
cds bind; run from the primary checkout.)No handler changes — test-only. If the run shows reconcile does NOT fire under
dad, the fix is anafter('DELETE','DRAFT.DraftAdministrativeData')fallback (noted in the test).