Skip to content

skill: use Effect.cached for load deduplication - #19165

Merged
kitlangton merged 4 commits into
devfrom
kit/effect-cached-skill
Mar 26, 2026
Merged

skill: use Effect.cached for load deduplication#19165
kitlangton merged 4 commits into
devfrom
kit/effect-cached-skill

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Summary

  • Replace Promise<void> task storage + manual check-and-create with Effect.cached for deduplicating concurrent load() calls
  • Removes task field from State type, renames Cache.ensure to Cache.load
  • Concurrent ensure() callers share the same in-flight effect instead of racing

Test plan

  • bun run typecheck passes
  • No test regressions
@kitlangton
kitlangton force-pushed the kit/effect-cached-skill branch from 8a6fee7 to 2f01392 Compare March 25, 2026 20:41
@kitlangton

Copy link
Copy Markdown
Contributor Author

/review

@github-actions

Copy link
Copy Markdown
Contributor

lgtm

@kitlangton
kitlangton enabled auto-merge (squash) March 26, 2026 00:41
@kitlangton
kitlangton merged commit ea04b23 into dev Mar 26, 2026
8 checks passed
@kitlangton
kitlangton deleted the kit/effect-cached-skill branch March 26, 2026 00:55
Andres77872 pushed a commit to Andres77872/opencode that referenced this pull request Mar 26, 2026
balcsida pushed a commit to balcsida/opencode that referenced this pull request Apr 8, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant