Repository navigation
CI: update tests assert codes, not sentences (#1089) - #1580
Merged
Mikola Lysenko (mikolalysenko) merged 3 commits intoOct 15, 2026
Merged
Conversation
Assisted-by: Claude Code:claude-opus-5-5
This was referenced Oct 15, 2026
The self-update covgap tests pinned English sentences, so a copy edit to an update message broke tests that were really about behavior. - update_json_contracts.rs: the already-latest and pin-to-current no-ops and the unlocked swap now read the --json envelope (event actions, already_latest code, from/to details) plus disk state. - update_render.rs: the human wording (pinned already-there, both dry-run reports, the PTY reinstall decline), one check per message. - The download_failed 500 test joins its 404 sibling in self_update_failures_e2e.rs. No covgap files remain in the update suite. Refs #1089. Assisted-by: Claude Code:claude-opus-5-5
- The 500 test matches "returned 500" again: a bare "500" could hit the mock server's random port. - The already-latest event must still carry a non-empty reason. - The pinned no-op checks dryRun and summary like its sibling, and no longer pins already_latest/latest for a pin (a pin says nothing about the latest release). - DEAD_ENDPOINT lives in update_fixture for both update files. Refs #1089. Assisted-by: Claude Code:claude-opus-5-5
Mikola Lysenko (mikolalysenko)
marked this pull request as ready for review
October 15, 2026 16:10
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 9dd5b35. Configure here.
Tanmay Singla (Tanmay182003)
approved these changes
Oct 15, 2026
Mikola Lysenko (mikolalysenko)
deleted the
agent/fix-ci-update-envelope-asserts
branch
October 15, 2026 16:58
This was referenced Oct 15, 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 (
updateslice of child 6; the issue stays open for thescan/covgap files and the core crate'scovgap_*files)Summary
The three
update/covgap_*files pinned English sentences, and their names kept "covgap" as a test category. This PR moves each test to a named home:covgap_commands_update.rsalready-latest--jsonupdate/update_json_contracts.rs:skipped/already_latestevent,details.current/latest, non-emptyreason, summary,warningsomitted,assert_envelope_invariants; the reason sentence assert is gonecovgap_commands_update.rspin-to-current (human)update_json_contracts.rswith--json: one skipped event,dryRun:false, zero network, notifier cache not written; plus one wording check inupdate/update_render.rscovgap_commands_update.rshuman dry-runs + PTY declineupdate/update_render.rs, one check per message familycovgap_update_swap.rs(assertedUpdated socket-patch)update_json_contracts.rswith--json:downloaded+updatedevents (from/to), plus the same disk, inode and lock-file proofscovgap_update_download.rsself_update_failures_e2e.rs::asset_server_error_is_download_failed, next to its 404 siblingDEAD_ENDPOINTmoves intotests/common/update_fixture.rs. No product code changes.CI cost: test-only. Lean PR run is unchanged: the same suites and job count, and the same test count (2 tests become 4 checks, all zero-network or local wiremock, under a second each).
Test evidence
cargo test -p socket-patch-cli --all-features --test update --test self_update_failures_e2e --test self_update_e2e: 63 + 38 + 30 passed.cargo fmt --all -- --check,cargo clippy --locked --workspace --all-features -- -D warnings: clean.--jsonenvelope./code-review high findings
Fixed: the bare
"500"match (it could hit the mock's port), the missingreasoncheck, the pinned test's missingdryRun/summary checks,DEAD_ENDPOINTplacement, and the render-suite doc.Not fixed:
already_latestwithlatest = <pin>. That is product behavior. This PR no longer asserts that code or field for the pinned path, so it doesn't lock them in. Whether the pinned envelope should use a different code is a product decision for a separate issue.FakeReleaseBuilderoption. It was moved verbatim from the covgap file. Adding a builder option would widen this PR for one caller.🤖 Generated with Claude Code
https://claude.ai/code/session_017tesJSyAELgQJ9X4mF2mWn
Generated by Claude Code