Repository navigation
CI: repair suite asserts codes, not sentences (#1089) - #1539
Merged
Mikola Lysenko (mikolalysenko) merged 3 commits intoOct 14, 2026
Merged
Conversation
Assisted-by: Claude Code:claude-opus-5-5
14 tasks
The repair suite's covgap tests pinned English sentences in --json mode and kept private parse_env/events_of readers, so a copy edit to a repair message broke them even when the exit code, error code, events and bytes on disk were unchanged. The --json tests now read envelopes through common::envelope and check error codes, events and disk state; a message is read only for what it must name (a flag, a patch uuid, state.json). The files move into the repair suite: repair_render.rs (human output), repair_vendor_failure_paths.rs and repair_vendor_predelete.rs. The private-reader ratchet now also catches parse_env/events_of. Refs #1089. Assisted-by: Claude Code:claude-opus-5-5
Moves repair_vendor_e2e and repair_vendor_flavors_e2e (and its vlt module) onto common::envelope, so the whole repair suite reads envelopes one way and neither needs a ratchet exemption. Where several repair arms share one errorCode (vendor_uuid_mismatch, vendor_artifact_unrepairable), the tests again check the short phrase that says which arm fired, kept in named constants, so a regression that routes an entry through the wrong arm still fails. The render suite keeps its "All blobs are present locally." check, and the cleanup-failure skip is checked for its "diff" label. The ratchet's self-test now covers the parse_env/events_of names. Assisted-by: Claude Code:claude-opus-5-5
Mikola Lysenko (mikolalysenko)
marked this pull request as ready for review
October 14, 2026 16:40
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 4eae757. Configure here.
Tanmay Singla (Tanmay182003)
approved these changes
Oct 14, 2026
Mikola Lysenko (mikolalysenko)
deleted the
agent/fix-ci-repair-envelope-asserts
branch
October 14, 2026 18:01
This was referenced Oct 14, 2026
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 (child 2, repair slice)
Problem
The repair suite's covgap files pin English sentences in
--jsonmode (
e["error"].contains("no manifest record for patch"), …) andkeep private
parse_env/events_ofenvelope readers, so a copy editto a repair message breaks them even when the exit code, error code,
events and bytes on disk are unchanged.
Change (test-only)
repair/covgap_commands_repair_vendor.rs→repair/repair_vendor_failure_paths.rs:reads envelopes through
common::envelope; assertserrorCodes,events and disk state. A message is read only for a token it must
name (a flag, a uuid,
state.json), or, where several arms shareone code, the short phrase that says which arm fired. Those phrases
live in named constants (
ARM_MOVED_ON,ARM_STALE_UUID,ARM_BAD_IDENTITY) so they can go once the arms get codes of their own.repair/covgap_commands_repair.rs→repair/repair_render.rs, therepair render suite (human output, sentence checks kept); its one
--jsonleg moves ontocommon::envelope.repair/coverage_fix_repair_vendor_predelete.rs→repair/repair_vendor_predelete.rson
common::envelope.repair/repair_vendor_e2e.rs,repair/repair_vendor_flavors_e2e.rsand
repair_vendor_flavors_e2e/vlt.rsdrop their private readers forcommon::envelope, so no repair file needs a ratchet exemption.parse_env/events_ofjoin the private-reader names, withpositive and negative self-test cases.
apply/in_process_gem_fallback_home.rs(the apply suite, not thisslice) defines a
parse_envand is listed as pending.covgap_commands_vendor.rs(the rest of child 2) stays for a later slice.Test evidence
cargo test -p socket-patch-cli --all-features --test repair: 129/129pass as a non-root user. As root, two chmod-based tests
(
repair_cleanup_failure_is_reported_in_json_and_silent_modes,repair_exits_zero_and_stays_quiet_when_lock_file_unremovable) failbecause root ignores the read-only dir; neither is changed here and
both pass non-root.
cargo test … --test cli envelope: 16/16 pass (ratchet + self-tests).cargo fmt --all -- --check,cargo clippy --locked --workspace --all-features -- -D warnings,cargo check --locked --workspace --all-targets --all-features: clean.Code review (/code-review high)
Fixed: arm discrimination for the shared
vendor_uuid_mismatch/vendor_artifact_unrepairablecodes (4 findings), the two repairfiles left on private readers, untested ratchet names, the dropped
render-suite blob summary check, the weakened
difflabel check, anda stale module doc.
Not fixed here:
repair_invariants.rsstill reads one--jsonmessage (
"mutually exclusive"); it was outside the covgap files thisslice moves and goes with the next #1089 slice.
CI cost
Test-only, no workflow changes. A lean PR run keeps the same job count
and minutes (about 28 Linux jobs, ~8 min wall), before and after.
🤖 Generated with Claude Code
https://claude.ai/code/session_01KPaZwe1urf5BTu41J38V4N
Generated by Claude Code