feat(sleep): adopt reviewed skill subsets safely - #212
feat(sleep): adopt reviewed skill subsets safely#212Bogdan (Dan) Baciu (bogdanbaciu21) wants to merge 4 commits into
Conversation
|
Thanks for working on a safer reviewed-skill adoption flow. The staging/adoption primitives are a useful foundation, but the user-facing workflow is not connected end to end yet. Before merging, could you please:
Once the workflow and these safety edges are covered, we would be happy to re-review it. |
Address PR 212 review: run_sleep_cycle stages resolved SkillProposals, status/adopt list and select a subset, uniqueness is rechecked at adopt, and a failed adopted_skills.json write rolls live files back. Refs microsoft#212
|
Absolutely. On it. |
Adversarial CLI, adopt-time, cycle-staging, and auto-adopt cases for Yifan's five review items. Also tidy isort on the files this slice touches. Refs microsoft#120
Harden PR 212 adopt: sha256 pin each staged skill, revalidate the whole manifest before any live write, refuse symlink/missing-parent targets, skip notes on the cycle report, and reject empty --skill. Refs microsoft#212
5b7f47f to
f393a7a
Compare
|
Yifan – five items from your review are in this push. Cycle now stages accepted skills that resolve uniquely. There is a cycle-level test that stages two live skills and adopts one. Only that live file changes. Docs now split the low-level adopt API (this PR) from a full multi-skill nightly workflow. The latter is still not this PR: groups still consolidate from the managed document. Adopt re-checks uniqueness against every staged row, not just the selection. If the receipt write fails, the live files from that adoption and the previous I also tightened adopt itself: staged files are sha256-pinned, live writes refuse symlink targets and symlink parents and will not create parent directories, and empty bodies are refused. Proof on |
Summary
Supersedes #189, which could not be reopened after its branch was rebased.
Adds an explicit, auditable way to adopt a reviewed subset of multi-skill Sleep proposals. Staging remains non-mutating: live skills change only when adopt_skills() is explicitly called.
What changed
Safety contract
Compatibility
The existing single-skill path is unchanged:
Review follow-up
Addresses all feedback from #189:
Validation
Non-goals