From e1be3ff17ec17752fdeae4f0be969055c856264f037dca145e080e3104770101 Mon Sep 17 00:00:00 2001 From: tlg Date: Thu, 9 Jul 2026 13:00:06 +0200 Subject: [PATCH] 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 --- projekt-matching/components/pm_crm.py | 4 ++-- projekt-matching/components/pm_extract.py | 4 ++-- projekt-matching/components/pm_match.py | 4 ++-- projekt-matching/components/pm_notify.py | 4 ++-- projekt-matching/components/pm_rules.py | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/projekt-matching/components/pm_crm.py b/projekt-matching/components/pm_crm.py index 9fe27aa..76c935e 100644 --- a/projekt-matching/components/pm_crm.py +++ b/projekt-matching/components/pm_crm.py @@ -15,7 +15,7 @@ class PMCrm(Component): display_name = "PM 5 CRM" description = "EspoCRM: Team, Firma, Kontakt, Verkaufschance + Verify" inputs = [ - DataInput(name="ctx", display_name="Context"), + DataInput(name="ctx_in", display_name="Context"), MessageTextInput(name="espo_base", display_name="Espo Base", value="PM_ESPO_BASE", load_from_db=True, advanced=True), @@ -28,6 +28,6 @@ class PMCrm(Component): def build_out(self) -> Data: cfg = Cfg(espo_base=self.espo_base, espo_api_key=self.espo_api_key) ctx = stages.run_stage("crm", stages.stage_crm, - dict(self.ctx.data), cfg) + dict(self.ctx_in.data), cfg) self.status = ctx.get("status", "") return Data(data=ctx) diff --git a/projekt-matching/components/pm_extract.py b/projekt-matching/components/pm_extract.py index ccc3cc2..6dd00e3 100644 --- a/projekt-matching/components/pm_extract.py +++ b/projekt-matching/components/pm_extract.py @@ -15,7 +15,7 @@ class PMExtract(Component): display_name = "PM 2 Extract" description = "LLM 1: Anforderungen strukturiert extrahieren" inputs = [ - DataInput(name="ctx", display_name="Context"), + DataInput(name="ctx_in", display_name="Context"), MessageTextInput(name="vllm_base", display_name="vLLM Base", value="PM_VLLM_BASE", load_from_db=True, advanced=True), @@ -28,6 +28,6 @@ class PMExtract(Component): def build_out(self) -> Data: cfg = Cfg(vllm_base=self.vllm_base, vllm_model=self.vllm_model) ctx = stages.run_stage("extract", stages.stage_extract, - dict(self.ctx.data), cfg) + dict(self.ctx_in.data), cfg) self.status = ctx.get("status", "") return Data(data=ctx) diff --git a/projekt-matching/components/pm_match.py b/projekt-matching/components/pm_match.py index 1fb9726..a418adc 100644 --- a/projekt-matching/components/pm_match.py +++ b/projekt-matching/components/pm_match.py @@ -15,7 +15,7 @@ class PMMatch(Component): display_name = "PM 3 Match CV" description = "LLM 2: Anforderungen gegen Lebenslauf bewerten" inputs = [ - DataInput(name="ctx", display_name="Context"), + DataInput(name="ctx_in", display_name="Context"), MessageTextInput(name="vllm_base", display_name="vLLM Base", value="PM_VLLM_BASE", load_from_db=True, advanced=True), @@ -28,6 +28,6 @@ class PMMatch(Component): def build_out(self) -> Data: cfg = Cfg(vllm_base=self.vllm_base, vllm_model=self.vllm_model) ctx = stages.run_stage("match", stages.stage_match, - dict(self.ctx.data), cfg) + dict(self.ctx_in.data), cfg) self.status = ctx.get("status", "") return Data(data=ctx) diff --git a/projekt-matching/components/pm_notify.py b/projekt-matching/components/pm_notify.py index 4023903..af32e5f 100644 --- a/projekt-matching/components/pm_notify.py +++ b/projekt-matching/components/pm_notify.py @@ -15,7 +15,7 @@ class PMNotify(Component): display_name = "PM 6 Notify" description = "Benachrichtigungs-Mail bei created + Langfuse-Trace" inputs = [ - DataInput(name="ctx", display_name="Context"), + DataInput(name="ctx_in", display_name="Context"), SecretStrInput(name="imap_password", display_name="Mail Password", value="PM_IMAP_PASSWORD", load_from_db=True, advanced=True), @@ -29,6 +29,6 @@ class PMNotify(Component): cfg = Cfg(imap_password=self.imap_password, notify_to=self.notify_to) # stage_notify is called DIRECTLY (not via run_stage): it must run for # every terminal status so failed runs still post their Langfuse trace. - ctx = stages.stage_notify(dict(self.ctx.data), cfg) + ctx = stages.stage_notify(dict(self.ctx_in.data), cfg) self.status = ctx.get("status", "") return Message(text=stages.summary(ctx)) diff --git a/projekt-matching/components/pm_rules.py b/projekt-matching/components/pm_rules.py index 26dc5ec..c1c96b6 100644 --- a/projekt-matching/components/pm_rules.py +++ b/projekt-matching/components/pm_rules.py @@ -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)