Skip to content

Build recurring payroll schedule state machine #351

Description

@edehvictor

Summary

Add a schedule state machine for recurring payroll periods, including draft, locked, executable, missed, and finalized states.

Why This Matters

Recurring payroll needs predictable state transitions so dashboard and SDK clients do not invent conflicting timing rules.

Suggested Files

  • contracts/src/schedule.rs
  • contracts/src/payroll.rs
  • contracts/src/policy.rs
  • contracts/tests/recurring_schedule.rs

Tasks

  • Define schedule states and allowed transitions.
  • Move payroll periods through states based on policy and ledger time.
  • Reject invalid manual transitions.
  • Add tests for normal and missed payroll timelines.

Acceptance Criteria

  • Schedules progress through valid states only.
  • Missed payroll windows are represented explicitly.
  • Invalid transitions return stable errors.
  • Tests cover time-based and manual transitions.

Coordination

Join the Telegram channel for proper coordination: https://t.me/zkpayroll

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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