feat(sleep): adopt reviewed skill subsets safely - #212
feat(sleep): adopt reviewed skill subsets safely#212Bogdan (Dan) Baciu (bogdanbaciu21) wants to merge 7 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 |
|
Thanks for addressing the five earlier review items. I re-reviewed the latest head ( Every hinted Before merge, could you please either:
Please add a cycle-level regression test with two live skills containing unique markers. Each staged proposal should preserve/derive from its matching marker and must not use the other skill or the managed scaffold as its baseline. Two smaller items are also worth fixing in the same update: render Once the baseline semantics are corrected, we will be happy to re-review it. |
|
Absolutely. On it. |
|
Yifan — thank you for the precise re-review. The remaining baseline blocker and the two smaller items are fixed in this update. Each hinted group now resolves and reads its corresponding live
I also completed the safety contract around the end-to-end path: manifest v2 pins, live-baseline drift checks, cross-night target locks, immutable backups and append-only receipts, WAL-backed rollback/restart recovery, pending-only subset adoption, hardened managed adoption, and explicit mixed-night modes. The documentation includes migration and honest POSIX/Windows durability boundaries. Validation on
Ready for re-review. |
Summary
Adds an end-to-end, review-gated multi-skill Sleep workflow. Each hinted skill is consolidated from its own pinned live baseline, staged independently, and promoted only through an explicit managed or per-skill selection.
Workflow
multi_skill_fanout(multi_skill_reportremains an alias).--skill-root.status.--skill NAME, pending-only--all-skills, or--legacyfor a co-staged managed proposal.Integrity contract
.latestpublication.Interfaces and safety
Validation
git diff --check, and MkDocs strict build: clean.Portability boundary
Cooperative SkillOpt adopters serialize through shared locks and revalidate immediately around publication. Portable Python does not provide a filesystem compare-and-swap against an unrelated editor that ignores those locks. POSIX directory entries are fsynced; Windows file contents are flushed, but Python's standard library does not expose an equivalent portable directory fsync.
Supersedes #189. Thanks Yif-Yang for the detailed review and acceptance criteria.