Skip to content

test(workflow): cover iteration file-attribute debug inputs - #44654

Open
Ryannn727 wants to merge 1 commit into
langgenius:mainfrom
Ryannn727:codex/test-44573-iteration-file-attributes
Open

Ryannn727 wants to merge 1 commit into
langgenius:mainfrom
Ryannn727:codex/test-44573-iteration-file-attributes

Conversation

@Ryannn727

Copy link
Copy Markdown

Summary

Fixes #44573.

Add eight regression cases for Code nodes referencing an iteration item's name, extension, mime_type, or size, covering both qualified and unqualified debug-input keys.

The reported 1.16.0 mapper writes the three-part selector directly into VariablePool.add, which only accepts two parts. Main already reconstructs the root variable through add_node_input_to_variable_pool after #40277. This PR covers that existing fix; it does not change runtime behavior or backport the fix to 1.16.x.

Validation

  • uv run --project api --no-sync pytest -q api/tests/unit_tests/core/workflow/test_workflow_entry.py api/tests/unit_tests/services/test_workflow_node_variables.py -o 'addopts=--import-mode=importlib -p no:opik -p no:langsmith_plugin': 98 passed.
  • Ruff check and format check on the changed file: passed.
  • Isolated comparison using the original 1.16.0 mapper and the strict variable pool: the exact reported error reproduces for all eight cases. This is a mapper-level reproduction, not a full 1.16.0 deployment test.
  • Targeted Pyrefly check reports the same 15 errors and two warnings on the unchanged base and this branch, with no new diagnostics.

Checklist

  • This change requires a documentation update. (Not applicable: regression tests only.)
  • I understand that this PR may be closed in case there was no previous discussion or issues.
  • I've verified the change and added tests where meaningful regression risk justifies coverage.
  • I've updated the documentation accordingly. (Not applicable.)
  • I ran make lint && make type-check. (Targeted checks and existing type-check failures are recorded above.)

From Codex

@github-actions github-actions Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-10-25 15:40:13.756990196 +0000
+++ /tmp/pyrefly_pr.txt	2026-10-25 15:40:03.280914899 +0000
@@ -5391,39 +5391,39 @@
 ERROR Object of class `object` has no attribute `tool` [missing-attribute]
     --> tests/unit_tests/core/workflow/test_node_runtime.py:2164:16
 WARN Cannot instantiate `BaseNodeData` because it directly extends `ABC` or uses `ABCMeta` [direct-abstract-base-instantiation]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1010:50
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1045:50
 ERROR `in` is not supported between `Literal['Maximum execution steps exceeded: 3 > 2']` and `None` [not-iterable]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1067:20
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1102:20
 WARN Cannot instantiate `BaseNodeData` because it directly extends `ABC` or uses `ABCMeta` [direct-abstract-base-instantiation]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1200:37
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1235:37
 ERROR Class member `EmptySplitKey.split` overrides parent class `UserString` in an inconsistent manner [bad-override]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1632:21
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1667:21
 ERROR Class member `EmptySplitKey.split` overrides a member in a parent class but is missing an `@override` decorator [missing-override-decorator]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1632:21
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1667:21
 ERROR `TestWorkflowEntryHelpersCases.TestMappingUserInputsBranches.test_rejects_invalid_node_variable_key.EmptySplitKey` is not assignable to dict key type `str` [bad-assignment]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1637:39
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1672:39
 ERROR Argument `TestWorkflowEntryHelpersCases.TestWorkflowEntryNodeLayers.test_run_node_with_layers_reports_success.FakeNode` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.workflow.workflow_entry.WorkflowEntry._run_node_with_layers` [bad-argument-type]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1740:82
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1775:82
 ERROR Object of class `FunctionType` has no attribute `assert_called_once_with` [missing-attribute]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1745:17
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1780:17
 ERROR Object of class `FunctionType` has no attribute `assert_called_once_with` [missing-attribute]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1746:17
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1781:17
 ERROR Object of class `FunctionType` has no attribute `assert_called_once_with` [missing-attribute]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1747:17
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1782:17
 ERROR Object of class `FunctionType` has no attribute `assert_called_once_with` [missing-attribute]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1748:17
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1783:17
 ERROR Object of class `FunctionType` has no attribute `assert_called_once_with` [missing-attribute]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1749:17
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1784:17
 ERROR Argument `TestWorkflowEntryHelpersCases.TestWorkflowEntryNodeLayers.test_run_node_with_layers_reports_errors.FakeNode` is not assignable to parameter `node` with type `Node[Unknown]` in function `core.workflow.workflow_entry.WorkflowEntry._run_node_with_layers` [bad-argument-type]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1776:77
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1811:77
 ERROR Object of class `FunctionType` has no attribute `call_args` [missing-attribute]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1779:24
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1814:24
 ERROR Object of class `FunctionType` has no attribute `call_args` [missing-attribute]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1780:35
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1815:35
 ERROR Object of class `FunctionType` has no attribute `call_args` [missing-attribute]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1781:24
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1816:24
 ERROR Object of class `FunctionType` has no attribute `call_args` [missing-attribute]
-    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1782:35
+    --> tests/unit_tests/core/workflow/test_workflow_entry.py:1817:35
 ERROR Object of class `object` has no attribute `append` [missing-attribute]
    --> tests/unit_tests/dev/test_generate_knowledge_fs_contract.py:121:13
 ERROR Cannot set item in `object` [unsupported-operation]

@github-actions

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 78.76% 78.31% -0.45%
Strict coverage 78.44% 77.99% -0.45%
Typed symbols 74,121 73,674 -447
Untyped symbols 20,067 20,490 +423
Modules 3911 3910 -1

@codecov

codecov Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.30%. Comparing base (691b792) to head (392ddba).
⚠️ Report is 40 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #44654      +/-   ##
==========================================
- Coverage   89.30%   89.30%   -0.01%     
==========================================
  Files        5983     5983              
  Lines      375009   375009              
  Branches    76051    76051              
==========================================
- Hits       334895   334890       -5     
- Misses      34078    34082       +4     
- Partials     6036     6037       +1     
Flag Coverage Δ
api 89.19% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

1 participant