fix(ci): restore test fixtures stripped by overbroad .gitignore#2
Merged
xsoheilalizadeh merged 17 commits intomainfrom Apr 27, 2026
Merged
fix(ci): restore test fixtures stripped by overbroad .gitignore#2xsoheilalizadeh merged 17 commits intomainfrom
xsoheilalizadeh merged 17 commits intomainfrom
Conversation
The `*.txt` rule in .gitignore (with a single `!ai_section.txt` exception) was excluding 10+ test fixture files that `include_str!()` in tests, breaking CI immediately on Linux. - Drop the `*.txt` ignore rule. `target/`, `**/obj/`, `dist/`, `**/node_modules/` already cover the build outputs we want excluded. - Add the missing parse/encoding/multi-ext test fixtures to git.
`parse_suite_summary` only handled nightly NDJSON output, so on
stable toolchains it returned None and the renderer emitted a
degenerate "tests failed {ms}" line without counts. The
`test_rust_fail_shows_structured_output` e2e test caught this
on CI (which uses dtolnay/rust-toolchain@stable) but it slipped
through locally where nightly is active.
Add a fallback that parses libtest's stable `test result: ok. N
passed; M failed; X ignored; ...` summary lines, summing across
multiple test binaries.
macOS runner left go undiscoverable for the spawned subprocess, causing build_go_* e2e tests to fail in 1ms with SpawnError. Pin go 1.21 (matches fixtures' go.mod) on both ubuntu and macOS for deterministic e2e runs. Separately note: o8v/src/commands/build.rs:130 currently treats ExitOutcome::SpawnError as plain build failure with empty stderr — violates rule #4 (no silent fallbacks). Tracked as follow-up.
e2e_deno tests spawn 'deno check' — was producing 'No such file or directory (os error 2)' on ubuntu CI.
The e2e suite spawns ~14 external binaries (hadolint, helm, kustomize, terraform, tflint, ktlint, ruff, mypy, biome, prettier, eslint, oxlint, tsc, rubocop, staticcheck, deno, go) plus per-OS extras. Inlining all the setup steps in the workflow was unreadable; a composite action keeps ci.yml short and the install list maintainable in one place.
setup-beam@v1 rejected '3.22' — no matching tag in erlang/rebar3 releases.
Ubuntu's system gem/npm dirs need root; macOS Homebrew/nvm versions don't. Also: pip --user (avoids dist-packages permission), add ~/.local/bin to PATH.
go vet -json writes findings to stderr on older toolchains and stdout on
newer ones. The parser previously read only stdout, so on a runner where
go writes to stderr the parser got nothing and reported zero diagnostics
on a fixture with a clear Printf format violation.
Pick the stream that actually starts with '{'. Mark Unparsed only when
both streams are empty (Parsed otherwise, matching prior behavior).
Some go toolchains interleave '# package/path' header lines with the
JSON stream that 'go vet -json' emits — and either stream (stdout or
stderr) may carry the JSON depending on toolchain version. The previous
parser only read stdout and choked on the first '#' character, so on a
runner where comments and JSON were mixed it produced zero diagnostics
on a fixture with a clear Printf format violation.
Strip lines starting with '#' from both streams, concatenate the
remainder, then deserialize. Adds a regression test mixing '# pkg' lines
with '{}' objects.
ruff/mypy were installed but not found on macOS — pip --user puts bins under ~/Library/Python/<ver>/bin, not ~/.local/bin. Compute the actual USER_BASE at install time and append <USER_BASE>/bin to GITHUB_PATH.
The flag was intended to fail 8v's own build on warnings, but it was exported to every spawned cargo subprocess — including the ones the e2e tests start, which then escalated warning-level diagnostics like unused_imports to errors and broke severity assertions. Clippy's own job already enforces -D warnings via the cargo clippy CLI.
The Append handler used a read-then-decide-then-append flow: it read the file, checked the trailing byte to decide if a separator newline was needed, then appended. Concurrent appends on a file missing a trailing newline both observed the missing byte, both prepended their own separator, and produced "\n\n" between contributions — an extra blank line per race. Push the separator decision into the fs layer behind an exclusive advisory flock so peek-last-byte + conditional separator + content + trailing newline are serialized. Adds safe_append_with_separator in o8v-fs and a 50-thread regression test. CRLF preservation in append is dropped for now (defer); the LF behavior matches the original test fixture and the cross-OS expectations.
4 tasks
- Update security_path_traversal_dotdot to assert against the current
error wording ("path escapes project directory") rather than the stale
set — ContainmentViolation emits "path escapes", which was not in the
OR conditions, causing the assertion to always fail on dotdot traversal.
- Fix RUSTSEC-2026-0104/-0098/-0099 (rustls-webpki 0.101.7): upgrade
ureq from 2.8.0 → 2.12.1 (option b) by running cargo update; the
new version depends on rustls 0.23 → rustls-webpki 0.103.13.
Also rename the feature flag from the removed "rustls" to "tls" in
o8v/Cargo.toml and o8v-testkit/Cargo.toml to match ureq 2.12.1's API.
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.
Summary
*.txtrule in.gitignorewas excluding test fixtures that testsinclude_str!(). CI has been red since the initial public commit.*.txtrule (target/,**/obj/,dist/,**/node_modules/already cover the build outputs).Test plan
cargo test --workspacepasses locallycargo clippy --workspace --all-targets -- -D warningspasses locally8v check .passes