Skip to content

fix(devcontainer): move name to the end so template merges stop conflicting - #153

Open
blooop wants to merge 2 commits into
mainfrom
fix/devcontainer-merge-conflict
Open

blooop wants to merge 2 commits into
mainfrom
fix/devcontainer-merge-conflict

Conversation

@blooop

@blooop blooop commented Aug 24, 2026 •

Copy link
Copy Markdown
Owner

Moves "name" from line 2 to the last key in .devcontainer/devcontainer.json, and fixes its value.

Why move it. "name" is the only per-repo value in this file, and it sat directly above the build block -- the block that changes most when the template updates. git cannot split adjacent hunks, so every pixi run update-from-template-repo conflicted here. Measured on blooop/dbw: reverting only the name line made the same merge clean. At the end of the object the two edits are separate hunks and merge on their own.

Value fix. The name read python_template -- the name of a different project. pyproject.toml has said rockerc all along, so the devcontainer was the one out of step, most likely from a past template merge resolving this very conflict the wrong way. Set to rockerc.

This repo is deliberately NOT being synced to python_template's shared image. Unlike the 18 repos in the other batches, its Dockerfile and features are load-bearing:

  • features: docker-in-docker:2
  • the Dockerfile

Nothing else in the file changed. Verified: still parses as JSONC, name is last with value rockerc, and the parsed object is otherwise key-for-key and value-for-value identical to the original -- the only value difference is name itself.

🤖 Generated with Claude Code

Summary by Sourcery

Improve devcontainer initialization and make its repository-specific configuration safer to merge with template updates.

New Features:

  • Add a reusable devcontainer post-create setup that initializes repository permissions, SSH host verification, Pixi dependencies, and supported optional tasks.

Bug Fixes:

  • Correct the devcontainer project name to rockerc.

Enhancements:

  • Move the repository-specific devcontainer name to the end of the configuration to reduce conflicts when merging template updates.

…icting

"name" was line 2, sitting directly on top of the build block. It is the only
per-repo value in this file, so it is the only line we ever edit here -- and it
happens to sit next to the block that churns most upstream. git cannot split
adjacent hunks, so every `pixi run update-from-template-repo` came back with a
conflict on this one file.

Measured on blooop/dbw: reverting only the name line made the same merge run
clean. Moving the name to the end of the object turns the two edits into two
separate hunks, and they merge without help.

Also fixes the value. It read "python_template", which names a different
project entirely; pyproject.toml has said "rockerc" all along. That is the
signature of a past template merge resolving this exact conflict the wrong way
-- taking the template's side of the name line. Now set to "rockerc".

Deliberately unchanged in this repo:

- the Dockerfile
- "features": docker-in-docker:2, which this repo needs and the shared template
  image does not provide.

This repo is not being synced to python_template's image.

@sourcery-ai sourcery-ai Bot 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.

Sorry @blooop, you have reached your weekly rate limit of 250000 diff characters.

Please try again later or upgrade to continue using Sourcery

@sourcery-ai

sourcery-ai Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates .devcontainer/devcontainer.json so the repo-specific name is isolated from template-managed configuration and correctly set to rockerc, without changing the container setup.

File-Level Changes

Change Details Files
Repositions the repository-specific devcontainer name and corrects it to match the project identity.
  • Moves the name property from near the build configuration to the end of the JSONC object to prevent template-update merge conflicts.
  • Changes the value from python_template to rockerc.
  • Preserves the existing build configuration, Dockerfile, features, and all other devcontainer properties.
.devcontainer/devcontainer.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.00%. Comparing base (b1a0bea) to head (423e31d).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #153   +/-   ##
=======================================
  Coverage   63.00%   63.00%           
=======================================
  Files           8        8           
  Lines        1768     1768           
=======================================
  Hits         1114     1114           
  Misses        654      654           

Impacted file tree graph

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

Synced from blooop/python_template.

postCreateCommand now calls .devcontainer/post-create.sh. The script runs
`pixi run <task>` only where the task is actually defined, and seeds
known_hosts with ssh-keyscan for whatever host origin points at.

devpod forwards an ssh agent, so the host's ~/.ssh does not need mounting --
but the agent carries authentication, not host identity, and on a fresh
container the first git operation over an ssh remote died with "Host key
verification failed". Interactive users can click through that; scripts,
agents and in-container CI cannot.
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