Skip to content

Fix checkpoint bundle dubious-ownership failure under Linux CI (#294 follow-up)#319

Merged
ealt merged 1 commit into
mainfrom
fix/checkpoint-bundle-dubious-ownership
Jun 16, 2026
Merged

Fix checkpoint bundle dubious-ownership failure under Linux CI (#294 follow-up)#319
ealt merged 1 commit into
mainfrom
fix/checkpoint-bundle-dubious-ownership

Conversation

@ealt

@ealt ealt commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up hotfix to #318 (merged as 03614ef). The merged #294 work landed with red compose-smoke-checkpoint / compose-smoke-auto-checkpoint checks (those smoke jobs aren't branch-protection-required yet), so main currently carries the bug: checkpoint export fails with git bundle create ... fatal: Need a repository to create a bundle.

  • Root cause (the AGENTS.md uid-match / dubious-ownership trap): the checkpoint repo is a host bind-mount (task-store-repo) whose top directory is owned by the host/runner uid, while the task-store-server runs as eden:1000. Git refuses to recognize a repository owned by a different uid, and git bundle surfaces that rejection as "Need a repository". eden_git.GitRepo already guards every invocation with -c safe.directory={path} (so the integrator's clone of the same host-owned mount works), but eden_checkpoint.repo_bundle's git helper did not.
  • Fix: add -c safe.directory=* to repo_bundle._git_env_overrides(), mirroring GitRepo._git_argv. These helpers only ever touch server-managed repos + scratch dirs, so disabling the ownership heuristic carries no untrusted-repo risk.
  • Why it slipped past local validation: macOS bind-mounts squash ownership to the container uid, so the dubious-ownership check never triggers locally — the exact "pytest is not a substitute for the bash smoke, and the smoke only fails on Linux" gap. Reproduced + fix-verified in a throwaway Linux container recreating the exact uid mismatch (repo top-dir uid ≠ git process uid): without the flag → "Need a repository"; with it → bundle created.

What this does NOT cover

Fresh-operator walkthrough

  • Walkthrough performed against the checkpoint-export flow via both compose smokes (image rebuilt with the fix).
  • Notes: bash reference/compose/healthcheck/smoke-checkpoint.shPASS (repo.bundle OK: 3256 bytes, 3 variant refs; git bundle verify + ref-set + import round-trip all green); bash reference/compose/healthcheck/smoke-auto-checkpoint.shPASS (3 periodic + 1 terminal archive, every one carrying a non-empty bundle). These are the two jobs that were red on main; both green locally with the fix.

Test plan

  • Linux-container repro of the exact uid mismatch — confirms failure without the flag, success with it
  • bash reference/compose/healthcheck/smoke-checkpoint.sh — PASS
  • bash reference/compose/healthcheck/smoke-auto-checkpoint.sh — PASS
  • full pre-push gate (complexity, ruff, pyright, docs-lint) — clean
  • uv run pytest -q — 2355 passed, 254 skipped (one unrelated Flaky: test_loop_respawns_on_subprocess_crash fails with BrokenPipeError under parallel pytest load #307 flake, passes in isolation)
  • new regression guard test_git_env_overrides_disables_dubious_ownership in test_checkpoint_repo_bundle.py

Related issues

🤖 Generated with Claude Code

compose-smoke-checkpoint / compose-smoke-auto-checkpoint failed in
PR-CI with `git bundle create ... fatal: Need a repository to create a
bundle` — the dubious-ownership trap. The checkpoint repo is a host
bind-mount whose top directory is owned by the host/runner uid, while
the task-store-server runs as eden:1000; git refuses to recognize a
repo owned by a different uid, and `git bundle` surfaces that as "Need
a repository". Invisible locally on macOS (bind-mount ownership is
squashed to the container uid); only manifests on Linux CI — the exact
pytest-is-not-a-substitute-for-the-smoke gap.

eden_git.GitRepo already guards every invocation with
`-c safe.directory={path}` (so the integrator's clone of the same
host-owned mount works), but eden_checkpoint.repo_bundle's git helper
did not. Add `-c safe.directory=*` to `_git_env_overrides()`, mirroring
GitRepo._git_argv — these helpers only touch server-managed repos +
scratch dirs, so the heuristic carries no untrusted-repo risk.

Reproduced + fix-verified in a throwaway Linux container recreating
the exact uid mismatch (repo top dir uid != git process uid):
without the flag → "Need a repository"; with it → bundle created.
Both compose smokes now pass locally (image rebuilt). Regression
guard added in test_checkpoint_repo_bundle.py.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit b87e2744e07eeea16071850630bb653490fc9b0d)
@ealt ealt enabled auto-merge (squash) June 16, 2026 20:48
@ealt ealt merged commit 7195f89 into main Jun 16, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant