Skip to content

fix(novita): ARG longest-match + example readiness cleanup - #1234

Closed
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/fix-novita-arg-leak
Closed

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/fix-novita-arg-leak

Conversation

@cursor

@cursor cursor Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Post-0.6.0 follow-up (explicitly not for Thursday’s release cut) for the two latent Novita items Ben asked to track:

  1. _resolve_from_references now substitutes ARG defaults longest-name-first and matches unbraced $NAME with a word-boundary lookahead, so ARG BASE before ARG BASE_IMAGE can no longer turn FROM $BASE_IMAGE into python:3.12_IMAGE.
  2. examples/novita_tbench2_simple.py moves wait_for_ready inside the try/finally, so a readiness timeout still calls stop_container.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • New environment
  • Refactoring

Alignment Checklist

Before submitting, verify:

  • I have read .claude/docs/PRINCIPLES.md and this PR aligns with our principles
  • I have checked .claude/docs/INVARIANTS.md and no invariants are violated
  • I have run focused lint/tests on the changed files

RFC Status

  • Not required (bug fix, docs, minor refactoring)
  • RFC exists: #___
  • RFC needed (will create before merge)

Test Plan

  • PYTHONPATH=src:envs uv run pytest tests/test_core/test_novita_provider.py -q — 103 passed (includes new test_resolve_unbraced_arg_does_not_prefix_longer_name)
  • ruff check / ruff format --check on the three changed files — clean

Claude Code Review

N/A — release-automation follow-up from Ben’s Slack ask.

Open in Web View Automation 

Prevent unbraced $BASE from corrupting $BASE_IMAGE during Dockerfile
FROM rewriting, and keep wait_for_ready inside try/finally in the
simple TB2 example so a readiness timeout still stops the sandbox.

Post-0.6.0 follow-up; not for the Thursday release cut.

Co-authored-by: benjamin.burtenshaw <benjamin.burtenshaw@huggingface.co>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Duplicate of #1235 (parallel sibling run for the same Ben ask). Prefer #1235; please close this PR. Tip here also has longest-first ARG expand + example readiness cleanup, plus an unbraced word-boundary guard #1235 can optionally adopt.

View PR

Open in Web View Automation 

Sent by Cursor Automation: Release

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