Skip to content

fix(github): gh project sync and reconcile resolve their template and task paths against the cwd and fail outside the repo root #1010

Closed as not planned

Description

@dan-petty

Context & Rationale

Both board commands resolve their input files relative to the current directory, so they fail when run from a subdirectory of the checkout. Checked at 9c879ae on 2026-10-02, shell in .data/agent/scratch/<dir>:

  • devops gh project sync --dry-run raised GitHubOperationError: Task path not found: docs/agent/tasks with a full Rich traceback (commands/gh.py:481 → github/projects.py:282 → _resolve_task_files :199). The default of --task-file is the relative docs/agent/tasks (commands/gh.py:478).
  • devops gh project reconcile -n 2 --state open --dry-run printed Failed to reconcile project #2: Project template file not found: .github/project-template.json, even though the board number was given, because reconcile_project_custom_fields loads the template itself (github/projects.py:117). Without -n, _resolve_project_number (commands/gh.py:518) fails the same way.
  • Passing --task-file and --template as absolute paths works for sync; reconcile has no --template option, so only running from the repo root works.
  • devops gh milestones list and devops gh issues create run fine from the same directory, so the two board commands are the exception.

Scope & Deliverables

  • Deliverable: the template and task paths default to locations under the repository root (git rev-parse --show-toplevel, as core/repo.py already resolves it), not the cwd; reconcile does not load the template when the board number is given; a missing file is reported as one line, not a traceback.
  • Tests: a CLI test that runs sync --dry-run and reconcile --dry-run with monkeypatch.chdir into a subdirectory of a fake checkout and asserts they resolve the files; a test that a missing template with -n given does not fail reconcile.
  • Constraint: fix(github): gh project sync stops parsing task files and reports only what it wrote #878 removes the task-file read from sync altogether; if it lands first, only the template path and the reconcile -n case remain here.

Strategic Alignment

Activity

  1. added
    type/bug
    scope/github
    priority/p3-low
    on Oct 2, 2026
  2. dan-petty commented on Oct 3, 2026

    @dan-petty
    OwnerAuthor

    Merged into #892: the cwd-relative template default and reconcile's template load with -n are in the entry points #892 rewrites. #878's task-file half is deleted there too. The repo-root default and one-line error criteria are carried.

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

    priority/p3-lowscope/githubtype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions