Skip to content

docs(nap): Add contract comment documenting archiveDecisions() invariants #37

@diberry

Description

@diberry

Problem

archiveDecisions() has implicit assumptions (entries have dates, old entries exist) that aren't documented. Future maintainers will repeat the same bugs.

From

Postmortem action item A8.

Proposed

Add JSDoc contract comment:

  • Entry format: ### YYYY-MM-DD: Topic expected, undated entries handled as archivable
  • Invariant: entries_before === entries_kept + entries_archived (no data loss)
  • Threshold: DECISION_THRESHOLD constant, overridable via config
  • Fallback: count-based when age-based produces no results
  • Return: null when file is under threshold OR nothing was archivable; NapAction otherwise

Owner

EECOM (Core Dev)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgo:needs-researchNeeds investigationsquadSquad triage inbox — Lead will assign to a membersquad:fidoAssigned to FIDO (Quality Owner)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions