Skip to content

test(hooks): fix stale docstring in worktree-port-collision fixture#1971

Merged
wrsmith108 merged 2 commits into
mainfrom
fix/smi-5748-port-collision-fixture
Jul 20, 2026
Merged

test(hooks): fix stale docstring in worktree-port-collision fixture#1971
wrsmith108 merged 2 commits into
mainfrom
fix/smi-5748-port-collision-fixture

Conversation

@wrsmith108

Copy link
Copy Markdown
Member

Business Summary

What shipped: A test-fixture docstring that claimed to "match the real generator's shape" was corrected — it no longer does, since an earlier cleanup deleted the service that shape referred to. Investigated the alternative fix (shrinking the fixture to match) and found it would have silently reduced test coverage, so kept the wider shape and documented why instead.

Quality bar: Plan-reviewed (no blockers) with an independent trace through the actual collision-detection code confirming the reasoning. No functional change — still 22/22 tests passing, same port values.

Net result: Fully shipped, no follow-up (this file's own CI-wiring gap is tracked separately under SMI-5771).


Technical detail

scripts/tests/worktree-port-collision.test.sh — rewrote write_fixed_override's docstring to explain why it intentionally still emits a 4th "orchestrator" port slot (no such service exists anymore) rather than shrinking to match the real generator's current 3-port output: the collision-check loop it tests still reserves and checks the full 4-port bucket width regardless of what a real override populates, so shrinking the fixture would drop coverage of that reserved slot. Added an inline comment at the fixture body's fictional orchestrator: block so this is visible without reading the docstring 14 lines above.

Fixes SMI-5748.

wrsmith108 and others added 2 commits July 19, 2026 20:03
write_fixed_override's docstring claimed its 4 port lines 'match the real
generator's shape' -- no longer true since SMI-5719 deleted the
orchestrator service and the real generator now only ever writes 3
ports. Investigated whether to shrink the fixture to match (the Linear
issue's other proposed fix) instead: traced through
_resolve_worktree_port_offset's collision-check loop and confirmed it
still reserves and checks all 4 slots in a bucket regardless of what a
real override populates, so shrinking would silently drop test coverage
for the reserved-but-currently-unwritten 4th slot.

Fixed the docstring instead, plus an inline comment at the fictional
orchestrator: block so the fixture's intent is visible at the point of
use, not just 14 lines above in the docstring. No functional change --
still 22/22 tests passing, no port values changed.

Fixes SMI-5748
Co-Authored-By: claude-flow <ruv@ruv.net>
Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

E2E Test Results

E2E Test Results - July 20, 2026

Summary

  • Status: ✅ PASSED
  • Total Duration: 0.00s
  • Generated: 2026-07-20T05:20:47.301Z

Test Results

Phase Status Duration
CLI E2E ⏭️ Skipped -
MCP E2E ⏭️ Skipped -

Generated by skillsmith E2E test suite

@wrsmith108
wrsmith108 merged commit c21b72a into main Jul 20, 2026
34 checks passed
@wrsmith108
wrsmith108 deleted the fix/smi-5748-port-collision-fixture branch July 20, 2026 23:49
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