Fix the three failures keeping CI red - #109
Merged
Merged
Conversation
libc is declared only under [target.'cfg(unix)'.dependencies], but the Drop impl called libc::kill unconditionally, so every Windows CI job failed with three E0433 errors before any test ran. Process groups and SIGHUP are unix concepts; on Windows the child is torn down when the master handle closes. ipc.rs already gates its libc use the same way.
71 of the 141 resolved URLs in the frontend lockfile pointed at an internal Artifactory mirror, committed by an npm install run on a machine configured against it. Public CI runners cannot authenticate there, so npm ci failed with E401 and build.rs panicked before any test ran — the ubuntu, macos and windows Test jobs all died in the build script. Integrity hashes are content hashes of the tarball and are unchanged, so the same package versions are installed; only the download host differs. Note the internal hostname remains in git history.
Pure formatting, no behavior change. cargo fmt -- --check has been failing in CI's Lint & Audit job on every run for weeks, across 37 files, which meant the job died in 10 seconds and never reached the dependency audit. Kept as its own commit so it can be skipped during review.
The test built SystemTime values 123ns and 124ns past a whole second. On Windows SystemTime is a FILETIME counting 100-nanosecond ticks, so 123ns is not representable and truncates to 100 — CI showed unixNs:...000000100 where the test expected ...000000123, and the assert_ne would have failed next since 123 and 124 both truncate to 100. The test could only ever have passed on unix, and had never run on Windows because that target did not compile until the previous commit. Use 100ns-aligned components instead: that is the finest gap every supported platform can represent, which is the granularity the fingerprint actually has to distinguish.
TaskDialogIndirect is exported only by comctl32 version 6, which lives in WinSxS and binds only for executables whose manifest declares a dependency on Microsoft.Windows.Common-Controls 6.0.0.0. tauri_build embeds that manifest into the app binary, but cargo test links a separate executable that never got it, so the loader bound System32\comctl32.dll (v5.82), found no TaskDialogIndirect, and killed the process at load with STATUS_ENTRYPOINT_NOT_FOUND before main. The entire termlab_tauri lib test target was unrunnable on Windows, on both x86_64 CI and an aarch64 VM. Scope the manifest dependency to test targets with rustc-link-arg-tests.
rustc-link-arg-tests covers only integration tests under tests/, which this crate does not have, and cargo hard-errors on the instruction when no such target exists. The unscoped form reaches the lib's unit-test binary.
Eleven termlab_tauri tests asserted unix path strings against values the code builds with PathBuf or normalizes with the host platform's rules, so they could only pass on unix. They had never run on Windows, because that target failed to compile and then failed to load. cli tests convert their expected paths through a native() helper, since evaluate() normalizes via PathBuf. The two destination-key tests spell out both platforms' expected strings: uses_windows_path_semantics is cfg!(windows) || ... by design, so backslash output on Windows is correct behavior, not a defect being papered over. No production code changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI has failed on every
mainpush for weeks — at least 8 consecutive runs going back to Aug 27. Three independent causes, one commit each.1. Windows didn't compile
libcis declared only under[target.'cfg(unix)'.dependencies], butPtyBackend'sDropimpl calledlibc::killunconditionally. Every Windows job died with threeE0433: cannot find module or crate libcbefore running a test.ipc.rsalready gates itslibcuse this way;pty_backend.rsdidn't.Not verified locally — cross-checking
--target x86_64-pc-windows-msvcfails inring's C build (needs Windows headers), so this branch's own Windows job is the first real proof. Flagging that rather than implying I confirmed it.2.
npm cicouldn't reach the registrybuild.rsrunsnpm ciwhen the frontend vendor bundle is stale, and asserts on failure — so a registry problem panics the build script and takes down the ubuntu, macos and windows Test jobs before a single test runs.71 of the 141
resolvedURLs incrates/termlab_tauri/frontend/package-lock.jsonpointed at a private corporate Artifactory mirror rather than the public npm registry — committed by annpm installrun on a machine configured against it. Public runners can't authenticate there, henceE401.This commit rewrites those URLs to
registry.npmjs.org. Integrity hashes are content hashes of the tarball and are unchanged, so the same package versions install; only the download host differs. Verified locally:npm cinow succeeds andcargo check -p termlab_taurigets throughbuild.rs.Two follow-ups worth considering separately:
build.rshard-asserts on npm failure. It already degrades gracefully when npm is absent (warns, continues), so a network or registry failure arguably deserves the same treatment rather than breaking every build.3.
cargo fmt --checkfailed workspace-wide37 files unformatted, so Lint & Audit died in ~10 seconds and never reached the dependency audit. Kept as its own commit — it's pure formatting and can be skipped during review.
Verification
Windows compilation is the one thing this branch's CI has to prove for me.
🤖 Generated with Claude Code