Skip to content

fix(templates): drop exclude-newer from the template uv.lock and add default input values - #385

Merged
vldcmp-uipath merged 1 commit into
mainfrom
fix/template-lock-without-exclude-newer
Nov 19, 2026
Merged

vldcmp-uipath merged 1 commit into
mainfrom
fix/template-lock-without-exclude-newer

Conversation

@vldcmp-uipath

@vldcmp-uipath vldcmp-uipath commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Every coded agent scaffolded from packages/uipath-llamaindex/template/ since its lock was last regenerated fails to prepare its environment:

Resolving despite existing lockfile due to removal of global exclude newer
error: The lockfile at `uv.lock` needs to be updated, but `--locked` was provided.

The template pyproject.toml files have no [tool.uv] table, so when uv lock runs inside this repo uv walks up to the package root and applies its exclude-newer = "2 days" plus the exclude-newer-package exemptions. uv records that in the template's uv.lock under [options]. A scaffolded project lives outside this repo, where the setting does not exist. uv treats the mismatch as a stale lock, re-resolves, and --locked refuses the result. The Robot adds --locked whenever a uv.lock is present and runs uv with UV_NO_CONFIG=1, so even a [tool.uv] in the project could not satisfy it there.

  • packages/uipath-llamaindex/template/pyproject.toml: adds an empty [tool.uv] table. uv stops the parent search at the first pyproject.toml that has the table, so the package's cooldown no longer reaches the template. It is deliberately uncommented, because Studio Web ships this file verbatim as the sample's pyproject.toml.
  • packages/uipath-llamaindex/template/uv.lock: regenerated from the committed lock with uv lock (no --upgrade). The diff is the removal of the [options] block only. Every pinned version is unchanged.
  • packages/uipath-claude-sdk/template/pyproject.toml: the same empty table. This template ships no lock today, so nothing fails there, but a future uv lock run inside the repo would reintroduce the problem without it.
  • main.py and entry-points.json in both templates: the input gets a default so Studio Web can prefill the field. llamaindex question defaults to "What's the weather in Paris?" and claude-sdk city to "London", the examples already in their descriptions. With a default the field is optional, so each entry-points.json carries default on the property and no longer lists the field under required, which is the schema uipath init emits for this declaration. Descriptions are unchanged.

Checked the rest of the repo: uipath-agent-framework, uipath-google-adk, uipath-openai-agents and uipath-pydantic-ai have no template/ directory, their uipath new scaffolds copy no uv.lock, and no sample ships a lock. The locks under testcases/ carry no exclude-newer. Each package root keeps its own cooldown, so package locking is unaffected.

How it was tested

uv 0.11.32.

  • In the llamaindex template, before the relock: uv lock --check reports "removal of global exclude newer", confirming the table stops the inheritance.
  • After the relock: uv lock --check passes in place.
  • On a copy of the template outside the repo: uv lock --check passes, with and without UV_NO_CONFIG=1, and UV_NO_CONFIG=1 uv sync --locked --no-dev --dry-run resolves without re-locking. Before this change the same copy failed with the error above.
  • model_json_schema() with the default in place produces the input schemas committed in both entry-points.json files: default on the property, no required list. The claude-sdk output schema is untouched.

Follow-ups

  • Studio Web bundles the llamaindex template in UiPath/Agents (UiPath/Agents#7080 carries the resync). Once this merges, pnpm sync:coded-agent-templates there against main yields identical content with the merge SHA in the header. Projects already created from the current template need a one-time uv lock by their owners.
  • If the team wants the two-day cooldown to apply to users' own later uv add runs, it has to live in the template's pyproject.toml and in the lock together, and the Robot has to read the project's [tool.uv] under a managed decision or sync with --frozen. That is a separate conversation with the Robot team.

🤖 Generated with Claude Code

https://claude.ai/code/session_014t9fy8viiGwocCpYNyc7uq

Copilot AI balanced review requested due to automatic review settings November 19, 2026 09:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified in the template configuration and lockfile changes.

No open issues 🎉

What changed in this PR

Fixes locked environment preparation for scaffolded LlamaIndex agents by keeping repository-only exclude-newer settings out of template locks. Adds the same safeguard to the Claude SDK template for future lock generation.

Changes:

  • Adds empty [tool.uv] tables to both templates to stop parent configuration discovery, with comments explaining why they must remain.
  • Removes inherited cooldown options from the LlamaIndex template lock without changing any pinned versions.
File Description
packages/​uipath-llamaindex/​template/​uv.lock Removes inherited exclude-newer options so locked installs work outside the repository.
packages/​uipath-llamaindex/​template/​pyproject.toml Adds a documented configuration boundary to prevent cooldown inheritance.
packages/​uipath-claude-sdk/​template/​pyproject.toml Adds the same boundary to protect future template locks.

Review effort: Balanced

@vldcmp-uipath
vldcmp-uipath force-pushed the fix/template-lock-without-exclude-newer branch 6 times, most recently from 18d7e9e to 953eb6f Compare November 19, 2026 11:44
@vldcmp-uipath vldcmp-uipath changed the title fix(templates): keep each package's exclude-newer out of the template uv.lock fix(templates): drop exclude-newer from the template uv.lock and add default input values Nov 19, 2026
…default input values

The templates have no [tool.uv] table, so uv kept walking up to the package
root and locked the llamaindex template under its `exclude-newer = "2 days"`.
That setting ended up in template/uv.lock's [options]. A scaffolded project
is synced outside this repo, where the setting does not exist, and
`uv sync --locked` then fails with "Resolving despite existing lockfile due
to removal of global exclude newer ... needs to be updated". The Robot adds
--locked whenever a uv.lock is present and runs uv with UV_NO_CONFIG=1, so
every project started from the template since the lock was regenerated
fails to prepare its environment.

An empty [tool.uv] table stops the parent search. The llamaindex lock is
regenerated from the committed one; the only change is the removal of the
[options] block, every pinned version stays. The claude-sdk template ships
no lock yet, so it only gets the table, which keeps a future `uv lock` from
reintroducing the setting. The other packages have no template directory.

Each sample's input also gets a default so Studio Web can prefill the
field: llamaindex `question` and claude-sdk `city` default to the example
from their descriptions. With a default the field is optional, so each
entry-points.json carries the default on the property and no longer lists
it under required, which is the schema `uipath init` emits for this
declaration.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014t9fy8viiGwocCpYNyc7uq
@vldcmp-uipath
vldcmp-uipath force-pushed the fix/template-lock-without-exclude-newer branch from 953eb6f to 5c551fc Compare November 19, 2026 14:55
@sonarqubecloud

Copy link
Copy Markdown

@vldcmp-uipath
vldcmp-uipath merged commit ef0420a into main Nov 19, 2026
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants