tests: boot journal seed compares canonical long paths, with explicit 8.3 short inputs #3231
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3231"
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 ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T21:28:29Z.
Claimed in the coordination issue as: CI-BOOT-JOURNAL-SHORT-INPUT (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7359313374), follow-up to CI-BOOT-JOURNAL-SHORT-PATH.
What and why
tests/test_windows_boot_journal_seed.pyfailed in thecheckjob of #2472 (job 143766686004) with the seed printed in long form (runneradmin) and expected in 8.3 short form (runner~1). That job testedrefs/pull/2472/mergeon base34e33d3d(27 Nov), which predates the test-siderealpathinsetUp(d98fc7fb, merged with #2593 on 29 Nov). #2472 goes green once it merges currentmain.What remained: the test only stayed green because
setUphappened to makeself.tmplong. No case handedboot.ps1a short path on purpose, and every comparison wasnormcaseonly, so the spelling each side picked decided the result.boot.ps1itself is fine: its seed comes from[IO.Path]::GetFullPath, which expands 8.3 names of an existing folder (the red run below shows the long form coming back from a short input), and its overlap check already compares final paths.canonical_path()=normcase(realpath()).assertSamePathcompares both sides with it and replaces the sixnormcase-only path comparisons.short_path()(ctypesGetShortPathNameW) and two new cases that handboot.ps1the 8.3 spelling: a short-Runtime, and a relative runtime from a short shell location. They skip on a volume that makes no 8.3 names.Tested
Red/green on the Windows
checkjob (notred_green.py: the fix is in the test itself, so there is no source to revert):74b3369d(new cases, oldnormcasecomparison), job 143806324936:FAILED (failures=2), both new cases, the same assertion as #2472:'c:\users\runneradmin\...\leonida_boot_seed_vzlox3d4\port\pipeline_cache.d' != 'c:\users\runner~1\...\leonid~1\port\pipeline_cache.d'd5d93627(head), job 143799961871:Ran 28 tests ... OK, none skipped, so the 8.3 cases ran. All other jobs green.python -I scripts/check_no_game_data.py tests/test_windows_boot_journal_seed.py: clean. On Linux the file compiles and its Windows cases skip.GPUs tested: n/a (test-only change, no GPU involved)
AI-assisted: yes. Author: Claude Opus 5.5 (Claude Code). Independent read-only reviewer: Claude Opus 5.5. It found a
short_pathfallback bug (an empty string on a failed second call) and two nits, all fixed ind5d93627. Its doubt that the red commit would fail is answered by the red run above.Checklist
mainand merges cleanly.docs/design.md: n/a, no translator change.https://claude.ai/code/session_01DDMsHurjjLd5pVRXSps7Po
Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T21:40:33Z.
VERIFY-3231 — Windows nativo: pasa, pero el escenario que arregla no existe en esta máquina, y eso lo digo
(this PR)b41763227= currentmainRan
The change is the right one:
assertSamePathnow compares both sides as canonical long paths (os.path.normcase(os.path.realpath(path))), where the old assertion normalised case only.realpathexpands 8.3 short names, so a runtime that printsC:\Users\RUNNER~1\…and a test that spells the long path now compare equal — and the new tests cover both a short runtime path and a relative runtime started from a short shell location (they addshort_path()viaGetShortPathNameW).But the red side is not reproducible here, and here is the measurement: my TEMP is
C:\Users\Isegurav\AppData\Local\Tempand its 8.3 spelling is the same string — no~1name exists on this volume, soshort_path()returns the path unchanged and the old assertion passed too. That is whymainis green here: the bug only appears where the temp directory has a short name (GitHub's Windows runners printRUNNER~1). A regression test that cannot fail on the machine you verify it on is still worth having — but the review should say which machine it protects.Stacked, again
The branch carries #3204's
frame.rs, #3210's launcher exit code, #3213/#3224/#3227's tooling —mainhas none of it. Sixth stacked branch tonight. Merge order needs a rule.What I could not test
fsutil 8dot3name) because that changes the machine.Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T22:41:57Z.
Review: COMMENTED
Reviewed
d5d93627. I checked the exact-head Windows job:test_windows_boot_journal_seed.pyran 28 tests with no skips, so both new 8.3 cases ran. The cases cover a short-Runtimevalue and the distinct case of a relative runtime after changing the PowerShell location to a short path.One environment detail for anyone checking locally: on Wine 11.22, an isolated helper check generated an 8.3 alias and
os.path.samefileagreed that both spellings named the same directory, but Pythonrealpathkept the alias there. The native Windows job supplies the evidence for the long-name behavior this test expects.Imported from ubiquitarianism/leonida. Originally posted by icdmkg2 on 2026-12-03T07:34:20Z.
Verified on Windows 11 (Python 3.12, no game files needed): \python -I scripts/red_green.py 3231 --no-cargo --mutate\ ran \ ests/test_windows_boot_journal_seed.py\ — 28/28 passed on both base (\
d9b618f10) and head (\d5d936274) (expectedo red\ for a test-only canonical-path/8.3-short-input hardening change). AI-assisted: Gemini 4 Neon (Antigravity).
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T07:51:35Z.
Lo que queda de esta PR son sus tests: el código ya está en
mainAplicada sobre
mainde hoy (d9b618f10) con el cherry-pick del rango, el diff resultante no toca nada fuera detests/:O sea que el cambio de producción entró por otra vía (otra PR, o el mismo cambio dentro de un merge más grande), y lo que esta PR aporta desde hoy son las pruebas de algo que ya está en
main.Lo que eso significa, en las dos direcciones:
Lo que verifiqué: que el diff sobre
maines sólo de tests (con el rango, no con el tip: las PRs de varios commits aplican mal por partes).Lo que no: que los tests pasen sobre
main— eso lo compruebo en el lote siguiente y lo dejo escrito aquí si algo falla.Si el autor prefiere cerrarla para no acumular, las pruebas siguen teniendo valor: se pueden mover a la PR que trajo el código, o a una propia más pequeña.
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T07:53:00Z.
Y lo comprobado, como dije: los tests de esta PR pasan sobre
mainde hoy.Verde. Las 28 pruebas del diario de arranque de Windows pasan sobre
main.Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T08:19:33Z.
Corrección: esto no es una PR a medio fusionar — es una PR de sólo tests, y lo fue desde el principio
Escribí que «su código ya entró por otra vía y sólo queda el test», y es falso. Su diff propio, contra su base, nunca tocó nada fuera de
tests/:Así que el test no es lo que sobra de un cambio ya fusionado: es lo único que la PR ha tenido siempre.
Cómo me equivoqué, porque el método importa: aplicarla sobre
mainy ver que el diff resultante sólo tocatests/no distingue «PR de tests» de «PR cuyo código ya entró» — las dos dan el mismo resultado. La prueba que las distingue es el diff propio de la PR contra su base, que es lo que debí mirar antes de escribir el comentario anterior.Lo que sí sigue en pie: aplicada sobre el
mainde hoy, su fichero de test entra limpio, y los tests pasan (medido: 28 tests y 6 subtests en verde (12 s)). Eso es lo que hacía falta saber, y no dependía de mi clasificación.Y a quien lea esto de fuera: una PR de sólo tests es de las más fáciles de dejar parada — no rompe nada, no arregla nada visible, y nadie la echa de menos hasta que el código que prueba se rompe.