docs(mcp): document login-pending.json in the README (WALM-647) - #952
Conversation
The Credential Storage section named only credentials.json, so the second file the MCP writes into the same directory was undocumented — nothing said what it holds, that it is mode 0600, that it expires after 24 hours, or when it is cleared. Also adds the one missing line for MEMWAL_MCP_TRANSPORT, which until now was described only in docs/reference/environment-variables.md.
Both sides added to the Credential Storage section of packages/mcp/README.md. Kept both and folded them into one section: the login write-ahead record is described after the credentials file, the per-project approval model from WALM-639 follows. Corrected two facts the WALM-639 merge changed underneath this branch's text. The record no longer always sits beside credentials.json: a sign-in from an approved project keeps it in ~/.memwal/login-pending/, one file per project, so no key material lands in the checkout. MEMWAL_CREDS_DIR still moves it, and that is now stated where the override's absolute-path-outside-the-project rule is, rather than as an unqualified aside.
|
Merged Both sides were kept and folded into one section: the Two factual corrections, because #958 moved the ground under this branch's text:
Also replaced #958's parenthetical "the short-lived login write-ahead record is kept outside the repository either way" with the concrete location, now that the file itself is documented above it. Checked the other claim in this PR: Prose only, no code touched, so there was nothing to run and I have no test result to report. |
ducnmm
left a comment
There was a problem hiding this comment.
Summary
Documents login-pending.json (location, 0600, 24h discard, per-project path). Matches the recovery behavior. Looks correct.
Issue counts by severity
- bugs: 0
- suggestions: 0
- nits: 0
|
Re-checked against today's Still worth landing, but narrower than the body says. The gap is real: Three claims in the body are now false, and should be corrected before merge.
The diff itself is accurate against today's
Suite. Docs-only; the branch touches no code, so |
This is a documentation gap, not a bug — the file handling is correct and this PR changes no code. The MCP writes a second file into the credential directory,
login-pending.json, and nothing documented it:git grep login-pendingoverdocs/andpackages/returned no documentation hits at all, and the whole Credential Storage section named onlycredentials.json. This extends that section with what the file is, where it lives, its mode, its TTL, and when it is cleared. It also adds the one line forMEMWAL_MCP_TRANSPORT, which was described only indocs/reference/environment-variables.md.Evidence: on
dev,Impact: documentation only. Nobody is broken by this; a user who finds the file has no way to know what it is, whether it is a leak, or how to get rid of it, and the answer to the last one (
--logout) was already written down for the other file only.Test: none — this is prose. The behaviour it describes is already pinned:
packages/mcp/test/logout-invalidation.test.mjs:681-689asserts thatmemwal_logoutremoveslogin-pending.json, andpackages/mcp/test/login-write-ahead.test.mjscovers the 0600 mode, the write-ahead ordering, and the clear on a completed sign-in.One thing to know when merging: PR #920 (draft) deletes
packages/mcp/test/logout-invalidation.test.mjsand rewritespackages/mcp/README.md, so it will conflict with this textually and the test reference above moves with it.Closes #925