Skip to content

CI: remove cleanup test asserts JSON warnings (#1089) - #1669

Merged
Mikola Lysenko (mikolalysenko) merged 3 commits into
mainfrom
agent/fix-ci-remove-cleanup-json
Oct 22, 2026
Merged

Mikola Lysenko (mikolalysenko) merged 3 commits into
mainfrom
agent/fix-ci-remove-cleanup-json

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

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

Refs #1089 (the remove cleanup-warning follow-up of child 6, listed in
this comment; the tracking issue stays open)

Root cause

remove/remove_failure_paths.rs::remove_cleanup_failures_warn_not_fatal
was the one test in that behaviour file that still checked only human
stderr. remove --json reports each failed sweep as a
cleanup_failed run warning, and no test pinned that. Dropping one of
those warnings from the JSON envelope went unnoticed.

Change

  • remove_failure_paths.rs: the test now runs with --json and
    checks exit 0, status: success, exactly three cleanup_failed
    warnings with distinct details, summary.removed == 1, a removed
    event for the purl, no Warning: lines on stderr, and the manifest
    entry gone.
  • remove_render.rs: new remove_cleanup_failures_print_one_warning_per_store
    holds the human wording. It requires exactly one
    Warning: <store> cleanup failed: line for each of blob, diffs and
    packages.
  • remove_fixture.rs: plant_unsweepable_stores is the shared setup
    (one-entry manifest, the three stores planted as regular files).

No production code changes.

Testing

  • cargo test -p socket-patch-cli --all-features --test remove: 104 passed,
    0 failed. Main has 103; this adds the render test.
  • Red check: with the diffs/packages cleanup_warnings.push in
    commands/remove.rs replaced by a no-op, the new JSON test fails
    (left: ["cleanup_failed"], right: [... x3]). The old human-only test
    passes that mutation.
  • cargo fmt --all -- --check: clean.
  • cargo clippy -p socket-patch-cli --all-features --test remove -- -D warnings:
    nothing in the three changed files. Its other findings are already on
    main, in tests/common. CI's clippy command doesn't build tests.
  • CI on b021532 is green: 36 passed, 50 skipped (full-tier jobs), no failures. Bugbot found no issues.
  • No cfg(windows)/cfg(unix) code changed, so no full-scope run.

CI cost

Test-only change in an existing test binary. A lean PR run is the same
before and after: about 28 Linux jobs, about 8 minutes.

/code-review high findings

  • Fixed: the JSON test no longer splits the English detail to tell the
    stores apart (it requires three distinct details; the store names are
    checked in the render suite). It now checks summary.removed and the
    removed event. The render test builds its prefix once per store.
  • Not fixed, pre-existing: remove/rollback/scan gc label the passes
    blob/diffs/packages, while repair says blob/diff/package
    (commands/repair.rs ~606). Unifying that is a product wording change
    outside this test lane. The render test pins remove's current labels
    only.
  • Not fixed: other tests that plant .socket/blobs as a file
    (remove_failure_paths.rs test 15, rollback_fixture.rs) plant only
    that one store for a different failure, so they don't share this
    fixture.
  • Not fixed: the empty first commit is the agent claim protocol's marker;
    the PR is squash-merged.

https://claude.ai/code/session_01BBgeMt9M6fhppCmiia5uPg


Generated by Claude Code

Assisted-by: Claude Code:claude-opus-5-5
remove_cleanup_failures_warn_not_fatal only read human stderr, so
dropping a cleanup_failed warning from `remove --json` went unnoticed.
It now runs with --json and checks exit 0, status success, one
cleanup_failed warning per failed sweep (blob, diffs, packages), no
stderr warnings, and the manifest entry removed.

The human Warning: line check moves to remove_render.rs, which now
requires exactly one line per store. Both tests share a new
plant_unsweepable_stores fixture. No production code changes.

Refs #1089

Assisted-by: Claude Code:claude-opus-5-5
The --json cleanup test told the three warnings apart by splitting
their English detail, so a copy edit could fail it. It now only
requires three distinct details and leaves the store names to the
render suite. It also checks that the entry is still counted and
reported as removed when every sweep fails.

Refs #1089

Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko
Mikola Lysenko (mikolalysenko) marked this pull request as ready for review October 22, 2026 18:03
@mikolalysenko Mikola Lysenko (mikolalysenko) added Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review and removed Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review labels Oct 22, 2026
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

BugBot review


Generated by Claude Code

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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 b021532. Configure here.

@mikolalysenko Mikola Lysenko (mikolalysenko) added the Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review label Oct 22, 2026
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

Burn-down agent: labeled Ready for review at b021532.

  • CI: 86/86 settled green on b021532 (36 success, 50 skipped); no main-wide failures.
  • Merges cleanly with main.
  • Bugbot: reviewed b021532, no findings.
  • Test-only change (3 files under crates/socket-patch-cli/tests/remove/); already approved by a human reviewer.
  • Slack: not announced — no Slack send tool in this run; the next run retries.

Generated by Claude Code

@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

[final reviewer] Sent to the merge queue at 19:49 UTC: approved, ci-ok and clippy green on b021532, mergeable, no open threads.


Generated by Claude Code

Merged via the queue into main with commit 1fa04c7 Oct 22, 2026
86 checks passed
@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the agent/fix-ci-remove-cleanup-json branch October 22, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants