Status: R7 candidate implementation for Delivery binding; independent acceptance pending.
Intelligence: none — A bounded fixed Git command reads committed bytes; interpretation and generation are absent.
readCheckoutHead(root, path, expectedHead?) in checkout-git.ts reads one UTF-8 blob from a canonical primary checkout. Without a pin it reads HEAD:<path>. Delivery supplies Portfolio's inspected 40-hex commit ID for every copied blob, preventing mixed snapshots if HEAD moves away and back during binding. No working-tree bytes are read. Linked worktrees are refused consistently with Portfolio's primary-checkout registration contract.
The executable is Repository's fixed GIT_EXECUTABLE, invoked without a shell or stdin. Every invocation disables hooks, fsmonitor, untracked caching, log updates, automatic maintenance, replacement objects, lazy fetch, text conversion and external diffs. The explicit environment inherits no Git variables, suppresses system/global configuration and attributes, has no protocol allowlist, disables prompts/optional locks and bounds repository discovery. Only git cat-file blob <commit>:<path> is used. This deliberate R7 addendum enforces blob type: git show also accepts directories and emits tree text. There is no batch reader, tree traversal or planned service scanner here.
Limits are 30 seconds, 128 KiB stdout and 16 KiB stderr. Overflow, timeout, a nonzero exit, invalid UTF-8, malformed paths or Git-metadata paths refuse without returning partial bytes. The child is killed on timeout. This reader executes no checkout code and writes no checkout metadata.
Focused tests inspect the actual spawn arguments and environment, exercise hostile configuration, preserve dirty bytes/HEAD/index/config, refuse output and encoding failures, and read an explicitly pinned old commit after HEAD moves. Alternate object stores may supply committed Git objects; they confer no command or transport authority.
