Part of #455.
Summary
Replace 'completed' with 'unproven' on the SolidQueueAdapter broadcast success path (wallet action status only). The job-queue row status stays 'completed' — it is a separate domain.
IMPORTANT — two 'completed' strings in solid_queue_adapter.rb
This file contains two distinct 'completed' statuses that must be kept separate:
| Location |
Domain |
Action |
| Line ~275 |
wallet_broadcast_jobs row status (job-queue lifecycle) |
Stays 'completed' — the job row correctly moves to the completed state when processed. |
| Line ~292 |
wallet_actions row status (wallet action semantic) |
Changes to 'unproven' — the broadcast succeeded, but the tx is not proven until a merkle proof arrives. |
Same for the finalize path: the job-queue 'completed' stays; the wallet-action 'completed' becomes 'unproven'.
Scope
gem/bsv-wallet-postgres/lib/bsv/wallet_postgres/solid_queue_adapter.rb
Changes
promote (line ~289-293): change line ~292 from
@storage.update_action_status(txid, 'completed')
to
@storage.update_action_status(txid, 'unproven')
- Line ~275 (job row status) stays
'completed'.
- Any other
update_action_status(..., 'completed') call in the broadcast-success path → 'unproven'.
- Update docstring at line ~280-288 to reflect that a successful broadcast produces
'unproven' action status, pending merkle proof.
Acceptance criteria
Edge cases
- Finalize path (no outpoints) on SolidQueue success — same logic as inline: wallet action
'unproven'.
txid nil — already guarded at line ~292 with if txid.
- Broadcast attempts that succeed after stale-job retry — same status transition; only the wallet row moves to
'unproven'.
Test scenarios
worker success path → action_status is 'unproven' (spec line ~263)
worker success path → job status is 'completed' (spec line ~251 — regression)
worker finalize path success → action_status is 'unproven' (spec line ~333)
worker finalize path success → job status is 'completed' (spec line ~337 — regression)
stale-job retry success → job status is 'completed' (spec line ~405 — regression)
worker failure path → action_status is 'failed' (regression)
Files modified
gem/bsv-wallet-postgres/lib/bsv/wallet_postgres/solid_queue_adapter.rb
gem/bsv-wallet-postgres/spec/bsv/wallet_postgres/solid_queue_adapter_spec.rb (Task 5 owns the broader spec migration; direct test additions for this file's new behaviour land here)
Sequencing
Lands after Task 1 (depends on broadcast_enabled? being in place on the BroadcastQueue interface — SolidQueueAdapter overrides it).
Part of #455.
Summary
Replace
'completed'with'unproven'on theSolidQueueAdapterbroadcast success path (wallet action status only). The job-queue row status stays'completed'— it is a separate domain.IMPORTANT — two
'completed'strings insolid_queue_adapter.rbThis file contains two distinct
'completed'statuses that must be kept separate:wallet_broadcast_jobsrow status (job-queue lifecycle)'completed'— the job row correctly moves to thecompletedstate when processed.wallet_actionsrow status (wallet action semantic)'unproven'— the broadcast succeeded, but the tx is not proven until a merkle proof arrives.Same for the finalize path: the job-queue
'completed'stays; the wallet-action'completed'becomes'unproven'.Scope
gem/bsv-wallet-postgres/lib/bsv/wallet_postgres/solid_queue_adapter.rbChanges
promote(line ~289-293): change line ~292 from'completed'.update_action_status(..., 'completed')call in the broadcast-success path →'unproven'.'unproven'action status, pending merkle proof.Acceptance criteria
wallet_actions.status = 'unproven'ANDwallet_broadcast_jobs.status = 'completed'.'failed'(regression).wallet_actions.status = 'unproven'on second-attempt success; job row'completed'.'unproven', job'completed'.Edge cases
'unproven'.txidnil — already guarded at line ~292 withif txid.'unproven'.Test scenarios
worker success path → action_status is 'unproven'(spec line ~263)worker success path → job status is 'completed'(spec line ~251 — regression)worker finalize path success → action_status is 'unproven'(spec line ~333)worker finalize path success → job status is 'completed'(spec line ~337 — regression)stale-job retry success → job status is 'completed'(spec line ~405 — regression)worker failure path → action_status is 'failed'(regression)Files modified
gem/bsv-wallet-postgres/lib/bsv/wallet_postgres/solid_queue_adapter.rbgem/bsv-wallet-postgres/spec/bsv/wallet_postgres/solid_queue_adapter_spec.rb(Task 5 owns the broader spec migration; direct test additions for this file's new behaviour land here)Sequencing
Lands after Task 1 (depends on
broadcast_enabled?being in place on theBroadcastQueueinterface — SolidQueueAdapter overrides it).