Skip to content

Extract shared _fetch_bundles_and_write skill-download helper - #763

Open
xsh310 wants to merge 1 commit into
mainfrom
skills-fetch-bundles-and-write
Open

xsh310 wants to merge 1 commit into
mainfrom
skills-fetch-bundles-and-write

Conversation

@xsh310

@xsh310 xsh310 commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

What did you change, and why?

Change: Extracted the fetch-bundles-then-write-each-skill core (with the per-skill fetch-failure and disk-error skip) out of _download_refs and reconcile_managed_skills into a single _fetch_bundles_and_write helper in skills_download.py.

Why: The two callers had duplicated this loop, and a third caller, a launch-time skill refresh stacked on top in #764, needs the same core. Sharing one helper keeps them consistent. This is a pure refactor with no behavior change, except that the download path now gains the same per-skill OSError guard the managed reconcile already had.

How do you know it works?

Testing: The existing _download_refs and reconcile_managed_skills tests still pass, plus a new TestFetchBundlesAndWrite covering the write-survivors, skip-fetch-failure, and empty-refs cases. uv run ruff check, ruff format --check, ty check src, and uv run pytest all pass locally.

This pull request and its description were written by Isaac.


Stack created with GitHub Stacks CLIGive Feedback 💬

Factor the fetch-bundles-then-write-each-skill core (with the per-skill fetch
failure and disk error skip) out of _download_refs and reconcile_managed_skills
into a single _fetch_bundles_and_write helper. Pure refactor: the download path
gains the same per-skill OSError guard the managed reconcile already had.

Co-authored-by: Isaac <no-reply@databricks.com>
@xsh310
xsh310 added this pull request to stack #765 September 20, 2026 01:24
@xsh310 xsh310 changed the title skills fetch bundles and write Extract shared _fetch_bundles_and_write skill-download helper Sep 20, 2026
@xsh310
xsh310 marked this pull request as ready for review September 20, 2026 04:18
@xsh310
xsh310 removed this pull request from stack #765 September 20, 2026 19:21
@xsh310
xsh310 added this pull request to stack #768 September 20, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant