agentleFS
docdyhrdocdyhr/simplenote-mcp-server/tests/AGENTS.md

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).

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
  1. Very specific:

    Run with SIMPLENOTE_OFFLINE_MODE=true — real Simplenote credentials must never be required to run this suite.

    line 16
  2. Very specific:

    Do not merge this tree's pytest invocation with simplenote_mcp/tests/ — both mutate process-global singletons (see …

    line 20
  3. Very specific:

    Prefer existing fixtures (mock_simplenote_client, authenticated_context) over hand-rolled mocks.

    line 27

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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_*.py per 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 to tmp_path), reset_write_budget, reset_config_cache, plus non-autouse mock_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.disabled at 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.ini is the active pytest config. pytest ignores [tool.pytest.ini_options] in pyproject.toml and warns about it at startup (configfile: pytest.ini (WARNING: ignoring pytest config in pyproject.toml…)). Change markers, addopts and timeouts in pytest.ini.
  • Coverage gate: --cov-fail-under=75 (pytest.ini addopts).
  • Markers available: unit, integration, perf, performance, security, slow, flaky, timeout, asyncio (--strict-markers enforced — unregistered markers fail collection). network, auth and offline appear 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 (see simplenote_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_note returns a note with a mock-note-N key that get_note/update_note round-trip, and each fresh client starts empty. The autouse isolate_token_file_cache fixture points keychain._CACHE_DIR at the test's tmp_path, so assert "nothing cached" by listing tmp_path.
  • test_tool_pin_parity.py fails when pyproject's exact ruff/mypy pin differs from requirements-lock.txt, the pre-commit hook rev:, or a <tool>== pin in a workflow. Dependabot bumps only pyproject and the lock, so on a failing bot PR bump the hook rev: on that branch. Don't loosen the test.

Work Guidance

  • New tool handler → add tests here, not in simplenote_mcp/tests/, per simplenote_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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.