Skip to content

Print paths with forward slashes on every platform - #816

Merged
jviotti merged 4 commits into
mainfrom
dsl-tighten
Aug 12, 2026
Merged

Print paths with forward slashes on every platform#816
jviotti merged 4 commits into
mainfrom
dsl-tighten

Conversation

@jviotti

@jviotti jviotti commented Aug 12, 2026

Copy link
Copy Markdown
Member

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Review in cubic

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@augmentcode

augmentcode Bot commented Aug 12, 2026

Copy link
Copy Markdown

This pull request is abnormally large and would use a significant amount of tokens to review. If you still wish to review it, comment "augment review" and we will review it.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

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

All reported issues were addressed

Note: This PR contains a large number of files. cubic only reviews up to 400 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.

Re-trigger cubic

Comment thread scripts/clitest.py

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

1 issue found across 139 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="test/install/fail_frozen_path_mismatch.clitest">

<violation number="1" location="test/install/fail_frozen_path_mismatch.clitest:43">
P3: The `REPLACE` command treats its pattern as a regular expression (scripts/clitest.py compiles `self.expand(pattern)` with `re.compile(... re.MULTILINE)`). Expanding `$CWD_URI` directly into that pattern means the sandbox path is interpreted as regex metacharacters: if the sandbox path ever contains a `+`, `(`, `)`, `[`, `]`, `*`, `?`, or `.` it will fail to match (or match the wrong substring) and the test will break for reasons unrelated to the CLI output. The previous code deliberately escaped the brackets (`\[CWD\]`), and dropping that escaping here makes the assertion fragile. Escape the expanded path before compiling, or match on a literal string instead.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread test/test/fail_draft7_defs_ref_target.clitest Outdated
REPLACE '\\\\' WITH '/' IN result_0.txt
REPLACE '\\(?!")' WITH '/' IN result_0.txt

REPLACE $CWD_URI WITH '[CWD_URI]' IN result_0.txt

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: The REPLACE command treats its pattern as a regular expression (scripts/clitest.py compiles self.expand(pattern) with re.compile(... re.MULTILINE)). Expanding $CWD_URI directly into that pattern means the sandbox path is interpreted as regex metacharacters: if the sandbox path ever contains a +, (, ), [, ], *, ?, or . it will fail to match (or match the wrong substring) and the test will break for reasons unrelated to the CLI output. The previous code deliberately escaped the brackets (\[CWD\]), and dropping that escaping here makes the assertion fragile. Escape the expanded path before compiling, or match on a literal string instead.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At test/install/fail_frozen_path_mismatch.clitest, line 43:

<comment>The `REPLACE` command treats its pattern as a regular expression (scripts/clitest.py compiles `self.expand(pattern)` with `re.compile(... re.MULTILINE)`). Expanding `$CWD_URI` directly into that pattern means the sandbox path is interpreted as regex metacharacters: if the sandbox path ever contains a `+`, `(`, `)`, `[`, `]`, `*`, `?`, or `.` it will fail to match (or match the wrong substring) and the test will break for reasons unrelated to the CLI output. The previous code deliberately escaped the brackets (`\[CWD\]`), and dropping that escaping here makes the assertion fragile. Escape the expanded path before compiling, or match on a literal string instead.</comment>

<file context>
@@ -40,33 +40,33 @@ COPY project/jsonschema.lock.json TO lock_before.json
 // Validation failure
 RUN install --frozen STDIN /dev/null IN project INTO result_0.txt EXPECTING 2
 
+REPLACE $CWD_URI WITH '[CWD_URI]' IN result_0.txt
 REPLACE $CWD WITH '[CWD]' IN result_0.txt
-REPLACE 'file:///\[CWD\]' WITH 'file://[CWD]' IN result_0.txt
</file context>

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti
jviotti merged commit 09a0cc2 into main Aug 12, 2026
16 checks passed
@jviotti
jviotti deleted the dsl-tighten branch August 12, 2026 16:03
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