Skip to content

fix(sync): refresh self-update evidence before planning - #227

Merged
pacphi merged 2 commits into
mainfrom
fix/sync-self-update-cache
Sep 20, 2026
Merged

pacphi merged 2 commits into
mainfrom
fix/sync-self-update-cache

Conversation

@pacphi

@pacphi pacphi commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Problem and change

ak sync refreshed managed-package versions before planning, but omitted the kit's separate self-update cache. If that cache was fresh and still named an older release, the collector never selected a self-update; the forced lookup inside the apply step was unreachable.

Refresh self-version evidence with the running package root before collecting the sync plan. Preserve dry-run/no-upgrade behavior and stable versus prerelease channel selection. Failed channel lookups retain eligible cached evidence without renewing its observation timestamp; successful registry observations still supersede rolled-back channel values.

Validation

  • New regression exercises the real self-status collector and planner with a stale-but-fresh cache; only registry I/O and package installation are substituted.
  • Eight new tests cover scheduling, opt-out flags, stable channels, total/partial lookup failures, and channel rollback. All 48 focused tests pass.
  • Full npm test passes: 4,173 passed, 6 existing skips; 92.12% line, 81.30% branch, 91.52% function coverage.
  • Typecheck, lint, complexity gate, Markdown lint, build, and diff checks pass. Existing advisory lint warnings remain.
  • No package version bump or publication is included.

@pacphi
pacphi merged commit fa19d4d into main Sep 20, 2026
16 checks passed
@pacphi
pacphi deleted the fix/sync-self-update-cache branch September 20, 2026 13:28
@pacphi pacphi mentioned this pull request Sep 20, 2026
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