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)
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:
### YYYY-MM-DD: Topicexpected, undated entries handled as archivableOwner
EECOM (Core Dev)