﻿# How can editable source changes escape a package freeze?

A practical investigation of how can editable source changes escape a package freeze?, with explicit observations, control cases and evidence limits.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/field-bench-editable-install-freeze-source-state/
Language: en

## The comparison being tested

A benchmark rerun has an identical pip freeze report but produces different tokenization or timing behavior. A helper package was installed in editable mode and its local source changed without a version bump. The dependency listing can remain familiar while executed code differs. The investigation must identify the source actually imported, not treat a package-name and version pair as a complete snapshot of implementation.

## The confounding mechanism

Pip documents editable installs as using development files rather than copying them into an ordinary installed distribution. Python source edits can take effect without reinstalling; native components may still require rebuilding. Pip also states that freeze reports installed packages rather than computing a lockfile. PyPA direct-origin metadata distinguishes local editable directories from VCS commit information, but an origin location does not snapshot its current working tree.

## Fix the experimental contract

Define the environment record to include interpreter, import locations, package metadata and source identity for locally editable components. Preserve the checked-out revision plus tracked changes and relevant untracked inputs when these affect execution. Keep generated binaries and build configuration separately identifiable. Do not assume a clean commit name proves that a loaded native extension was rebuilt from those exact sources.

## A step-by-step comparison

First inspect which module paths the benchmark imports in its actual invocation. Match those paths to editable-origin metadata and record the local source state before running. Next create an isolated fixture that changes a harmless source behavior without changing package version. Verify that the provenance check detects the difference even if the installed-package listing is unchanged. Restore the intended source before comparing candidate performance.

## Evidence required for the result

The evidence should retain source hashes or a reviewable source snapshot, metadata, build identities and the environment listing under the same run identifier. Protect private path information when publishing the record. A control imports a similarly named module from another path: the audit should expose the changed origin rather than accepting a matching distribution name. Acceptance requires reconstructing the code path that generated the observation.

## Interpretation and limits

Editable development is legitimate and does not automatically invalidate results. The limitation is pretending its listing captures mutable local code. A regular installation can simplify packaging evidence but still needs artifact identity and environment checks. This protocol does not install software or reproduce an engine result; it closes the specific gap between reported package inventory and the source implementation actually exercised by a benchmark.

## Primary references and related reading

An installed-package list must be paired with the actual imported source state when editable projects are benchmarked. [pip freeze environment report](https://pip.pypa.io/en/stable/cli/pip_freeze/); [PyPA direct URL origin metadata](https://packaging.python.org/en/latest/specifications/direct-url-data-structure/); [pip editable versus regular local installs](https://pip.pypa.io/en/stable/topics/local-project-installs/).

The proposed investigation of editable install freeze source state is not an executed deployment benchmark. Related reading: [Reproducible inference stacks: preserving a GPU pilot’s result](/journal/software-stack-reproducibility/); [lm-evaluation-harness task identity: YAML, plugins, filters and code revisions](/journal/data-guide-lm-eval-task-config-revisions/).
