Repository navigation
Conversation
Spec and ADR drafts for NIW2-313, from the 2026-10-12 security, quality and scalability audit (umbrella NIW2-302). Status: proposed, not implemented. Refs: NIW2-313 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
csdev19
deleted the
feature/niw2-313-fix-file-read-leaks-state-caching-and-file-locking-in
branch
October 12, 2026 17:13
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.
Refs NIW2-313. Spec:
design/core-hardening.md. ADRs: 0020 (cross-process file lock), 0021 (mock files are never read through symlinks).Decisions
resolveSourcePathreturns the real path. It denies dot-segments andnode_modules.JSON.parse.StateStoreserves state from memory, revalidated by astatfingerprint and written through.isErrorover MCP.Projectdoes its state read-modify-write inside the lock.findKeyLinebecomes a single pass over the file.The spec also found that
maindoes state read-modify-write outside the lock, and that the watcher ignores.laqi/, so the server does not see MCP's state writes.Open questions
schemaSources.root, or is the deny list enough?state-changedevent, so the panel sees MCP's flips?'unavailable'change in NIW2-309'scontrol-plane-app.tsacceptable here?Status
This PR contains only the design spec and ADR drafts. It is opened as a draft so the design is not lost. The implementation will land on this same branch after the open questions are answered. Everything is "proposed, not implemented".
Part of the 2026-10-12 audit, umbrella NIW2-302. Specs were written by Fable agents against a read-only export of
mainatee34302. The ADR numbers (0014–0026) are assigned across all eight audit PRs.decisions/index.mdis not edited in these PRs, to avoid eight-way conflicts; add the index rows when each PR is promoted.🤖 Generated with Claude Code