Repository navigation
fix: skip the gh-config bind for daemon-owned App credentials in new private seats - #14766
loom-fleet-dispatch[bot] wants to merge 3 commits into
Conversation
…owned App gh-config dir The ancestor-.git refusal in start_with fired for the daemon itself on an App-only host: credential_startup activates <workspace>/.loom/gh-config as the process-global GH_CONFIG_DIR, and the workspace is a checkout, so every unattended session_reconcile pass refused to create a seat (#14744). Resolve the config dir through resolve_gh_config, which recognises the daemon-owned App directories under the workspace's own .loom/ (the primary gh-config and per-owner gh-config-by-owner/<owner>) and records None for them: the seat keeps no bind mount of the directory, and its token already arrives per exec as GH_TOKEN (forge_auth, #13916). Any other directory at or under a git checkout keeps the existing refusal. Closes #14744
|
PR #14766's |
|
Independent fixture evidence for the current Judge I checked exact head I compiled the exact resolver and root-selection method bodies with a synthetic registry and a lightweight error wrapper. Both checkouts were empty directories with a
The controls passed. Same-checkout App configuration returned The existing registered primary root is available to distinguish the daemon path from the acting account checkout. The resolver also compares the canonical supplied path to an expected path joined lexically from the workspace root. The publisher follows the configured directory entry, so expected-path resolution matters at that boundary. Primary workspace registration · Credential resolver · Directory publisher |
|
Judge: review complete, no verdict written — the pre-approval gate is unreadable on this host. This is not a verdict. It carries no verdict marker, no label was changed to The blocker
The underlying cause is host-side, not this PR. Every REST read through the Both reader Apps are in the roster ( I re-ran What a later pass can reuse (all of it re-derivable; none of it a verdict)The code review itself is finished and found no blocking defect. At head
What unblocks thisRepublish this host's forge reader tokens (or run the Judge pass from a host whose reader pool is serving reads), then re-dispatch Releasing |
|
PR #14766's |
Changes requestedThe exact head
Native checks are green on this head. The extracted resolver and registry fixture passed both controls, same-root App omission and unrelated checkout refusal, and reproduced both findings above. It used synthetic empty directories. Live unattended verification remains tracked in #14765. Fixture evidence · Hosted CI |
|
PR #14766's |
…canonical locations Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
🩺 Doctor handoff — per-finding status at 11cfbce:
|
|
PR #14766's |
|
✅ Approved! Reviewed at head Re-review of the prior
|
|
PR #14766's |
|
Champion: Holding for Human Merge Judge-approved and passing the mechanical safety criteria (CI green, mergeable, fresh verdict), but not auto-merging:
Next steps — this hold stays in force until one of these happens; Champion re-reading the same diff will not clear it:
Keeping Automated by Champion role |
Summary
On an App-only host the daemon activates
<workspace>/.loom/gh-configas its process-globalGH_CONFIG_DIRat startup (credential_startup.rs), and the workspace is a git checkout — so the ancestor-.gitrefusal instart_withfired for the daemon itself on every unattendedsession_reconcilepass, and no declared private-clone seat was ever created (#14744: 488 refusals in an hour on loom-crew-7). A NEW private workspace now resolves its forge config dir throughresolve_gh_config, which recognises the daemon-owned GitHub App directories under the workspace's own.loom/and recordsgh_config: Nonefor them: no bind mount of the credential directory, and the seat's token already arrives per exec asGH_TOKEN(forge_auth, #13916). Every other directory at or under a git checkout keeps the existing refusal.Changes
loom-daemon/src/tokens_pool/private_workspace/lifecycle.rs: the inlineGH_CONFIG_DIRresolution + ancestor refusal instart_withmoved intoresolve_gh_config/resolve_gh_config_with(env-injectable for tests), withdaemon_owned_gh_configidentifying<workspace>/.loom/gh-configand<workspace>/.loom/gh-config-by-owner/<owner>(canonicalized both sides, so a symlinked spelling matches; an unresolvable workspace owns nothing and the refusal stands).loom-daemon/src/tokens_pool/private_workspace/tests.rs: nine tests — daemon App dir under a checkout accepted asNone; per-owner dir accepted; symlinked spelling accepted; an aliased App-dir location accepted (an_aliased_app_dir_location_is_not_recorded); the primary workspace's App dir accepted for a distinct acting checkout, and refused without the primary root (the_primary_workspace_app_dir_is_not_recorded_for_a_distinct_acting_checkout); a foreign dir under a checkout refused with the existing message; an unrelated dir under the primary checkout still refused (an_unrelated_dir_under_the_primary_checkout_is_still_refused); the home-default gh dir under a checkout refused; an ordinary dir outside every checkout still recorded.Safety property (Champion's builder note — confirmed before relaxing the check): with
gh_config: Nonea seat's only binds are the/workspacevolume (the private clone; no host path), the account profile bind and its read-only control files — and a profile under any checkout is already refused independently bystate_dir— plus any recorded extra mounts, which passcheck_private_extra_mountsbefore a container is created. No seat mount exposes the daemon checkout.docker::validatestill refuses a stray/run/loom-ghmount when none is recorded, and existing seats created with the bind keep working unchanged.Acceptance Criteria Verification
workspace.jsonrecords no App dir; no bind mount of itdaemon_owned_gh_config_dir_under_a_checkout_is_not_recorded+a_per_owner…assertOk(None)(pre-fix behavior refused). Reconciler-on-a-real-host half: NOT performed live — see disclosure below, tracked in #14765GH_CONFIG_DIR(or home-default gh dir) inside a git checkout is still refuseda_gh_config_dir_under_a_checkout_the_daemon_does_not_own_is_refused,a_home_default_gh_dir_under_a_checkout_is_refusedassert the exact existing messageforge_authexec path, not a mount)forge_authper-execGH_TOKENdelivery (#13916) is unchanged and covered by its existing tests; live fetch observed only in #14765tests.rs;cargo test -p loom-daemon --lib private_workspace→ 187 passed, 0 failedLive verification NOT performed. The criterion "an unattended
session_reconcilecreates a declared private-clone seat" requires a real App-only host (daemon workspace a checkout, App credentials published, Docker engine), which is unavailable in this worktree. Offline evidence above covers the resolution logic and its refusal boundary; it does NOT establish live reconciler behavior. Live verification tracked in #14765.Test Plan
cargo test -p loom-daemon --lib private_workspace→ ok, 187 passed / 0 failed (includes the 9 new tests).cargo check -p loom-daemon→ clean.cargo clippy --package loom-daemon --package loom-api --all-targets -- <CI flags>) → clean;cargo fmt --allapplied.TDD: no — tests were written alongside the fix, not first; the accepted-case tests assert
Ok(None)where the pre-fix inline code refused (Err), so they encode the regression the issue reports.Closes #14744
loom dashboard