Troubleshooting

Troubleshoot freshness and cache handling — Unified Discovery

Diagnose stale or inconsistent discovery results, cache invalidation, provider revision changes, incomplete retrievals, and mismatched source timestamps.

ProductResearch LibrarianUpdatedNovember 14, 2026Reading time16 minutes

Application: Unified Discovery
Knowledge-base classification: Troubleshooting / Data Freshness / Cache and Snapshot Integrity
Audience: Researchers, data stewards, platform engineers, application operators, and support personnel
Technical level: Intermediate to advanced
Reference environment: Python 3 standard library
Relevant specifications: HTTP Caching (RFC 9111), stale-response extensions (RFC 5861), Problem Details for HTTP APIs (RFC 9457)
Primary outputs: Freshness diagnosis, source revision reconciliation, cache-state assessment, safe recovery decision, and sanitized acceptance evidence
Estimated reading time: 14–18 minutes; approximately 30–45 minutes including exercises

1. What freshness and cache handling means

Unified Discovery may combine results from multiple information providers, stored research assets, previous retrievals, and indexed source records.

These results may differ in age, provenance, access rights, version, and availability.

Freshness handling determines whether the system can accurately describe when information was observed, published, retrieved, or last checked.

Cache handling determines whether a previously stored result can be reused under the applicable validity, authorization, and application policies.

These are related but different responsibilities.

Central acceptance condition: Users must be able to distinguish current provider responses, cached results, stale results, and archived snapshots, and must be able to see the relevant source observation and retrieval timestamps.

A recently retrieved record is not necessarily recently observed information.

Similarly, a result may be technically fresh under HTTP caching rules while still being too old for a particular research question.

2. Distinguish the important timestamps

Table 1. Discovery timestamp definitions
Timestamp Meaning Potential mistake
observed_at When the underlying event or measurement occurred Confused with retrieval time
published_at When the provider published the resource Assumed to be observation time
source_updated_at Provider’s stated content revision time Treated as proof of current accuracy
retrieved_at When the application obtained the provider result Used to make old observations appear current
validated_at When source or cache validity was checked Mistaken for new data collection
cached_at When a representation was stored locally Confused with provider generation time
archived_at When a retained snapshot entered an archive Presented as a live provider response
displayed_at When a user viewed the result Used as evidence of source freshness

Not every provider supplies all these timestamps. Missing values should remain explicitly unknown rather than being replaced with the current date.

For historical research, an older observation may be exactly the intended source. The problem is not its age, but an incorrect claim about its age, version, or current status.

3. Recognize common failure symptoms

Freshness and cache failures may appear as:

  • A newly published provider record does not appear in discovery.
  • A deleted or superseded source remains visible as current.
  • Results change between requests without a clear revision explanation.
  • A refresh completes but the user still sees the old snapshot.
  • A recently retrieved historical record appears as a new observation.
  • A provider returns an error, but cached content is displayed without disclosure.
  • One provider is unavailable, yet the combined result is marked complete.
  • A source revision changes without invalidating dependent derived records.
  • A user receives results cached under another organization’s authorization scope.
  • An archived snapshot is displayed without its original retrieval date.
  • Different interfaces show different freshness states for the same artifact.
  • Repeated refresh requests cause duplicate operations or excessive provider traffic.

Determine whether the defect is in provider retrieval, cache identity, freshness calculation, revision comparison, authorization, or user-interface presentation before changing system state.

4. Use the diagnostic decision sequence

  1. Identify the request. Confirm the organization, workspace, project, user role, provider, query, and source identifier.
  2. Check authorization. Verify that the requesting identity is permitted to access the source and any cached result.
  3. Identify the result origin. Determine whether the response came from a live provider retrieval, cache, retained snapshot, or archive.
  4. Inspect timestamps. Compare observation, publication, retrieval, validation, and archive times without treating them as interchangeable.
  5. Check the freshness policy. Determine the applicable source-specific or operation-specific age limit.
  6. Compare revisions. Verify source version, content digest, index version, and any dependent artifact versions.
  7. Inspect provider coverage. Identify successful, failed, timed-out, unauthorized, or unsupported providers.
  8. Inspect HTTP caching separately. Examine caching headers, validators, age, and intermediary behavior if HTTP caching is involved.
  9. Review sanitized diagnostics. Correlate trace IDs, provider status, cache decisions, and error classifications.
  10. Choose a safe recovery. Preserve accepted evidence, correct the failing layer, and rerun authorized read-only checks before resuming publication or mutation.

Do not begin by clearing every cache or repeatedly calling provider endpoints. Doing so can destroy diagnostic evidence, increase load, and conceal the original failure.

5. Classify freshness and cache failures

Table 2. Symptom-to-cause diagnostic matrix
Symptom Possible cause First check
Old result shown after refresh Stale cache entry, unchanged provider revision, or stale frontend state Compare cache key, retrieval result, and source revision
Missing recent provider records Index lag, incomplete pagination, or delayed provider publication Inspect source coverage and index watermark
Result marked current despite old observation Retrieval time substituted for observation time Inspect timestamp mapping
Archived record presented as live Snapshot classification lost during serialization Inspect origin and archive metadata
New data rejected as stale Clock skew, incorrect timezone, or unsuitable freshness policy Compare UTC timestamps and policy
Some providers missing Timeout, rate limit, authentication failure, or unsupported query Inspect provider-level coverage
Cross-project result leakage Insufficient cache partitioning or authorization failure Inspect cache identity and access checks
Unexpected revision mismatch Source updated without dependent index or artifact refresh Compare revision chain
Repeated refresh errors Provider outage, invalid credentials, or repeated unsafe request Inspect error type and retry safety
Cache appears correct but content is outdated Provider supplied unchanged old content or research freshness threshold differs Compare observation age with HTTP response freshness

6. Distinguish live, cached, stale, and archived records

The following classifications are useful for a research discovery interface.

Table 3. Recommended result-origin labels
Classification Meaning Required disclosure
Provider response Retrieved from the provider during the current request or operation Provider, retrieval time, source observation time if known
Cached result Previously obtained data reused under a cache policy Cache provenance, relevant timestamps, validity state
Stale result Stored content exceeds the applicable freshness requirement Staleness and any permitted fallback reason
Archived snapshot Deliberately preserved historical representation Snapshot identity, original dates, archive status
Unavailable No authorized and suitable result can be supplied Reason classification and next permitted action
Partial results Only part of the expected provider set or result collection is available Coverage details and missing dependencies

Result origin and freshness are separate attributes. A provider response retrieved moments ago can contain an observation made years earlier.

Likewise, an archived record may be intentionally old and still valid for historical analysis.

7. Understand HTTP caching without conflating it with research freshness

HTTP caching has documented rules for response freshness, revalidation, and reuse. RFC 9111 defines the general caching model.

Examples of relevant HTTP headers include:

Cache-Control: max-age=300
ETag: "source-revision-7"
Last-Modified: ...
Age: 120

These values relate to HTTP response caching and validation. They do not directly establish when a scientific observation occurred.

7.1 Cache-Control

The max-age directive controls the freshness lifetime of a cached HTTP response, subject to applicable HTTP rules.

The directives no-cache and no-store have distinct meanings:

  • no-cache permits storage but requires successful validation before reuse.
  • no-store instructs compliant caches not to store the response.

The name no-cache must not be interpreted as equivalent to no-store.

7.2 ETag and conditional requests

An ETag can identify a specific representation version for HTTP validation.

A conditional request may use:

If-None-Match: "source-revision-7"

If the relevant representation remains unchanged, a server may respond with HTTP 304 Not Modified under the applicable protocol rules.

A 304 response indicates that the selected representation remains valid for that HTTP validation request. It does not mean the underlying scientific observation was repeated or newly measured.

7.3 Age

The HTTP Age header provides an estimate of how long a response has existed since origin generation or validation in the caching chain.

It is not an observation-age measurement.

7.4 Stale response extensions

RFC 5861 specifies stale-while-revalidate and stale-if-error extensions.

These can support controlled reuse of stale HTTP responses where permitted by the applicable cache directives.

They should not automatically authorize the use of stale scientific evidence for a research operation requiring current observations.

Operational distinction: HTTP cache eligibility and scientific-source acceptability are separate decisions. Both must pass before a result is treated as suitable for the requested purpose.

8. Evaluate source-specific freshness policies

Different research sources require different freshness expectations.

Examples include:

  • Historical publications that are intentionally fixed.
  • Frequently updated scientific datasets.
  • Live environmental monitoring feeds.
  • Periodically revised government statistics.
  • Satellite observations with acquisition and processing delays.
  • Research asset indexes that lag behind source ingestion.

A generic five-minute cache lifetime is not a scientifically valid freshness policy for every source.

Define the applicable policy using the nature of the source, research question, and intended decision.

For a source with a known observation timestamp:

observation_age =
    evaluation_time - observed_at

For a retrieved resource:

retrieval_age =
    evaluation_time - retrieved_at

These ages answer different questions.

A freshness policy should state which timestamp it evaluates, its threshold, and whether a stale-but-labeled fallback is acceptable.

9. Diagnose source and dependency revisions

A discovery result may depend on multiple revisions:

Provider source revision
         |
         v
Retrieved source representation
         |
         v
Normalized source record
         |
         v
Discovery index revision
         |
         v
Search result or saved asset
         |
         v
Research analytical dependency

Compare the versions at each boundary.

A source update does not automatically mean that every downstream index, knowledge relationship, and research artifact has been recomputed.

When a dependency is outdated, the system should expose the relationship rather than silently claim that all downstream results are current.

Reprocessing a source must also respect rights, provenance, schema compatibility, and applicable review policies.

10. Diagnose partial provider coverage

Unified Discovery may query multiple providers with different capabilities and availability.

A combined response should preserve provider-level outcomes.

Table 4. Provider coverage example
Provider Status Appropriate interpretation
Provider A Success Results available for that provider
Provider B Timeout Coverage incomplete
Provider C Unauthorized Results unavailable due to access restrictions
Provider D Cached fallback Previously retrieved results, not a confirmed current provider response

The overall result must not be presented as comprehensive coverage when required providers have failed or were not queried.

Distinguish:

  • No matching results from a successfully queried provider.
  • No results because the provider was unavailable.
  • No results because access was denied.
  • No results because a provider was unsupported or excluded.
  • Results returned from an older snapshot.

These states have different implications for research completeness.

11. Diagnose authorization and cache partitioning

Cache identity must preserve relevant security boundaries.

A cache key may need to reflect the authorization scope, tenant, project, source permissions, query, provider, and response representation.

The exact design is implementation-specific and should not expose secrets.

Important tests include:

  • One organization’s private results are not available to another organization.
  • One research owner’s cached records do not bypass another owner’s access restrictions.
  • A user’s revoked access is not restored by a stale cache entry.
  • Changes in source permissions are reflected in subsequent authorized reads.
  • Public and private source representations remain appropriately separated.
  • Shared cache entries do not include user-specific protected information unless explicitly authorized by a safe design.

Do not publish raw cache keys, tokens, credentials, protected research values, or internal authorization identifiers in public troubleshooting tickets.

12. Construct a synthetic diagnostic fixture

The following fixture demonstrates four different discovery states evaluated at the same reference time.

All timestamps and records are synthetic.

Table 5. Synthetic discovery freshness fixture
Record Origin Observed at Retrieved at Expected assessment
R01 Provider 2026-11-14 11:00 UTC 2026-11-14 11:50 UTC Current under a two-hour observation policy
R02 Cache 2026-11-10 11:00 UTC 2026-11-14 11:55 UTC Observation stale despite recent retrieval
R03 Archive 2025-11-14 12:00 UTC 2025-11-15 12:00 UTC Historical snapshot
R04 Cache Unknown 2026-11-14 11:58 UTC Observation freshness unknown

Evaluation time:

2026-11-14T12:00:00Z

Example observation-age threshold:

2 hours = 7200 seconds

The two-hour threshold is used only for this synthetic exercise. It is not a recommended production threshold for all discovery providers.

13. Implement a deterministic freshness diagnostic module

The reference example uses the Python standard library and performs no network requests, mutations, or external cache operations.

13.1 Prepare the environment

mkdir discovery-freshness-diagnostics
cd discovery-freshness-diagnostics

python3 -m venv .venv
source .venv/bin/activate

python --version

Save the following as freshness_diagnostics.py.

from dataclasses import dataclass
from datetime import datetime, timezone
from enum import Enum
import json


class Origin(str, Enum):
    PROVIDER = "provider"
    CACHE = "cache"
    ARCHIVE = "archive"


class Freshness(str, Enum):
    CURRENT = "current"
    STALE = "stale"
    UNKNOWN = "unknown"
    ARCHIVED = "archived"


@dataclass(frozen=True)
class Record:
    record_id: str
    provider_id: str
    origin: Origin
    observed_at: datetime | None
    retrieved_at: datetime
    source_revision: str
    authorized: bool = True


REFERENCE_TIME = datetime(
    2026, 11, 14, 12, 0,
    tzinfo=timezone.utc
)


def parse_utc(value):
    if value is None:
        return None

    parsed = datetime.fromisoformat(
        value.replace("Z", "+00:00")
    )

    if (
        parsed.tzinfo is None
        or parsed.utcoffset() is None
    ):
        raise ValueError(
            "Timezone-aware timestamp required"
        )

    return parsed.astimezone(
        timezone.utc
    )


def ensure_timestamp(value):
    if (
        not isinstance(value, datetime)
        or value.tzinfo is None
        or value.utcoffset() is None
    ):
        raise ValueError(
            "Invalid timestamp"
        )

    return value.astimezone(
        timezone.utc
    )


