DRC-3813: impact outranks additive in CLL graph-badge precedence#1468
Draft
danyelf wants to merge 3 commits into
Draft
DRC-3813: impact outranks additive in CLL graph-badge precedence#1468danyelf wants to merge 3 commits into
danyelf wants to merge 3 commits into
Conversation
…edence (DRC-3813) A downstream node that is backend-flagged impacted but whose own change_category is non_breaking currently renders the green additive badge instead of the amber column-impacted badge. Add the missing combined case at both the classifier level (pickGraphBadge) and the render level (LineageNode), red against unmodified source. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Danyel Fisher <danyel@gmail.com>
…-3813) Under the new CLL experience, a downstream node the backend flagged impacted but whose own change_category is non_breaking rendered a misleading green additive badge instead of the actionable amber column-impacted badge. classifyGraphBadge checked the node's own change_category before its isImpacted flag. Reorder so isImpacted is checked before the non_breaking->additive line. New precedence: partial_breaking (own column change) > isImpacted > non_breaking (own additive change). partial_breaking still outranks impact per the changed-wins doctrine; only non_breaking yields. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Danyel Fisher <danyel@gmail.com>
Adds LineageNode_ImpactedOutranksAdditive — the PARENT/CHILD repro where CHILD's own change is additive (non_breaking) but it is backend-flagged impacted. Renders green ADD before the badge-precedence fix and amber COLUMN after, giving a reproducible visual before/after. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Danyel Fisher <danyel@gmail.com>
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.
Note: this is Claude being really enthusiastic about the issue MERELY being rank. From a design POV, the real issue is that a local change (e.g. a column-level additive) is both important to see -- but also should not hide the fact that it's impacted from a parent.
Background (for a reader with no context)
In Recce's new column-level-lineage (CLL) experience, each node in the lineage graph shows a small badge summarizing how that model was affected by a change. The relevant two here:
Which badge to show is decided by
classifyGraphBadgeinjs/packages/ui/src/components/lineage/wholeModelTreatment.ts.The problem
classifyGraphBadgechecked the node's own change category before checking whether it was impacted by an upstream change:So a node that is genuinely impacted upstream, but whose own SQL only added something (category
non_breaking), got the benign green ADD badge — hiding the more important fact that it's impacted. The backend had already correctly flagged the node as impacted; this was purely a presentation bug in the badge ordering. (Onlynon_breakingwas affected — see the precedence table below.)Concrete repro
c1changes fromidtoid || lastname.select id, name from parent where length(parent.c1) < 10— it filters onc1but never selects it, and its own SQL is otherwise unchanged.CHILD is impacted (the column it filters on changed), but because its own change is merely additive/non-breaking:
Here is the same CHILD node rendered with identical inputs — the fix reverted (left) vs applied (right):
The fix
Move the
isImpactedcheck up by one line so impact outranks additive, while a genuine own-column change (partial_breaking) still outranks impact:Net precedence: column-changed (own change) > column-impacted (impacted) > additive (own additive). This preserves the file's documented "changed-wins" doctrine — a node's own change still outranks being impacted — but a harmless additive change no longer masks the impact signal.
Precedence across all four change categories combined with
isImpacted: true(onlynon_breakingwas wrong):breakingnon_breakingpartial_breakingunknownVerification
wholeModelTreatment.test.tsvia the exportedpickGraphBadge, plus a<LineageNode>render assertion inLineageNode.test.tsx) committed red first, green after the reorder. Reverting only the one-line reorder reddens exactly those 3 and nothing else.type:checkclean on all touched files.LineageNode_ImpactedOutranksAdditiverenders the CHILD repro through the realLineageNode, driving the before/after image above.Frontend-only; backend
node.impactedwas already correct and is untouched. Distinct from the DRC-2891/380x lineage-extraction work (that's a different layer). Opening as draft — validated in the workflow; pending final review.🤖 Generated with Claude Code