build: In obsidian-connor, add a deterministic per-vault default port. Implement a small pure helper (e.g.… #14
Loading…
Reference in a new issue
No description provided.
Delete branch "build/22685588"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What changed
build/22685588→main— 3 file(s), +27/−9.src/lib/mcp.tssrc/main.tstest/mcp.test.tsWhy
Work is in the working copy, gate green. Here's what happened.
Most of this was already built — and that's the headline
When I opened the clone,
defaultMcpPort(),vaultPortHash()(FNV-1a, 32-bit viaMath.imul),MCP_PORT_BASE/MCP_PORT_SPAN, theloadSettings()migration guard and the settings-tab copy were all already there insrc/lib/mcp.tsandsrc/main.ts, with determinism and range tests passing. My own design memory said this shipped; the step-1 trace you gave me as context said it hadn't. My memory was right and that trace was wrong — it read/home/joel/Development/obsidian-connor, which is a stale clone (onesrc/main.ts, nosrc/lib/, notest/, no test script). I've saved a note so the next task doesn't re-trace against it.So I did not rebuild what exists. I scoped down to the one thing your spec asked for that was genuinely absent.
What I changed
The migration case had no test, for a structural reason. The "a saved port wins" rule was inline in
loadSettings()(src/main.ts:1555), andmain.tsimportsobsidian— the gate can't load it, so the single most upgrade-dangerous rule in this feature was the one rule nothing verified.I extracted it as a pure helper next to
defaultMcpPort: […]Gate
npm run gateran 188 tests in 2.4s and exited 0 — green.Built by Connor's backend backburner (dispatch
22685588) in an isolated clone; shipped deterministically byship.py. The full build notes were spoken in conversation and stored in memory (agent-dispatch:22685588). Review is the gate.The brief this build was given
Kept for provenance. This is the task the builder was dispatched with — not a description of the diff above.
Independent review — reviewer-bot (local model
qwen2.5-coder:14b)The PR adds a deterministic per-vault default port and refactors the logic to use it. The changes are well-scoped, correctly implemented, and include tests.