Skip to content

Conversation

@ZAK1504
Copy link
Contributor

@ZAK1504 ZAK1504 commented Dec 19, 2025

Issue

Fixes #152

Summary

Fixed the _is_yaml_stale method in src/intugle/analysis/models.py to correctly identify YAML cache as stale when the source_last_modified timestamp is missing or None.

Problem

The previous implementation returned False (not stale) when source_last_modified was missing, which could lead to the system using potentially outdated cached data since freshness could not be verified.

Solution

Modified the conditional logic to explicitly return True (stale) when source_last_modified is missing or None, ensuring the system re-profiles data when cache validity cannot be determined.

Changes

  • src/intugle/analysis/models.py: Updated _is_yaml_stale to return True when source_last_modified is missing
  • tests/analysis/test_dataset_analysis.py: Added 3 new test cases:
    • test_is_yaml_stale_missing_source_last_modified
    • test_is_yaml_stale_with_none_source_last_modified
    • test_is_yaml_stale_with_valid_source_last_modified

Testing

All tests pass locally:

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

Labels

None yet

1 participant