Summary
Network, URL, and contract-id resolution runs as top-level side effects in mcp/src/index.ts, including two process.exit(1) calls, which makes the config path effectively untestable.
Scope
- Keep the implementation aligned with the existing MindVault architecture.
- Add or update automated tests.
- Update docs when the change affects contributors, deployers, or agent users.
Acceptance criteria
- Config resolution moves to a dedicated module that returns a typed config object or a validation error instead of exiting.
- The entrypoint keeps the current fail-fast behaviour and messages, with tests covering valid and invalid environments.
- Failure cases are deterministic and safe to show in issue-driven contributor work.
- Relevant local tests pass.
Summary
Network, URL, and contract-id resolution runs as top-level side effects in
mcp/src/index.ts, including twoprocess.exit(1)calls, which makes the config path effectively untestable.Scope
Acceptance criteria