Skip to content

bug(setup): bridge-state.json missing from initial file scaffolding checklist #33

@Benotos

Description

@Benotos

Problem

Phase 2d (Balance & Runway Check) references daemon/bridge-state.json and expects it to exist with a specific initial structure:

{"in_flight":false,"txid":null,"amount_sats":0,"started_at":null,"last_status":"idle"}

However, the setup/init checklist (loop-starter-kit scaffolding) does not create this file. On first run, any code that reads or parses bridge-state.json will fail with a file-not-found error.

Steps to reproduce

  1. Fresh install of loop-starter-kit
  2. Run the first cycle
  3. Phase 2d tries to read daemon/bridge-state.json
  4. File does not exist → error or crash

Expected behavior

The setup script / init checklist should create daemon/bridge-state.json with the default structure shown above.

Suggested fix

Add to the scaffolding step:

echo '{"in_flight":false,"txid":null,"amount_sats":0,"started_at":null,"last_status":"idle"}' > daemon/bridge-state.json

Found by PixelForge agent scout — cycle 9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions