docs(6209): preference door, systems and notes tools, lesson surfacing, rule versions, backup round trip, JSON reader, charter search, provenance, location filter

Ten more test files: issue, milestone, rule, decision and snippet numbers
come out of docstrings, comments and messages; the preference door states
what a preference is instead of quoting the framing; the JSON reader says
why jq is not assumed instead of what every hook used to do; the backup
round trip's column warning no longer claims the import side is unguarded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 21:33:08 -04:00
co-authored by Claude Opus 5.5
parent fa41e006a7
commit ead4a7e2ad
10 changed files with 69 additions and 74 deletions
+6 -6
View File
@@ -15,10 +15,10 @@ pytestmark = pytest.mark.usefixtures("_bind_user")
@pytest.fixture(autouse=True)
def _no_supersession():
"""Every note read/write now asks for its supersession relations (#278).
"""Every note read/write asks for its supersession relations.
These are unit tests of the TOOL layer and this job has no database — the
same hazard the `_fake_note` comment below records for note 2109. Stubbed
same hazard the `_fake_note` comment below records. Stubbed
to "no relations", which is the state of essentially every note; the
relation's own behaviour is covered in test_services_supersession.py, and
the attachment is covered explicitly below.
@@ -120,7 +120,7 @@ async def test_get_note_returns_dict():
# Own record: no provenance noise.
assert "shared" not in out
# No supersession relations: both keys ABSENT, not present-and-empty. A
# field that always says nothing trains readers to skip fields (#2483).
# field that always says nothing trains readers to skip fields.
assert "supersedes" not in out
assert "superseded_by" not in out
@@ -218,7 +218,7 @@ async def test_update_note_only_sends_non_default_fields():
`clear` is always forwarded and is not a field: it is how this door says
"unset these", and an empty one says "unset nothing". Same shape the rules
door took in #3096, and the same test that had to learn about it there."""
door takes, and the same test."""
fake = fake_note()
mock = AsyncMock(return_value=fake)
with patch("scribe.mcp.tools.notes.notes_svc.update_note", mock):
@@ -232,7 +232,7 @@ async def test_update_note_only_sends_non_default_fields():
@pytest.mark.asyncio
async def test_update_note_forwards_a_check_but_not_an_empty_one():
""""" means "leave this alone" at this door — an agent updating a body must
not wipe a check it was never asked about (milestone 317)."""
not wipe a check it was never asked about."""
mock = AsyncMock(return_value=fake_note())
with patch("scribe.mcp.tools.notes.notes_svc.update_note", mock):
await update_note(note_id=1, verify_with="curl the docs")
@@ -305,7 +305,7 @@ async def test_delete_note_soft_deletes_and_returns_batch():
):
result = await delete_note(note_id=7)
assert result["deleted_batch_id"] == "batch-1"
# The confirmation NAMES what went (#3273). After the delete the row is
# The confirmation NAMES what went. After the delete the row is
# trashed, so this line is the last chance to say which note it was.
assert result["title"] == "the note that went"
assert "the note that went" in result["message"]