(MOT-4187) feat(iii-directory): version-aware skills reconcile - #573
(MOT-4187) feat(iii-directory): version-aware skills reconcile#573rohitg00 wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
skill-check — worker0 verified, 48 skipped (no docs/).
Four for four. Nicely done. |
|
Warning Review limit reached
Next review available in: 6 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds the ChangesSkill refresh lifecycle
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Worker
participant WorkerEventHandler
participant IIIClient
participant ReconcileDecision
participant SkillDownload
Worker->>WorkerEventHandler: emit add or update event
WorkerEventHandler->>IIIClient: resolve installed version when needed
IIIClient-->>WorkerEventHandler: return worker version
WorkerEventHandler->>ReconcileDecision: select latest or pinned VersionSpec
ReconcileDecision->>SkillDownload: download or refresh skill bundle
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Skills for a namespace were downloaded once and then frozen: the boot reconcile skips any namespace with a completion marker, so skills drift behind the worker they describe as installed versions move forward. - Completion marker records the resolved semver when the download was pinned to a concrete version (tolerant additive field; legacy markers parse as version-absent and converge on their first refresh pass). - reconcile_decision compares the marker version against the installed worker version and re-downloads on mismatch, behind a new opt-in auto_refresh config field (default false keeps existing behavior). - The worker-event subscription covers update as well as add, pinned to the version on the event when present, with a single worker::list lookup as fallback. - Re-downloads keep existing overwrite semantics: file-by-file, hand added sibling files survive.
60b17f6 to
363bb41
Compare
Problem
Skills for a namespace are downloaded once and then frozen. The boot reconcile skips any namespace with a
.iii-skill-completemarker (reconcile_skips_existing_marker), so skills drift behind the worker they describe asiii worker updatemoves the installed version forward. On a live rig this left harness skills at 1.0.2 while harness 1.5.2 was running, with equivalent drift across ~18 namespaces.Change
Two mechanisms close the gap, both keeping the existing overwrite semantics (file-by-file, hand-added sibling files survive):
workertrigger subscription now coversupdateas well asadd. The download is pinned to the installed version: preferred from theversionfield on the event when present (the wire schema reserves it on terminal add/update stages), with a singleworker::listlookup as fallback, thenlatesttag as before.version, additive optional field; legacy markers parse tolerantly as version-absent). With the newauto_refreshconfig field enabled, the boot reconcile compares the marker version against the installed worker version and re-downloads on mismatch. A marker without a recorded version converges to a versioned marker on its first refresh pass.auto_refreshdefaults tofalse: without it, marker-present behavior is byte-identical to today, so this ships opt-in.Tests
Six new unit tests on
reconcile_decisioncover drift, match, tag-marker convergence, no-version skip, disabled-flag skip, and legacy marker parsing.cargo fmt --check,cargo clippy --all-targets --all-features -D warnings, andcargo test --lib(255) pass.The behavior was proven against a live rig first: a version-matched re-pull pass refreshed 30 stale namespaces with zero errors and was a full no-op on the second run.
Fixes MOT-4187