Files
codebase-memory-mcp/tests
Martin Vogel 55fbc5a6d7 feat(pipeline): a Dockerfile references the files it copies
A COPY or ADD source written as a plain path that is an indexed file under
exactly one of the two contexts a build of the Dockerfile can have (its
directory, the repository root) draws REFERENCES_FILE {via: copy | add,
line} from the Dockerfile's File node to that file's, once per file at the
first instruction naming it. A source of another stage or image (--from),
a URL, a glob, a source a variable supplies, a directory, a path out of its
context, a file under both contexts and a file under one context that is a
directory under the other draw nothing.

The lookup is the one the pass already uses to map a container path back
to the repository for SPAWNS; the pass already recorded every COPY and ADD.

The incremental planner runs the container pass over changed files only.
When a file that has a same-path partner under a Dockerfile's other context
is deleted, the remaining file becomes the only candidate, and its edge
would come from a Dockerfile that did not change. The same holds for a file
below a directory whose same-path partner is a file: once the directory is
empty, that file is the only candidate. Both deletions now take the full
route (docker_context_pair_deleted). The pass's SPAWNS mapping uses the
same lookup and had the first of the two gaps.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-11-26 23:05:31 +01:00
..