wallet_client_spec.rb |
518 |
No-broadcaster + accept_delayed_broadcast: false |
Replace with raises-WalletError spec |
wallet_client_spec.rb |
544 |
No-broadcaster + default options |
Replace with raises-WalletError spec |
wallet_client_auto_fund_spec.rb |
513 |
Broadcaster + auto-fund success |
'completed' → 'unproven' |
wallet_client_auto_fund_spec.rb |
741 |
No-broadcaster + auto-fund (default options) |
Replace with raises-WalletError spec |
wallet_client_auto_fund_spec.rb |
787 |
Broadcaster + accept_delayed_broadcast: false |
'completed' → 'unproven' |
wallet_client_auto_fund_spec.rb |
817 |
Broadcaster + default options |
'completed' → 'unproven' |
broadcast_rollback_spec.rb |
137 |
Broadcaster + broadcast success |
'completed' → 'unproven' |
inline_queue_spec.rb |
122 |
Broadcaster + auto-fund success |
'completed' → 'unproven' |
inline_queue_spec.rb |
237 |
No-broadcaster (silent-fallback path, describe 3) |
Entire describe becomes "raises WalletError" tests |
inline_queue_spec.rb |
306 |
Broadcaster + finalize path success |
'completed' → 'unproven' |
inline_queue_spec.rb |
378-379 |
#status delegation round-trip |
Leave — arbitrary test data |
auto_funding_spec.rb |
137 |
No-broadcaster + auto-fund |
Add stubbed broadcaster to wallet at line ~69 (Option 1) |
wire/serializer_spec.rb |
331, 346 |
Wire-format round-trip |
Leave — arbitrary test data |
shared_examples_for_storage_adapter.rb |
72 |
Storage-adapter round-trip |
Leave — arbitrary test data |
solid_queue_adapter_spec.rb |
251 |
Job row status |
Keep 'completed' — job-queue lifecycle, different domain |
solid_queue_adapter_spec.rb |
263 |
Action status (worker success) |
'completed' → 'unproven' |
solid_queue_adapter_spec.rb |
333 |
Action status (finalize success) |
'completed' → 'unproven' |
solid_queue_adapter_spec.rb |
337 |
Job row status |
Keep 'completed' |
solid_queue_adapter_spec.rb |
405 |
Job row status (stale retry) |
Keep 'completed' |
postgres_store_spec.rb |
389-396 |
Storage update_action_status round-trip |
Leave — arbitrary test data |
Part of #455.
Summary
Migrate existing specs to the new status taxonomy and add new coverage for the HLR-driven behaviour.
bundle exec rake spec:walletandbundle exec rake spec:wallet-postgresmust pass after Tasks 1-4 land.Resolved decision:
auto_funding_spec.rbstrategyOption 1 — add a broadcaster to the default
walletat line ~69 (stubbed). Least invasive. Specs test auto-fund behaviour, not broadcast behaviour. Preserves existing test intent with minimal diff. Use this approach.Rejected alternatives:
no_send: trueto every call would change the test intent (the auto-fund flow being exercised assumes broadcast happens).wallet_client_spec.rbalready.Classification of existing
'completed'assertionswallet_client_spec.rbaccept_delayed_broadcast: falsewallet_client_spec.rbwallet_client_auto_fund_spec.rb'completed'→'unproven'wallet_client_auto_fund_spec.rbwallet_client_auto_fund_spec.rbaccept_delayed_broadcast: false'completed'→'unproven'wallet_client_auto_fund_spec.rb'completed'→'unproven'broadcast_rollback_spec.rb'completed'→'unproven'inline_queue_spec.rb'completed'→'unproven'inline_queue_spec.rbinline_queue_spec.rb'completed'→'unproven'inline_queue_spec.rb#statusdelegation round-tripauto_funding_spec.rbwalletat line ~69 (Option 1)wire/serializer_spec.rbshared_examples_for_storage_adapter.rbsolid_queue_adapter_spec.rb'completed'— job-queue lifecycle, different domainsolid_queue_adapter_spec.rb'completed'→'unproven'solid_queue_adapter_spec.rb'completed'→'unproven'solid_queue_adapter_spec.rb'completed'solid_queue_adapter_spec.rb'completed'postgres_store_spec.rbupdate_action_statusround-tripNew specs to add
create_action raises WalletError when no broadcaster AND no_send is false/absent(Task 1)create_action raises WalletError before any storage writes(Task 1)create_action with no_send: true and no broadcaster succeeds with status 'nosend'(Task 1)create_action with broadcast_queue carrying embedded broadcaster does not raise(Task 1)sign_action raises WalletError when no_send flipped false at sign time with no broadcaster(Task 1)create_action with broadcaster → action status 'unproven' on success(Task 2)InlineQueue defensive guard raises when no broadcaster and no accept_delayed_broadcast(Task 2)internalize_action with proven BEEF → 'completed'(Task 4)internalize_action with unproven BEEF → 'unproven'(Task 4)SolidQueueAdapter worker success → action status 'unproven', job status 'completed'(Task 3)Acceptance criteria
bundle exec rake spec:walletpasses (0 failures).bundle exec rake spec:wallet-postgrespasses (0 failures; all pending specs pending withoutDATABASE_URLis acceptable — no new failures introduced).'completed'assertions remain anywhere the asserted state is post-broadcast (pre-proof).'completed'spec has a one-line comment explaining the semantic shift if the new expectation differs from the old one (e.g.# Post-HLR #455: 'unproven' until merkle proof lands).auto_funding_spec.rbwallet at line ~69 has a stubbed broadcaster (Option 1). Existing test assertions updated to'unproven'where they currently assert'completed'.Files modified
gem/bsv-wallet/spec/bsv/wallet_interface/wallet_client_spec.rbgem/bsv-wallet/spec/bsv/wallet_interface/wallet_client_auto_fund_spec.rbgem/bsv-wallet/spec/bsv/wallet_interface/broadcast_rollback_spec.rbgem/bsv-wallet/spec/bsv/wallet_interface/inline_queue_spec.rbgem/bsv-wallet/spec/bsv/wallet/auto_funding_spec.rbgem/bsv-wallet-postgres/spec/bsv/wallet_postgres/solid_queue_adapter_spec.rbSequencing
Lands after Tasks 1-4 (consumes their production code changes).