Skip to content

fix(github): gh project sync stops parsing task files and reports only what it wrote #878

Closed as not planned

Description

@dan-petty

Context & Rationale

Since #703, the help and docs say devops gh project sync does not read task files (lang/en/help.py:757-760, docs/agent/tasks/README.md:13, docs/MCP_TOOLS.md:69). The code still reads them:

  • sync_project takes --task-file, which defaults to docs/agent/tasks (commands/gh.py:523-530). It parses every task file (:551) and builds the "synchronized N items (Backlog: x, Done: y)" line from those counts (:552-575).
  • sync_remote_project (github/projects.py:1377-1428) never writes those items, but adds them to its count: items_synced=len(items) + items_added (:1425).
  • A dry run returns project Release v0.1.8 #1 and len(items) without reading GitHub (:1386-1396).
  • At ef21785, parse_tasks_to_project_items(Path('docs/agent/tasks')) returns 1,499 items (1,430 Done, 69 Backlog). Each one is reported as synchronized.
  • The parser (projects.py:128-282, with ProjectItem at :74) has no other caller. github/__init__.py:101,112,160,212 re-exports it.
  • AGENTS.md:216 ("Synchronize task items") and :312 ("linking card lifecycles with docs/agent/tasks/") repeat the old claim.

Scope & Deliverables

Deliverable:

  • Remove --task-file, the parse and the items parameter from project sync and sync_remote_project.
  • Delete these, with their re-exports and their tests (tests/test_github_projects.py:32, :58, :117, :615):
    • parse_tasks_to_project_items and its private helpers;
    • _ITEM_REGEX;
    • _determine_section_status;
    • ProjectItem.
  • The result reports only what the run wrote: the issues it added to the board and the fields it provisioned.
  • A dry run says what a live run would do. It prints no project number or count that it did not read.
  • Reword AGENTS.md:216 and :312, and regenerate docs/commands/gh.md and docs/CLI_REFERENCE.md.

Acceptance criteria:

  • rg -n 'parse_tasks_to_project_items|ProjectItem\b|--task-file' src tests docs/commands docs/CLI_REFERENCE.md AGENTS.md returns nothing.
  • A test with run_gh stubbed checks that a live sync which adds 2 issues reports 2, whatever task files exist on disk.
  • A dry-run test checks that run_gh is never called and that the output contains no project number.
  • uv run devops ci passes. The changed tests run offline in under 0.1 s each.

Key questions:

Constraint:

Strategic Alignment

Split off #704 during the v0.2.25/v0.2.26 readiness review (2026-10-01): This was the 'honest sync' part of #704. It is a different command and module from the readiness blocker, so keeping it there would make #704's PR deliver two things. It is also left over from #703: that item reworded the help and docs to say task files are not read, but the code still parses them and counts them as synchronized.

Activity

  1. added
    type/bug
    scope/github
    priority/p2-medium
    on Oct 1, 2026
  2. dan-petty commented on Oct 2, 2026

    @dan-petty
    OwnerAuthor

    Note from refining #892 (2026-10-02, now in v0.2.29). #892's refined scope deletes sync_repository_issues_to_project, the step in sync that adds every open issue to the board; intake (#742) takes over adding items. After #892, sync adds no issues, so this item's rename of items_synced to issues_added no longer fits. It should drop the count and report the fields provisioned and reconcile's outcome instead. #892 also edits AGENTS.md:313, which this item touches as well, so whichever lands second rebases.

  3. dan-petty commented on Oct 3, 2026

    @dan-petty
    OwnerAuthor

    Merged into #892: sync's task-file parse and its count sit in the same sync/reconcile chain that #892 rewrites, and #892 now reports only what the run did. This item's criteria are carried there.

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/p2-mediumscope/githubtype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions