Repository navigation
Description
Problem Description
docs/TESTING.md (the syrupy rule, line 125) says to regenerate a snapshot with uv run pytest <test-file> --snapshot-update --snapshot-file-lock, and says that the file lock is required. The pinned syrupy 7.0.0 has no option --snapshot-file-lock, so the documented command stops with a usage error. syrupy 7.0.0 locks an amber snapshot file by itself when pytest-xdist distributes work, and has only --snapshot-file-lock-timeout (default 60 seconds).
Reproduction Steps
uv run pytest tests/ai/mcp/test_mcp_tool_listing.py --snapshot-update --snapshot-file-lock
Expected vs Actual Behavior
Expected: the documented command updates the snapshot.
Actual: pytest: error: unrecognized arguments: --snapshot-file-lock. uv run pytest <test-file> --snapshot-update works, and syrupy takes the lock under xdist by itself (syrupy/__init__.py, option --snapshot-file-lock-timeout: "Locking is enabled automatically when xdist is distributing work").
Environment Diagnostics
devops-cli at origin/main on 2026-11-12, syrupy 7.0.0 from uv.lock, Python 3.14.
Logs, Traces, or Terminal Output
pytest: error: unrecognized arguments: --snapshot-file-lock
inifile: pyproject.toml
Found while updating the MCP tool listing snapshot for pull request #5142.
Pre-Submission Checklist
- I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
- I have checked existing issues and pull requests to ensure this is not a duplicate.
Alternatives check of 2026-11-16: not-applicable.
Class: docs, no search.
Tool: none found.
Proposed design
Problem statement
docs/TESTING.md tells a maintainer to regenerate a snapshot with uv run pytest <test-file> --snapshot-update --snapshot-file-lock. The same text says that the file lock is required. syrupy 7.0.0 and 7.0.3 have no option --snapshot-file-lock, so the command stops with pytest: error: unrecognized arguments: --snapshot-file-lock. A maintainer who updates a snapshot needs a command that works. The guide must show that command and must state the automatic lock.
Acceptance criteria
Requirement: The snapshot command names no lock option
The testing guide SHALL name no --snapshot-file-lock option in its snapshot update command.
Scenario: The removed option is absent
- WHEN A maintainer runs
! git grep -n -F -e 'snapshot-file-lock' -- docs/TESTING.md. - THEN The command exits 0 and prints no line.
Requirement: The guide drops the false lock requirement
The testing guide SHALL NOT claim that an explicit file lock is required for a snapshot update.
Scenario: The old lock sentence is absent
- WHEN A maintainer runs
! git grep -n -F -e 'The file lock is required' -- docs/TESTING.md. - THEN The command exits 0 and prints no line.
Requirement: The guide names the automatic lock
The testing guide SHALL state that syrupy locks the amber snapshot file by itself when pytest-xdist distributes work.
Scenario: The automatic lock sentence is present
- WHEN A maintainer runs
git grep -n -F -e 'locks the amber snapshot file by itself when pytest-xdist distributes work' -- docs/TESTING.md. - THEN The command exits 0 and prints the line of the guide that holds the sentence.
Requirement: The testing guide passes the docs check
The testing guide MUST pass the repository docs check after the snapshot command changes.
Scenario: The docs check passes
- WHEN A maintainer runs
uv run devops ci docs. - THEN The command exits 0 and reports no docs error.
Existing Tool Considered
The alternatives check of 2026-11-16 in the issue body returned not-applicable for this docs item, made no search, and named no tool. The library in play is syrupy, which uv.lock pins. syrupy covers the snapshot update need. It lacks an option --snapshot-file-lock, because it locks the amber snapshot file by itself when pytest-xdist distributes work. The change writes no code and builds nothing, so it has no build cost.
Key questions
- Which command does
docs/TESTING.mdshow to regenerate a snapshot with syrupy 7.x?: Showuv run pytest <test-file> --snapshot-updateand no lock option. syrupy locks the amber snapshot file by itself when pytest-xdist distributes work, so the update keeps its entries. (best practice) [sources: docs/TESTING.md, uv.lock, pyproject.toml]- Chosen: Use
--snapshot-updatealone. syrupy 7.0.3 locks the amber file by itself under pytest-xdist, so the command runs and keeps the entries. - Rejected: Keep
--snapshot-file-lock. syrupy 7.0.0 and 7.0.3 have no such option, so pytest stops withunrecognized arguments. - Rejected: Name
--snapshot-file-lock-timeoutin the guide. The automatic lock needs no option. A timeout is a rare case.
- Chosen: Use
- Does this documentation fix need a new test?: No. A document gets no test. The proof is a command that runs again with the same answer: the
! git grepchecks anduv run devops ci docs. [sources: docs/TESTING.md] - What does the guide do with the old sentence that cites syrupy issue 1237?: The guide drops that sentence with its citation. The new sentence states the automatic lock, so the guide needs no citation of the old problem. (best practice) [sources: docs/TESTING.md]
- Chosen: Drop the sentence with its citation. The sentence makes the false claim that the file lock is required.
- Rejected: Keep the citation and change the claim. The citation then points at a problem that syrupy already fixes.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 12, 2026
Both concern a wrong command in docs, but #4862 fixes the argv-check tool to detect missing options while this item fixes a named-but-nonexistent flag in TESTING.md.dan-petty commentedon Nov 12, 2026
Seen again on 2026-11-12 while I wrote the snapshot of #5189:
uv run pytest <file> --snapshot-update --snapshot-file-lockstops with "unrecognized arguments: --snapshot-file-lock" (pytest 9.2.0, syrupy 7.0.0).pytest --helplists no lock option. I ran--snapshot-update -n 0in place of it.dan-petty commentedon Nov 13, 2026
The issue occurred again on 2026-11-13 in #5297 (#5212). Issue #5212 told the agent to run
uv run pytest tests/ai/mcp/test_mcp_tool_listing.py --snapshot-update --snapshot-file-lock, asdocs/TESTING.mdsays. The command stopped withpytest: error: unrecognized arguments: --snapshot-file-lock.uv run pytest -q -n 0 tests/ai/mcp/test_mcp_tool_listing.py --snapshot-updateupdated the snapshot.devops-cli-service commentedon Nov 16, 2026
Alternatives check: not-applicable
Class: docs. The check makes no search and no model call for an item of this class.
Tool: none found
Checked on 2026-11-16. A person decides what this means for the item. The check changes no label and closes no issue.
dan-petty commentedon Nov 16, 2026
Seen again on 2026-11-16 in #5975:
uv run pytest tests/roadmap/test_job_grade_report.py --snapshot-update --snapshot-file-lockstops withunrecognized arguments: --snapshot-file-lock(syrupy 7.0.0). The command with--snapshot-updateand-n 0updated the snapshot.devops-cli-service commentedon Nov 17, 2026
Status set to Ready at c58b592 (see proposed design in issue body).
dan-petty commentedon Nov 25, 2026
The defect is still present on 2026-11-25 with syrupy 7.0.3:
uv run pytest tests/roadmap/implement/test_roadmap_implement_step.py --snapshot-update --snapshot-file-lockstops withpytest: error: unrecognized arguments: --snapshot-file-lock(worktree of #7217). The update worked with--snapshot-update -n 0. I filed #7225 for it by mistake and closed it as a duplicate of this item.devops-cli-service commentedon Nov 26, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
dan-petty commentedon Nov 28, 2026
Seen again on 2026-11-28 at
origin/main70dc18c, with syrupy 7.0.3 (pyproject.toml):uv run pytest tests/ai/mcp/test_mcp_tool_listing.py --snapshot-update --snapshot-file-lock -qstops withpytest: error: unrecognized arguments: --snapshot-file-lock.docs/TESTING.md(Test data) still requires the option. The same command with no--snapshot-file-lockupdated the snapshot.devops-cli-service commentedon Nov 28, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.