Skip to content

pull: submodule update can succeed while skip-sync still skips tool-dir deploy #525

Closed

Description

@hsuchifeng

Summary

Follow-up to #501 (submodules: true → git submodule update --init on pull).

#501 holds back lastPullRev when the submodule update fails, so a later retry can full-sync. It does not bypass skip-sync when the update succeeds but the parent SHA is already the cached lastPullRev.

getInstalledResourceTargets only records which AI tools are installed, not which skills appeared. Filling an empty submodule therefore does not invalidate the fast path. Team-repo content is populated; ~/.claude/skills (etc.) stay empty until teamai pull --force or the parent SHA moves.

This is the second half of the review note on #501: don't skip when the update succeeded and the tree changed. Only the failure hold-back landed.

When it happens

  1. Team repo already has submodules: true and submodule-backed skills.
  2. Members pull with a CLI that ignores the knob (unknown yaml key stripped). Parent SHA is cached; submodule dirs stay empty; empty dirs are what get “deployed”.
  3. They upgrade to a CLI that honors submodules: true.
  4. SessionStart/teamai pull: submodule update fills the clone, then Already synced at <rev>, skipping — tool dirs never receive the skill.

New installs (lastPullRev: null) are fine. Shipping the CLI before the yaml commit is also fine (parent SHA changes → full sync).

Opt-in and off by default, so #501 can merge; this is the leftover upgrade footgun.

Repro

Parent clone without --recurse-submodules. teamai.yaml has submodules: true. State has lastPullRev = current short HEAD and lastPullTargets: ["claude"].

✔ Team repo: already up to date
✔ Already synced at <rev>, skipping
# team-repo/skills/<name>/SKILL.md exists
# ~/.claude/skills/<name>/SKILL.md does not

teamai pull --force deploys it. A first pull with lastPullRev: null also deploys it.

Expected

If submodules: true and this run’s submodule update --init succeeded, do not take the unchanged-rev fast path (at least for that pull). Failure hold-back can stay.

Workaround

teamai pull --force (or any parent-repo commit that changes HEAD).

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