﻿# Snakemake ancient inputs: ignoring freshness does not make a model file immutable

Interpret the Snakemake ancient flag as a freshness policy, keeping it separate from model artifact identity, forced reruns and the evidence needed for reproducibility.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-snakemake-ancient-input-not-immutable-model-reference/
Language: en

## The reference model is replaced behind a stable path

A workflow marks a reference model file as ancient to avoid rebuilding downstream evaluations after unimportant timestamp changes. Later someone replaces the file's contents at the same path. The workflow policy can still suppress the freshness trigger that the author deliberately disabled, while old evaluation outputs remain present.

The original optimization assumed a stable reference. Replacing its contents changes that assumption. A flag controlling rebuild decisions does not prevent file mutation or retain the earlier model for a future replay.

## Ancient changes freshness handling

The [Snakemake rule reference](https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html) describes ancient inputs as being treated as older than outputs for freshness purposes. It also notes that forced recreation still applies. Interpret the flag in that documented scope rather than as a universal promise that the associated job can never run again.

Current freshness behavior can involve more than naive timestamp comparison, so inspect the installed version's rules. The central point remains that ancient is a deliberate exception to ordinary input-change handling, not an artifact versioning system.

## A model identity needs independent evidence

Use an [artifact release manifest](/journal/tokenizer-artifact-release-manifest/) or another immutable reference policy to identify the model actually evaluated. A path that retains its spelling is not equivalent to a file whose contents remain fixed.

The [provenance guide](https://snakemake.readthedocs.io/en/stable/executing/provenance.html) describes workflow provenance capabilities. Preserve the evidence needed to explain the reference artifact alongside the rule's freshness policy. Historical output availability alone cannot identify a model that was overwritten after producing it.

## Forced reruns and fresh meaning are different

The [command-line guide](https://snakemake.readthedocs.io/en/stable/executing/cli.html) documents controls for forcing execution. A forced run can recompute against the current file, but it cannot reconstruct overwritten historical contents automatically. Re-execution and restoration answer different questions.

For an experiment intended to compare candidates against one fixed reference, verify that every candidate actually consumed the same resolved artifact. Otherwise a rerun may be operationally fresh while no longer comparable to the earlier results.

## Test the exception before relying on it

Use an expendable input to inspect behavior under a timestamp-only change, a content change and a deliberate forced rerun. Record the chosen policy and observed output identities without generalizing from a single unchanged file.

[Dataset evidence documentation](/journal/data-guide-datasheets-dataset-evidence-gaps/) offers a parallel lesson: naming and storage conventions need an explicit account of what the reference represents. Ancient can express a justified freshness assumption, but the experiment must still justify and preserve its reference identity.