def assess_record(
    record,
    now,
    max_observation_age_seconds
):
    now = ensure_timestamp(now)
    retrieved = ensure_timestamp(
        record.retrieved_at
    )

    if (
        not isinstance(
            max_observation_age_seconds,
            (int, float)
        )
        or isinstance(
            max_observation_age_seconds,
            bool
        )
        or not (
            0 < max_observation_age_seconds
            < float("inf")
        )
    ):
        raise ValueError(
            "Invalid freshness threshold"
        )

    if not record.authorized:
        return {
            "record_id": record.record_id,
            "usable": False,
            "reason": "ACCESS_DENIED",
            "freshness": "not_evaluated"
        }

    if not record.source_revision:
        raise ValueError(
            "Missing source revision"
        )

    if retrieved > now:
        raise ValueError(
            "Retrieval timestamp is in the future"
        )

    if record.origin == Origin.ARCHIVE:
        return {
            "record_id": record.record_id,
            "usable": True,
            "reason": "HISTORICAL_SNAPSHOT",
            "freshness": Freshness.ARCHIVED.value,
            "origin": record.origin.value,
            "retrieved_at": retrieved.isoformat()
        }

    if record.observed_at is None:
        status = Freshness.UNKNOWN
        age_seconds = None
    else:
        observed = ensure_timestamp(
            record.observed_at
        )

        if observed > now:
            raise ValueError(
                "Observation timestamp is in the future"
            )

        age_seconds = (
            now - observed
        ).total_seconds()

        status = (
            Freshness.CURRENT
            if age_seconds
            <= max_observation_age_seconds
            else Freshness.STALE
        )

    return {
        "record_id": record.record_id,
        "usable": status == Freshness.CURRENT,
        "reason": (
            "OBSERVATION_CURRENT"
            if status == Freshness.CURRENT
            else "OBSERVATION_STALE"
            if status == Freshness.STALE
            else "OBSERVATION_TIME_UNKNOWN"
        ),
        "freshness": status.value,
        "origin": record.origin.value,
        "observation_age_seconds": age_seconds,
        "retrieved_at": retrieved.isoformat(),
        "source_revision": record.source_revision
    }


def assess_coverage(required, outcomes):
    required_set = set(required)

    if len(required_set) != len(required):
        raise ValueError(
            "Duplicate required provider"
        )

    unexpected = set(outcomes) - required_set

    if unexpected:
        raise ValueError(
            "Unexpected provider outcomes"
        )

    missing = sorted(
        provider
        for provider in required_set
        if outcomes.get(provider) != "success"
    )

    return {
        "complete": not missing,
        "missing_or_failed": missing,
        "successful": sorted(
            provider
            for provider in required_set
            if outcomes.get(provider) == "success"
        )
    }


def example_records():
    return [
        Record(
            "R01", "provider-a",
            Origin.PROVIDER,
            parse_utc("2026-11-14T11:00:00Z"),
            parse_utc("2026-11-14T11:50:00Z"),
            "source-v7"
        ),
        Record(
            "R02", "provider-b",
            Origin.CACHE,
            parse_utc("2026-11-10T11:00:00Z"),
            parse_utc("2026-11-14T11:55:00Z"),
            "source-v3"
        ),
        Record(
            "R03", "provider-c",
            Origin.ARCHIVE,
            parse_utc("2025-11-14T12:00:00Z"),
            parse_utc("2025-11-15T12:00:00Z"),
            "archive-v1"
        ),
        Record(
            "R04", "provider-d",
            Origin.CACHE,
            None,
            parse_utc("2026-11-14T11:58:00Z"),
            "source-v2"
        )
    ]


def main():
    reports = [
        assess_record(
            record,
            REFERENCE_TIME,
            7200
        )
        for record in example_records()
    ]

    coverage = assess_coverage(
        ["provider-a", "provider-b", "provider-c"],
        {
            "provider-a": "success",
            "provider-b": "timeout",
            "provider-c": "unauthorized"
        }
    )

    print(
        json.dumps(
            {
                "classification": "synthetic",
                "record_diagnostics": reports,
                "provider_coverage": coverage,
                "runtime_acceptance": "not_tested",
                "production_verification": "not_tested"
            },
            indent=2
        )
    )


if __name__ == "__main__":
    main()

The module deliberately separates observation freshness from result origin and provider coverage.

It does not implement the complete HTTP caching standard. It evaluates a simplified application-level scientific freshness policy.

Under this conservative exercise, records with unknown observation time cannot pass an observation-freshness requirement.

Archived records may be usable as historical evidence, but must not be described as current provider results.

14. Run and interpret the diagnostic exercise

python freshness_diagnostics.py

Expected classification:

Table 6. Expected synthetic diagnostic results
Record Freshness Interpretation
R01 current Observed within the example two-hour policy
R02 stale Recently retrieved but based on an older observation
R03 archived Historical snapshot rather than a current provider observation
R04 unknown Observation date unavailable

