GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CI: update tests assert codes, not sentences (#1089) by mikolalysenko · Pull Request #1580 · SocketDev/socket-patch

Conversation

@mikolalysenko

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

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

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

Refs #1089 (update slice of child 6; the issue stays open for the scan/ covgap files and the core crate's covgap_* 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:

Old New
covgap_commands_update.rs already-latest --json update/update_json_contracts.rs: skipped/already_latest event, details.current/latest, non-empty reason, summary, warnings omitted, assert_envelope_invariants; the reason sentence assert is gone
covgap_commands_update.rs pin-to-current (human) update_json_contracts.rs with --json: one skipped event, dryRun:false, zero network, notifier cache not written; plus one wording check in update/update_render.rs
covgap_commands_update.rs human dry-runs + PTY decline update/update_render.rs, one check per message family
covgap_update_swap.rs (asserted Updated socket-patch) update_json_contracts.rs with --json: downloaded + updated events (from/to), plus the same disk, inode and lock-file proofs
covgap_update_download.rs self_update_failures_e2e.rs::asset_server_error_is_download_failed, next to its 404 sibling

DEAD_ENDPOINT moves into tests/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.
  • This PR moves tests, so there is no red→green regression test. The moved checks cover the same paths as before, and the pinned and unlocked-swap paths now also check their --json envelope.

/code-review high findings

Fixed: the bare "500" match (it could hit the mock's port), the missing reason check, the pinned test's missing dryRun/summary checks, DEAD_ENDPOINT placement, and the render-suite doc.
Not fixed:

  • Pinned no-op reports already_latest with latest = <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.
  • The hand-written 500 wiremock mock should become a FakeReleaseBuilder option. 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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@claude
Start update slice of #1089
56de51e
Assisted-by: Claude Code:claude-opus-5-5
This was referenced Oct 15, 2026
Tracking: assert stable codes instead of human sentences in CLI tests, and fold the covgap suites #1089
Open
Swarm health manager log #1382
Open
Claude (claude) added 2 commits October 15, 2026 16:04
@claude
Update tests assert codes, not sentences
01ead20
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
@claude
Tighten update JSON checks from review
9dd5b35
- 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
@mikolalysenko
Mikola Lysenko (mikolalysenko) marked this pull request as ready for review October 15, 2026 16:10
@mikolalysenko Mikola Lysenko (mikolalysenko) added the Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review label Oct 15, 2026
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

BugBot review


Generated by Claude Code

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Oct 15, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

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 9dd5b35. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Tanmay182003
Tanmay Singla (Tanmay182003) approved these changes Oct 15, 2026
View reviewed changes
@mikolalysenko
Mikola Lysenko (mikolalysenko) added this pull request to the merge queue Oct 15, 2026
Merged via the queue into main with commit 4cc50f4 Oct 15, 2026
86 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the agent/fix-ci-update-envelope-asserts branch October 15, 2026 16:58
This was referenced Oct 15, 2026
CI: scan suite covgap files get real homes (#1089) #1583
Merged
CI: core covgap tests join their suites (#1089) #1585
Merged
CI performance dashboard #1182
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@Tanmay182003 Tanmay Singla (Tanmay182003) Tanmay182003 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mikolalysenko @Tanmay182003 @claude
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.