test(memhub): register the sedimentation switch test in the core test inventory

New core test files must appear in TEST_INDEX.md and in the classification
inventory's expected count and digest, and the backfill case needs a settled
turn because an unanswered user tail is not backfill material.
This commit is contained in:
kristinhe committed 2026-10-17 23:31:42 +08:00
1 parent e038006c7f
commit 0822e7137e
3 files changed
+26 -4

No files matched your search

+2 -1
View File
@@ -328,6 +328,7 @@
| `test_secret_store_error_codes.py` | `integration` | 3925a kernel item 3: keychain failure classification and backoff that heals. |
| `test_secure_storage.py` | `integration` | 覆盖 isolated keychain service namespace、custom keychain service is refused outside isolated tests、packaged keychain budget covers loaded process startup 等 20 个场景。 |
| `test_sedimentation_concurrency.py` | `contract` | Sedimentation runs several harnesses at once, but one harness at a time. |
| `test_sedimentation_switch.py` | `contract` | Stopping model-driven sedimentation without losing the configuration. |
| `test_service_level_pressure_acceptance.py` | `contract` | 覆盖 workbuddy recall remains available during 100k import 场景。 |
| `test_service_levels.py` | `contract` | 覆盖 background never consumes the realtime reservation、realtime is next for the same source after background yields、import history gets one slice after nine realtime admissions 等 8 个场景。 |
| `test_session_inbox.py` | `contract` | A session inbox is not a shared mailbox and a pull is not adoption. |
@@ -386,4 +387,4 @@
| `test_workspace_recall.py` | `contract` | Workspace memories were unreachable from every host; these pin the way in. |
| `test_write_queue_lease_renewal.py` | `contract` | Rule 8: a lease must outlive the work it covers, and be renewed while it runs. |
共 381 个测试文件。
共 382 个测试文件。
@@ -14,8 +14,8 @@ from pathlib import Path
import pytest
PRIMARY_MARKERS = ("unit", "contract", "integration", "performance", "live")
EXPECTED_TEST_FILE_COUNT = 381
EXPECTED_TEST_FILES_SHA256 = "1f5100ccee78a9a4ea91805ec07b2054ee4a18911a8162943acedf471ae9b3e7"
EXPECTED_TEST_FILE_COUNT = 382
EXPECTED_TEST_FILES_SHA256 = "f08fbe22bc3af3df5c340ec75b94ba42287220bb728b34cbeadd5f5c93eea40b"
# Pure transformations, validation models, parity checks and state machines.
# This list is intentionally small: uncertain files default to contract.
@@ -145,7 +145,28 @@ def test_stopped_switch_enqueues_nothing(tmp_path) -> None:
def test_stopped_switch_prepares_no_backfill(tmp_path) -> None:
flag = _Flag(False)
evidence, tasks, active, supervisor, _profiles, _secrets = _stores(tmp_path, flag)
_task(evidence, tasks, active, index=1)
# No task is queued yet: backfill is what would create one for this
# conversation, so the stopped switch must keep it from creating any.
# A settled turn (question plus answer): an unanswered user tail is not
# backfill material, so the conversation needs both records.
for message_id, role, written_by, verbatim in (
("m-old", "user", WrittenBy.PERSON, "Remember this too."),
("m-old-reply", "assistant", WrittenBy.AGENT, "Saved."),
):
evidence.put(
EvidenceInput(
source_id="cursor",
workspace="/Users/me/project",
conversation_id="conv-old",
message_id=message_id,
correlation_id=message_id,
role=role,
written_by=written_by,
created_at=NOW - timedelta(days=1),
verbatim=verbatim,
origin_meta={EvidenceOrigin.FILE: OriginMetadata()},
)
)
assert supervisor.prepare_backfill() == []