Skip to content

Fix the three failures keeping CI red - #109

Merged
an0nn30 merged 7 commits into
mainfrom
fix/ci-pipeline
Sep 3, 2026
Merged

Fix the three failures keeping CI red#109
an0nn30 merged 7 commits into
mainfrom
fix/ci-pipeline

Conversation

@an0nn30

@an0nn30 an0nn30 commented Sep 2, 2026

Copy link
Copy Markdown
Owner

CI has failed on every main push for weeks — at least 8 consecutive runs going back to Aug 27. Three independent causes, one commit each.

1. Windows didn't compile

libc is declared only under [target.'cfg(unix)'.dependencies], but PtyBackend's Drop impl called libc::kill unconditionally. Every Windows job died with three E0433: cannot find module or crate libc before running a test. ipc.rs already gates its libc use this way; pty_backend.rs didn't.

Not verified locally — cross-checking --target x86_64-pc-windows-msvc fails in ring'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 ci couldn't reach the registry

build.rs runs npm ci when 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 resolved URLs in crates/termlab_tauri/frontend/package-lock.json pointed at a private corporate Artifactory mirror rather than the public npm registry — committed by an npm install run on a machine configured against it. Public runners can't authenticate there, hence E401.

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 ci now succeeds and cargo check -p termlab_tauri gets through build.rs.

Two follow-ups worth considering separately:

  • The private hostname remains in git history.
  • build.rs hard-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 --check failed workspace-wide

37 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

cargo test --workspace   # all green, ~1228 tests
cargo fmt --all -- --check   # clean
cargo clippy --all-targets   # exit 0 (warnings only, as before)

Windows compilation is the one thing this branch's CI has to prove for me.

🤖 Generated with Claude Code

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.
@an0nn30
an0nn30 merged commit 28c0799 into main Sep 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant