# Prior art — base-free patch application and content addressing of patches Search run 2026-09-23 for the rescue's changed ingredient (recovering a patch's base from served bytes by content, instead of requiring a recorded base identity). Sources are external and were read as data. - **git's three-way apply needs the recorded blob id.** `git-apply(1)`: `--3way` "attempt[s] 3-way merge if the patch records the identity of blobs it is supposed to apply to"; the code requires an `index` line for that path (`apply.c`: "For safety, we require patch index line to contain"). This is #1486's own finding, and it is why a plain `diff -u` patch degrades to a line-match — [chromium.googlesource.com apply.c](https://chromium.googlesource.com/external/github.com/git/git/+/9fadb373dd4a670e761776560d3c40f6fcc80360/apply.c#7), [kernel.googlesource.com apply.c](https://kernel.googlesource.com/pub/scm/git/git/+/refs/tags/v2.20.0-rc1/apply.c#7). - **Heuristic / semi-manual application is a documented fallback** when the source has changed substantially (`git apply` context reduction, recount, and the "apply by hand" family of options) — [stackoverflow.com revisions post](https://stackoverflow.com/posts/59016006/revisions#1). - **Fuzzy application by context matching is classical**: diff-match-patch locates a patch's pre-image by searching for its context with a fuzzy threshold rather than trusting line numbers (`match_main`, `patch_apply`) — [android.googlesource.com dmp.go](https://android.googlesource.com/platform/external/kythe/+/c6ffcf204f17c58231a09a951171860bc8be41dc/third_party/go/src/github.com/sergi/go-diff/diffmatchpatch/dmp.go#5), [chromium.googlesource.com dmp.go](https://chromium.googlesource.com/external/github.com/sergi/go-diff/+/46a5ea38cd871938467b9dfcb00805fb7efcac7f/diffmatchpatch/dmp.go#5). - **Content addressing of the patch itself is standard**: `git patch-id` hashes a patch's pre-image/post-image line pairs, and `--stable` makes the id independent of line numbers, so a patch can be named without naming its base — [Mageia 9 git-patch-id(1)](https://man.pm/MGA9/1+git-patch-id?pdf#1#1). Content-addressable storage and its use in Git are textbook — [COS 316 notes](https://cos316.princeton.systems/notes/Content%20Addressable%20Storage%20&%20Git.pdf#1#1). - The unified-diff pre-image fact used here (a hunk's ` `/`-` lines are its pre-image slice) is what all of the above already rely on for context matching; it is not a new claim. **Exact remaining gap.** No source read packages, for a patch queue whose accept path records no base, the *certificate* step used here: identify the base as the served version that every hunk's pre-image slice matches at a unique offset, publish `base_sha256` and `post_sha256` in the return's own `hashes` field, and prove the identification when the reconstruction equals a served version. `git patch-id` names a patch without its base but is explicitly not an applicability certificate; `git apply --3way` is an applicability test that requires the base identity to have been recorded; diff-match-patch applies fuzzily but records nothing content-addressed. The rescue's contribution is therefore the packaging plus the measured certificates, on classical ingredients — a convention and a resolver, not a new mechanism.