Skip to content

Scripts: report the build commit for an external smoke executable - #1591

Open
alpz1000 wants to merge 1 commit into
xcl-dev:mainfrom
alpz1000:scripts/smoke-build-provenance
Open

alpz1000 wants to merge 1 commit into
xcl-dev:mainfrom
alpz1000:scripts/smoke-build-provenance

Conversation

@alpz1000

Copy link
Copy Markdown

What is in it

scripts/smoke.ps1 reads the commit from its own checkout even when -Xcl points at a binary built elsewhere. In a paired regression test this can label a baseline binary with the PR checkout's commit.

Add -BuildCommit for a clean external build with a known full SHA. Existing invocations still work. When -Xcl is supplied without the build commit, warn that the reported provenance comes from the script checkout. The override uses the caller's supplied provenance.

Tested

  • Ran the script on Windows with XCL's bundled test title and an archived build from 47efa2e while the script checkout was on a different commit. Verified the explicit SHA appeared, that omitting it preserved legacy output and emitted the warning, and that an invalid SHA was rejected.
  • python -m unittest discover -s scripts: 16 passed.
  • git diff --check passed.

Not tested

Retail launches and Windows PowerShell 5.1. The fixture run checked smoke-block attribution.

AI use

OpenAI Codex (GPT-6) implemented the script change, ran the tests, and drafted this description.

@fromthemoonx

Copy link
Copy Markdown

Windows PowerShell 5.1 run, since Not tested lists it.

Tested

  • Windows PowerShell 5.1.26100.9818; native Windows 11 Pro 26H2 (build 26300.9974); NVIDIA GeForce RTX 3060 12 GB; Python 3.12
  • Exact head 1336f1b83e688d2cca7474cbeae67e1c1fdca200 (merges cleanly into current main 9e3831e). I ran its scripts/smoke.ps1 with -Xcl pointing at a debug xcl.exe built from main 9e3831e, on XCL's bundled test title (target/e2e-debug-layer/game):
    1. -Xcl with -BuildCommit <9e3831e… full SHA>: the block says commit: 9e3831e1f570d3646e53ab753b19ec07eb8f1485, no dirty, no warning.
    2. -Xcl without -BuildCommit: the warning prints, and the block says the script checkout's commit (1336f1b…), as before.
    3. Short SHA (9e3831e): refused by ValidatePattern.
    4. -BuildCommit without -Xcl: refused with -BuildCommit requires -Xcl. If target\release\xcl.exe does not exist, the older no …\xcl.exe - build it first check fires first instead; still a refusal.
    5. Upper-case SHA: printed in lower case.
    6. SHA with a trailing newline: refused (\z).
    7. No -Xcl and no -BuildCommit: no warning, the script checkout's commit, as before.
  • scripts/pr_check.py's smoke_blocks reads the commit from case 1's block as the given SHA.
  • python -m unittest discover -s scripts: 16 tests, OK

The test title ends early in all these runs (crashes: 1, frames shown: none logged). main's smoke.ps1 gives the same with the same xcl.exe, so the cause is the test title on a 10 s run, not this change.

Not tested

  • PowerShell 7 (not installed here); a retail title.

AI use

  • Claude Code (Claude Opus 5.5) ran the script cases on the machine above and wrote this report from the output.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

@JJAutoCompare

Copy link
Copy Markdown

XCL PR #1591 focused Windows verification

Head 1336f1b83e688d2cca7474cbeae67e1c1fdca200, verified in a clean detached worktree. The PR changes only scripts/smoke.ps1 and adds no checked-in tests.

Tested

  • STOR-WINLAB, AMD Ryzen 7 3800X, Intel Arc A770 (driver 32.0.101.9175), Windows 11 Enterprise Evaluation build 26200, Windows PowerShell 5.1.26100.9818. rustc -Vv reported 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). dxc.exe --version reported 1.9.2609.5 from the configured DXC directory.
  • Ran powershell.exe -NoProfile -ExecutionPolicy Bypass -File 'L:\XclTooling\sol-slot-7\tmp\verify-pr1591.ps1' 2>&1 | Tee-Object -FilePath 'L:\XclTooling\sol-slot-7\tmp\pr1591-focused.log' outside the Arc lock. Exit 0, 11 passed, 0 failed, 0 ignored, 0 skipped. Six cases started the synthetic executable and checked the output block. Five rejection cases ran before launch.
  • The head lowercased a full external SHA and omitted the dirty suffix even with a dirty Cargo.toml. The default executable used the checkout SHA quietly. An explicit executable without -BuildCommit warned and reported the checkout SHA and its clean or dirty state. Abbreviated, nonhex, and newline-terminated SHAs were rejected, as was -BuildCommit without -Xcl.
  • Parent b7aa9f3bd212088e0d927439284dc5ed325ce3c7 rejected -BuildCommit as an unknown parameter. With -Xcl alone it printed its checkout SHA without a warning. The first harness run expected the parent to ignore the parameter. The final harness checks the observed rejection and the legacy invocation separately.
  • Temporary script copies used .NET for environment cleanup and required a synthetic report.json in place of the Windows adapter fallback. The original worktree stayed clean.

Not tested

  • Full GPU workspace suite, retail smoke runs, and Windows adapter fallback. Cargo builds and Rust tests were outside this script-only verification.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1591-focused.log and published.

@throny throny added the off-goal Does not bear on the current goal (world loading); waits until it is reached label Nov 25, 2026
@RavenCurseBurg

RavenCurseBurg commented Nov 25, 2026 •

Copy link
Copy Markdown

Resolved the scripts/smoke.ps1 conflict between this PR's 1336f1b and main 889ef3e8aa7f. The merge commit on my fork has those two parents and preserves main's positional Title and OutDir arguments. Its artifact test checks the child exit in the manifest: supplying an external commit can skip Git entirely, so a fresh shell can have an unset $LASTEXITCODE.

  • On Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9, I ran six synthetic launches per shell with an exact copy of the merged runner in a disposable Git checkout. Default launchers reported the fixture checkout's SHA and clean/dirty state. Explicit launchers without -BuildCommit warned and reported the checkout state. With an uppercase external SHA, the printed block and saved manifest both named its lowercase value and reported a clean build, even when the script checkout was dirty.
  • In each shell a short, nonhex or newline-terminated SHA and -BuildCommit without -Xcl all failed before the fixture process started. Both scripts/test-smoke-artifacts.tests.ps1 and scripts/smoke-title.tests.ps1 passed on the final merge.

Windows 11 build 26100.9711, i7-13700. Synthetic executable and reports only. No retail game, Rust build or GPU suite. OpenAI Codex (GPT-6) resolved the conflict, extended the artifact test and ran the checks.

@github-actions

Copy link
Copy Markdown

Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

@github-actions github-actions Bot added the stale No activity for 3 days; closed 4 days later unless something happens label Nov 30, 2026
@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Triage (#1607) – head 1336f1b

No other open PR changes how smoke.ps1 names its commit (#1611 and #1863 change log parsing and artifacts). The PR conflicts with main, which has since added -Title, -OutDir and -StartupTimeoutSeconds to the same param block.
Concern in scripts/smoke.ps1: with -BuildCommit, $dirty is set to $false and the SHA is taken as given, so the block claims a clean build of a commit nothing verified. pr_check.py relies on that line to accept a regression run. Reading the commit from the binary (e.g. a build-time git rev-parse embedded in xcl.exe), or at least marking the block as caller-supplied, would keep the check meaningful.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached stale No activity for 3 days; closed 4 days later unless something happens

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants