This repository was archived by the owner on Sep 22, 2026. It is now read-only.
Repository navigation
test: assert the channel-link contract once instead of four times - #1554
Merged
Merged
Conversation
|
Warning Review limit reachedNext included review available in 20 minutes. View limit detailsLimit details: You’ve used all 2 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: mozilla-ai/clawbolt/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
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. Comment |
njbrake
force-pushed
the
simplify/10-frontend-generated-types
branch
from
September 21, 2026 15:12
1e430a6 to
864da2c
Compare
njbrake
force-pushed
the
simplify/11-test-consolidation
branch
from
September 21, 2026 15:12
8535dfd to
312b5e2
Compare
njbrake
force-pushed
the
simplify/10-frontend-generated-types
branch
from
September 21, 2026 18:47
864da2c to
1cfcd65
Compare
njbrake
force-pushed
the
simplify/11-test-consolidation
branch
from
September 21, 2026 18:47
312b5e2 to
21369f4
Compare
7 of 8 tasks
njbrake
force-pushed
the
simplify/10-frontend-generated-types
branch
from
September 21, 2026 18:49
1cfcd65 to
2e3f2d3
Compare
njbrake
force-pushed
the
simplify/11-test-consolidation
branch
from
September 21, 2026 18:49
21369f4 to
cb0774d
Compare
njbrake
force-pushed
the
simplify/10-frontend-generated-types
branch
from
September 21, 2026 19:00
2e3f2d3 to
245bcea
Compare
njbrake
force-pushed
the
simplify/11-test-consolidation
branch
from
September 21, 2026 19:00
cb0774d to
9af0d19
Compare
njbrake
force-pushed
the
simplify/10-frontend-generated-types
branch
from
September 21, 2026 19:10
245bcea to
063ef19
Compare
njbrake
force-pushed
the
simplify/11-test-consolidation
branch
from
September 21, 2026 19:10
9af0d19 to
b9b0ded
Compare
njbrake
force-pushed
the
simplify/10-frontend-generated-types
branch
from
September 21, 2026 19:18
063ef19 to
c71a8aa
Compare
njbrake
force-pushed
the
simplify/11-test-consolidation
branch
from
September 21, 2026 19:19
b9b0ded to
6bbd533
Compare
Base automatically changed from
simplify/10-frontend-generated-types
to
main
September 21, 2026 19:29
Telegram, Linq, BlueBubbles, and Twilio expose the same GET / PUT / DELETE contract over one identifier, and the file spelled all of it out four times: 61 test functions, of which 36 were the same nine tests with a different path and field name. The shared contract is now one class parametrized over the four channels, and each channel keeps a class for its own format rules (numeric ids for Telegram, E.164 for Linq and Twilio, E.164 or an iCloud email for BlueBubbles). ids=str keeps failure attribution per channel. Same 61 cases collected, 338 fewer lines, and two assertions gained: Telegram, Linq, and BlueBubbles pick up the `connected is True` check on a linked GET that only Twilio had, and Twilio's remove-when-not-linked test picks up the null-identifier check the other three had. CHANNEL_CASES is the only roster of link-capable channels, so a channel added to the router and not to the table would ship with no contract coverage and a green build. One test now compares the table against the router's own link endpoints. Fields are passed by keyword: three of the five are same-typed strings, and reordering them would silently repurpose which value stands for "already claimed by another user". Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
njbrake
force-pushed
the
simplify/11-test-consolidation
branch
from
September 21, 2026 19:29
6bbd533 to
a7a7a6f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Fifth of six stacked PRs. Targets #1553.
Telegram, Linq, BlueBubbles, and Twilio expose the same GET / PUT / DELETE contract over one identifier.
test_channels_router.pyspelled all of it out four times: 61 test functions, of which 36 were the same nine tests with a different path and field name.The shared contract is now one class parametrized over the four channels. Each channel keeps a class for its own format rules: numeric ids for Telegram, E.164 for Linq and Twilio, E.164 or an iCloud email for BlueBubbles.
ids=strkeeps failure attribution per channel.Same 61 cases collected, 338 fewer lines, and two assertions gained: Telegram, Linq, and BlueBubbles pick up the
connected is Truecheck on a linked GET that only Twilio had, and Twilio's remove-when-not-linked test picks up the null-identifier check the other three had.CHANNEL_CASESis the only roster of link-capable channels, so a channel added to the router and not to the table would ship with no contract coverage and a green build. One test compares the table against the router's own link endpoints.Type
Checklist
uv run pytest -v): 4268 passed, 6 skippedruff check backend/ && ruff format --check backend/)AI Usage
🤖 Generated with Claude Code