feat: add incremental skills sync (#965)"#1006
Conversation
This reverts commit 3a3fc31. rollback the feat: add incremental skills sync
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR replaces JSON state-based skills synchronization with a lightweight stamp-file mechanism. The migration removes the ChangesSkills sync state → stamp migration
Sequence Diagram(s)sequenceDiagram
participant Init as Init(currentVersion)
participant ReadStamp as ReadStamp()
participant File as skills.stamp
participant Notice as StaleNotice
Init->>ReadStamp: read persisted stamp
ReadStamp->>File: lookup stamp file
alt Missing stamp (cold start)
File-->>ReadStamp: ENOENT
ReadStamp-->>Init: empty string, nil error
Init->>Init: no notice
else Non-ENOENT I/O error
File-->>ReadStamp: I/O error
ReadStamp-->>Init: error
Init->>Init: fail-closed: no notice
else Empty stamp content
File-->>ReadStamp: empty string
ReadStamp-->>Init: empty string, nil
Init->>Init: no notice
else Stamp matches current
File-->>ReadStamp: version string
ReadStamp-->>Init: version matches currentVersion
Init->>Init: in-sync: no notice
else Stamp differs from current
File-->>ReadStamp: version string
ReadStamp-->>Init: version differs from currentVersion
Init->>Notice: Current: stamp, Target: currentVersion
end
sequenceDiagram
participant updateRun as updateRun
participant runSkillsAndStamp as runSkillsAndStamp
participant ReadStamp as ReadStamp()
participant RunSkillsUpdate as Updater.RunSkillsUpdate()
participant WriteStamp as WriteStamp()
updateRun->>updateRun: check if binary current
alt Binary is current
updateRun->>runSkillsAndStamp: pass updater, io, version
runSkillsAndStamp->>ReadStamp: read persisted stamp
alt Stamp matches target
ReadStamp-->>runSkillsAndStamp: in_sync
runSkillsAndStamp-->>updateRun: skip npx
else Stamp differs or missing
runSkillsAndStamp->>RunSkillsUpdate: invoke npm update
RunSkillsUpdate-->>runSkillsAndStamp: NpmResult (nil or error)
runSkillsAndStamp->>WriteStamp: persist new version
WriteStamp-->>runSkillsAndStamp: warn only on failure
runSkillsAndStamp-->>updateRun: sync result
end
else Binary needs update
updateRun->>RunSkillsUpdate: invoke skills update path
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1006 +/- ##
==========================================
- Coverage 67.68% 67.62% -0.07%
==========================================
Files 576 575 -1
Lines 54548 54337 -211
==========================================
- Hits 36919 36743 -176
+ Misses 14568 14550 -18
+ Partials 3061 3044 -17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@b770a6853c247ed14067eac4a6483feeee96e4b2🧩 Skill updatenpx skills add larksuite/cli#feat/incremental-skills-update -y -g |
Summary
Changes
Test Plan
lark xxxcommand works as expectedRelated Issues
Summary by CodeRabbit
Release Notes