0344971
refactor: put webhook tests in their own file
Phillip Davis created
0344971
refactor: put webhook tests in their own file
Phillip Davis created
0ade5d1
apply-hotfix: amend msg fallback logic
Phillip Davis created
7e4ceb6
apply-hotfix: early exit for some inbound
Phillip Davis created
c4a5a62
apply-hotfix: dont add empty text bodies
Phillip Davis created
628ed0d
apply-hotfix: relocate deduplication of group msgs
Phillip Davis created
3dfa8c7
apply-hotfix: shuffle handling of message-failed
this does not change any functionality, it removes a case where we initially lie about which values is `others_num`
Phillip Davis created
e9249f4
remove inactive `case jparams['type']` branches
these types do not exist in V2, which can be verified either by the reading the bandwidth docs here[0] or by reading the commit message of cd6e0df [0]: https://dev.bandwidth.com/docs/messaging/webhooks/#inbound-message-webhooks
Phillip Davis created
46e6b93
remove pry-stack_explorer
pry-byebug explicitly says that pry-stack_explorer is incompatible
Phillip Davis created
d16f235
enhancement: -j/--json flag
Phillip Davis created
782205a
backport: dont run handlers after message :error?
Phillip Davis created
e5254af
Merge branch 'emit-resends-as-resends' of https://git.secluded.site/sgx-bwmsgsv2
* 'emit-resends-as-resends' of https://git.secluded.site/sgx-bwmsgsv2: Emit ResendIn event when replaying inbound messages
Stephen Paul Weber created
0d3b089
Merge branch 'incorporate-first-round-of-hotfixes' of https://git.secluded.site/sgx-bwmsgsv2
* 'incorporate-first-round-of-hotfixes' of https://git.secluded.site/sgx-bwmsgsv2: fix: make sure ARGV[0] is set for all tests fix: don't call `from=` on StanzaError fix: Message::Base.media_urls is always an array fix: correct for dedup in message event fix: webhook tests need to stub component's `write` fix: webhooks expect top-level 'to' fix: response_handler wants unescaped strings fix: don't stop reactor if test
Stephen Paul Weber created
d5b108f
Add event viewer script
Amolith created
6ed61f9
Emit ResendIn event when replaying inbound messages
Add a ResendIn message event type that records the original stream ID and bandwidth ID without duplicating body or media fields. The webhook handler emits this event instead of a normal In event when the X-JMP-Resend header is present.
Amolith created
980b24a
fix: make sure ARGV[0] is set for all tests
Phillip Davis created
b773ad3
fix: don't call `from=` on StanzaError
Phillip Davis created
78c4b9c
fix: Message::Base.media_urls is always an array
Phillip Davis created
851699e
fix: correct for dedup in message event
Phillip Davis created
234b65f
fix: webhook tests need to stub component's `write`
Phillip Davis created
e87a1cc
fix: webhooks expect top-level 'to'
Phillip Davis created
d49eae1
fix: response_handler wants unescaped strings
except we also unescape each individual tag part?
Phillip Davis created
1ea7964
fix: don't stop reactor if test
each test runs on its own reactor. stopping it means that `assert`s are never called, which meant that gateway shutdown was counted as test success. no bueno!
Phillip Davis created
34f259b
Add resend-inbounds script for replaying messages from Redis
Amolith created
d51ed18
Fix editorconfig
Stephen Paul Weber created
eebff0f
pin blather to better-ids branch
includes the same fix as better-feature-order
Phillip Davis created
ace95df
Add .gitignore
Phillip Davis created
cecd219
Add .editorconfig
so I stop accidentally blowing it away
Phillip Davis created
8bba5ad
fix: monkeypatch URI.escape, for now
pending bigger move to newer Ruby version which supports Gems that don't rely on old, broken APIs from the stdlib
Phillip Davis created
68a0ab4
Merge branch 'catch-errors-from-at-least-bandwidth' of https://git.secluded.site/sgx-bwmsgsv2
* 'catch-errors-from-at-least-bandwidth' of https://git.secluded.site/sgx-bwmsgsv2: Adopt cmd error handling like sgx-jmp
Stephen Paul Weber created
7fefb47
Owner more often etc
Stephen Paul Weber created
ccff41b
From and to do not need to be phone numbers
Might be short codes for example
Stephen Paul Weber created
22acdfe
Fix because we require synchrony now
Stephen Paul Weber created
ee1ac92
Merge branch 'emit-messages-to-event-stream' of https://git.secluded.site/sgx-bwmsgsv2
* 'emit-messages-to-event-stream' of https://git.secluded.site/sgx-bwmsgsv2: Separate message_id into bandwidth/stanza IDs, make timestamp optional Switch from ValueSemantics to normal OOP Ruby Use stream name in example Remove unused wait_for Pin ruby-bandwidth-iris to ~> 2.7 Add Redis stream trim example Emit messages and statuses to Redis stream
Stephen Paul Weber created
484bb55
Fixa already broken test + 1 new test fix
- The first commit was broken since it didn't include the `with_stubs`
helper
- The second one was included in a previous patchset but I'm including
it as a standalone to get upstream tests 'fixed.' Apparnetly this test
reliably passed without stubbing TnOptiions.get, but clearly it should
be stubbed or mocked.
The following changes since commit 710dfae450ea52a53a46f92776451e9e3f1afa19:
Merge branch '380-conditionally-show-command' of https://git.secluded.site/sgx-bwmsgsv2 (2025-10-22 09:49:51 -0500)
are available in the Git repository at:
test_fixes
for you to fetch changes up to 23cca00d8274c7f8bf808d5f0af6993369c7a76d:
fix `test_port_out_pin` (2026-01-31 10:17:03 -0500)
----------------------------------------------------------------
Phillip Davis (2):
fix: handle 404 in tn_eligible_for_port_out_pin?
fix `test_port_out_pin`
lib/bandwidth_tn_options.rb | 8 +++++++-
test/test_bandwidth_tn_options.rb | 19 +++++++++++++++++++
test/test_component.rb | 34 ++++++++++++++++++++++++----------
test/test_helper.rb | 11 +++++++++++
4 files changed, 61 insertions(+), 11 deletions(-)
create mode 100644 test/test_bandwidth_tn_options.rb
Phillip Davis created
a0b76cc
Adopt cmd error handling like sgx-jmp
So it doesn't fall over on errors and we have to rely on a supervisor to bring it back up a couple minutes after. This also adds Sentry error reporting, only tested with the mock, not with actual GlitchTip.
Amolith created
324d4e3
Separate message_id into bandwidth/stanza IDs, make timestamp optional
Having both bandwidth and stanza IDs would be useful instead of only ever capturing one. With both, message_id becomes redundant. Use provided timestamp everywhere, don't generate a timestamp when one's not provided and instead just rely on the event ID from redis, because stream IDs are timestamps.
Amolith created
d71aff8
Switch from ValueSemantics to normal OOP Ruby
The more I tried to clean up and improve the use of ValueSemantics, the more I came to the conclusion it would either have way too much duplication or deduplicating would be too messy and complex.
Amolith created
0e03f2d
Tidy test deps
- depend on Amolith's fork of Rantly. Fix has moved into upstream but requires jump to Ruby 3.3; should do eventually, but 3.3 isn't even packaged in our Guix commit. - pin to same Rubocop version as sgx-jmp. - pry-byebug
Phillip Davis created
4f2f3b1
Add 'csv' and 'mutex_m' to Gemfile
Some dependencies or other depend on them, but don't add them to their Gemfile. However, they were removed from the stdlib in later Ruby versions, so things break if we don't explicitly include them.
Phillip Davis created
752795f
fix: handle 404 in tn_eligible_for_port_out_pin?
Phillip Davis created
7505075
Use stream name in example
Amolith created
c3975c3
Remove unused wait_for
I refactored away how I was using it before committing 51d5802e2782f49f6ade16e36d0caf599a9020ef, then forgot to remove it.
Amolith created
5736b88
Pin ruby-bandwidth-iris to ~> 2.7
Version 2.7.0 added TnOptions endpoints needed for port-out PIN functionality. The lock file had 1.0.2 which predates that feature.
Amolith created
aa48bfa
Add Redis stream trim example
Amolith created
51d5802
Emit messages and statuses to Redis stream
- in: inbound message-received - out: outbound after successful Bandwidth API call - thru: pass-through XMPP-to-XMPP messages - delivered: message-delivered callback - failed: message-failed callback Implements: https://todo.sr.ht/~singpolyma/soprani.ca/517 Implements: https://todo.sr.ht/~singpolyma/soprani.ca/518
Amolith created
710dfae
Merge branch '380-conditionally-show-command' of https://git.secluded.site/sgx-bwmsgsv2
* '380-conditionally-show-command' of https://git.secluded.site/sgx-bwmsgsv2: refactor: only show port-out cmd if tn eligible
Stephen Paul Weber created
a953751
refactor: only show port-out cmd if tn eligible
References: https://todo.sr.ht/~singpolyma/soprani.ca/380 Co-authored-by: Crush <crush@charm.land>
Amolith and Crush created
16170c6
Merge branch '380-set-port-out-pin' of https://git.secluded.site/sgx-bwmsgsv2
* '380-set-port-out-pin' of https://git.secluded.site/sgx-bwmsgsv2: chore: swap StandardError/RuntimeError, simplify feat: let users set their port-out PIN chore: update rubocop names test: rescue NameError chore: add missing webrick dependency
Stephen Paul Weber created
97a38ec
chore: swap StandardError/RuntimeError, simplify
Amolith created
fe75c33
feat: let users set their port-out PIN
Amolith created