abhigyanpatwari/GitNexus · error · ValueError
committed overlay destination is unavailable: {target}
Error message
committed overlay destination is unavailable: {target} What it means
Thrown in `committed_destination_base_digests` when `git show {commit}:{key}` fails for a target path. The promoter needs the bytes of every committed destination to hash them; if any target is missing from that commit, overflowed the byte cap, or git reported an error, the committed binding cannot be captured.
Source
Thrown at eval/workflow_bench/promotion_apply.py:551
)
if not rev.ok or rev.stdout_capture_overflow or rev.stdout_capture is None:
raise ValueError("could not resolve the committed promotion base")
commit = rev.stdout_capture.decode("ascii", errors="strict").strip()
if not commit or any(character not in "0123456789abcdefABCDEF" for character in commit):
raise ValueError("committed promotion base is not an immutable object id")
bindings: dict[str, str] = {}
for relative, _content in payload:
for target in mirror_targets(relative):
key = target.as_posix()
if key in bindings:
raise ValueError(f"duplicate overlay destination: {target}")
result = run_managed(
["git", "-C", str(root), "show", f"{commit}:{key}"],
timeout=60,
capture_stdout_bytes=MAX_CANDIDATE_OVERLAY_BYTES + 1,
)
if not result.ok or result.stdout_capture_overflow or result.stdout_capture is None:
raise ValueError(f"committed overlay destination is unavailable: {target}")
bindings[key] = hashlib.sha256(result.stdout_capture).hexdigest()
return bindings
def _write_recovery_artifact(
root_descriptor: int,
repo_root: Path,
*,
failure: BaseException,
rollback_failures: list[str],
replacements: list[dict[str, Any]],
transaction_state: str,
) -> Path:
recovery_name = ".wfbench-overlay-recovery-" + datetime.now(UTC).strftime("%Y%m%dT%H%M%S%fZ") + ".json"
def descriptor_path(descriptor: int, fallback: Path) -> Path:
try:
return Path(os.readlink(f"/proc/self/fd/{descriptor}"))View on GitHub (pinned to d540b00184)
Solutions
- Confirm the file exists at that commit: `git -C <repo> cat-file -e <commit>:<path>` — if it errors, pick a ref where the file exists.
- Check path casing and that the key uses no leading slash (`mirror_targets` produces repo-relative paths).
- If the file is large, raise `MAX_CANDIDATE_OVERLAY_BYTES` or remove that target from the overlay.
- Ensure the overlay was generated against the same commit you are binding (don't add new files to the overlay without committing them first).
Example fix
# before: overlay references docs/NEW.md not yet committed bases = committed_destination_base_digests(overlay) # -> ValueError # after: commit the file, then capture import subprocess subprocess.run(['git', 'add', 'docs/NEW.md'], cwd=repo_root, check=True) subprocess.run(['git', 'commit', '-m', 'add docs/NEW.md'], cwd=repo_root, check=True) bases = committed_destination_base_digests(overlay)
Defensive patterns
Strategy: validation
Validate before calling
import subprocess
from workflow_bench.promotion_apply import candidate_overlay_payload, mirror_targets, MAX_CANDIDATE_OVERLAY_BYTES
def all_targets_exist_at_commit(repo_root, overlay, ref="HEAD") -> bool:
_, payload = candidate_overlay_payload(overlay)
targets = [t.as_posix() for rel, _ in payload for t in mirror_targets(rel)]
for key in targets:
r = subprocess.run(
["git", "-C", str(repo_root), "cat-file", "-e", f"{ref}:{key}"],
)
if r.returncode != 0:
return False
return True Type guard
null
Try / catch
null
Prevention
- Commit every target file before capturing committed bases.
- Keep target paths repo-relative with no leading slash and correct casing.
- If a file is large, raise `MAX_CANDIDATE_OVERLAY_BYTES` or exclude it from the overlay.
When it happens
Trigger: Calling `committed_destination_base_digests(overlay, ref=<ref>)` where the commit does not contain one of the overlay's target paths (`git show` exits non-zero), the file is larger than `MAX_CANDIDATE_OVERLAY_BYTES`, or `stdout_capture_overflow`/`None` capture made the result unusable.
Common situations: Overlay targets a file that was added in a later commit than `<ref>`; the path was renamed/removed before `<ref>`; the target path is in `.gitignore` and was never committed; the file is binary and exceeds the byte cap; the commit SHA resolved correctly but the path key has wrong casing or leading slash.
Related errors
- committed promotion base is not an immutable object id
- ${source}: branch name must not be empty.
- ${source}: branch name is too long (max ${BRANCH_MAX_LENGTH}
- ${source}: branch name must not contain whitespace.
- ${source}: branch name contains characters not allowed in a
AI-assisted analysis of abhigyanpatwari/GitNexus@d540b00184 (2026-08-12).
Data as JSON: /api/errors/89b11b939f780e44.
Report an issue: GitHub.