Skip to content

Name the Snippets' Host Mount Paths and Give mktemp an Explicit Template - #3878

Merged
ptr727 merged 2 commits into
developfrom
feature/1763-snippet-mounts
Nov 4, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/1763-snippet-mounts

Conversation

@ptr727

@ptr727 ptr727 commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Summary

This finishes the two points still open on #1763. Its HOME and USERPROFILE part was split out into #3852, which is closed.

The comments label is needed for the added comment lines.

Verification

  • I ran the new mktemp line in debian:bookworm-slim (the snippet's image family) and in busybox:1.36, with TMPDIR unset and with it set. It created the file under the expected directory each time.
  • tests/test_cli_usage.py passed.
  • The local strict review was run twice. Pass 1 found one problem: the comment stated the requirement but not the reason, which is fixed in c0113cf7. Pass 2 found nothing. prose_lint reported no violations.

The promotion PR will carry the Closes #1763 line.

🤖 Generated with Claude Code

ptr727 and others added 2 commits November 4, 2026 13:35
Each devcontainer snippet gets a comment beside its mounts naming the host
paths that must exist before the container starts, per the answer to #3754.

The Python post-create drops `mktemp -t`, whose temp-dir choice differs across
mktemp implementations, for an explicit template under ${TMPDIR:-/tmp}. The
template ends in its X run, since BSD mktemp reads a suffix after it literally.

Closes #1763

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings November 4, 2026 21:53
@ptr727 ptr727 added the comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses label Nov 4, 2026
@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ptr727

ptr727 commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head c0113cf7b849486026d6a09693b4cc35a98853f5, the content this pull request carries at that commit against develop, and it recorded 0 findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The reviewed changes address the documented mount-path and temporary-file portability concerns while preserving installer behavior, with no active issues identified.

No open issues 🎉

What changed in this PR

Updates the canonical Python and .NET devcontainer snippets to document required host mount paths and improve mktemp portability for the Python installer.

Changes:

  • Documents required host paths and Docker behavior when mount sources are missing.
  • Replaces mktemp -t with an explicit TMPDIR-aware template.
  • Preserves the existing installer execution and cleanup behavior.
File Description
catalog/​snippets/​devcontainer/​python/​post-create.sh Uses an explicit portable temporary-file template for the uv installer.
catalog/​snippets/​devcontainer/​python/​devcontainer.json Documents required host paths for Python container mounts.
catalog/​snippets/​devcontainer/​dotnet/​devcontainer.json Documents required host paths for .NET container mounts.

Review effort: Lite

@codecov

codecov Bot commented Nov 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.31%. Comparing base (8565add) to head (c0113cf).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3878   +/-   ##
========================================
  Coverage    83.31%   83.31%           
========================================
  Files           29       29           
  Lines         9956     9956           
========================================
  Hits          8295     8295           
  Misses        1661     1661           
Flag Coverage Δ
python-3.13 83.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727
ptr727 merged commit 3a81362 into develop Nov 4, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/1763-snippet-mounts branch November 4, 2026 22:06
ptr727 added a commit that referenced this pull request Nov 5, 2026
…an Explicit Template (#3879)

## Summary

Promotes #3878 to `main`.

Closes #1763.

- **Host mount paths.** Each devcontainer snippet has a one-line JSONC
comment above `mounts`. It names the host paths that must exist and says
why: Docker either refuses an absent source or creates an empty
directory in its place. This is the maintainer's answer to #3754.
- **`mktemp` template.** The Python post-create step uses `mktemp
"${TMPDIR:-/tmp}/uv-install.XXXXXX"` in place of `mktemp -t
uv-install.XXXXXX.sh`. It still honors `TMPDIR` and behaves the same
across mktemp implementations.

Verified by running the new `mktemp` line in `debian:bookworm-slim` and
`busybox:1.36`, with `TMPDIR` unset and with it set. #3878 had two local
strict review passes, which found one problem between them, now fixed,
and a Copilot round with no findings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants