Ver código fonte

Retain native Windows remote argument regression in replay closure

codex 2 meses atrás
pai
commit
857578f4e5

+ 26 - 2
docs/remote-jobs.md

@@ -92,8 +92,8 @@ continued execution after the submitting SSH sessions ended, rejection of change
 arguments, native exit7, cancellation of a separate process group, and cleanup of
 arguments, native exit7, cancellation of a separate process group, and cleanup of
 leaked background children. Boot-change handling has a unit fixture; an actual
 leaked background children. Boot-change handling has a unit fixture; an actual
 host reboot was not performed. Artifact transport now uses the shared resumable
 host reboot was not performed. Artifact transport now uses the shared resumable
-tools/remote_transfer.py implementation. Cross-run content cache reuse remains
-separate work.
+tools/remote_transfer.py implementation. Content-bound RTL result reuse is
+documented in rtl-result-reuse.md; TD evidence is not cached by this runner.
 
 
 ## Failed-stage diagnostics
 ## Failed-stage diagnostics
 
 
@@ -127,3 +127,27 @@ report were downloaded; the full waveform remained remote. Repeated status used
 zero transferred chunks. Local archive corruption was reported separately while
 zero transferred chunks. Local archive corruption was reported separately while
 native exit7 remained FAIL, and a fresh download recovered the verified archive.
 native exit7 remained FAIL, and a fresh download recovered the verified archive.
 This validates diagnostic collection/transport, not production RTL acceptance.
 This validates diagnostic collection/transport, not production RTL acceptance.
+
+## Public alias verification
+
+On source c2553bd, the Linux runner/lifecycle/closure suite passed53 tests.
+The Windows c376b8c public entry was exercised from a path with Chinese
+characters and spaces: exact snapshot creation/reuse, invalid commit rejection,
+duplicate Quick submission, explicit Full command, live logs, cancellation,
+failure fetch, legacy doctor and unchanged container identity. The Quick alias
+completed31 MR RTL compile/behavior checks using source80d4a61. These commits
+have identical product RTL; this is integration evidence for the entrypoints.
+
+The initial Windows live run exposed advanced PowerShell parameter binding
+consuming the child's options after `--`. Both thin launchers now forward
+automatic `$args` unchanged. The permanent regression runs on Windows with:
+
+    python -m pytest tests/unit/test_windows_remote_entrypoints.py -q
+
+It executes the real PowerShell scripts from paths containing Chinese and spaces,
+checks a literal `--`, child options, quotes, dollar expressions and backticks,
+and requires the child's failing exit code to survive. It needs native PowerShell;
+a skip elsewhere is not its Windows acceptance evidence. The test is included in
+the analysis source closure. Help and invalid/missing-command cases were also
+run through both Windows entrypoints. None of these checks closes product Full,
+MR resource fit or hardware validation.

+ 2 - 1
tests/unit/test_source_package_closure.py

@@ -13,7 +13,8 @@ def test_current_closure_contains_public_replay_dependencies():
         'tests/sim/i2c_master_tasks.vh','tests/sim/motor_queue_storage_tb.v','tools/td2026',
         'tests/sim/i2c_master_tasks.vh','tests/sim/motor_queue_storage_tb.v','tools/td2026',
         'docs/current-analysis-status.md','docs/audits/mrdimm-header-word-copy.md',
         'docs/current-analysis-status.md','docs/audits/mrdimm-header-word-copy.md',
         'tests/sim/motor_control_hold_monitor.vh','tools/prod2u_gui.py',
         'tests/sim/motor_control_hold_monitor.vh','tools/prod2u_gui.py',
-        'tools/remote/prod2u-remote.ps1','tools/windows/remote-doctor.ps1'}
+        'tools/remote/prod2u-remote.ps1','tools/windows/remote-doctor.ps1',
+        'tests/unit/test_windows_remote_entrypoints.py'}
     assert required<=set(paths)
     assert required<=set(paths)
     assert len(paths)==len(set(paths))
     assert len(paths)==len(set(paths))
     assert not any('/legacy/' in p or p.startswith('src/generated/') for p in paths)
     assert not any('/legacy/' in p or p.startswith('src/generated/') for p in paths)

+ 24 - 0
tests/unit/test_windows_remote_entrypoints.py

@@ -0,0 +1,24 @@
+"""Run on Windows: exercise native PowerShell argument and exit-code forwarding."""
+from pathlib import Path
+import json
+import shutil
+import subprocess
+import pytest
+
+ROOT=Path(__file__).resolve().parents[2]
+
+
+@pytest.mark.parametrize('entry', ['tools/remote/prod2u-remote.ps1','tools/windows/remote-run.ps1'])
+@pytest.mark.parametrize('tail', [[], ['--','python3','-u','-c','print("literal \u4e2d\u6587 $() `quoted`")']])
+def test_native_powershell_preserves_child_options_and_failure(tmp_path,entry,tail):
+    powershell=shutil.which('pwsh')
+    if not powershell:
+        pytest.skip('native PowerShell required; run this suite in the Windows build environment')
+    root=tmp_path/'source \u4e2d\u6587 space';script=root/entry
+    script.parent.mkdir(parents=True)
+    shutil.copy2(ROOT/entry,script)
+    (root/'tools/remote_job.py').write_text('import json,sys\nprint(json.dumps(sys.argv[1:])); raise SystemExit(7)\n',encoding='utf-8')
+    args=['--ssh-runner','/exact \u4e2d\u6587 space/tools/remote_job.py','submit','run-id','--target','mrdimm-chamber',*tail]
+    result=subprocess.run([powershell,'-NoProfile','-File',str(script),*args],capture_output=True,encoding='utf-8')
+    assert result.returncode==7,result.stderr
+    assert json.loads(result.stdout)==args

+ 1 - 1
tools/source_package_closure.py

@@ -34,7 +34,7 @@ ENTRYPOINTS=(
     'tools/6400_hex_gui.py','tools/mrdimm_hex_gui.py','tools/build_6400_hex_gui.py','tools/build_mrdimm_hex_gui.py',
     'tools/6400_hex_gui.py','tools/mrdimm_hex_gui.py','tools/build_6400_hex_gui.py','tools/build_mrdimm_hex_gui.py',
     'tools/verify_motor_arithmetic.py','tools/verify_td_smoke.py','tools/dev_container.py','tools/dev-container.sh',
     'tools/verify_motor_arithmetic.py','tools/verify_td_smoke.py','tools/dev_container.py','tools/dev-container.sh',
     'tools/remote_job.py','tools/remote_transfer.py','tools/remote/prod2u-remote-job.sh','tools/remote/prod2u-remote.ps1',
     'tools/remote_job.py','tools/remote_transfer.py','tools/remote/prod2u-remote-job.sh','tools/remote/prod2u-remote.ps1',
-    'tools/windows/remote-doctor.ps1',
+    'tools/windows/remote-doctor.ps1','tests/unit/test_windows_remote_entrypoints.py',
     'tools/windows/sync-to-remote.ps1','tools/windows/sync-from-remote.ps1',
     'tools/windows/sync-to-remote.ps1','tools/windows/sync-from-remote.ps1',
     'tools/windows/remote-run.ps1','tools/windows/remote-status.ps1','tools/windows/invoke-remote.ps1')
     'tools/windows/remote-run.ps1','tools/windows/remote-status.ps1','tools/windows/invoke-remote.ps1')