The provider coverage assessment should report incomplete coverage because two required providers did not succeed.

These are expected synthetic results, not outcomes observed on a deployed Sustainable Catalyst service.

15. Test boundary conditions and failure states

Save as test_freshness_diagnostics.py.

from dataclasses import replace
from datetime import timedelta
import unittest

from freshness_diagnostics import (
    Origin,
    REFERENCE_TIME,
    assess_record,
    assess_coverage,
    example_records,
    parse_utc
)


class FreshnessTests(unittest.TestCase):

    def setUp(self):
        self.records = example_records()

    def test_current_observation(self):
        result = assess_record(
            self.records[0],
            REFERENCE_TIME,
            7200
        )
        self.assertEqual(
            result["freshness"],
            "current"
        )

    def test_old_observation_is_stale(self):
        result = assess_record(
            self.records[1],
            REFERENCE_TIME,
            7200
        )
        self.assertEqual(
            result["freshness"],
            "stale"
        )

    def test_archive_not_current(self):
        result = assess_record(
            self.records[2],
            REFERENCE_TIME,
            7200
        )
        self.assertEqual(
            result["freshness"],
            "archived"
        )

    def test_missing_observation_unknown(self):
        result = assess_record(
            self.records[3],
            REFERENCE_TIME,
            7200
        )
        self.assertEqual(
            result["freshness"],
            "unknown"
        )

    def test_access_denied(self):
        record = replace(
            self.records[0],
            authorized=False
        )
        result = assess_record(
            record,
            REFERENCE_TIME,
            7200
        )
        self.assertFalse(
            result["usable"]
        )
        self.assertEqual(
            result["reason"],
            "ACCESS_DENIED"
        )

    def test_boundary_exactly_current(self):
        record = replace(
            self.records[0],
            observed_at=(
                REFERENCE_TIME
                - timedelta(seconds=7200)
            )
        )
        result = assess_record(
            record,
            REFERENCE_TIME,
            7200
        )
        self.assertEqual(
            result["freshness"],
            "current"
        )

    def test_boundary_one_second_stale(self):
        record = replace(
            self.records[0],
            observed_at=(
                REFERENCE_TIME
                - timedelta(seconds=7201)
            )
        )
        result = assess_record(
            record,
            REFERENCE_TIME,
            7200
        )
        self.assertEqual(
            result["freshness"],
            "stale"
        )

    def test_future_observation_rejected(self):
        record = replace(
            self.records[0],
            observed_at=(
                REFERENCE_TIME
                + timedelta(seconds=1)
            )
        )
        with self.assertRaises(ValueError):
            assess_record(
                record,
                REFERENCE_TIME,
                7200
            )

    def test_future_retrieval_rejected(self):
        record = replace(
            self.records[0],
            retrieved_at=(
                REFERENCE_TIME
                + timedelta(seconds=1)
            )
        )
        with self.assertRaises(ValueError):
            assess_record(
                record,
                REFERENCE_TIME,
                7200
            )

    def test_invalid_threshold(self):
        with self.assertRaises(ValueError):
            assess_record(
                self.records[0],
                REFERENCE_TIME,
                0
            )

    def test_naive_timestamp_rejected(self):
        with self.assertRaises(ValueError):
            parse_utc(
                "2026-11-14T12:00:00"
            )

    def test_missing_revision_rejected(self):
        record = replace(
            self.records[0],
            source_revision=""
        )
        with self.assertRaises(ValueError):
            assess_record(
                record,
                REFERENCE_TIME,
                7200
            )

    def test_full_provider_coverage(self):
        result = assess_coverage(
            ["a", "b"],
            {
                "a": "success",
                "b": "success"
            }
        )
        self.assertTrue(
            result["complete"]
        )

    def test_partial_provider_coverage(self):
        result = assess_coverage(
            ["a", "b"],
            {
                "a": "success",
                "b": "timeout"
            }
        )
        self.assertFalse(
            result["complete"]
        )

    def test_missing_provider_outcome(self):
        result = assess_coverage(
            ["a", "b"],
            {"a": "success"}
        )
        self.assertFalse(
            result["complete"]
        )

    def test_unexpected_provider_rejected(self):
        with self.assertRaises(ValueError):
            assess_coverage(
                ["a"],
                {
                    "a": "success",
                    "other": "success"
                }
            )

    def test_duplicate_required_provider_rejected(self):
        with self.assertRaises(ValueError):
            assess_coverage(
                ["a", "a"],
                {"a": "success"}
            )


if __name__ == "__main__":
    unittest.main()

Execute:

python -m unittest -v test_freshness_diagnostics.py

This reference suite defines seventeen tests. It covers age boundaries, unknown timestamps, future timestamps, authorization, archived records, source revisions, and incomplete provider coverage.

Passing these synthetic tests would establish only the behavior of the reference module. It would not certify HTTP caching compliance, deployed security, provider behavior, or production integration.

16. Interpret provider and HTTP errors correctly

Error handling must distinguish the reason a result is unavailable from the age of any retained source.

Table 7. Common API outcomes and safe diagnostic responses
Condition Possible interpretation Safe response
400 Invalid request or parameters Correct the request, not the cache
401 Missing or invalid authentication Restore authorized authentication; do not bypass checks
403 Access prohibited Review rights and role; do not disclose protected data
404 Resource unavailable at the requested identifier Verify identifier, scope, version, and endpoint
409 Conflict, where defined by the API Inspect version or state conflict before mutation
429 Rate limit or request throttling Honor provider limits and applicable retry guidance
500–503 Server or dependency failure Preserve diagnostics; apply only safe retry or fallback rules
504 Gateway timeout Inspect upstream availability and request state
304 Conditional HTTP representation validation Use under HTTP cache rules; do not equate with new scientific observation

HTTP status codes require the specific endpoint context for accurate interpretation.

RFC 9457 defines a machine-readable problem-details format that may help an API expose categorized errors without requiring every consumer to parse free-form text.

For example, a sanitized application error might contain:

{
  "type": "https://example.org/problems/provider-timeout",
  "title": "Discovery provider unavailable",
  "status": 503,
  "detail": "One required provider did not respond.",
  "trace_id": "synthetic-trace-001",
  "coverage": "partial"
}

The domain and payload above are illustrative, not Sustainable Catalyst production endpoints or API contracts.

17. Establish safe retry rules

Retry behavior must account for operation semantics.

For read-only requests, a bounded retry may be appropriate for transient connection failures, timeouts, or documented retryable server errors.

Use provider-specific limits and applicable Retry-After guidance where available.

For mutation operations, never retry blindly when the first request may have succeeded.

Examples of potentially unsafe operations include:

  • Importing or registering a source artifact.
  • Creating a saved research object.
  • Publishing a discovery result.
  • Updating a rights or ownership record.
  • Deleting or replacing a snapshot.

If a write request times out, first determine whether it committed. Use a documented idempotency mechanism or a confirmed safe reconciliation procedure before retrying.

Do not invent an idempotency guarantee merely because the operation uses a familiar HTTP method.

18. Recover stale or incorrect results safely

  1. Preserve the accepted state. Record the current source revision, response classification, cache metadata, trace ID, and error evidence.
  2. Identify the affected scope. Determine which organization, project, provider, query, and source are affected.
  3. Confirm permissions. Verify that the operator can access the source and perform the proposed operation.
  4. Determine the failing layer. Separate provider freshness from local cache, index, analytical dependency, and user-interface state.
  5. Inspect the source revision. Compare the latest authorized provider result against the retained source record.
  6. Perform a guarded read-only validation. Recheck an authorized source using documented provider and cache behavior.
  7. Apply the narrowest correction. Where authorized, invalidate or refresh only the affected entry or dependency rather than indiscriminately clearing shared caches.
  8. Reconcile dependent assets. Identify indexes, saved research objects, and analytical outputs that may require review or regeneration.
  9. Retest the response. Verify timestamps, revision, origin classification, provider coverage, and authorization.
  10. Document the outcome. Preserve actual results, unresolved limitations, and any publication impact.

A stale response should not automatically be deleted if it is an important archived research record.

Where archival retention is appropriate, preserve the historical artifact and update its classification or display context instead.

19. Do not mistake refresh success for data freshness

A refresh operation may complete successfully without producing new scientific information.

For example:

Provider retrieval completed: yes

Retrieved at:
2026-11-14T12:00:00Z

Source observation date:
2026-10-01T00:00:00Z

Source revision:
unchanged

The retrieval is recent, but the observation is not.

Similarly, a cache revalidation may establish that the same provider representation remains current under HTTP rules, while the source observation itself remains old.

Use separate indicators for retrieval success and scientific observation freshness.

20. Reconcile cache status with research outputs

Discovery may provide sources that are subsequently saved to Library, used in Workbench, or incorporated into Research.

A newly discovered source revision should not silently alter accepted analytical or published outputs.

Preserve distinctions between:

  • The source that was originally analyzed.
  • The latest source revision now available.
  • The analytical artifact generated from the earlier source.
  • A newer analytical candidate generated from updated evidence.
  • The figure or publication revision that has undergone scientific review.

When a source changes, dependent research artifacts may need reassessment. A discovery refresh alone must not be treated as scientific approval of a revised analysis.

