Skip to content

sweep: test hygiene (DW-561, DW-562, DW-566, DW-568) - #993

Merged
pbean merged 4 commits into
sweep/v7-sweep-store-dw-556-571from
sweep/test-hygiene-dw-561-568
Oct 19, 2026
Merged

pbean merged 4 commits into
sweep/v7-sweep-store-dw-556-571from
sweep/test-hygiene-dw-561-568

Conversation

@pbean

@pbean pbean commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

What

Test hygiene: real-mux E2E tmux server cleanup, an ungated generic-tmux probe, a manifest-redirect test that now reaches its write, and an -n logical mux-registry flake. Test-only, so no CHANGELOG entries.

bmad-loop sweep commits, one per ledger entry:

  • DW-561 — real-mux E2E tests no longer leave the default tmux server alive in a deleted cwd
  • DW-562 — make the manifest-redirect test actually reach the manifest write
  • DW-566 — fix the -n logical _OtherRegistryMux flake in tests/test_cli.py
  • DW-568 — stop an ungated test_generic_tmux.py test probing the default tmux server

Notes

These sweeps ran on fix/run-dir-confined-records after #960 merged. They have been moved onto main and grouped by theme into a 4-PR stack. The sweep commits are unchanged apart from their order and per-commit CHANGELOG hunks; a final docs commit tightens the sweep-written CHANGELOG/FEATURES text. Review and merge bottom-up.

Summary by CodeRabbit

  • Tests
    • Improved isolation and cleanup for tmux-based checks, reducing the chance of affecting existing tmux sessions.
    • Expanded coverage for tmux safeguards, crash handling, and migration-manifest writes.
    • Added checks that tmux-based tests use the isolated server and that it is shut down after use.
  • Documentation
    • Updated the testing guide with instructions for isolated tmux testing and related safeguards.

@pbean
pbean added this pull request to stack #994 October 19, 2026 02:36
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 295ab9a4-82bd-4511-ae02-7476daaf865a
📥 Commits

Reviewing files that changed from the base of the PR and between 1ef7873 and 290fced.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 329ee014-a990-4992-b436-989e56d35e48
📥 Commits

Reviewing files that changed from the base of the PR and between 1dce9ac and 1ef7873.

📒 Files selected for processing: 8
  • tests/conftest.py
  • tests/test_conftest.py
  • tests/test_generic_tmux.py
  • tests/test_stories_e2e.py
  • tests/test_sweep.py
  • tests/test_tickets_e2e.py
  • tests/test_tmux_locale_e2e.py
  • tests/test_tui_launch_tmux_e2e.py

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

Walkthrough

The changes add a private tmux server fixture and apply it to real-tmux tests. New checks detect tmux-gated tests without private-server setup and verify multiplexer imports. The testing guide documents the fixture. A migration manifest redirection test changes its redirect timing and assertions.

Changes

Private tmux test isolation

Layer / File(s) Summary
Private tmux server fixture
tests/conftest.py, docs/testing.md
Test setup imports modules that bind the multiplexer and provides a per-test private socket fixture. The fixture clears inherited tmux variables and checks explicit-socket teardown. The guide describes the fixture and its guard.
Private-server and import guards
tests/test_conftest.py
AST checks identify tmux-gated tests without private-server setup. Integration and import checks verify private socket isolation, shutdown, and multiplexer bindings.
Apply private server to tmux tests
tests/test_generic_tmux.py, tests/test_stories_e2e.py, tests/test_tickets_e2e.py, tests/test_tmux_locale_e2e.py, tests/test_tui_launch_tmux_e2e.py
Real-tmux tests use the fixture for isolation, queries, or teardown. The budget grace-expiry test checks that its crash path issues no tmux or psmux commands.

Migration manifest redirection test

Layer / File(s) Summary
Manifest write redirection test
tests/test_sweep.py
The test redirects the run-directory parent after stale-record cleanup. It checks that the baseline and manifest paths reach the confined-write helper, that the manifest write is refused, and that no migration session is dispatched.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Suggested reviewers: dracic

Merge Risk: ⚪ Minimal · up to 1ef78

The test-isolation changes appear mergeable after normal checks; no actionable merge-blocking risk was identified.

Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Inconclusive Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 6 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title accurately identifies the changes as a test-hygiene sweep and includes the related work-item IDs. It is concise and consistent with the test isolation, reachability, flake, and gating change…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title accurately identifies the changes as a test-hygiene sweep and includes the related work-item IDs. It is concise and consistent with the test isolation, reachability, flake, and gating changes.

Full details: Docstring Coverage

Explanation

Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 6 files. (2 skipped: 2 too large.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the socket door,
No stray old server waits outdoors.
Tests follow paths both clear and tight,
Then close the server for the night.
The manifest gets one careful scan,
And hops away, as rabbits can.

Comment @coderabbitai help to get the list of available commands.

@pbean pbean changed the title sweep/test hygiene dw 561 568 sweep: test hygiene (DW-561, DW-562, DW-566, DW-568) Oct 19, 2026
@pbean
pbean force-pushed the sweep/test-hygiene-dw-561-568 branch from bab2d69 to 59e0877 Compare October 19, 2026 05:10
@pbean
pbean force-pushed the sweep/test-hygiene-dw-561-568 branch 4 times, most recently from 1ef7873 to 28160ce Compare October 19, 2026 08:47
@pbean

pbean commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T09:02:52.549873Z 28160ce Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 28160ce27e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pbean
pbean force-pushed the sweep/test-hygiene-dw-561-568 branch from 28160ce to 290fced Compare October 19, 2026 09:08
@pbean
pbean merged commit 5624519 into main Oct 19, 2026
17 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant