tdam: pin upstream ref + telemetry/egress audit (no fork) #35

Open
opened 2026-11-06 15:27:44 +01:00 by Grok · 2 comments
Contributor

Goal

Choose and pin the TencentDB Agent Memory upstream ref we will deploy; prove all telemetry/analytics/phone-home are OFF (or absent); document egress policy. Do not fork unless a hard blocker — prefer config, overlay, or upstream PR.

Context

Acceptance

  • Written pin: commit SHA + branch + rationale
  • Grep/config audit: no telemetry, Sentry, PostHog, OTEL export, usage reporting, or phone-home by default
  • Network policy: outbound to vendor analytics denied; only Tailscale + required LLM provider for distillation
  • Decision recorded: run from vendored checkout / flake input / submodule (still not a fork)
  • Comment on this issue with findings before deploy issue proceeds
## Goal Choose and pin the TencentDB Agent Memory upstream ref we will deploy; prove **all telemetry/analytics/phone-home are OFF** (or absent); document egress policy. **Do not fork** unless a hard blocker — prefer config, overlay, or upstream PR. ## Context - Upstream: https://github.com/TencentCloud/TencentDB-Agent-Memory - Docs: https://tencentcloud.github.io/TencentDB-Agent-Memory/ - As of 2026-11-06 research: default GitHub branch is `feat/server_team` (full MemoryCore / MemoryProxy / MemoryPanel / deploy). `main` looks like the OpenClaw/Hermes plugin surface. Confirm before pinning. - License on `feat/server_team`: MIT. ## Acceptance - [ ] Written pin: commit SHA + branch + rationale - [ ] Grep/config audit: no telemetry, Sentry, PostHog, OTEL export, usage reporting, or phone-home by default - [ ] Network policy: outbound to vendor analytics denied; only Tailscale + required LLM provider for distillation - [ ] Decision recorded: run from vendored checkout / flake input / submodule (still not a fork) - [ ] Comment on this issue with findings before deploy issue proceeds
Contributor

Pin and static telemetry/egress audit — Orca on orchestra

Upstream: https://github.com/TencentCloud/TencentDB-Agent-Memory
Pin: feat/server_team @ 2002196f2d7c22ea267cfcaf67c5a6fa861df681 (MIT, LICENSE:1-26). main is the separate plugin/OpenClaw/Hermes tree, not the full Core/Proxy/Panel/Knowledge hub. Use a flake=false input at this exact SHA; no fork.

Orca: grok session 01a1b145-0585-75c2-9da9-e1e49bcfd394; terminal term_9dd1182b-8ee8-4713-9e82-9e112666b0d6; worktree /home/orchestra/orca/workspaces/nixos-llm/tdam-35-audit. Read-only source audit completed 2026-11-06 15:43 Europe/Prague. No deploy/restarts/commits/pushes/merges.

Decision: config-only vendor telemetry suppression appears viable; no hard fork blocker identified. NOT a runtime no-egress certification. Do not advance deployment acceptance until deny-by-default network policy, startup/request capture, auth, and isolation smokes pass.

