Skip to content

fix: enable agent-lifecycle-toolkit (altk) on Python 3.14 - #13513

Merged
erichare merged 2 commits into
release-1.10.0from
fix/altk-python314
Jun 4, 2026
Merged

fix: enable agent-lifecycle-toolkit (altk) on Python 3.14#13513
erichare merged 2 commits into
release-1.10.0from
fix/altk-python314

Conversation

@erichare

@erichare erichare commented Jun 4, 2026

Copy link
Copy Markdown
Member

Problem

The altk extra (agent-lifecycle-toolkit) in langflow-base was gated with python_version < '3.14', so on the Python 3.14 Docker image / pip install it silently resolved to nothing and the Agent Lifecycle Toolkit features were unavailable.

That gate is now stale:

  • agent-lifecycle-toolkit 0.10.1 declares requires-python = '>=3.10' — it no longer caps at <3.14.
  • It does not depend on OpenDsStar (checked all 47 requires_dist entries + every extra). The two were independent gates; only OpenDsStar is genuinely still blocked (see below).

Change

  • Remove the python_version < '3.14' marker from the altk extra in src/backend/base/pyproject.toml, keeping the macOS x86_64 platform exclusion (PyTorch dropped Intel-Mac wheels after v2.2.2).
  • Regenerate uv.lock.

Verification

  • uv lock resolves cleanly (804 packages, no conflict). The lock's agent-lifecycle-toolkit edge is now gated only by extra == 'altk' + the platform exclusion — the python_version < '3.14' cap is gone.
  • The one open risk was the forced onnxruntime>=1.26 on 3.14 (langflow holds onnxruntime to <1.24 on <3.14 "for altk compatibility"). Confirmed they coexist on 3.14:
$ uv pip compile (agent-lifecycle-toolkit>=0.10.1,<1.0  +  onnxruntime>=1.26) --python-version 3.14 --python-platform linux
agent-lifecycle-toolkit==0.10.1
numpy==2.4.6
onnxruntime==1.26.0
smolagents==1.26.0
# exit 0

Scope

  • This only lifts an artificial restriction on the opt-in altk extra; it does not change the default image's dependency set.
  • OpenDsStar stays gated. Every published release (incl. latest 1.0.26) still declares requires-python = '>=3.11,<3.14' upstream, so the OpenDsStarAgent component remains correctly excluded on 3.14 until that upstream cap is lifted. Tracked separately from this PR.

Test plan

  • uv lock resolves without conflict
  • altk edge in uv.lock no longer carries a < '3.14' marker
  • agent-lifecycle-toolkit 0.10.1 + onnxruntime 1.26.0 co-resolve on Python 3.14
  • CI green
  • Runtime smoke-test of an ALTK component on a real 3.14 build (resolution is verified; runtime import is not)

Independent of the IBM watsonx.ai 3.14 PR (#13512); both branch from release-1.10.0. Same markers exist on main — likely needs forward-porting.

Summary by CodeRabbit

  • Chores
    • Updated agent-lifecycle-toolkit dependency configuration to enable support for Python 3.14+.

agent-lifecycle-toolkit 0.10.x dropped its own requires-python <3.14
cap (now >=3.10) and does not depend on OpenDsStar, so the
`python_version < '3.14'` gate on the altk extra is stale.

- Remove the python_version < '3.14' marker from the altk extra in
  langflow-base, keeping the macOS x86_64 platform exclusion.
- Regenerate uv.lock: agent-lifecycle-toolkit resolves on 3.14 and
  coexists with the onnxruntime>=1.26 langflow forces there
  (verified agent-lifecycle-toolkit 0.10.1 + onnxruntime 1.26.0).

OpenDsStar (the separate OpenDsStarAgent component) stays gated: all
its releases still cap requires-python at <3.14 upstream.
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1cce5bba-29bd-4c91-88c8-90216e25aced

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The PR updates the altk optional dependency extra in src/backend/base/pyproject.toml by removing the python_version < '3.14' environment marker constraint. The agent-lifecycle-toolkit>=0.10.1,<1.0 dependency is now allowed on Python 3.14+ systems (retaining only the macOS Intel platform exclusion).

Changes

Dependency Configuration Update

Layer / File(s) Summary
altk dependency marker update
src/backend/base/pyproject.toml
The altk extra's environment marker is simplified to remove the Python 3.14 exclusion, allowing agent-lifecycle-toolkit>=0.10.1,<1.0 to be selected on Python 3.14+ while maintaining the macOS x86_64 platform exclusion.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

bug

Suggested reviewers

  • ogabrielluiz
  • Empreiteiro
  • jordanrfrazier

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 2 warnings)

Check name Status Explanation Resolution
Test Coverage For New Implementations ❌ Error PR modifies dependency configuration to enable altk on Python 3.14 but includes no new/updated tests; review comments flag outdated test comment unaddressed. Add/update tests: (1) update outdated comment in test_altk_agent.py per review, (2) add regression test for Python 3.14 compatibility.
Test Quality And Coverage ⚠️ Warning PR removes Python 3.14 gate but leaves 4 test files with outdated comments claiming the gate exists upstream. Test coverage is comprehensive but comment updates were omitted. Update outdated comments in 4 test files to remove false claim about Python 3.14 gating. Change to: "altk is an optional extra; skip tests when not installed."
Test File Naming And Structure ⚠️ Warning Test file's line 10 comment is outdated: states "agent-lifecycle-toolkit is gated to python_version<'3.14'" but PR removes this gate. Review requested updating. Update test_altk_agent.py line 10 comment to remove Python 3.14 gate reference per review suggestion.
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing the Python 3.14 version gate from the altk extra to enable agent-lifecycle-toolkit on Python 3.14.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Excessive Mock Usage Warning ✅ Passed The PR only modifies pyproject.toml to remove Python 3.14 version gate; it makes no test file changes. Excessive mock usage check is not applicable as no test code was added or modified.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/altk-python314

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the bug Something isn't working label Jun 4, 2026
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

