Skip to content

PAB-9: close extension persistence gaps#142

Merged
pablopunk merged 4 commits into
mainfrom
agent/coder/40ff0a59
Jul 18, 2026
Merged

PAB-9: close extension persistence gaps#142
pablopunk merged 4 commits into
mainfrom
agent/coder/40ff0a59

Conversation

@pablopunk

@pablopunk pablopunk commented Jul 18, 2026

Copy link
Copy Markdown
Owner

This PR hardens extension persistence by eliminating ordering and concurrency gaps in the on‑disk store and introducing a reusable storage layer with proper memoization and cache‑deduplication.

What changed

  • Sequential ordering guarantees – The JSON file store now preserves invocation order even when canonical (resolved) paths are still pending or multiple aliases point to the same file (including symlinks on non‑Windows platforms). This prevents interleaved writes from silently losing data.
  • Non‑blocking cache writes – Fresh data hydration no longer waits for the persistent cache to be fully written; the response is returned immediately while the cache mutation completes in the background.
  • Reusable extension storage abstraction – A new createExtensionStorage module provides get / set / delete / clear / memo (TTL‑based caching) / memoStale (stale‑while‑revalidate) methods. It serialises mutations correctly and deduplicates concurrent refreshes for the same stale cache key.
  • Durable temporary files – Atomic file replacements now use unique temporary names with restrictive permissions (0600 on Unix) to avoid accidental sharing or data leaks.
  • Recovery from rejected mutations – If an update callback throws, the store properly unwinds without blocking future operations or leaving a pending queue count.
  • Expanded test coverage – New tests for ordering, alias resolution, non‑blocking hydration, concurrent set/delete, reject handling, and memo deduplication are added and integrated into the CI workflow.

Impact

  • Extension storage operations are now safe under concurrent access from multiple extension views.
  • Cached data (e.g. PR lists, API responses) is refreshed more responsively and without unnecessary duplication.
  • The platform behaves correctly even when multiple path aliases reference the same on‑disk file.
  • Persistent state – both application storage and memo caches – remains consistent and recoverable after unexpected errors.

Co-authored-by: multica-agent <github@multica.ai>
@vercel

vercel Bot commented Jul 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nvm Ready Ready Preview, Comment Jul 18, 2026 12:12pm

Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
github-actions Bot added a commit that referenced this pull request Jul 18, 2026
@pablopunk
pablopunk marked this pull request as ready for review July 18, 2026 12:24
@kody-ai

kody-ai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug
Performance
Security
Business Logic

Access your configuration settings here.

@pablopunk
pablopunk merged commit b9e8d5e into main Jul 18, 2026
11 checks passed
@pablopunk
pablopunk deleted the agent/coder/40ff0a59 branch July 18, 2026 12:26
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