21. Monitoring, observability, and privacy

Useful operational evidence may include:

  • Provider request duration and response status.
  • Cache hit, miss, validation, or fallback decision.
  • Observation and retrieval age where known.
  • Source revision and index watermark.
  • Provider coverage status.
  • Retry count and retry reason.
  • Trace or correlation identifier.
  • Relevant sanitized error category.
  • Result origin classification.
  • Authorization decision without exposing secrets.

Metrics such as cache hit rate should not be interpreted as scientific freshness metrics.

A high cache hit rate may improve performance while simultaneously revealing little about whether scientific observations meet the research freshness policy.

Keep secrets, private research payloads, protected identifiers, authorization tokens, and sensitive source content out of public logs and support records.

22. Technical acceptance matrix

Table 8. Freshness and cache troubleshooting acceptance criteria
Criterion Pass condition Required evidence
Request identity Correct provider, query, organization, project, and scope Sanitized request metadata
Authorization Current access rights enforced Access-control tests
Source identity Correct record and source revision resolved Source metadata
Observation time Known observation time shown or unknown explicitly disclosed Timestamp mapping
Retrieval time Actual retrieval time preserved and displayed Retrieval record
Freshness policy Applicable source-specific policy correctly evaluated Policy and boundary tests
Result origin Provider, cache, stale, and archived states distinguished Classification tests
HTTP cache behavior Applicable directives and validators honored Protocol tests where applicable
Revision integrity Source, index, and dependent revisions reconciled Revision-chain inspection
Provider coverage Partial or missing coverage disclosed accurately Provider outcomes
Retry safety Read retries bounded and writes protected against ambiguous duplication Negative and failure tests
Cache isolation Protected results cannot cross authorization boundaries Cross-owner tests
Recovery Correction is scoped, authorized, and evidence-preserving Recovery receipt
Accessibility Freshness and result origin understandable without color alone UI accessibility review
Production verification Runtime behavior independently inspected Executed integration acceptance

Acceptance rule: Record each applicable criterion as Pass, Fail, Not Tested, or Not Applicable. A successful response or resolved support ticket is not sufficient evidence that freshness handling has been corrected.

23. Create a sanitized diagnostic receipt

A completed troubleshooting case should contain the affected scope, confirmed cause, retained evidence, and recovery outcome.

Illustrative JSON:

{
  "schema_version": "example-1.0",
  "case_id": "synthetic-freshness-001",
  "application": "unified_discovery",
  "classification": "synthetic",
  "request": {
    "provider_id": "provider-b",
    "source_id": "R02",
    "operation": "read",
    "authorization_verified": false
  },
  "source": {
    "revision": "source-v3",
    "observed_at": "2026-11-10T11:00:00Z",
    "retrieved_at": "2026-11-14T11:55:00Z",
    "origin": "cache"
  },
  "policy": {
    "observation_max_age_seconds": 7200,
    "policy_class": "synthetic"
  },
  "diagnosis": {
    "classification": "observation_stale",
    "provider_coverage": "partial",
    "root_cause_confirmed": false
  },
  "acceptance": {
    "source_identity": "not_tested",
    "timestamp_integrity": "not_tested",
    "cache_isolation": "not_tested",
    "revision_integrity": "not_tested",
    "provider_coverage": "not_tested",
    "recovery": "not_tested",
    "production_runtime": "not_tested"
  },
  "release_decision": "NO_GO"
}

This is a proposed documentation format, not a deployed Unified Discovery API contract.

Do not mark operational acceptance as passed merely because a local synthetic test completes.

24. Sustainable Catalyst cross-application responsibilities

Freshness and cache handling may affect several intended Sustainable Catalyst application areas.

Table 9. Proposed cross-application responsibilities
Application Intended responsibility
Unified Discovery Classify result origin, provider coverage, retrieval state, and freshness
Library Preserve source revisions, observed dates, retrieval metadata, rights, and retained snapshots
Workbench Identify analytical outputs dependent on specific source revisions
Research Lab Evaluate whether source currency affects scientific analysis
Site Intelligence Distinguish image acquisition, product generation, retrieval, and analytical dates
Decision Studio Track changes in source evidence affecting models and scenarios
Workspace Manage refresh decisions, ownership, recovery evidence, and review
Research Preserve the source revisions used by accepted publications and disclose subsequent corrections
Platform Core Enforce relevant identity, authorization, and governance boundaries

These describe proposed architectural responsibilities. They must be checked against actual repositories, deployed interfaces, schemas, and service boundaries before being presented as operational features.

25. Source audit before production certification

