feat(storage): bulk-copy CR storage driver into _imported/ (S06 Step 11)
What
S06 Step 11 — bulk-copy the Container Registry storage driver layer
verbatim into the Go-toolchain-ignored quarantine internal/storage/_imported/.
First step of S06 Track B (lower-layer port).
Plan: docs/plans/2026-05-15-storage-layer.md · Spec: S06
Why this shape
The leading underscore in _imported/ makes the whole tree invisible to the Go
toolchain (go build/test/vet/mod tidy all skip _-prefixed dirs), so
main stays green even though the code has unported
github.com/docker/distribution/... imports and does not compile yet.
Adaptation (interface narrowing, import rewrites, LabKit v2 wiring) and trimming
of out-of-scope trees happen in steps 12–20, not here.
Reviewer effort is bounded: this is a verbatim copy, audited by diffing
against the pinned upstream commit — not a line-by-line read. The tree is also
marked gitlab-generated so it collapses in the diff.
Source (pinned)
| Repo | gitlab-org/container-registry |
| Commit | e835b93c9a5e5dedd666eac3110adb2554e1957f (master) |
| Mapping | registry/storage/driver/ → internal/storage/_imported/driver/ (64 files, verbatim) |
registry/storage/cache/ is intentionally not copied: it is the OCI
blob-descriptor cache (BlobDescriptorCacheProvider), not the signed-URL
cache. The S06 URL cache is driver/middleware/urlcache/ (inside the copied
tree) and is self-contained. The rest of registry/storage/ (manifest/tag/GC
logic) is out of S06 scope. Rationale recorded in COPY_SOURCE.md.
Verbatim verification
$ diff -r internal/storage/_imported/driver "$CONTAINER_REGISTRY_PATH/registry/storage/driver"
exit=0Empty diff (exit 0): the only file in the tree not sourced from the Container
Registry is COPY_SOURCE.md.
Keeping _imported/ off every checker
.golangci.yaml—linters+formattersexclusion paths.markdownlint-cli2.yaml,.vale.ini— ignore the tree.gitlab-ci.yml— extendCOMMON_TASK_VALIDATIONS_EXCLUDES_REGEXP;lychee --exclude-path.pre-commit-config.yaml— top-levelexcludeso formatting hooks (pretty-format-json, end-of-file-fixer, …) never mutate the verbatim tree.gitattributes— marklinguist-generated/gitlab-generated
Tests
None — per the plan, the copied tests are not built at this step. New behaviour and tests arrive with the adjust steps (15–20).
Note
This MR's raw LOC is large (~23k) by design — a justified exception to the
500-LOC guideline per the planner's bulk-copy strategy. Per-line reviewer cost
is ~0: verify the empty diff -r above against the pinned SHA.