Skip to content

EPIC: one service account for every taOS-owned service (taos), finishing the /opt/taos move first #2073

Description

@jaylfc

Problem

taOS-owned services currently run under three different accounts, and nothing enforces a policy:

service runs as install / data
tinyagentos (controller) taos /opt/taos
taosmd serve (memory + A2A bus) jay /home/jay/taosmd, /home/jay/.taosmd
qmd jay -
rkllama root /root/rkllama

This is not cosmetic. It produced a real production defect on 2026-07-20: the Library writes its collections handoff directory as taos under /opt/taos/data (mode 700), while taosmd indexes as jay, so taosmd could not traverse to the directory at all and every create failed with a PermissionError before any allowed_roots check. Patched with group traversal plus a setgid shared dir, which works but is a workaround for the account split, not a fix. The same class already bit us once before with the agent-commons mirror (relocated to /srv because taos cannot traverse /home/jay).

Root cause: cross-service file handoffs are only sane when producer and consumer share an account (or an explicit, documented group contract). We have neither by policy, only by accident.

Goal

Every taOS-owned service runs as taos, with installs and data under taos-owned paths, so file handoffs between services need no group gymnastics and deployment is repeatable rather than hand-tuned per service.

Hard prerequisite

Finish the /opt/taos move first (#156 is half-done). getent passwd taos still reports home /opt/tinyagentos. Relocating any service into taos-owned space before that is resolved bakes the stale path in deeper.

Sequencing (each step independently verifiable)

  1. Finish Cross-node conversation summarization: idle CPU nodes compress old context in the background #156: taos home and any remaining hardcoded /opt/tinyagentos paths move to /opt/taos.
  2. taosmd (highest value, ties to the Library handoff): relocate install + data dir + the 7.9 GB ONNX model tree out of /home/jay into taos-owned space; run taosmd.service as taos; set TAOSMD_ONNX_PATH explicitly in the service environment. Non-negotiable, see risk below. Revert the interim group-traversal patch (jay in the taos group, g+x on /opt/taos/data) once it is redundant.
  3. qmd: same treatment, currently jay.
  4. rkllama: currently root, which is the worst of the three. Needs its own assessment (NPU device node permissions may be why it is root - confirm before demoting).
  5. Policy + docs: a short service-account contract in the repo, and every new managed backend registers under it by default. This is what makes the backend-service-management slice repeatable instead of per-service bespoke.

Risk that must be respected at step 2

Moving the ONNX model path is the exact trigger for taosmd store-mode poisoning: if the model does not resolve at the moment of the first post-move request, the vector store is permanently stamped embedder=qmd:qmd and serve raises on every later boot. Procedure: cold backup of the data dir, explicit TAOSMD_ONNX_PATH, then verify store_meta reads embedder=minilm-onnx after the first real request (recovery is deleting the marker row, but only clean if nothing was ingested in the poisoned window).

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestinfrastructureBuild system, CI, deploymentkilo-auto-fixAuto-generated label by Kilokilo-triagedAuto-generated label by KilomodelsModel management and inferencenpu-rk3588RK3588 NPU worksecuritySecurity improvements

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions