Skip to content

feat: apply --dev-spec to dependency-sourced dev versions#607

Merged
ianpittwood merged 4 commits into
mainfrom
fix/dev-dep-versions-dev-spec-option
Jun 12, 2026
Merged

feat: apply --dev-spec to dependency-sourced dev versions#607
ianpittwood merged 4 commits into
mainfrom
fix/dev-dep-versions-dev-spec-option

Conversation

@ianpittwood

Copy link
Copy Markdown
Contributor

Summary

--dev-spec could pin the built version for stream / product-channel dev versions, but was a silent no-op for dependency-sourced dev versions (ImageDevelopmentVersionFromDependency, used by workbench-positron-init). _apply_dev_spec() only matched the stream model, so dispatching a pinned Positron version still built the latest daily.

This PR makes --dev-spec pin what's built for dependency dev versions too:

  • Lift version_override to BaseImageDevelopmentVersion so both dev-version models share one override slot (stream model's duplicate field removed; behavior unchanged).
  • ImageDevelopmentVersionFromDependency.get_version() honors the override — short-circuits before dependency-CDN resolution. Sufficient because the dev Containerfile builds the Positron download URL from {{ Image.Version }}, which derives from get_version().
  • _apply_dev_spec() matches either model by channel via get_release_channel(). version pins both; release_branch/YYYY.MM logic stays stream-only; a branch-only spec (no version) cannot pin a dependency dev version, so it warns and falls back to latest.

No DevBuildSpec schema change — Positron versions already satisfy the CalVer validation, and channel-based matching reuses existing fields.

Known limitation (unchanged from existing behavior)

A single --dev-spec applies to every image in the loaded config; channel matching + the per-image single-candidate rule + CI per-image --filter scope it in practice.

Test Plan

  • New unit tests: version pins a dependency dev version's get_version(); channel match/mismatch; ambiguity (mixed stream+dependency on same channel) errors; branch-only spec warns and skips; release_branch ignored for dependency versions.
  • Stream-model regression tests unchanged and passing.
  • uv run pytest -m "not slow" → 1777 passed (pre-existing test/cli/* collection cwd-pollution errors are present on main too and unrelated).
  • uv run ruff check clean.

🤖 Generated with Claude Code

ianpittwood and others added 4 commits June 12, 2026 12:46
…ersions

Lift version_override from the stream model to BaseImageDevelopmentVersion and
short-circuit ImageDevelopmentVersionFromDependency.get_version() on it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Broaden _apply_dev_spec() to match either dev-version model by channel via
get_release_channel(). version pins both models; release_branch stays
stream-only; a branch-only spec warns and skips dependency dev versions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Address code review: move import logging to module top per project
convention and verify a single warning record is emitted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Note that the stream model forwards it to the channel resolver for URL
construction while the dependency model returns it directly from get_version().

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ianpittwood ianpittwood requested a review from bschwedler as a code owner June 12, 2026 19:29
@github-actions

Copy link
Copy Markdown

Test Results

1 869 tests   1 869 ✅  8m 13s ⏱️
    1 suites      0 💤
    1 files        0 ❌

Results for commit eaff40e.

@ianpittwood ianpittwood merged commit fa2c180 into main Jun 12, 2026
24 checks passed
@ianpittwood ianpittwood deleted the fix/dev-dep-versions-dev-spec-option branch June 12, 2026 20:35
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.

1 participant