Skip to content

Test: ensure scheduler nags are deferred during quiet hours #23

Description

@TheDThompsonDev

Why this matters

A due nag inside quiet hours should be rescheduled without creating a notification or delivery event.

Scope

  • Create one due open task in a migrated temporary database.
  • Tick the scheduler inside quiet hours.
  • Assert next_nag_at moves to quiet-hour end and history records quiet_hours as the reason.

Suggested starting points

  • src/engine/scheduler.ts
  • src/engine/store.ts
  • src/engine/nag.ts
  • test

Acceptance criteria

  • No nag notification is created during the quiet period.
  • The rescheduled timestamp is asserted exactly.
  • A comparison tick outside quiet hours is covered.

Out of scope

  • Daily brief folding behavior.
  • Discord notification delivery.

How to verify

  • Run npm test with a fixed timezone and instant.

New contributor notes

Please comment before starting so maintainers can confirm nobody else is working on it. Use only synthetic examples and never commit real API keys, tokens, private content, database files, or deployment credentials.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: task engineCommitment, reminder, and scheduler behaviorarea: testingAutomated tests and test infrastructureeffort: smallA few focused files without an architecture changegood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions