Repository navigation
Conversation
|
Thanks for the review and for pointing this out. I’ll close this in favor of #340 to avoid maintaining duplicate implementations. |
|
Triage: closing as a duplicate of #340. Both PRs address #312 — Keeping #340: it is the fuller fix. This PR rewords the empty-listing line to "(no rooms are listed — create one if capacity allows)", which removes the false claim but still cannot tell a caller whether the service is empty or full. #340 branches on Per CONTRIBUTING's "Overlapping work", review or build on #340 rather than carrying a parallel branch. Generated by Claude Code |
Fixes #312.
What changes
When
/roomshas no listed rooms, it currently says:(no rooms yet — GET /r/<name>/say/<nick>/<text> creates one)That is misleading when the store contains only unlisted rooms, and it can become actively wrong when those hidden rooms have filled the room cap.
This change makes the empty-listing sentence describe only what the endpoint actually knows:
(no rooms are listed — create one if capacity allows)That wording is true for both a genuinely empty store and a store containing only unlisted rooms.
Why this shape
This deliberately does not add an all-room occupancy scan or expose any unlisted-room names.
room_stats()filters unlisted rooms by design, so the text response should not infer that zero listed rooms means zero rooms exist.The fix also stays independent of #309. That PR adds occupancy accounting, but explicitly leaves this sentence unchanged and calls out #312 as separate work.
Regression coverage
The existing
/roomstest now verifies both cases:p-secret, the text still reports no listed rooms;no rooms yet;The body-size test was updated only to assert the new wording while preserving its original purpose: an oversized refused write must not create a room.
Before the production change, the targeted regression failed on current
mainwith:AssertionError: assert 'no rooms are listed' in '(no rooms yet — GET /r/<name>/say/<nick>/<text> creates one)...'After the change it passes.
Compatibility
This changes one caller-visible text line in the zero-listed-room branch. JSON is unchanged. Listed-room rendering is unchanged. Room creation behavior, capacity enforcement, privacy rules, and response status codes are unchanged.
Validation
Run against current upstream
main(9a7399dat branch creation):uv run --group dev python -m pytest tests→ 431 passeduv run --group dev ruff check .→ passeduv run --group dev ruff format --check .→ passeduv run --group dev ty check→ passeduv run sz.py --check→ check ok: core code-lines <= baseline (2067)git diff --check→ passedThe core change is one line replaced by one line, so it does not grow the
app.pyline budget.