Findings and OFF settings (paths/lines at the pin):

  • Core OTLP: MemoryCore/src/gateway/config.ts:839-843; default off. Set observability.otel.enabled=false and TDAI_OTEL_ENABLED=false. Default collector localhost:4317 remains unused while disabled.
  • Core Langfuse: same file:891-897; default off. Set observability.langfuse.enabled=false, LANGFUSE_ENABLED=false; omit host/public/secret keys.
  • Core ClickHouse / analytics: same file:853-856,866-872; default off. Set observability.clickhouse.enabled=false, analytics.clickhouse.enabled=false, CLICKHOUSE_ENABLED=false, ANALYTICS_CLICKHOUSE_ENABLED=false.
  • Core Kafka: same file:881-886; brokers alone enable it. Set observability.kafka.enabled=false, brokers="", KAFKA_METRIC_ENABLED=false; unset KAFKA_METRIC_BROKERS.
  • Core Opik: MemoryCore/src/offload_server/opik-tracer.ts:74-77,106-111; OPIK_ENABLED=false, no Opik credentials/URL. Otherwise SDK cloud defaults may apply.
  • Core report/API trace: MemoryCore/src/config.ts:732-735 report.enabled defaults false; keep false. MemoryCore/src/utils/env-config.ts:186-189 API trace defaults ON but stdout-only; set TDAI_API_TRACE_ENABLED=false to avoid sensitive local trace logs.
  • Core optional JEV: MemoryCore/src/gateway/config.ts:435,465-485; persona triggerMode defaults current; do not enable jev. deploy/global-images/.env.example:48 has a commented Tencent SystemOne endpoint; do not copy it.
  • Proxy optional sinks: MemoryProxy/src/config.ts:60-89,203; keep opik.enabled, langfuse.enabled, clickhouse.enabled, redis.enabled, traceArchive.enabled false. Langfuse initialization additionally requires host and both keys (MemoryProxy/src/langfuse.ts:49-52). Full stage presets remain enabled internally but disabled sink backends no-op; credit reporting is the exception below.
  • CRITICAL stock Proxy startup egress: MemoryProxy/src/config.ts:17,52,119-121 supplies llm-upstream.example.com and gateway.example.com. MemoryProxy/src/index.ts:157-160 invokes connectivity probes; connectivity.ts:15,47-48 probes upstream always and credit URL when nonempty. Set upstream.url to the explicitly approved fleet LLM URL and creditReport.url="". The empty value survives the loader (config.ts:464) and skips the credit startup probe. Per-request credit usage still reaches fetch("") (credit-reporter.ts:319-332,399-434), which fails URL parsing before a socket. This behavior was independently checked with Node 24.22.1; production-version smoke remains required. There is no proper credit-report enabled switch. An early-return overlay would remove failed attempts/log noise, but is not necessary to prevent transmission; no fork now.
  • Proxy JEV selection: MemoryProxy/src/config.ts:26-41 defaults selection disabled despite api.typesafe.ai endpoint. Keep skillRuntime.selection.enabled=false and omit TYPESAFE_API_KEY. Do not add the private optional @context-proxy/cost-guard package (MemoryProxy/src/guard-adapter.ts:166-178,234-235).
  • LLM defaults: MemoryCore/src/gateway/config.ts:644-647,681-682 defaults to api.openai.com/gpt-4o with empty key; extraction is not enabled by that empty-key path. Set TDAI_LLM_BASE_URL/API_KEY/MODEL together to the approved fleet service before adding a key. Never copy the Tencent LKEAP sample MemoryCore/tdai-gateway.yaml:38. Use standalone mode, not service/TCVDB/COS (gateway/config.ts:746-747).
  • Embeddings: gateway/config.ts:501-524,567-570 defaults provider none; local is also disabled upstream. Keep none initially (lexical recall); vectors need an explicit approved remote embedding endpoint. No HF/Xenova/ONNX runtime download found. sqlite-vec is an npm native dependency, not a runtime model download (MemoryCore/package.json:125).
  • Optional Knowledge is excluded initially: MemoryKnowledge/src/server.ts:11 initializes telemetry on import; telemetry.ts:28-44 auto-enables Langfuse when LANGFUSE_SECRET_KEY exists, with cloud.langfuse.com fallback. Omit both Langfuse keys. KNOWLEDGE_CLICKHOUSE_ENABLED=false (config.ts:208).
  • Optional Panel excluded initially: PANEL_FEATURE_ANALYTICS_ENABLED=false and PANEL_CLICKHOUSE_ENABLED=false (MemoryPanel/src/panel/config/panel-config.ts:276-278). Its local proxy binding sync defaults true; set KNOWLEDGE_LLM_BINDING_SYNC=false if later enabled without that dependency (:270-272).

No PostHog/Sentry/Mixpanel/Segment/Amplitude/Datadog or update-check client found in first-party runtime sources. README badges, memory.tencentyun.com SDK examples, Docker Hub/mirrors.tencent.com helpers, and npm fetches are docs/install/build surfaces, not the minimal deployed runtime. Build on the Nix builder, not the service host. Transitive npm tarballs/import-time effects and full Core initialize() were not exhaustively audited; static grep is not proof of no startup traffic.

Proposed host: bot-vm0, Tailscale 100.107.159.102. Measurements 2026-11-06 15:29 Europe/Prague: 11961 MiB RAM / 11078 available, zero swap used, 101 GiB disk free, 25 running services. cfx-mgmt: 47580 MiB / 19200 available, 48766 MiB swap occupied, 425 GiB free, 83 services including live STT, Forgejo, Mattermost, Hermes and inference. bot-vm0 has enough headroom for Core/Proxy and a smaller shared-service blast radius. Occupied swap is not itself proof of current pressure. Leave STT/hybrid :10443/:8766 untouched.

Routing to existing bot-vm0:8810 returned HTTP401 from orchestra, braiinschestra, Hermes and brainses: routing proof only, not TDAM auth proof. Grok Bot/CoS box is off-tailnet; #38 needs a scoped authenticated tailnet gateway/connector. Neither proposed host solves that automatically. No upstream Grok adapter found; Hermes/OpenCode/Claude adapters exist.

#36 scope only, no PR: native Node >=22.16 Core/Proxy services (bot-vm0 forbids Docker), bind 100.107.159.102:8420 and :8096 only; omit Panel/Knowledge initially. StateDirectory under /var/lib/tdam; SQLite online backup API, not live DB file copies. Dedicated unprivileged UIDs/resources and no global allowedTCPPorts. Default-deny app egress, with only the exact fleet LLM/auth endpoints and required DNS; no analytics/cloud model/registry/download exceptions. Pin own YAML false settings as well as explicit env, without inherited telemetry keys. Hermes handles SOPS; module accepts secret-file paths, never values.

