Source: https://guthlabs.ai/docs/instruments/leftover-freshness-countdown-tracker/mechanism/

instrument mechanism / verified-clean

# Leftover/Freshness Countdown Tracker mechanism

The inspectable method record for Leftover/Freshness Countdown Tracker, kept separate from implementation and qualification.

Status: **VERIFIED_CLEAN**Lifecycle: **verified-clean**

## Model scope

The core subtraction is standard date arithmetic, but the instrument is not formula-complete because the table contains ranges and mixed units and the specification does not define a selection or conversion policy. The honest-label warning is appropriate and should be prominent: estimates only, not a substitute for USDA food-safety guidance or sensory and handling judgment.

- The date arithmetic is valid only after a single shelf-life value is selected, but USDA FoodKeeper commonly provides ranges such as 3–4 days or 1–2 days; the specification does not define whether to use the minimum, maximum, or another value.

- FoodKeeper shelf-life guidance is an estimated quality/safety window, not a calculated spoilage date. The output should be labeled an estimated discard/use-by date rather than an expiry or spoilage date.

- Freezer guidance is often expressed in months and for quality rather than safety; converting months to shelf_life_days requires an explicit calendar-month versus fixed-day policy.

- The formula omits storage temperature, refrigerator/freezer operating condition, packaging, whether the food was opened, and time spent in the temperature danger zone. Food type plus broad storage method is insufficient for a reliable safety estimate.

- The subtraction convention is unspecified: it must define whether days_left is a calendar-day difference, whether the storage date counts as day zero, and whether negative values are permitted after the estimated date.

## Units and conventions

- Dates are interpreted as ISO calendar dates in the proleptic Gregorian calendar.

- expiry_date = date_stored plus the selected shelf-life duration; the storage date is day zero.

- days_left = expiry_date minus today, measured as whole calendar days. A result of zero means the estimated date is today; a negative result means the estimate has passed.

- For the refrigerated vectors, the implementation policy used here selects the conservative maximum table endpoint: 4 days for cooked leftovers, 7 days for hard-cooked eggs, and 2 days for raw chicken. This policy is not stated in the instrument specification.

- The frozen-leftovers table value is expressed as 2–6 months. The test vector explicitly uses a 180-day approximation for the 6-month upper endpoint; this is not equivalent to six calendar months in every date interval.

## Inspectable vector

One of 4 source-bound review vectors:

````
{
  "inputs": {
    "food_item": "cooked meat or poultry leftovers",
    "date_stored": "2025-03-01",
    "storage_method": "fridge",
    "today": "2025-03-05"
  },
  "expected_outputs": {
    "estimated_use_by_date": "2025-03-05",
    "days_remaining": 0
  },
  "reference_data": {
    "foodkeeper_table_row": {
      "food_item": "cooked meat or poultry leftovers",
      "storage_method": "refrigerator",
      "shelf_life": "3–4 days"
    },
    "selected_shelf_life_days": 4,
    "selection_policy": "maximum endpoint of the USDA range",
    "source_convention": "USDA FoodKeeper / FoodSafety.gov standard consumer food-storage table value"
  },
  "working": "1. Select 4 days from the table's 3–4 day refrigerator range using the stated maximum-endpoint policy. 2. 2025-03-01 + 4 calendar days = 2025-03-05. 3. days_left = 2025-03-05 − 2025-03-05 = 0 days."
}
````

## Failure boundary

**BREAK_CLAIMED** · SELF_FLAGGED

The instrument cannot produce a deterministic numeric result from the supplied specification because the required FoodSafety.gov/USDA shelf-life lookup table is absent and the table may contain ranges rather than one shelf-life value. It also lacks an explicit date-range and overflow policy; a positive shelf life added to 9999-12-31 produces an out-of-range date.

## Other records

[01**Overview**](<https://guthlabs.ai/docs/instruments/leftover-freshness-countdown-tracker/>)[03**Implementation**](<https://guthlabs.ai/docs/instruments/leftover-freshness-countdown-tracker/implementation/>)[04**Qualification**](<https://guthlabs.ai/docs/instruments/leftover-freshness-countdown-tracker/qualification/>)

## Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

- `VERIFIED_LEDGER.json`

- `evidence-tranche7/tranche7-results.json`

- `BOUNDARY_HAZARD_CATALOG.json`
