simplenote-mcp-server / tests
AGENTS.md21 starsChanged 24 days agoMITView on GitHub
Primary, CI-wired pytest tree (testpaths = tests in pytest.ini) — 64 test files. All new tests go here, not in the legacy simplenote_mcp/tests/ tree (see that folder's AGENTS.md).
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/skills/AGENTS.mdAGENTS.md
- .github/workflows/AGENTS.mdAGENTS.md
- helm/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- dependabotSkill
- docs-sync-auditSkill
- github-actions-hardeningSkill
- mcp-implementation-security-reviewSkill
- mcp-release-qaSkill
- mcp-security-auditSkill
- pytest-coverageSkill
- security-reviewSkill
- test-gap-auditSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 16
Run with SIMPLENOTE_OFFLINE_MODE=true — real Simplenote credentials must never be required to run this suite.
- Very specific: line 20
Do not merge this tree's pytest invocation with simplenote_mcp/tests/ — both mutate process-global singletons (see …
- Very specific: line 27
Prefer existing fixtures (mock_simplenote_client, authenticated_context) over hand-rolled mocks.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
tests/
Purpose
Primary, CI-wired pytest tree (testpaths = tests in pytest.ini) — 64 test files. All new tests go here, not in the legacy simplenote_mcp/tests/ tree (see that folder's AGENTS.md).
Ownership
- One
test_*.pyper source module/feature area (e.g.test_cache.py,test_advanced_search.py,test_tool_handlers*.py,test_auth*.py,test_config.py). conftest.py— shared fixtures, all autouse unless noted:isolate_token_file_cache(redirects the keychain token-cache path totmp_path),reset_write_budget,reset_config_cache, plus non-autousemock_simplenote_client,simplenote_env_vars,server_context,authenticated_context.fixtures_rate_limit.py,fixtures_retry.py— shared fixture modules for rate-limit/retry test scenarios.unit/— currently empty;test_server_comprehensive.py.disabled/test_server_integration.py.disabledat this level are intentionally disabled, not stale cruft to delete without checking why first.
Local Contracts
- Run with
SIMPLENOTE_OFFLINE_MODE=true— real Simplenote credentials must never be required to run this suite. pytest.iniis the active pytest config. pytest ignores[tool.pytest.ini_options]inpyproject.tomland warns about it at startup (configfile: pytest.ini (WARNING: ignoring pytest config in pyproject.toml…)). Change markers,addoptsand timeouts inpytest.ini.- Coverage gate:
--cov-fail-under=75(pytest.iniaddopts). - Markers available:
unit,integration,perf,performance,security,slow,flaky,timeout,asyncio(--strict-markersenforced — unregistered markers fail collection).network,authandofflineappear only in pyproject's ignored section, so using them fails collection. - Do not merge this tree's pytest invocation with
simplenote_mcp/tests/— both mutate process-global singletons (seesimplenote_mcp/server/monitoring/AGENTS.md) and only reset state for their own tests. - Offline-mode mock client (
server.py::_build_offline_mock_client()) keeps an in-memory store:add_notereturns a note with amock-note-Nkey thatget_note/update_noteround-trip, and each fresh client starts empty. The autouseisolate_token_file_cachefixture pointskeychain._CACHE_DIRat the test'stmp_path, so assert "nothing cached" by listingtmp_path. test_tool_pin_parity.pyfails when pyproject's exactruff/mypypin differs fromrequirements-lock.txt, the pre-commit hookrev:, or a<tool>==pin in a workflow. Dependabot bumps only pyproject and the lock, so on a failing bot PR bump the hookrev:on that branch. Don't loosen the test.
Work Guidance
- New tool handler → add tests here, not in
simplenote_mcp/tests/, persimplenote_mcp/server/AGENTS.md's tool-handler pattern. - Prefer existing fixtures (
mock_simplenote_client,authenticated_context) over hand-rolled mocks; grep for the symbol's real import path before mocking — mock where it's used, not where it's defined.
Verification
make test-fast—SIMPLENOTE_OFFLINE_MODE=true .venv/bin/pytest tests/ -x -q --timeout=30
Child DOX Index
None.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

