Daily interest accrual workflow #1

Open
opened 2026-08-07 14:22:48 +00:00 by hum3 · 0 comments
Owner

Overview

Implement daily interest accrual as a durable workflow using go-workflows.

Current State

gobank's demo calculates interest inline in advanceDay() (demo_state.go), tightly coupled to in-memory state. This needs to become a proper workflow that:

  1. Iterates all accounts from go-luca ledger
  2. Calculates daily interest per account (rate / 365 * balance)
  3. Records interest movements to the ledger
  4. Handles savings (expense) vs lending (income) correctly
  5. Is resumable if interrupted mid-run

Acceptance Criteria

  • InterestAccrualWorkflow using go-workflows
  • Takes a luca.Ledger and date as input
  • Processes all accounts, records movements
  • Idempotent — safe to re-run for the same date
  • Tests with in-memory ledger

Migrated from Codeberg: originally #1, opened 2026-03-25.

## Overview Implement daily interest accrual as a durable workflow using go-workflows. ## Current State gobank's demo calculates interest inline in `advanceDay()` (demo_state.go), tightly coupled to in-memory state. This needs to become a proper workflow that: 1. Iterates all accounts from go-luca ledger 2. Calculates daily interest per account (rate / 365 * balance) 3. Records interest movements to the ledger 4. Handles savings (expense) vs lending (income) correctly 5. Is resumable if interrupted mid-run ## Acceptance Criteria - `InterestAccrualWorkflow` using go-workflows - Takes a `luca.Ledger` and date as input - Processes all accounts, records movements - Idempotent — safe to re-run for the same date - Tests with in-memory ledger --- *Migrated from Codeberg: originally [#1](https://codeberg.org/hum3/gobank-workflow/issues/1), opened 2026-03-25.*
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
hum3/gobank-workflow#1
No description provided.