Scripts: allow smoke artifacts in source log directory #2641
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2651"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T05:04:36Z.
smoke.ps1 -OutDirfails when the destination is the title's own log directory: copyingxcl.logorreport.jsononto itself throws before the manifest and smoke report are produced. Normalize the destination directory and leave in-place artifacts where they are.What is in it
.and different casing; confirm the original log/report remain intact and the manifest and smoke block are emitted.Tested
b49be183, the original in-place fixture failed with a self-copy error. The case-variant fixture reproduced the reviewer's self-copy failure in Windows PowerShell 5.1 before the follow-up fix. PowerShell 7 normalized the path casing in that fixture. With this patch,scripts/test-smoke-artifacts.tests.ps1and the existingscripts/smoke-title.tests.ps1passed in both Windows PowerShell 5.1 and PowerShell 7.git diff --checkpassed.Regression run
Not tested
-OutDirjunction targeting the log directory can still cause a self-copy; this patch handles ordinary Windows paths.AI use
Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-26T06:44:58Z.
Small one at
28e26958: the self-copy guards (smoke.ps1:99and:104) compare with-cne, which is case-sensitive, but NTFS paths are not.(Get-Item).FullNamekeeps the casing it was given, so-OutDir d:\xcl\logsagainst a log atD:\XCL\logs\xcl.logcounts as two files, andCopy-Itemthen stops with "Cannot overwrite the item … with itself".Reproduced on Windows 11 (Windows PowerShell 5.1): a file in
%TEMP%\XcLcAsE, with the destination built from the lower-cased directory, gives-cneTrue and thatCopy-Itemerror.-ne(case-insensitive, like the file system) avoids it.AI use: Gemini (Antigravity) spotted it in a review; Claude Code (Claude Opus 5.5) reproduced it and wrote this.
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T08:34:54Z.
Thanks for the reproducible case. I updated the PR to
382a161b: both in-place copy guards now compare ordinary Windows paths withStringComparison.OrdinalIgnoreCase, and the artifact fixture exercises-OutDirwith different casing as well as.. The case-variant fixture reproduced the self-copy error before the fix in Windows PowerShell 5.1; after the fix, the artifact and title smoke script tests pass in both PowerShell 5.1 and 7. The PR description records the remaining junction and explicitly case-sensitive-directory limitations. Windows no-GPU CI is rerunning on the updated head.AI use: GPT-6.2 Sol implemented and tested the follow-up; GPT-6.2 Astra reviewed the diff and report.
Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-26T16:31:51Z.
Checked at
382a161b: both self-copy guards now compare with[StringComparison]::OrdinalIgnoreCase(smoke.ps1:99,:104). Thanks @luckyteagirl.AI use: Claude Code (Claude Opus 5.5) checked the source at that head and wrote this.
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:35:14Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:34:22Z.
Triage (#1607) – head
382a161#2716 (same author, draft) is stacked on this PR: it carries this commit plus literal-path lookups. That is not a duplicate. No other open or merged PR makes this change.
No problems found in the diff:
smoke.ps1skips copyingxcl.log/report.jsononto themselves when-OutDiris their own folder, and the test coversrun\.and a case variant.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T09:14:10Z.
merge-check
base:
1c8b551475head:
382a161b3emerge: clean (
git merge --no-editonto1c8b5514,git diff --checkclean;scripts/smoke.ps1+9/-3,scripts/test-smoke-artifacts.tests.ps1+16/-1)build: not run (Tier 0 PowerShell script diff touching only
scripts/; no Rust code changed)tests: Windows PowerShell 5.1 (
5.1.26100.8457):scripts/test-smoke-artifacts.tests.ps1-> ok (test-smoke-artifacts: all assertions passed successfully.); other passing scripts (perf-compare.tests.ps1,perf-run.tests.ps1,smoke-title.tests.ps1) -> 3/3 ok.test-native-stderr.tests.ps1fails with exit 127 identically on clean base1c8b5514(its mockcargo.cmddoes not handle thecargo benchcall inscripts/test.ps1). Rust workspace tests not run (Tier 0); PowerShell 7 not installed here.review: Read the full merged diff (
scripts/smoke.ps1:101-110,scripts/test-smoke-artifacts.tests.ps1). Resolving$OutDirvia(Get-Item -LiteralPath $OutDir).FullNameand skippingCopy-Itemwhen$logor$reportmatches its destination under[StringComparison]::OrdinalIgnoreCaseprevents self-copy errors when-OutDirpoints to the source log directory (including.and case-variant paths). The updated fixture verifies both in-place paths and unchanged original files. Clean, minimal, no regressions.performance: none (script-only change in
scripts/; zero runtime impact)verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Windows PowerShell 5.1.26100.8457, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.