fix(projekt-matching): rename component input ctx -> ctx_in (Langflow reserves Component.ctx)

Langflow 1.10's Component base class defines ctx as a @property returning
the flow-level graph.context store; a DataInput named ctx is silently
shadowed at attribute access, so the edge-delivered payload never reaches
build_out(). Renamed the field in the five downstream Flow-2 wrappers;
build_flows.py edges target ctx_in.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
tlg
2026-07-09 13:00:06 +02:00
parent 92b1c23c3a
commit e1be3ff17e
5 changed files with 10 additions and 10 deletions

View File

@@ -16,7 +16,7 @@ class PMRules(Component):
description = ("Deterministisch: Misc-Regeln, Match-Berechnung, "
"Beschreibungs-Markdown, Gate > Schwellwert")
inputs = [
DataInput(name="ctx", display_name="Context"),
DataInput(name="ctx_in", display_name="Context"),
MessageTextInput(name="threshold", display_name="Threshold",
value="PM_THRESHOLD", load_from_db=True,
advanced=True),
@@ -26,6 +26,6 @@ class PMRules(Component):
def build_out(self) -> Data:
cfg = Cfg(threshold=int(self.threshold))
ctx = stages.run_stage("rules", stages.stage_rules,
dict(self.ctx.data), cfg)
dict(self.ctx_in.data), cfg)
self.status = f"{ctx.get('decision')} ({ctx.get('mustMatch')} %)"
return Data(data=ctx)