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: cli suite tests assert codes, not sentences (#1089) by mikolalysenko · Pull Request #1565 · 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 (cli slice of child 6). The tracking issue stays open: covgap_commands_scan_mod.rs (#1560), covgap_commands_vex.rs (#1563), the update/ and scan/ covgap files, covgap_utils_socket_cli_config.rs and coverage_fix_scan_hosted_dryrun_vendored.rs remain for later slices.

Root cause

CLI tests pin English sentences and private helpers instead of the shared --json envelope readers in tests/common/envelope.rs. A copy edit to the org-fallback warning broke five tests at once, and the JSON runs only proved the behavior through the warning's prose.

What changed (test-only, plus one doc comment)

  • cli/covgap_api_client.rs → cli/api_client_org_fallback.rs. The five --json tests assert the api_auth_fallback code in warnings[] (and that its detail names --org) through common::envelope, plus the request log as before. Only the human run pins stderr text, one check per message family (org fallback + remedy, stored-hash hint + remedy, token-shape warning). The --json run still checks the warning prints once and isn't muted; --silent still checks it is. The private json_stdout copy is gone.
  • common/envelope.rs: new output_envelope(&Output), which panics with stdout and stderr, so a run that dies before printing JSON shows why.
  • cli/covgap_output.rs → cli/prompts_tty.rs (PTY render tests; fixtures renamed off "covgap", behavior unchanged).
  • cli/covgap_commands_list.rs → cli/list_render.rs; the vlt test reads the vendored purls via mode_events(&env, "vendored") instead of searching the envelope text.
  • socket-patch-core/src/api/client.rs: a doc comment points at the renamed suite.

Sentence (4+-word .contains) assertions in these files: 10 → 4, all in human/PTY render tests.

CI cost

Same cli test binary, no new job or workflow change. A lean PR run is unchanged: about 28 Linux jobs, about 8 min wall, same job-minutes before and after.

Test evidence

  • cargo test -p socket-patch-cli --all-features --test cli: 113 passed, 0 failed (same count as main).
  • cargo fmt --all -- --check: clean. cargo clippy --locked --workspace --all-features -- -D warnings: clean.
  • cargo clippy --test cli -- -D warnings reports the same 10 pre-existing lints in prebuilt_common/mod.rs and common/mod.rs on main and on this branch; none are in the changed files.
  • /code-review high ran on the diff. Fixed: warn-once count in --json, remedy in the warning detail, hint/shape remedy pins, stderr on parse failure, the --silent check matching message bodies, the stale doc comment. Not fixed: "empty start commit". It is the agent claim marker, and a squash merge drops it.
  • prompts_tty.rs is cfg(unix), so I dispatched one full-scope run on this branch to cover macOS.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AZa8HreenUM7a9mcyWuevm


Generated by Claude Code

Sorry, something went wrong.

Uh oh!

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

All reactions
@claude
Start fix for #1089 (cli slice)
63396fd
Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko Mikola Lysenko (mikolalysenko) added the ci-perf CI / merge-queue performance finding (profiler routine) label Oct 15, 2026
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 06:03
@claude
CI: cli suite tests assert codes, not sentences
8cf024b
The three covgap files in the cli test binary get names that say what
they cover: api_client_org_fallback.rs, prompts_tty.rs and
list_render.rs. A copy edit to the org-fallback warning no longer
breaks five tests: the --json runs now check the api_auth_fallback
warning code through common::envelope, and only the human run pins the
stderr text, once per message family. The vlt list test reads the
vendored purls from the envelope instead of searching its text.

Test-only; the cli binary and its CI job are unchanged.

Refs #1089

Assisted-by: Claude Code:claude-opus-5-5
@claude
CI: keep warn-once and remedy checks in --json
4c2517a
Review follow-up. The --json run checks again that the org fallback
warning is printed once, the api_auth_fallback detail must still name
the --org remedy, and the human run pins the hint's remedy line and the
token-shape reason. A run that dies before printing JSON now shows its
stderr, through a shared output_envelope helper. The core doc comment
points at the renamed suite.

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 06:18
@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 4c2517a. Configure here.

Sorry, something went wrong.

Uh oh!

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

All reactions
@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

Ready for review at 4c2517a.

  • CI: 281/281 run checks green, 51 skipped by path filters (332 total); no main-wide failures.
  • Bugbot: reviewed 4c2517a, no findings.
  • Reviewer note: test-only change (cli suite asserts error codes instead of message text, Tracking: assert stable codes instead of human sentences in CLI tests, and fold the covgap suites #1089).

Generated by Claude Code

All reactions

Sorry, something went wrong.

Uh oh!

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

@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Oct 15, 2026
CI performance dashboard #1182
Open
@mikolalysenko
Mikola Lysenko (mikolalysenko) enabled auto-merge October 15, 2026 08:32
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

Final review brief: #1565 at 4c2517a

What it does: It renames three covgap_* modules in the cli test binary to descriptive names (api_client_org_fallback, list_render, prompts_tty). The org-fallback --json tests now assert the api_auth_fallback warning code through the shared common::envelope readers instead of English sentences. The only production-crate edit is one doc-comment line inside #[cfg(test)] in api/client.rs.

Risk: low. The change is tests plus one comment, and nothing changes at runtime.

Look here:

  • api_client_org_fallback.rs:21:`` assert_api_auth_fallback. Its detail check at :32 now needs only `--org`.
  • api_client_org_fallback.rs:107:``` the human stderr test still pins the full sentence.
  • api_client_org_fallback.rs:191:```` the --silent mute check.
  • common/envelope.rs:22: the new output_envelope helper.
  • list_render.rs:317: the vlt test now pins exactly [PURL] among the mode == "vendored" events. This is stronger than the old text search.

Verified:

  • Read the full diff. CHANGELOG.md is untouched and there is no debug code.
  • No coverage was lost:
    • All 113 cli tests still exist and pass.
    • Every dropped --json stderr sentence is still pinned once by the human-mode test.
    • The fixture purl renames are self-contained.
    • prompts_tty stays #[cfg(unix)], as on main.
  • Ran locally:
    • cargo test -p socket-patch-cli --test cli: 113 passed.
    • cargo test -p socket-patch-core --lib api::client: 126 passed.
    • cargo fmt --check: clean.
    • Test-target clippy: only the existing lints in prebuilt_common/common that the description names, none in changed files.
  • CI: 100/100 checks green on this head, including ci-ok and clippy. Bugbot reviewed 4c2517a with no findings, per the burn-down's comment.

Changes I made: none.

Open questions (non-blocking):

  • The --json detail check no longer requires SOCKET_ORG_SLUG. The human test still pins it.
  • output_envelope repeats parse_json_envelope, and api_client_errors_e2e.rs keeps a private json_stdout copy. Both could be cleaned up in a later Tracking: assert stable codes instead of human sentences in CLI tests, and fold the covgap suites #1089 slice.

Auto-merge (squash) is armed, so approving sends this straight to the merge queue.


Generated by Claude Code

All reactions

Sorry, something went wrong.

Uh oh!

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

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 544df96 Oct 15, 2026
332 checks passed

Uh oh!

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

@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the agent/fix-ci-cli-envelope-asserts branch October 15, 2026 14:22
@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Oct 15, 2026
CI perf (settings): merge queue builds 5 entries at a time — a 13-PR burst took 100 min to drain on a 21-min CI run (~21 min per PR past the 5th) #1248
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

ci-perf CI / merge-queue performance finding (profiler routine) 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.