Skip to content

docs: per-source skill-source sync docstring says it re-injects; only the full sync does #3291

Open

Description

@AndriiPasternak31

Summary

The docstring of sync_skill_source (POST /api/skills/sources/{source_id}/sync) in src/backend/routers/skills.py says the route "reaches the same clone-and-re-inject machinery, just scoped to one source". It does not re-inject. It calls skill_service.sync_library(source_id) and returns the result. Only the full sweep (POST /api/skills/library/sync, sync_library in the same file) spawns skills_sync_service.run_fleet_reinject, and only when the commit changed and automatic re-inject is on.

There is a knock-on effect. A per-source sync records the new commit on the source row, so a full sync run after it sees no commit change and starts no re-inject either. Running agents then keep their old skill files until they restart or their skills are re-delivered (POST /api/agents/{name}/skills/inject). The operator steps in docs/user-docs/automation/skills-and-playbooks.md now say to use the full sync and describe this case (#3123).

Decide which one is wrong:

  • the docstring: fix the wording; or
  • the route: if the per-source sync should re-inject, retype this issue as type-bug and make the route re-inject (with a test).

Acceptance Criteria

  • The decision (docstring vs route) is recorded on this issue.
  • The docstring describes what the route actually does, or the route re-injects and a test pins it.

Technical Notes

  • The commit-changed gate is per source and keyed on the row's durable last_commit_sha (src/backend/services/skill_service.py, _sync_sources_locked); a ref change through PUT /api/skills/sources/{id} resets it (src/backend/db/skill_sources.py).

Activity

  1. added
    complexity-lowComplexity: low (board points 1-3)
    status-readyGreenlit and ready for development (vetted; counterpart to status-incubating)
    on Oct 6, 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

    complexity-lowComplexity: low (board points 1-3)priority-p3Nice-to-havestatus-readyGreenlit and ready for development (vetted; counterpart to status-incubating)theme-devexTheme: DevExtype-docsDocumentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions