diff --git a/server/insights/workers/adoption_telemetry.py b/server/insights/workers/adoption_telemetry.py index 8782f7da39e..e8501539430 100644 --- a/server/insights/workers/adoption_telemetry.py +++ b/server/insights/workers/adoption_telemetry.py @@ -60,7 +60,7 @@ async def _postgres_metadata() -> dict[str, str]: hosting = _postgres_hosting(settings.pg_dsn) if configured == "auto" else configured metadata = {"postgres_hosting": hosting} if hosting else {} try: - # A slow Postgres must not hold up the ClickHouse activity reports. + # not a setting: this optional version lookup gets two seconds of the reporting budget. async with asyncio.timeout(2): version = await pg.fetchval("SHOW server_version") except Exception: # noqa: BLE001 — ClickHouse activity can still be reported without a Postgres version diff --git a/server/memory/domain/refusals.py b/server/memory/domain/refusals.py index df6ffe59c17..cc170bf21cd 100644 --- a/server/memory/domain/refusals.py +++ b/server/memory/domain/refusals.py @@ -85,6 +85,7 @@ def matches(value: Any, patterns: Iterable[Fingerprint]) -> bool: "messages", "last_messages", "session_values", + "changed_files", "extra_tags", "recalled_keys", "extraction_instructions", @@ -148,6 +149,10 @@ def transcript_content(payload: Mapping[str, Any]) -> list[Any]: result.append(role) for field in ("session_values", "extra_tags", "recalled_keys"): result.extend(payload.get(field) or []) + for changed_file in payload.get("changed_files") or []: + result.extend( + changed_file[field] for field in ("path", "modified_at") if changed_file.get(field) + ) for field in ("extraction_instructions", "observation_date", "memory_key"): if payload.get(field): result.append(payload[field]) diff --git a/tests/integration/test_conflict_resolver_ch.py b/tests/integration/test_conflict_resolver_ch.py index ce70f2fbb17..5d81235b56d 100644 --- a/tests/integration/test_conflict_resolver_ch.py +++ b/tests/integration/test_conflict_resolver_ch.py @@ -3193,6 +3193,8 @@ async def clear(**kw: Any) -> ConflictResult: assert (await _rows(ch, org))["office_city"]["status"] == "superseded" winner = (await _rows(ch, org))["office_location"]["id"] assert (await _undo(org, "office_city", winner)).restored + await after_write.drain(timeout_s=60.0) + assert after_write.pending() == 0, "verification mirrors still pending" await _place(ch, org, "s3", "office_site", _vec((2140, 0.9), (2142, 0.436)), owed=True) monkeypatch.setitem(_SCRIPT, "office_site", ("update", 0.98)) out = await run_pass() diff --git a/tests/unit/session_content_senders.json b/tests/unit/session_content_senders.json index 1ddbf36a0df..b2c753b1adc 100644 --- a/tests/unit/session_content_senders.json +++ b/tests/unit/session_content_senders.json @@ -387,8 +387,8 @@ "integrations/claude-code-plugin/hooks/loom-flush.mjs": "8b48742059e0c7bdc1fe724a78df31f28af646dc9e9325aace7bae3a7d2a86ab", "integrations/claude-code-plugin/hooks/loom-namespace-health.mjs": "5f2bd718a88587c5f66b9823317bc77c18ce6a124f0602368b254d2c8c733ddb", "integrations/claude-code-plugin/hooks/loom-prompt-pack.mjs": "db4ebc48929214e55acbc9a41f6143a97715ea9b1948e429c158fcae110c2ee4", - "integrations/claude-code-plugin/hooks/loom-session-start.mjs": "d492ffd106dde196ce2949fb31b0d1933dff6441e30d91c6191dee03b20dc49b", - "integrations/claude-code-plugin/lib/collections-line.mjs": "d3f112711219cd5ff435b398ef323502ea1f9ac46c02b8b66bc44b3f1ba74a73", + "integrations/claude-code-plugin/hooks/loom-session-start.mjs": "46ad5c59b10d683c7bcc922c57749fdce4c79a4802efedc33269b53ca38fdcdd", + "integrations/claude-code-plugin/lib/collections-line.mjs": "5c8e1eb430708f5039583a0810bfad9768ed554669624e5084aa6330aa70c498", "integrations/claude-code-plugin/lib/first-session.mjs": "e9183d950899f3ef78bdd17ba677d25e9ff5baffddc97ca282fecc5a80a92651", "integrations/claude-code-plugin/lib/flush-job.mjs": "e6c4ae5e42a54cba0e171b727688be621a81245023bf85a8ac093d334bc9bfd5", "integrations/claude-code-plugin/lib/loom-client.mjs": "4002ed3ecd815258eca4904aede0e549579eeb1069ed59ea425ecb252fa59e78", @@ -402,8 +402,8 @@ "integrations/codex-plugin/hooks/loom-flush.mjs": "8b48742059e0c7bdc1fe724a78df31f28af646dc9e9325aace7bae3a7d2a86ab", "integrations/codex-plugin/hooks/loom-namespace-health.mjs": "5f2bd718a88587c5f66b9823317bc77c18ce6a124f0602368b254d2c8c733ddb", "integrations/codex-plugin/hooks/loom-prompt-pack.mjs": "db4ebc48929214e55acbc9a41f6143a97715ea9b1948e429c158fcae110c2ee4", - "integrations/codex-plugin/hooks/loom-session-start.mjs": "d492ffd106dde196ce2949fb31b0d1933dff6441e30d91c6191dee03b20dc49b", - "integrations/codex-plugin/lib/collections-line.mjs": "d3f112711219cd5ff435b398ef323502ea1f9ac46c02b8b66bc44b3f1ba74a73", + "integrations/codex-plugin/hooks/loom-session-start.mjs": "46ad5c59b10d683c7bcc922c57749fdce4c79a4802efedc33269b53ca38fdcdd", + "integrations/codex-plugin/lib/collections-line.mjs": "5c8e1eb430708f5039583a0810bfad9768ed554669624e5084aa6330aa70c498", "integrations/codex-plugin/lib/first-session.mjs": "e9183d950899f3ef78bdd17ba677d25e9ff5baffddc97ca282fecc5a80a92651", "integrations/codex-plugin/lib/flush-job.mjs": "e6c4ae5e42a54cba0e171b727688be621a81245023bf85a8ac093d334bc9bfd5", "integrations/codex-plugin/lib/loom-client.mjs": "4002ed3ecd815258eca4904aede0e549579eeb1069ed59ea425ecb252fa59e78", diff --git a/tests/unit/test_memory_refusals.py b/tests/unit/test_memory_refusals.py index df201ec8649..6856af5804d 100644 --- a/tests/unit/test_memory_refusals.py +++ b/tests/unit/test_memory_refusals.py @@ -290,6 +290,14 @@ def test_every_extraction_field_has_an_explicit_content_classification(): [ ("extraction_instructions", "retired copper lark"), ("session_values", ["retired copper lark"]), + ( + "changed_files", + [{"path": "retired copper lark", "modified_at": "2025-01-01T12:00:00Z"}], + ), + ( + "changed_files", + [{"path": "source/module.py", "modified_at": "retired copper lark"}], + ), ("extra_tags", ["retired copper lark"]), ("recalled_keys", ["retired copper lark"]), ("record_schema", {"choice": ["retired copper lark"]}),