Skip to content

CI: core covgap tests join their suites (#1089) - #1585

Merged
Mikola Lysenko (mikolalysenko) merged 3 commits into
mainfrom
agent/fix-ci-core-covgap-homes
Oct 15, 2026
Merged

Mikola Lysenko (mikolalysenko) merged 3 commits into
mainfrom
agent/fix-ci-core-covgap-homes

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

LLM Description written by Claude Code:claude-opus-5-5

Refs #1089 (core-crate slice of child 6; the scan slice is #1583, update merged in #1580). With this and #1583, no covgap_* / coverage_fix_* file is left in the repo. The issue's other children (sentence-assertion counts) stay open.

Summary

The core crate had five tests/covgap_*.rs files. Each was its own test binary, with helpers mirrored from the suite it called its companion. Each one now lives in that suite and uses the suite's helpers:

Old New
covgap_api_blob_fetcher.rs (6 tests) blob_fetcher_edges_e2e.rs. The mirrored dummy_client, proxy_client, manifest_with_after_hashes and dir_entry_count are gone
covgap_crawlers_npm_crawler.rs (8) crawler_npm_e2e.rs. The mirrored options_at and stage_npm_pkg are gone
covgap_patch_apply.rs (4) crawler_npm_e2e.rs, next to the twin-healing success tests. It uses the suite's index.js patch fixture (ungated and renamed from vlt_patch/vlt_apply) and stage_npm_pkg
covgap_crawlers_composer_crawler.rs (5) crawler_composer_e2e.rs, using its EnvVars restore guard and global_opts instead of a private EnvVarGuard and global_options_at
covgap_update_state.rs (1) renamed to update_state_env.rs. It blanks HOME, so it has to stay its own process (see its header)

Cleanups from /code-review high:

  • The five older global-home tests in crawler_composer_e2e.rs now restore env through EnvVars instead of hand-written save/restore. Before, a panic left a stubbed HOME/PATH in place for the rest of the binary.
  • Function-local imports that the new file-level ones made redundant are removed.
  • The read-only blobs-dir test in blob_fetcher_edges_e2e.rs now restores the write bit in a drop guard.

scripts/ci-test-durations.json (the Windows shard balancer) moves the removed targets' timings onto their new homes and adds update_state_env. No product code changes.

CI cost: test-only. A lean PR run is still about 28 Linux jobs and ~8 min, before and after. There are four fewer test binaries to compile and link in every job that builds the core tests (coverage, test-release, Windows/macOS shards). The shard file prices each binary at 2 s of link time. All 24 moved tests still run, with the same assertions.

Test evidence

  • Test counts per binary before → after: blob_fetcher_edges_e2e 14+6 → 20, crawler_npm_e2e 86+8+4 → 98, crawler_composer_e2e 39+5 → 44, update_state_env 1. All pass locally.
  • cargo test -p socket-patch-core --all-features --test '*': all 32 integration binaries pass. The lib unit tests have 4 failures in this sandbox: copy_tree, vlt_heal, pypi_poetry and pypi_requirements tests whose chmod denials don't hold as root. They are in src/, which this PR doesn't touch.
  • cargo fmt --all -- --check is clean. cargo clippy --locked --workspace --all-features -- -D warnings is clean, and so is clippy on the four touched test targets.
  • python3 -m pytest scripts/tests -q: 342 passed, 6 skipped. This includes the shard tests that read ci-test-durations.json.
  • The moved tests include cfg(unix) and cfg(not(windows)) tests and helpers that are now ungated, so one full-scope run was dispatched on 709b391. It passed, Windows and macOS shards included: https://github.com/SocketDev/socket-patch/actions/runs/38783841518
  • This PR moves tests, so there is no red→green regression test.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JH8KWf5dc23jDNhurGwAsN


Generated by Claude Code

Assisted-by: Claude Code:claude-opus-5-5
The core crate kept five coverage-gap test files, each its own test
binary, with helpers mirrored from the suites they called companions.
Each now lives in its named suite and shares that suite's helpers:

- covgap_api_blob_fetcher -> blob_fetcher_edges_e2e (drops the
  mirrored client, manifest and dir-count helpers)
- covgap_crawlers_npm_crawler and covgap_patch_apply ->
  crawler_npm_e2e, next to the twin-healing success tests
- covgap_crawlers_composer_crawler -> crawler_composer_e2e, using its
  EnvVars restore guard and global_opts instead of private copies
- covgap_update_state -> update_state_env (it blanks HOME, so it must
  stay its own process)

No test is dropped and nothing is asserted differently. Four fewer
test binaries to link per test leg; the Windows shard timings move
with them.

Refs #1089

Assisted-by: Claude Code:claude-opus-5-5
Review follow-ups on the folded core suites:

- crawler_npm_e2e: the moved apply tests now use the suite's one
  index.js patch fixture (ungated and renamed from the vlt-only
  helpers) and stage_npm_pkg, and the per-test imports that the
  file-level ones replaced are gone.
- crawler_composer_e2e: the older global-home tests restore their
  env through EnvVars too, so a panic no longer leaks a stubbed
  HOME or PATH into later tests in the binary.
- blob_fetcher_edges_e2e: the read-only blobs dir gets its write bit
  back through a drop guard, so a failed assert or the root skip no
  longer leaves an undeletable tempdir.

Refs #1089

Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko
Mikola Lysenko (mikolalysenko) marked this pull request as ready for review October 15, 2026 18:13
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

BugBot review


Generated by Claude Code

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 709b391. Configure here.

Merged via the queue into main with commit 15cbde4 Oct 15, 2026
332 checks passed
@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the agent/fix-ci-core-covgap-homes branch October 15, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-perf CI / merge-queue performance finding (profiler routine)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants