Repository navigation
Conversation
devmap analyze now holds .devmap/analyze.lock, so a terminal analysis and an MCP refresh cannot write the snapshot at the same time. The lock code moves to cache/analysisLock.ts and is re-exported from mcp/refresh.ts. The lock is taken in analyzeCommand, not runAnalyze, because the MCP refresher already holds it when it calls runAnalyze. A missing target folder still fails without creating a .devmap folder.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Welcome ke DevMap!Terima kasih sudah buat PR. Pastikan checklist ini terpenuhi sebelum review:
CI akan jalan otomatis pada setiap update. Kalau gagal, akan muncul link run di komentar ini. Kalau DevMap membantu, tolong star ya: https://github.com/itsflaid/devmap Terima kasih kontribusinya! 🙏 |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
.devmap/analyze.lockwas taken only by the MCP server. A terminaldevmap analyzeignored it, so it could write the snapshot while an MCP refresh was writing it too (listed as a known limitation in CLAUDE.md).Change
src/cache/analysisLock.ts;mcp/refresh.tsre-exportsacquireLockandLOCK_STALE_MS, so MCP code and tests are unchanged.analyzeCommandholds the lock aroundrunAnalyze(human and--json).runAnalyzedoes not take it: the MCP refresher already holds the lock when it calls it, so taking it there would make every MCP refresh refuse itself..devmapfolder.Another DevMap analysis is already running (pid N), same as in the MCP server. Dead-pid and 15-minute-old locks are taken over as before.[Unreleased]updated.Checks
pnpm test:cli: 488 pass, 0 fail (5 new tests inanalyze-lock.test.ts: released after a run, refused while held,--json, re-run, missing folder)analyze --freshstarted 0.3s apart in one folder: first exits 0, second exits 1 with the "already running" message, no lock left behind, and a later run works.Release
This changes
packages/cli, so it is publish-worthy only if you choose to release it. No version bump here. Suggested level when you do: patch (0.9.1).Generated by Claude Code