fix(vector-sync): address round-5 review — partial-failure signal, markers
- purge route: include a "failed" key in the 200 body listing requested doc types that were not purged, so Astrolabe knows consent isn't yet enforced for them (scanner backstop still catches up) - tests: add @pytest.mark.unit / module-level pytestmark to the new test modules so they run under `pytest -m unit`; add a partial-failure route test - capabilities: comment why the cache is keyed per-user despite a global value - semantic/scanner: doc/comment clarifications (sorted-order, eviction timing) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
b0751102d7
commit
d0db530ac9
@@ -377,7 +377,10 @@ async def _enqueue_deletes_for_disabled_types(
|
||||
if len(_consent_backstop_done) >= _CONSENT_BACKSTOP_MAX:
|
||||
# Evict oldest-first down to half capacity (insertion-ordered dict),
|
||||
# so overflow re-fires the backstop for only the oldest markers
|
||||
# rather than the whole fleet at once.
|
||||
# rather than the whole fleet at once. Placed inside the per-doc_type
|
||||
# loop: markers added earlier in *this* call are the newest, so they
|
||||
# survive eviction; only genuinely old entries are dropped (and a
|
||||
# re-fire is idempotent regardless).
|
||||
overage = len(_consent_backstop_done) - _CONSENT_BACKSTOP_MAX // 2
|
||||
logger.info(
|
||||
"consent backstop tracking hit %d entries; evicting %d oldest",
|
||||
|
||||
Reference in New Issue
Block a user