Repository navigation
Description
Description
Wire the existing version-check.sh into the devcontainer lifecycle so it automatically notifies users on connect when a newer release is available. Add a host-side just devcontainer-upgrade recipe as the recommended upgrade path, and fix the notification message to show correct instructions.
Problem Statement
The version-check infrastructure (version-check.sh) is fully implemented but not integrated:
- Not called on connect — none of the lifecycle hooks (
post-attach.sh,post-create.sh,initialize.sh) invokeversion-check.sh, so users are never notified about new releases. - Wrong upgrade instructions — the notification says
just update, which only runsuv lock --upgrade(Python deps), not a devcontainer upgrade. - No host-side upgrade recipe — the actual upgrade requires host-side commands (
podman pull+init-workspace.sh --force), but there is nojustrecipe for it. Users must remember thecurlone-liner from the README. - No container detection — if someone accidentally runs the upgrade from inside the container, there is no guard or helpful error message.
Proposed Solution
1. Wire version-check.sh into post-attach.sh
Call version-check.sh (no args = silent check) at the end of post-attach.sh so it runs on every VS Code connect. It already handles:
- 24-hour interval throttling (won't hit the API on every attach)
- Mute/disable preferences
- Silent failure (no output on network errors)
2. Fix notify_update() message in version-check.sh
Replace the current misleading notification (lines 252-268) with correct instructions showing both options:
🚀 Devcontainer Update Available
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Current: X.Y.Z → Latest: A.B.C
Run from a host terminal (not inside the container):
just devcontainer-upgrade
Or without just:
curl -sSf https://vig-os.github.io/devcontainer/install.sh | sh -s -- --force .
After upgrading, rebuild the container in VS Code.
Mute: just check 7d Disable: just check off
3. Add just devcontainer-upgrade recipe
Add a recipe in justfile.base (so it ships with every workspace) that:
- Detects if running inside a container (check
/.dockerenvorcontainerenv var) — if so, prints an error: "This must be run from a host terminal, not inside the container." and exits. - On the host: pulls the latest image and runs
init-workspace.sh --force, equivalent to theinstall.sh --forcepath.
Since the workspace is bind-mounted, the same justfile is visible from both host and container. This recipe is the one that intentionally targets the host side.
4. Add just check recipe to justfile.base
Expose version-check.sh subcommands via just:
just check # verbose version check
just check on # enable notifications
just check off # disable notifications
just check 7d # mute for 7 days
just check config # show configuration
This recipe works inside the container (where the script lives and where users interact with it).
Alternatives Considered
- Only show the
curlone-liner — simpler, but less discoverable; users who havejuston the host benefit from a short memorable command. - Auto-upgrade from inside the container — not feasible; the container cannot pull its own replacement image or re-run
init-workspace.shon the host-mounted workspace safely. - Run version check in
initializeCommand(host-side) — possible, butinitializeCommandruns before the container starts and adds latency to every open. The throttledpost-attach.shapproach is less intrusive.
Additional Context
version-check.shis already feature-complete: interval throttling, mute, enable/disable, config display, GitHub API check, semver comparison.- The CHANGELOG already mentions "Auto-runs on
justdefault command" but this was never implemented. - Tests in the test suite reference a
just checkrecipe that doesn't exist yet.
Impact
- Who benefits: all devcontainer users — they'll know when a new version is available without manually checking GitHub releases.
- Breaking changes: none — this is additive. Existing containers will start showing notifications after upgrade, but users can
just check offto disable. - Backward compatible: yes. The
just devcontainer-upgraderecipe fails gracefully on host (nopodman→ clear error) and inside container (detected, clear error).
Activity
gerchowl commentedon Feb 18, 2026
🤖 Autonomous Design (worktree-brainstorm)
Problem Analysis
The version-check infrastructure exists but is not integrated into the devcontainer lifecycle. Four gaps need to be closed:
version-check.shis never called by any hookjust update(Python deps) instead of proper devcontainer upgradecurlone-linerjust checkwrapper — tests expect it, but it doesn't existDesign Decisions
1. Integration Point:
post-attach.shWire
version-check.shintopost-attach.sh(notpost-create.shorinitialize.sh).Rationale:
post-attach.shruns on every VS Code connect → perfect for periodic checksversion-check.shalready has 24h throttling → won't spam on every attachpost-create.shruns once per container lifetime → too infrequentinitialize.shruns beforepost-create.sh→ too early (no venv yet)Implementation:
Silent check (no args) +
|| trueensures graceful failure.2. Fix Notification Message
Replace lines 252-268 in
version-check.shwith corrected instructions.Current (wrong):
New (correct):
3. Add
just devcontainer-upgrade(Host-Side)Add to
assets/workspace/.devcontainer/justfile.base:Why in
justfile.base?4. Add
just checkWrapper (Container-Side)Add to
assets/workspace/.devcontainer/justfile.base:Usage:
just check→ verbose checkjust check on→ enable notificationsjust check off→ disable notificationsjust check 7d→ mute for 7 daysjust check config→ show configurationWhy in
justfile.base?TestVersionCheckJustIntegration)Alternative Considered:
initializeCommandRejected: Run version check in
initializeCommand(host-side, before container starts).Why rejected:
post-attach.sh+ throttling is less intrusiveFiles to Modify
assets/workspace/.devcontainer/scripts/post-attach.sh— add version check callassets/workspace/.devcontainer/scripts/version-check.sh— fix notification message (lines 252-268)assets/workspace/.devcontainer/justfile.base— addcheckanddevcontainer-upgraderecipesBackward Compatibility
✅ No breaking changes:
Test Coverage
Existing tests already cover:
TestVersionCheckJustIntegration.test_just_check_command_exists→ will pass after addingcheckrecipeTestVersionCheckJustIntegration.test_just_check_calls_script→ will pass once wiredNew tests needed:
Implementation Order (TDD)
test_just_check_command_existscurrently failscheckrecipe tojustfile.basetest_just_check_calls_scriptcurrently failspost-attach.shdevcontainer-upgraderecipe (host-side, outside container test scope)Ready to proceed to
/worktree-planto break this down into implementation tasks.gerchowl commentedon Feb 19, 2026
📋 Implementation Plan
I've created a detailed implementation plan for wiring up version-check notifications and adding the host-side devcontainer-upgrade recipe.
Plan document:
.github_data/issues/issue-73-plan.mdOverview
The plan breaks down the work into 9 tasks following strict TDD discipline (RED-GREEN-REFACTOR):
just checkrecipe (RED)just checkrecipe (GREEN)just devcontainer-upgrade(RED)just devcontainer-upgraderecipe (GREEN)Key Design Decisions
Post-attach integration:
version-check.shwith no args (silent mode) at end ofpost-attach.sh|| trueto ensure graceful failure (never breaks attach)just checkrecipe:version-check.shwith all argumentscheck,check config,check on/off,check 7d, etc.just devcontainer-upgraderecipe:/.dockerenvor$container)install.sh --force .Fixed notification message:
just devcontainer-upgrade(not misleadingjust update)Commit Strategy
Each task produces atomic commits with proper type prefixes (
test:,feat:,fix:,docs:) andRefs: #73.Testing
/.dockerenvfixtureRisks Mitigated
|| truefor graceful degradationjustfile_directory()functionReady to proceed with
/worktree-executeto implement this plan using strict TDD methodology.test: add comprehensive tests for version-check just recipes
feat(devcontainer): add just check recipe to justfile.base
feat(devcontainer): wire version-check into post-attach.sh
fix(devcontainer): correct update instructions in version-check notif…
feat(devcontainer): add host-side devcontainer-upgrade recipe
docs: update CHANGELOG for version-check wiring and upgrade recipe
gerchowl commentedon Feb 19, 2026
✅ Implementation Complete
Pull request created: #87
Summary
Successfully implemented all requirements from issue #73 following strict TDD methodology:
✅ Automatic update notifications
|| true✅ Just check recipe
✅ Host-side upgrade recipe
just devcontainer-upgradefor convenient upgrades✅ Fixed notification message
Implementation Stats
Commits
test:Comprehensive tests for all features (RED)feat:Just check recipe implementation (GREEN)feat:Wire version-check into post-attach (GREEN)fix:Correct notification message (GREEN)feat:Host-side devcontainer-upgrade recipe (GREEN)docs:Update CHANGELOGAll commits include
Refs: #73for traceability.Next Steps
The PR is ready for review. Once merged, users will:
just checkfor version managementjust devcontainer-upgradefor easy host-side upgradestest: update expected gh CLI version to 2.87
feat: agent-driven development workflows, templates, and declarative …
chore: release 0.3.0 (#270)