Auth/isolation gates: Core API key mandatory (default unset, gateway/server.ts:1276-1278); Proxy admin.apiKey mandatory (default empty permits admin access, routes/admin-auth.ts:8), and Proxy client auth is a separate remote verification setting, not its admin key. No fleet data exposure until that verification path works. V3_STRICT_ISOLATION defaults false (MemoryCore/src/utils/env-config.ts:204-206); require team/agent/user identity plus real project ACL authorization before production capture. A single bearer key is not project isolation. Proxy full-stage modelGate also needs all approved model IDs in creditPricing.models; its default empty table otherwise yields 400 (#36 smoke gate).

Pin and static telemetry/egress audit — Orca on orchestra Upstream: https://github.com/TencentCloud/TencentDB-Agent-Memory Pin: feat/server_team @ 2002196f2d7c22ea267cfcaf67c5a6fa861df681 (MIT, LICENSE:1-26). main is the separate plugin/OpenClaw/Hermes tree, not the full Core/Proxy/Panel/Knowledge hub. Use a flake=false input at this exact SHA; no fork. Orca: grok session 01a1b145-0585-75c2-9da9-e1e49bcfd394; terminal term_9dd1182b-8ee8-4713-9e82-9e112666b0d6; worktree /home/orchestra/orca/workspaces/nixos-llm/tdam-35-audit. Read-only source audit completed 2026-11-06 15:43 Europe/Prague. No deploy/restarts/commits/pushes/merges. Decision: config-only vendor telemetry suppression appears viable; no hard fork blocker identified. NOT a runtime no-egress certification. Do not advance deployment acceptance until deny-by-default network policy, startup/request capture, auth, and isolation smokes pass. Findings and OFF settings (paths/lines at the pin): - Core OTLP: MemoryCore/src/gateway/config.ts:839-843; default off. Set observability.otel.enabled=false and TDAI_OTEL_ENABLED=false. Default collector localhost:4317 remains unused while disabled. - Core Langfuse: same file:891-897; default off. Set observability.langfuse.enabled=false, LANGFUSE_ENABLED=false; omit host/public/secret keys. - Core ClickHouse / analytics: same file:853-856,866-872; default off. Set observability.clickhouse.enabled=false, analytics.clickhouse.enabled=false, CLICKHOUSE_ENABLED=false, ANALYTICS_CLICKHOUSE_ENABLED=false. - Core Kafka: same file:881-886; brokers alone enable it. Set observability.kafka.enabled=false, brokers="", KAFKA_METRIC_ENABLED=false; unset KAFKA_METRIC_BROKERS. - Core Opik: MemoryCore/src/offload_server/opik-tracer.ts:74-77,106-111; OPIK_ENABLED=false, no Opik credentials/URL. Otherwise SDK cloud defaults may apply. - Core report/API trace: MemoryCore/src/config.ts:732-735 report.enabled defaults false; keep false. MemoryCore/src/utils/env-config.ts:186-189 API trace defaults ON but stdout-only; set TDAI_API_TRACE_ENABLED=false to avoid sensitive local trace logs. - Core optional JEV: MemoryCore/src/gateway/config.ts:435,465-485; persona triggerMode defaults current; do not enable jev. deploy/global-images/.env.example:48 has a commented Tencent SystemOne endpoint; do not copy it. - Proxy optional sinks: MemoryProxy/src/config.ts:60-89,203; keep opik.enabled, langfuse.enabled, clickhouse.enabled, redis.enabled, traceArchive.enabled false. Langfuse initialization additionally requires host and both keys (MemoryProxy/src/langfuse.ts:49-52). Full stage presets remain enabled internally but disabled sink backends no-op; credit reporting is the exception below. - CRITICAL stock Proxy startup egress: MemoryProxy/src/config.ts:17,52,119-121 supplies llm-upstream.example.com and gateway.example.com. MemoryProxy/src/index.ts:157-160 invokes connectivity probes; connectivity.ts:15,47-48 probes upstream always and credit URL when nonempty. Set upstream.url to the explicitly approved fleet LLM URL and creditReport.url="". The empty value survives the loader (config.ts:464) and skips the credit startup probe. Per-request credit usage still reaches fetch("") (credit-reporter.ts:319-332,399-434), which fails URL parsing before a socket. This behavior was independently checked with Node 24.22.1; production-version smoke remains required. There is no proper credit-report enabled switch. An early-return overlay would remove failed attempts/log noise, but is not necessary to prevent transmission; no fork now. - Proxy JEV selection: MemoryProxy/src/config.ts:26-41 defaults selection disabled despite api.typesafe.ai endpoint. Keep skillRuntime.selection.enabled=false and omit TYPESAFE_API_KEY. Do not add the private optional @context-proxy/cost-guard package (MemoryProxy/src/guard-adapter.ts:166-178,234-235). - LLM defaults: MemoryCore/src/gateway/config.ts:644-647,681-682 defaults to api.openai.com/gpt-4o with empty key; extraction is not enabled by that empty-key path. Set TDAI_LLM_BASE_URL/API_KEY/MODEL together to the approved fleet service before adding a key. Never copy the Tencent LKEAP sample MemoryCore/tdai-gateway.yaml:38. Use standalone mode, not service/TCVDB/COS (gateway/config.ts:746-747). - Embeddings: gateway/config.ts:501-524,567-570 defaults provider none; local is also disabled upstream. Keep none initially (lexical recall); vectors need an explicit approved remote embedding endpoint. No HF/Xenova/ONNX runtime download found. sqlite-vec is an npm native dependency, not a runtime model download (MemoryCore/package.json:125). - Optional Knowledge is excluded initially: MemoryKnowledge/src/server.ts:11 initializes telemetry on import; telemetry.ts:28-44 auto-enables Langfuse when LANGFUSE_SECRET_KEY exists, with cloud.langfuse.com fallback. Omit both Langfuse keys. KNOWLEDGE_CLICKHOUSE_ENABLED=false (config.ts:208). - Optional Panel excluded initially: PANEL_FEATURE_ANALYTICS_ENABLED=false and PANEL_CLICKHOUSE_ENABLED=false (MemoryPanel/src/panel/config/panel-config.ts:276-278). Its local proxy binding sync defaults true; set KNOWLEDGE_LLM_BINDING_SYNC=false if later enabled without that dependency (:270-272). No PostHog/Sentry/Mixpanel/Segment/Amplitude/Datadog or update-check client found in first-party runtime sources. README badges, memory.tencentyun.com SDK examples, Docker Hub/mirrors.tencent.com helpers, and npm fetches are docs/install/build surfaces, not the minimal deployed runtime. Build on the Nix builder, not the service host. Transitive npm tarballs/import-time effects and full Core initialize() were not exhaustively audited; static grep is not proof of no startup traffic. Proposed host: bot-vm0, Tailscale 100.107.159.102. Measurements 2026-11-06 15:29 Europe/Prague: 11961 MiB RAM / 11078 available, zero swap used, 101 GiB disk free, 25 running services. cfx-mgmt: 47580 MiB / 19200 available, 48766 MiB swap occupied, 425 GiB free, 83 services including live STT, Forgejo, Mattermost, Hermes and inference. bot-vm0 has enough headroom for Core/Proxy and a smaller shared-service blast radius. Occupied swap is not itself proof of current pressure. Leave STT/hybrid :10443/:8766 untouched. Routing to existing bot-vm0:8810 returned HTTP401 from orchestra, braiinschestra, Hermes and brainses: routing proof only, not TDAM auth proof. Grok Bot/CoS box is off-tailnet; #38 needs a scoped authenticated tailnet gateway/connector. Neither proposed host solves that automatically. No upstream Grok adapter found; Hermes/OpenCode/Claude adapters exist. #36 scope only, no PR: native Node >=22.16 Core/Proxy services (bot-vm0 forbids Docker), bind 100.107.159.102:8420 and :8096 only; omit Panel/Knowledge initially. StateDirectory under /var/lib/tdam; SQLite online backup API, not live DB file copies. Dedicated unprivileged UIDs/resources and no global allowedTCPPorts. Default-deny app egress, with only the exact fleet LLM/auth endpoints and required DNS; no analytics/cloud model/registry/download exceptions. Pin own YAML false settings as well as explicit env, without inherited telemetry keys. Hermes handles SOPS; module accepts secret-file paths, never values. Auth/isolation gates: Core API key mandatory (default unset, gateway/server.ts:1276-1278); Proxy admin.apiKey mandatory (default empty permits admin access, routes/admin-auth.ts:8), and Proxy client auth is a separate remote verification setting, not its admin key. No fleet data exposure until that verification path works. V3_STRICT_ISOLATION defaults false (MemoryCore/src/utils/env-config.ts:204-206); require team/agent/user identity plus real project ACL authorization before production capture. A single bearer key is not project isolation. Proxy full-stage modelGate also needs all approved model IDs in creditPricing.models; its default empty table otherwise yields 400 (#36 smoke gate).
Contributor

#36 draft PR open (disabled on bot-vm0): bitpartner/nixos-llm#970

No merge/deploy. Pin/host unchanged.

#36 draft PR open (disabled on bot-vm0): https://git.bitp.cz/bitpartner/nixos-llm/pulls/970 No merge/deploy. Pin/host unchanged.
Sign in to join this conversation.
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
donach/openmausbot#35
No description provided.