Repository navigation
CI: scan suite covgap files get real homes (#1089) - #1583
Merged
Mikola Lysenko (mikolalysenko) merged 2 commits intoOct 15, 2026
Merged
Conversation
The scan test binary still carried four coverage-gap files, two of which tested other commands: - covgap_ecosystem_dispatch.rs held the deno apply and rollback dispatch checks as adapted copies of ecosystem_dispatch_e2e.rs's oracles. They now live in that file and use its shared oracles; RollbackFixture takes scope flags so the deno case can pass --global-prefix. - covgap_commands_fetch_stage.rs drove apply's staging output. Its cold-cache fetch duplicated apply_network.rs, so what stays is one render check per message family in apply_render.rs (the offline no-local-source report, the download result line) plus a new --json check in apply_failure_paths.rs that the offline bail reports the offline_missing_sources warning code, which no CLI test asserted before. - coverage_fix_scan_discovery_corrupt_ledger.rs and covgap_commands_scan_vendor_flow.rs already asserted through --json; they are renamed scan_prune_corrupt_vendor_ledger.rs and scan_vendor_flow.rs and parse through common::envelope. Test-only; no production change and no new test binary. Refs #1089 Assisted-by: Claude Code:claude-opus-5-5
14 tasks
- The offline --json bail already had a test in apply_silent_staging_errors.rs, so the new copy is dropped and that test now also checks the offline_missing_sources warning code, that nothing is applied, and that the manifest and .socket/blobs are left as they were. - That file's private sourceless-manifest writer is replaced by the shared write_sourceless_npm_patches fixture. - The offline report lists purls in no fixed order, so the render check counts five distinct fixture purls instead of a prefix match. - scan_vendor_flow.rs parses every envelope through common::envelope, and the deno apply runner takes env as (String, String) like the rollback runner. Refs #1089 Assisted-by: Claude Code:claude-opus-5-5
Mikola Lysenko (mikolalysenko)
marked this pull request as ready for review
October 15, 2026 17:09
Collaborator
Author
|
BugBot review Generated by Claude Code |
There was a problem hiding this comment.
✅ 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 1e87433. Configure here.
Tanmay Singla (Tanmay182003)
approved these changes
Oct 15, 2026
This was referenced Oct 15, 2026
Mikola Lysenko (mikolalysenko)
deleted the
agent/fix-ci-scan-envelope-asserts
branch
October 15, 2026 18:58
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.
LLM Description written by Claude Code:claude-opus-5-5
Refs #1089 (
scan/slice of child 6; the issue stays open for the core crate'scovgap_*files, and #1580 coversupdate/)Summary
The
scantest binary still carried four coverage-gap files, and two of them tested other commands. This PR moves each test to a named home:scan/covgap_ecosystem_dispatch.rs(deno apply + rollback dispatch, adapted copies of another file's oracles)ecosystem_dispatch_e2e.rs::dispatch_branch_deno/rollback_dispatch_branch_deno, using that file's shared oracles.RollbackFixture.global: boolbecomesscope_argsso deno can pass--global-prefixscan/covgap_commands_fetch_stage.rsoffline no-local-source reportapply/apply_render.rs: one render check (header total, five distinct purls listed,... and N more, repair remedy). The existing--jsontest inapply_silent_staging_errors.rsnow also checks theoffline_missing_sourceswarning code (no CLI test asserted it before),applied == 0, and an unchanged manifest and.socket/blobsscan/covgap_commands_fetch_stage.rscold-cache online apply.socket/blobs) is already inapply/apply_network.rs. What stays is one render check inapply_render.rs: the result line on stderr, no permanent progress, nothing on stdoutscan/coverage_fix_scan_discovery_corrupt_ledger.rsscan/scan_prune_corrupt_vendor_ledger.rs(already--json; now parses throughcommon::envelope)scan/covgap_commands_scan_vendor_flow.rsscan/scan_vendor_flow.rs(already--json; every envelope now parses throughcommon::envelope)apply_fixture.rsgets one sharedwrite_sourceless_npm_patches(root, n), which replacesapply_silent_staging_errors.rs's private copy. No product code changes.CI cost: test-only. A lean PR run is unchanged: about 28 Linux jobs and ~8 min, before and after, with no new test binary. Six moved tests become six checks, plus stronger assertions on one existing test. All are local or wiremock and take under a second each.
Test evidence
cargo test -p socket-patch-cli --all-features --test scan --test apply --test ecosystem_dispatch_e2e: 241 + 148 (1 ignored, pre-existing) + 43 passed, three runs in a row.cargo fmt --all -- --checkandcargo clippy --locked --workspace --all-features -- -D warningsare clean. Clippy with--testson these three binaries reports 33 lints both before and after this PR. They are pre-existing (file is loaded as a module multiple times, …) and none is in a line this PR adds.ci-okpassed. Bugbot found no issues./code-review high findings
All seven fixed in 1e87433:
node_modules/miss-0check is gone. The offline bail now checks the manifest bytes and.socket/blobs.--jsonoffline test was dropped. Its new assertions moved into the existingapply_json_offline_missing_source_keeps_stderr_clean. That test's warnings check is "containsoffline_missing_sources, notsources_download_failed", not exact equality.(). The render check matches listed lines against the fixture purls. The order isn't pinned because the report lists purls in hash order.scan_vendor_flow.rs::assert_vendor_step_errorusesparse_json_envelope. The deno apply runner takes(String, String)env, likerun_rollback.🤖 Generated with Claude Code
https://claude.ai/code/session_018CDpmXSF81omP1jGKngH54