Before certifying Sustainable Catalyst Unified Discovery freshness and cache handling, attach:

  • Actual owning repository, branch, and commit.
  • Deployed API and backend revision.
  • Provider registry and supported query contracts.
  • Current freshness-policy definitions.
  • Source and snapshot schemas.
  • Cache-store configuration and key-partitioning rules.
  • HTTP response caching and validator behavior where applicable.
  • Index synchronization and revision handling.
  • Provider timeout, retry, and rate-limit behavior.
  • Identity and authorization test receipts.
  • Cross-owner cache isolation evidence.
  • Actual API responses and sanitized traces.
  • Browser screenshots showing source and retrieval timestamps.
  • Executed unit, integration, and failure-injection tests.
  • Recovery, rollback, and data-retention evidence.
  • Known limitations and unresolved production risks.

Do not infer a production cache implementation or interface from this article’s reference design.

26. Escalation and release gates

Escalate immediately when:

  • Protected cached information is visible outside its authorized scope.
  • Stale data are represented as current evidence in a consequential research or decision process.
  • Archived records overwrite accepted source revisions.
  • Provider failures are concealed by a complete-results status.
  • Source revisions cannot be reconciled with dependent research outputs.
  • Repeated writes may have produced duplicate or inconsistent records.
  • Recovery would require destructive cache operations, database mutation, or restoration from backup.
  • Published findings depend on incorrectly classified source freshness.

Stop affected publication or mutation workflows where necessary, but do not disable unrelated services without an authorized incident decision.

Preserve the last accepted state and record the correct recovery scope.

27. Technical references

  1. Fielding, R., Nottingham, M. and Reschke, J. (2022). HTTP Caching. RFC 9111. Internet Engineering Task Force. Available at: https://www.rfc-editor.org/rfc/rfc9111.html.
  2. Nottingham, M. (2010). HTTP Cache-Control Extensions for Stale Content. RFC 5861. Available at: https://www.rfc-editor.org/rfc/rfc5861.html.
  3. Nottingham, M., Wilde, E. and Dalal, S. (2023). Problem Details for HTTP APIs. RFC 9457. Available at: https://www.rfc-editor.org/rfc/rfc9457.html.
  4. Fielding, R., Nottingham, M. and Reschke, J. (2022). HTTP Semantics. RFC 9110. Available at: https://www.rfc-editor.org/rfc/rfc9110.html.
  5. Python Software Foundation (n.d.). datetime — Basic Date and Time Types. Available at: Python documentation.
  6. Python Software Foundation (n.d.). unittest — Unit Testing Framework. Available at: Python documentation.
  7. World Wide Web Consortium (W3C) (2013). PROV-O: The PROV Ontology. Available at: https://www.w3.org/TR/prov-o/.
  8. World Wide Web Consortium (W3C) (2024). Web Content Accessibility Guidelines (WCAG) 2.2. Available at: https://www.w3.org/TR/WCAG22/.

28. Completion and verification record

Table 10. Required troubleshooting outcome record
Field Required record
Incident identifier Unique support or engineering case
Affected scope Provider, project, source, and authorization context
Source revision Actual source and index revisions
Observation time Verified timestamp or explicit unknown
Retrieval time Verified retrieval record
Result origin Provider, cache, stale fallback, or archive
Freshness policy Actual policy and threshold
Provider coverage Complete, Partial, or Unavailable with details
Authorization Pass, Fail, or Not Tested
Cache isolation Pass, Fail, or Not Tested
HTTP cache compliance Pass, Fail, Not Tested, or Not Applicable
Revision reconciliation Pass, Fail, or Not Tested
Retry safety Pass, Fail, or Not Tested
Recovery Action, authorized operator, and evidence
Regression tests Executed results and code revision
Browser verification Actual displayed timestamps and status classifications
Publication impact Affected research outputs and correction decision
Reviewer Actual reviewer and date
Outstanding limitations Unresolved failures or verification gaps

Completion criterion: A freshness or cache-handling defect is resolved when the actual result origin, observation time, retrieval time, source revision, authorization scope, and provider coverage have been established; the confirmed root cause has been corrected; and the applicable numerical, protocol, security, runtime, and user-interface checks have passed.

Scientific limitation: Correct freshness classification does not establish the accuracy, completeness, representativeness, or scientific validity of a provider’s information. It establishes when and from where the information was obtained and whether its use satisfies a defined freshness and access policy.

Current implementation status: Technical troubleshooting procedures, timestamp definitions, HTTP caching distinctions, synthetic diagnostic fixtures, automated test definitions, safe recovery rules, and proposed acceptance criteria documented. No particular Sustainable Catalyst Unified Discovery cache store, provider adapter, freshness calculation service, browser interface, or production recovery workflow is certified without source-code audit, executed integration testing, runtime inspection, and release acceptance evidence.

Scroll to Top