fix(skills): stop marking persisted env vars missing on remote backends#3452
fix(skills): stop marking persisted env vars missing on remote backends#3452kentimsit wants to merge 2 commits into
Conversation
|
Scoped to the agreed readiness fix for #3433; I’m handling the separate remote terminal passthrough gap in follow-up discussion, not in this PR. |
There was a problem hiding this comment.
Pull request overview
Fixes skill readiness checks so remote terminal backends no longer mark already-persisted required environment variables as missing, ensuring skills correctly report as available when values exist in HERMES_HOME/.env or the host environment.
Changes:
- Removed remote-backend short-circuits so missing required env vars are computed strictly from actual persisted/available values.
- Updated readiness flow so secret-captured values clear
setup_neededfor remote backends when available locally. - Added/updated regression tests for remote readiness and env passthrough registration behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tools/skills_tool.py |
Removes remote-only “always missing” behavior; readiness now depends on _is_env_var_persisted(...) results. |
tests/tools/test_skills_tool.py |
Adds regression coverage for remote backends treating persisted env vars as available; updates secret-capture expectations. |
tests/tools/test_skill_env_passthrough.py |
Adds coverage ensuring remote-backed skills still register locally available (persisted) env vars for passthrough. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -360,8 +360,6 @@ def _remaining_required_environment_names( | |||
| if backend is None: | |||
| backend = _get_terminal_backend_name() | |||
There was a problem hiding this comment.
backend is now effectively unused in _remaining_required_environment_names (it’s only defaulted but never referenced). Consider removing the backend kwarg and the if backend is None: ... block (and the call-site arg) to avoid dead parameters/assignments and future confusion (and to prevent potential unused-variable lint failures if enabled).
|
I created the follow-up stacked PR for the remote terminal passthrough fix with a clean diff against this branch: It is marked as a draft because it depends on this PR. Once this PR merges, I’ll rebase that branch onto |
|
Referring to : #3433 I created the follow-up stacked PR for the remote terminal passthrough fix with a clean diff against this branch: It is marked as a draft because it depends on this PR. Once this PR merges, I’ll rebase that branch onto upstream/main so the upstream-ready diff contains only the second change. |
|
Good catch. That parameter became dead after removing the remote-backend short-circuit. I trimmed the unused |
|
Merged via PR #3650. Cherry-picked both commits onto current main with authorship preserved. All 81 skill tests passing. Good catch on the readiness check — there's a related gap where the env_passthrough registry isn't automatically consulted by Docker/SSH/Modal backends when forwarding vars into the remote environment (they use a separate |
…ds (NousResearch#3650) Salvage of PR NousResearch#3452 (kentimsit). Fixes skill readiness checks on remote backends — persisted env vars are no longer incorrectly marked as missing. Co-Authored-By: kentimsit <kentimsit@users.noreply.github.com>
…ds (NousResearch#3650) Salvage of PR NousResearch#3452 (kentimsit). Fixes skill readiness checks on remote backends — persisted env vars are no longer incorrectly marked as missing. Co-Authored-By: kentimsit <kentimsit@users.noreply.github.com>
…ds (NousResearch#3650) Salvage of PR NousResearch#3452 (kentimsit). Fixes skill readiness checks on remote backends — persisted env vars are no longer incorrectly marked as missing. Co-Authored-By: kentimsit <kentimsit@users.noreply.github.com>
…ds (NousResearch#3650) Salvage of PR NousResearch#3452 (kentimsit). Fixes skill readiness checks on remote backends — persisted env vars are no longer incorrectly marked as missing. Co-Authored-By: kentimsit <kentimsit@users.noreply.github.com>
…ds (NousResearch#3650) Salvage of PR NousResearch#3452 (kentimsit). Fixes skill readiness checks on remote backends — persisted env vars are no longer incorrectly marked as missing. Co-Authored-By: kentimsit <kentimsit@users.noreply.github.com>
What does this PR do?
Stops remote backends from marking persisted required environment variables as missing during skill readiness checks.
Today,
skill_view(...)can report a skill as not ready on remote backends even when the required env var already exists inHERMES_HOME/.envoros.environ. This PR makes readiness depend on whether the var is actually persisted, regardless of backend.This is intentionally scoped to the maintainer-approved
tools/skills_tool.pyfix. It does not change remote backend command injectionbehavior.
Related Issue
Fixes #3433
Type of Change
Changes Made
skill_view(...)_remaining_required_environment_names(...)setup_needed=trueHow to Test
uv run --extra dev python -m pytest tests/tools/test_skills_tool.py tests/tools/test_skill_env_passthrough.py -qTERMINAL_ENV=dockerHERMES_HOME/.envrequired_environment_variablessetup_neededisfalsemissing_required_environment_variablesis emptyreadiness_statusisavailableTest Results
81 passed in 5.63sPlatform Tested