Skip to content

Conversation

@lorenss-m
Copy link
Contributor

@lorenss-m lorenss-m commented Feb 8, 2026

Note

Medium Risk
Adds new CLI workflows and modifies core scenario argument deserialization plus MCP transport patching; mistakes could break task execution or cause new failure modes in client/server communication.

Overview
Adds a new, pluggable hud convert command that converts Harbor-style task directories/datasets into HUD-ready output: generated env.py, Dockerfile.hud, pyproject.toml, copied task assets/build context, and a v5 taskset.json (with auto-detect and optional interactive format selection).

Extends deployment with hud deploy --all to discover and sequentially deploy all environment subdirectories in a converted output folder, and updates docs to reflect the new convert/deploy workflow.

Includes robustness fixes: scenario arg deserialization now avoids mis-coercing Literal["0", ...] values and falls back safely when annotations can’t be resolved; MCP streamable HTTP transport is patched to re-raise JSON response handling errors to prevent hangs; version bumps to 0.5.21 with new tests covering the converter and Literal deserialization edge cases.

Written by Cursor Bugbot for commit b6dab5e. This will update automatically on new commits. Configure here.

normalized = normalized.replace(" ", "-").replace("_", "-")
normalized = re.sub(r"[^a-z0-9-]", "", normalized)
normalized = re.sub(r"-+", "-", normalized)
return normalized.strip("-") or "converted"
Copy link

Choose a reason for hiding this comment

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

Duplicated name normalization logic across files

Low Severity

_normalize_name in harbor.py is a near-exact copy of normalize_environment_name in hud/cli/utils/environment.py (and Environment._normalize_name). The only difference is the empty-string fallback ("converted" vs "environment"). This duplicated normalization logic increases maintenance risk — a fix in one copy could be missed in the others. The existing utility could be reused with the fallback handled at the call site.

Fix in Cursor Fix in Web

@lorenss-m lorenss-m merged commit 796ab15 into main Feb 8, 2026
9 checks passed
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

adapted.append(f"# [harbor original] {line}")
else:
adapted.append(line)
return "\n".join(adapted)
Copy link

Choose a reason for hiding this comment

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

Multi-line CMD/ENTRYPOINT leaves orphaned continuation lines

Medium Severity

_adapt_harbor_dockerfile does line-by-line matching and only comments out the first line of a multi-line CMD or ENTRYPOINT instruction that uses backslash continuation. The continuation lines (e.g., "-c", \) remain as bare, invalid Dockerfile instructions, causing Docker build failures for any Harbor task whose Dockerfile uses multi-line CMD/ENTRYPOINT.

Fix in Cursor Fix in Web

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.

2 participants