✅ Test Coverage Advisor

No source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉

Advisory check only — never blocks merge.

@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jun 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/backend/base/pyproject.toml`:
- Around line 340-343: The test contains an outdated comment claiming
"agent-lifecycle-toolkit is gated to python_version<'3.14' upstream"; update
that comment in
src/backend/tests/unit/components/models_and_agents/test_altk_agent.py (around
the top of the file) to reflect that the upstream package no longer enforces a
<3.14 python_version gate (e.g., note that agent-lifecycle-toolkit>=0.10.1
removed the <3.14 cap and now requires >=3.10), keeping the rest of the test
intact and preserving any context around the comment.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7c63684a-373e-4d16-b01f-ba550df0379e

📥 Commits

Reviewing files that changed from the base of the PR and between f08e9e1 and 5ddb2be.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • src/backend/base/pyproject.toml

Comment on lines +340 to +343
# Python 3.14: agent-lifecycle-toolkit 0.10.x dropped its own <3.14 cap (now
# requires-python >=3.10) and does not depend on OpenDsStar, so the python_version
# gate is removed; the dependency tree resolves on 3.14 within the langflow lock.
altk = ["agent-lifecycle-toolkit>=0.10.1,<1.0; sys_platform != 'darwin' or platform_machine != 'x86_64'"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the outdated comment in the test file.

The test file src/backend/tests/unit/components/models_and_agents/test_altk_agent.py at lines 9-10 contains an outdated comment stating that "agent-lifecycle-toolkit is gated to python_version<'3.14' upstream". Since this PR removes that gate, the comment should be updated to reflect the current state.

📝 Suggested comment update

In src/backend/tests/unit/components/models_and_agents/test_altk_agent.py:

 try:
     import altk  # noqa: F401
 except ImportError:
-    # agent-lifecycle-toolkit is gated to python_version<'3.14' upstream.
-    pytest.skip("altk (agent-lifecycle-toolkit) not available", allow_module_level=True)
+    # altk is an optional extra; skip tests when not installed.
+    pytest.skip("altk (agent-lifecycle-toolkit) not available", allow_module_level=True)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/backend/base/pyproject.toml` around lines 340 - 343, The test contains an
outdated comment claiming "agent-lifecycle-toolkit is gated to
python_version<'3.14' upstream"; update that comment in
src/backend/tests/unit/components/models_and_agents/test_altk_agent.py (around
the top of the file) to reflect that the upstream package no longer enforces a
<3.14 python_version gate (e.g., note that agent-lifecycle-toolkit>=0.10.1
removed the <3.14 cap and now requires >=3.10), keeping the rest of the test
intact and preserving any context around the comment.

@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.19%. Comparing base (f08e9e1) to head (de032a3).
⚠️ Report is 1 commits behind head on release-1.10.0.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##           release-1.10.0   #13513      +/-   ##
==================================================
+ Coverage           57.99%   58.19%   +0.19%     
==================================================
  Files                2280     2281       +1     
  Lines              218123   218942     +819     
  Branches            30984    32268    +1284     
==================================================
+ Hits               126502   127407     +905     
+ Misses              90183    90097      -86     
  Partials             1438     1438              
Flag Coverage Δ
backend 64.89% <ø> (-0.05%) ⬇️
frontend 57.62% <ø> (+0.30%) ⬆️
lfx 53.68% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 226 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 43%
43.03% (57321/133211) 69.39% (7805/11247) 41.4% (1282/3096)

Unit Test Results

Tests Skipped Failures Errors Time
4924 0 💤 0 ❌ 0 🔥 13m 23s ⏱️

The module-level import skips in the ALTK agent tests carried an
outdated comment claiming "agent-lifecycle-toolkit is gated to
python_version<'3.14' upstream". That is no longer accurate:
agent-lifecycle-toolkit 0.10.1 dropped the <3.14 cap (now requires
>=3.10), and this PR removes the langflow <3.14 marker on the altk extra.

The skip itself is preserved -- altk is an optional extra
(langflow-base[altk]) that may be absent from a given environment, so
the ImportError guard is still required. Only the comment is corrected,
to state the real reason for the skip plus the upstream change. Applied
to all four files carrying the identical comment (test_altk_agent,
test_altk_agent_logic, test_altk_agent_tool_conversion,
test_conversation_context_ordering).

Also tag a pre-existing fake test key (api_key="sk-test") with
`# pragma: allowlist secret`; the comment shift re-staged the file and
surfaced it to detect-secrets.

Validated (Python 3.13, altk installed): ruff clean; the three logic
modules run (64 passed, 4 skipped) and test_altk_agent collects (13).
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Jun 4, 2026
@erichare
erichare merged commit 3d685da into release-1.10.0 Jun 4, 2026
206 of 209 checks passed
@erichare
erichare deleted the fix/altk-python314 branch June 4, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant