Repository navigation
CI: vendor suite asserts codes, not sentences (#1089) - #1544
Merged
Mikola Lysenko (mikolalysenko) merged 3 commits intoOct 14, 2026
Merged
Conversation
Assisted-by: Claude Code:claude-opus-5-5
This was referenced Oct 14, 2026
The vendor covgap tests pinned English sentences in --json mode, so a copy edit to a vendor message broke them even when the exit code, error code, events and bytes on disk were unchanged. The --json tests now read the takeover, symlink and revert messages only for what they must name (the lockfile, the git checkout remedy, the ecosystem), and the patch-target test checks its applied event instead of human output. The human-only twin of the stale-ledger test is dropped; its --json twin covers the same path. The file moves into the vendor suite binary, one fewer test binary to link: vendor_failure_paths.rs (--json), vendor_render.rs (human output) and npm_fixture.rs (their shared fixture). The CI shard timings fold its time into the vendor target. Refs #1089. Assisted-by: Claude Code:claude-opus-5-5
The read-only-directory tests skip themselves under root, as the repair suite's do: chmod cannot stop root writing, so they failed the whole vendor binary in root containers. Test names and docs now say what the tests check. The corrupt artifact runs fail the redownload on the --offline conflict (there is no repair hint), the legacy-ledger and no-lockfile runs fail rather than skip, and the missing-patch-target run checks that the service's artifact carries the patched file. The yarn check reads the failed event by its code, not by stringifying it. The human stale-ledger render check is back. Refs #1089. Assisted-by: Claude Code:claude-opus-5-5
Mikola Lysenko (mikolalysenko)
marked this pull request as ready for review
October 14, 2026 19:13
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 cdd3949. Configure here.
Tanmay Singla (Tanmay182003)
approved these changes
Oct 14, 2026
Mikola Lysenko (mikolalysenko)
deleted the
agent/fix-ci-vendor-envelope-asserts
branch
October 14, 2026 20:00
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 (vendor slice of child 2; the tracking issue stays open for children 3-6).
Summary
covgap_commands_vendor.rspinned English sentences in its--jsontests. A copy edit to a vendor message broke them even when the exit code, error code, events and bytes on disk were unchanged. This PR moves the file into thevendorsuite binary, split three ways:vendor/vendor_failure_paths.rs: the--jsontests, asserting codes, events and disk state. A message is read only for what it must name: the lockfile, thegit checkoutremedy, the ecosystem, the link name, or the--offlineflag. 4+-word.containssentence asserts: 0.vendor/vendor_render.rs: the human-mode render checks, one per message family. 25 sentence asserts, all in this render suite as Tracking: assert stable codes instead of human sentences in CLI tests, and fold the covgap suites #1089's target design allows.vendor/npm_fixture.rs: the fixture and runners both files share.The
--jsontests also got these fixes:--checkevents carry their message underreason, noterror. The tests now read the right field, and the yarn--checktest finds the event by its code instead of stringifying it.--offlineconflict and carry no repair hint, and the legacy-ledger and no-lockfile runs exit 1 rather than skip.patch_target_absent_from_the_install_still_vendors(formerlyhuman_patch_failure_prints_failed_to_vendor, which checked no output at all) now asserts that the service-built tarball carries the patchedpackage/absent.js.repair_vendor_failure_paths.rsdoes. Before, they failed in any root container, because chmod 0o555 can't stop root writing.coverage_fix_vendor_silent_mute_exit.rsstays where it is. It has no sentence asserts, and #1089 puts it in child 3 with its apply twin.CI cost
Test-only change. A lean PR run keeps the same ~28 Linux jobs and ~8 min. There is one fewer integration test binary to link in the test shards, and
scripts/ci-test-durations.jsonfolds the old target's 3.75 s intovendor(7.77 → 11.52 s) so the Windows shard balance holds.Test evidence
cargo test -p socket-patch-cli --all-features --test vendor: 148 passed. As root, the three chmod tests skip; run asnobody, they pass (3/3).cargo test -p socket-patch-cli --all-features --test cli: 113 passed, including theenvelope_helper_copiesratchet.cargo fmt --all -- --check: clean.python3 -m pytest scripts/tests -q: 342 passed, 6 skipped.cargo clippy -p socket-patch-cli --all-features --test vendor: 26 warnings, against 35 across the two old targets, and none of a new kind. CI's clippy step doesn't lint test targets./code-review highraised 10 findings and 9 are fixed. Not fixed: switching the runners tocommon::envelope::parse_json_envelope. These runners put the child's stderr in the panic message, and the shared helper takes stdout only.🤖 Generated with Claude Code
Note
Low Risk
Test-only refactor and assertion updates; no production vendor CLI behavior changes in this diff.
Overview
Refactors the vendor integration tests (#1089) so
--jsoncontracts (exit codes, error codes, events, on-disk state) live separately from human CLI output checks.Shared npm fixture/runners move to
npm_fixture.rs.vendor_failure_paths.rsdrops long English.containsasserts in favor of structured envelope fields (reasonvserror, specific event codes). Several scenarios are retargeted to current behavior (e.g. corrupt committed artifacts →vendor_redownload_failed/--offlineconflict; legacy ledger and missing lockfile → exit 1, not calm skips). Addspatch_target_absent_from_the_install_still_vendors(service tarball includes patched absent file). Unix fault-injection tests skip as root.Human summary/stderr tests move to
vendor_render.rs. Thevendortest binary inmain.rswires the new modules;scripts/ci-test-durations.jsonremovescovgap_commands_vendorand bumpsvendorduration (~7.77s → ~11.52s).Reviewed by Cursor Bugbot for commit cdd3949. Configure here.
Generated by Claude Code