diff --git a/CHANGELOG.md b/CHANGELOG.md index 6182cdc..b442f3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [0.4.4] — 2026-07-11 + +### Bug fixes + +- Actor cache TTL now treats `fetched_at: None` as always-stale instead of always-fresh. Consumers who never populated `fetched_at` were silently getting no cache invalidation. + +--- + ## [0.4.3] — 2026-07-11 ### Bug fixes diff --git a/Cargo.lock b/Cargo.lock index b9580be..c6aaeb9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1368,7 +1368,7 @@ dependencies = [ [[package]] name = "k-ap" -version = "0.4.3" +version = "0.4.4" dependencies = [ "activitypub_federation", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index d94d4e3..aa09961 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "k-ap" -version = "0.4.3" +version = "0.4.4" edition = "2024" description = "Generic ActivityPub protocol layer" license = "MIT" diff --git a/src/service/fetch.rs b/src/service/fetch.rs index 27d6a57..5aa0d8b 100644 --- a/src/service/fetch.rs +++ b/src/service/fetch.rs @@ -39,7 +39,10 @@ impl ActivityPubService { let age = chrono::Utc::now().signed_duration_since(t); age < chrono::Duration::from_std(data.actor_cache_ttl).unwrap_or_default() }) - .unwrap_or(true); + .unwrap_or_else(|| { + tracing::debug!(actor_url, "fetched_at is None, treating as stale — consider populating fetched_at in get_remote_actor()"); + false + }); if is_fresh { return Ok(cached); }