Always ensure documentation and comments accurately reflect the actual code implementation. When modifying code, update all related documentation to maintain consistency. This applies to:

  1. Function behavior descriptions: Make sure JSDoc comments and inline comments accurately describe what functions do. ```typescript /**
  2. Parameter types: Ensure type annotations in documentation match the actual types used in code. ```typescript /**
  3. Constants and threshold values: Document the actual values used in conditions. ```typescript /**

    // If no fromStartTime or startTime is provided, use a 1-day lookback for a faster query // Be specific ```

  4. Time-related values: When changing durations or time-based configurations, update the corresponding documentation.
    // Process at most `max` jobs per 120 seconds // Not "30 seconds" if the value is 120_000
    

Accurate documentation reduces confusion, speeds up onboarding for new team members, and prevents bugs caused by misunderstanding code behavior. Review all documentation changes as carefully as you review code changes.