fix(journey): conditional legacy handle compat (EVO-1922)#99
Open
daniloleonecarneiro wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Sorry @daniloleonecarneiro, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
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.
Summary
Follow-up do EVO-1902/D13. O EVO-1902 corrigiu o FE para emitir o
sourceHandledo conditional sem o prefixo (path.idcru). Isso conserta jornadas novas/re-salvas, mas jornadas já salvas têm edges comsourceHandle = "path-<id>". O matching do workflow (edge.sourceHandle === nodeResult.nextNodeHandle, comnextNodeHandle = path.idcru) não casava o handle legado → o ramo VERDADEIRO ainda ia pro ELSE nessas jornadas.Fix (abordagem 1, retrocompatível): tornar o matching tolerante ao prefixo. Novo util
normalizeConditionalPathHandleremove um único prefixopath-opcional dos dois lados antes de comparar. Assim:path-<id>no edge) + node cru (<id>) → casa<id>no edge) + node cru (<id>) → casaelse→ inalteradoSem regressão no Split:
split-variant-<id>não começa compath-, então a normalização o devolve intacto; o Split continua casando no handle prefixado completo nos dois lados.Arquivos
src/modules/temporal/workflows/conditional-path-handle.util.ts(novo) — helper puronormalizeConditionalPathHandle.src/modules/temporal/workflows/journey-execution.workflow.ts— matching normaliza ambos os lados.src/modules/temporal/workflows/conditional-path-handle.util.spec.ts(novo) — 9 casos (legado/novo/else/split/non-string/path-path-/pathway-).Test plan
conditional-path-handle.util.spec.ts+conditional.node.spec.ts+split.node.spec.ts: 32 passed.journey-execution.coverage.spec.ts(parity guard): 26 passed.tsc -p tsconfig.json --noEmit: clean.EVO-1922