Skip to content

Serve the Checkout From Device Builder and Debug It in VS Code - #230

Merged
ptr727 merged 3 commits into
developfrom
device-builder-launch
Oct 15, 2026
Merged

ptr727 merged 3 commits into
developfrom
device-builder-launch

Conversation

@ptr727

@ptr727 ptr727 commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Answers the Copilot round on the promotion PR #228. That round named four topics in its headline and opened no threads: checkout path, Python version, cleanup, and VS Code launch configuration.

Changes

  • Checkout path: VSCode Setup runs esphome-device-builder . from the checkout root. Device Builder's configuration argument defaults to ./configs, so the bare command served the wrong directory.
  • Launch configuration: the .vscode/launch.json debug config ran python -m esphome dashboard /config, which ESPHome 2026.9.1 rejects. It runs the esphome_device_builder module with --log-level debug /config, renamed to match.

The Other Two Topics

  • Python version: no change needed. ESPHome 2026.9.1 requires Python >=3.12.0,<3.15 and Device Builder requires >=3.12, so the venv the existing setup step already makes for ESPHome satisfies both. Device Builder's ESPHome dependency sits behind an extra the doc does not install, so it cannot conflict with the pinned esphome.
  • Cleanup: no change needed. The secrets.yaml guard removes its temporary file on every failure path and renames it on success. Only an interrupt in the window between mktemp and mv leaves it, and that shows in git status rather than failing silently.

Verification

  • python3 -m esphome_device_builder --log-level debug --help parses in the ESPHome 2026.9.1 image.
  • Prose gate at the pinned hub version, plus sentence-length, markdownlint, and editorconfig-checker pass locally.
  • Devcontainer coexistence, Make the Device Builder debug launch config run in the devcontainer #229, also raised by Copilot here: the image entrypoint already runs Device Builder on 6052, so a debug launch on the same data directory exits on the single-instance lock. The launch config gets its own ESPHOME_DATA_DIR and port 6054, the devcontainer forwards 6054, and "Debugging in the DevContainer" says what the two instances share. In a throwaway 2026.9.1 container with the entrypoint running, the same-data-dir run exited on the lock, while the fixed invocation started, and 6052 and 6054 both answered HTTP 200 at once.
  • Local strict review: the first pass raised the coexistence finding. The second found the doc overstating the isolation, since the build tree and the preferences file stay shared, which is fixed in 95204d1. The third raised none.

🤖 Generated with Claude Code

- Pass the checkout path to esphome-device-builder, which serves ./configs
  without one.
- Point the VS Code launch config at esphome_device_builder, since
  esphome dashboard only prints a redirect on ESPHome 2026.9.1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings October 15, 2026 02:24
@ptr727

ptr727 commented Oct 15, 2026

Copy link
Copy Markdown
Owner Author

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

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 32 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: e89478fd-484a-426b-9890-fe4f367f5767
📥 Commits

Reviewing files that changed from the base of the PR and between 78c6e79 and 95204d1.

📒 Files selected for processing: 3
  • .devcontainer/devcontainer.json
  • .vscode/launch.json
  • OPERATIONS.md
  • 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

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.07%. Comparing base (78c6e79) to head (95204d1).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #230   +/-   ##
========================================
  Coverage    43.07%   43.07%           
========================================
  Files            1        1           
  Lines          130      130           
========================================
  Hits            56       56           
  Misses          74       74           
Flag Coverage Δ
python-3.13 43.07% <ø> (ø)

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Resolve the debug-launch conflict with the devcontainer’s existing Device Builder process.

1 open finding
What changed in this PR

Updates Device Builder checkout serving and the VS Code debug configuration.

Changes:

  • Documents serving the checkout root.
  • Replaces the obsolete dashboard launch with Device Builder.
  • The debug launch conflicts with the devcontainer’s existing Device Builder process.
File Summary
OPERATIONS.md Documents serving the checkout root.
.vscode/​launch.json Configures Device Builder debugging; conflicts with the devcontainer process.

🧠 Review effort: Lite


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .vscode/launch.json Resolved
ptr727 and others added 2 commits October 14, 2026 19:28
- Give the launch config its own data directory and port 6054, since
  Device Builder allows one instance per data directory and the image
  entrypoint already serves 6052.
- Forward 6054 from the devcontainer and document the pair.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ptr727

ptr727 commented Oct 15, 2026

Copy link
Copy Markdown
Owner Author

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

@ptr727
ptr727 merged commit c680104 into develop Oct 15, 2026
14 checks passed
@ptr727
ptr727 deleted the device-builder-launch branch October 15, 2026 02:34
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