Skip to content

Follow-up from #2365: the sampler finds no repository in a git worktree #349

Open

Description

@oxa-agent

Observed in the two-pass review of oxstack/ox-llm#2365 at head 4ddb6bfc89a0f2d6a7efcd76d22d7dc61dc62cdf (static read of the diff; no local build). Carried from the review at 4d30ba28, unchanged at this head.

repository() (oxa/oxa-cli/src/lead_sampler.rs:195) reads cwd/.git/config. In a git worktree .git is a gitdir: file, so with oxa.lead.serve.repo unset the sampler finds no repository and starts nothing. The "lead sampler off" journal line only fires when oxa.github.tokenCommand is set (oxa/oxa-cli/src/lead_serve.rs:1120-1130), so an owner with only GH_TOKEN gets no reason in the journal.

Scenario: an owner runs oxa lead serve from a worktree of a github project with GH_TOKEN set and no oxa.lead.serve.repo: no sampler, and the page says "Sampling: external timer" although a token source is configured.

Fix: resolve the config through the git common dir (the way work_cmd.rs does), or write one fixed journal line whenever no repository was found, whatever the token source.

Activity

  1. transferred this issue fromon Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions