Repository navigation
fix(core): parse continued Dockerfile CMD instructions - #1532
Open
GoldArowana wants to merge 2 commits into
Open
GoldArowana wants to merge 2 commits into
GoldArowana wants to merge 2 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dockerfile
CMDinstructions continued onto another physical line currently produce a truncated server command in the shared Modal/Daytona parser. Assemble logical instructions before extracting the lastCMD, including comments, CRLF, whitespace after the escape character, and a valid top-levelescapedirective. Preserve the existing single-line, JSON-array joining, and invalid-JSON fallback behavior.Type of Change
Alignment Checklist
.claude/docs/PRINCIPLES.md; this change preserves the existing runtime interfaces..claude/docs/INVARIANTS.md; no API, isolation, serialization, or architectural boundary changes.RFC Status
Test Plan
Claude Code Review
N/A — prepared with Codex assistance. An independent review checked the parser behavior, baseline reproduction, compatibility controls, and the final diff.
Note
Low Risk
Internal Dockerfile text parsing only; fixes command extraction without changing public APIs or runtime interfaces.
Overview
parse_dockerfile_cmdno longer stops at the first physical line of aCMD, so multi-line Dockerfiles no longer yield truncated server commands for Daytona/runtime config.The parser now stitches logical Dockerfile instructions using line-ending escapes (respecting an optional top-level
# escape=directive), then picks the lastCMDas before. Exec-form JSON joining and invalid-JSON fallback are unchanged.Adds
tests/test_core/test_server_config.pywith regression cases (continuations, CRLF, comments, escape directives, and non-CMDcontinuations) loaded directly from the module so optional container packages are not required.Reviewed by Cursor Bugbot for commit b57842e. Bugbot is set up for automated code reviews on this repo. Configure here.